/* ========================================
   FORMS CSS - VILLAGE PROFILE
   Khusus untuk history_form dan official_form
   ======================================== */

/* Period Inputs */
.period-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

@media (max-width: 768px) {
    .period-inputs {
        grid-template-columns: 1fr;
    }
}

/* Character Counter */
.character-count {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.5rem;
}

.character-count.warning {
    color: #ffc107;
}

.character-count.danger {
    color: #dc3545;
}

/* Summernote Editor Customization */
.note-editor {
    border: 2px solid #e9ecef;
    border-radius: 0.5rem;
    overflow: hidden;
}

.note-editor.note-frame .note-editing-area .note-editable {
    padding: 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #495057;
    min-height: 200px;
}

.note-editor.note-frame .note-toolbar {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 0.5rem;
}

.note-editor.note-frame .note-toolbar .note-btn {
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    margin: 0 0.125rem;
    padding: 0.25rem 0.5rem;
    background: white;
    color: #495057;
    transition: all 0.2s ease;
}

.note-editor.note-frame .note-toolbar .note-btn:hover,
.note-editor.note-frame .note-toolbar .note-btn.active {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

/* Penduduk Search Dropdown */
.penduduk-search-container {
    position: relative;
}

.penduduk-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ced4da;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.penduduk-item {
    padding: 12px 15px;
    border-bottom: 1px solid #f8f9fa;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.penduduk-item:hover {
    background-color: #f8f9fa;
}

.penduduk-item:last-child {
    border-bottom: none;
}

.penduduk-name {
    font-weight: 600;
    color: #495057;
    margin-bottom: 4px;
}

.penduduk-details {
    font-size: 0.8rem;
    color: #6c757d;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.penduduk-detail {
    display: flex;
    align-items: center;
    gap: 4px;
}

.penduduk-detail i {
    font-size: 0.75rem;
    width: 12px;
}

.penduduk-info {
    overflow: hidden;
}

.penduduk-no-results {
    padding: 20px;
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

.penduduk-loading {
    padding: 20px;
    text-align: center;
    color: #6c757d;
}

.penduduk-loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Image Upload Styles */
.image-upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
    margin-bottom: 1rem;
}

.image-upload-area:hover {
    border-color: #007bff;
    background-color: #e3f2fd;
}

.image-upload-area i {
    font-size: 2rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.image-upload-area p {
    margin: 0.5rem 0;
    color: #495057;
    font-weight: 500;
}

.image-upload-area small {
    color: #6c757d;
    font-size: 0.875rem;
}

.image-preview {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
    display: none;
}

.image-preview.show {
    display: block;
}

/* Drag and Drop States */
.image-upload-area.dragover {
    border-color: #007bff;
    background-color: #e3f2fd;
    transform: scale(1.02);
}

.image-upload-area.dragenter {
    border-color: #28a745;
    background-color: #d4edda;
}

