/* ========================================
   Validation Panel Styles
   ======================================== */

.validation-panel {
    margin: 1rem 0;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.validation-panel.has-errors {
    border-color: #dc3545;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.15);
}

.validation-panel.has-warnings {
    border-color: #ffc107;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.15);
}

.validation-panel.has-success {
    border-color: #28a745;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.15);
}

.validation-panel .panel-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
    user-select: none;
    background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
    border-radius: 6px 6px 0 0;
    transition: background 0.2s ease;
}

.validation-panel .panel-header:hover {
    background: linear-gradient(to bottom, #e9ecef, #dee2e6);
}

.validation-panel .panel-header .icon {
    font-size: 1.5rem;
}

.validation-panel .panel-header .title {
    flex: 1;
    font-weight: 600;
    font-size: 1.1rem;
    color: #212529;
}

.validation-panel .panel-header .toggle {
    font-size: 1rem;
    color: #6c757d;
    transition: transform 0.3s ease;
}

.validation-panel.collapsed .panel-header .toggle {
    transform: rotate(0deg);
}

.validation-panel.expanded .panel-header .toggle {
    transform: rotate(180deg);
}

.validation-panel .panel-content {
    padding: 1.5rem;
    border-top: 1px solid #dee2e6;
}

.validation-panel .success-message {
    text-align: center;
    padding: 3rem 2rem;
    color: #28a745;
}

.validation-panel .success-message .success-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
}

.validation-panel .success-message h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #28a745;
}

.validation-panel .success-message p {
    color: #6c757d;
    font-size: 1rem;
}

.validation-panel .error-section {
    margin-bottom: 2rem;
}

.validation-panel .error-section:last-child {
    margin-bottom: 0;
}

.validation-panel .section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-left: 4px solid #0d6efd;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
}

.validation-panel .section-header .section-icon {
    font-size: 1.2rem;
}

.validation-panel .error-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.validation-panel .error-item {
    padding: 1rem;
    border-radius: 6px;
    border-left: 4px solid;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}

.validation-panel .error-item:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.validation-panel .error-item.error {
    border-left-color: #dc3545;
    background: #fff5f5;
}

.validation-panel .error-item.warning {
    border-left-color: #ffc107;
    background: #fffbf0;
}

.validation-panel .error-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.validation-panel .error-icon {
    font-size: 1.2rem;
}

.validation-panel .error-entity {
    padding: 0.25rem 0.5rem;
    background: #e9ecef;
    border-radius: 4px;
    font-size: 0.875rem;
    font-family: 'Courier New', monospace;
}

.validation-panel .error-field {
    padding: 0.25rem 0.5rem;
    background: #dee2e6;
    border-radius: 4px;
    font-size: 0.875rem;
    font-family: 'Courier New', monospace;
}

.validation-panel .error-message {
    color: #212529;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.validation-panel .error-details {
    margin-top: 0.25rem;
    color: #6c757d;
    font-size: 0.875rem;
}

.validation-panel .error-details code {
    padding: 0.125rem 0.375rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 3px;
    font-size: 0.875rem;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .validation-panel {
        border-width: 3px;
    }

    .validation-panel.has-errors {
        border-color: #dc3545;
    }

    .validation-panel.has-warnings {
        border-color: #ffc107;
    }

    .validation-panel.has-success {
        border-color: #28a745;
    }

    .validation-panel .error-item.error {
        border-left-color: #dc3545;
        border-left-width: 6px;
        background: Canvas;
        color: CanvasText;
    }

    .validation-panel .error-item.warning {
        border-left-color: #ffc107;
        border-left-width: 6px;
        background: Canvas;
        color: CanvasText;
    }

    .validation-panel .error-entity,
    .validation-panel .error-field {
        background: ButtonFace;
        border: 1px solid ButtonText;
        color: ButtonText;
    }

    .validation-panel .section-header {
        border-left-width: 6px;
        background: Canvas;
        color: CanvasText;
    }

    .validation-panel .panel-header {
        background: ButtonFace;
        color: ButtonText;
        border-bottom: 2px solid ButtonText;
    }
}

/* ========================================
   Base Editable Field Styles
   ======================================== */

.editable-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    position: relative;
    border: 2px solid transparent;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.editable-field:hover {
    background-color: #f8f9fa;
}

.editable-field__label {
    font-weight: 600;
    font-size: 0.875rem;
    color: #495057;
    margin-bottom: 0.25rem;
}

.editable-field__label .required {
    color: #dc3545;
    margin-left: 0.125rem;
}

.editable-field__label .info-icon {
    margin-left: 0.5rem;
    cursor: help;
    font-size: 0.875rem;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.editable-field__label .info-icon:hover {
    opacity: 1;
}

.editable-field__value {
    cursor: pointer;
    border-radius: 4px;
    color: #212529;
}

.editable-field__value:hover {
    background-color: #e9ecef;
}

.editable-field__input,
.editable-field select {
    width: 100%;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1rem;
    color: #495057;
}

.editable-field__input:focus,
.editable-field select:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* State: Editing */
.editable-field--editing {
    background-color: #fff;
    border-color: #80bdff;
}

/* State: Dirty (unsaved changes) */
.editable-field--dirty {
    border-color: #ffc107;
    background-color: #fff8e1;
}

.editable-field--dirty .editable-field__value::after {
    content: " ●";
    color: #ffc107;
    margin-left: 0.5rem;
}

/* State: Invalid */
.editable-field--invalid {
    border-color: #dc3545;
    background-color: #f8d7da;
}

.editable-field__errors {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.25rem;
}

.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    font-weight: 500;
}

/* State: Disabled */
.editable-field--disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.editable-field--disabled .editable-field__value {
    cursor: not-allowed;
}

/* Dropdown specific styles */
.editable-dropdown {
    /* Inherits from .editable-field */
    position: relative;
}

.dropdown-editor {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    background: white;
    border: 1px solid #80bdff;
    border-radius: 4px;
    padding: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-top: 2px;
}

.dropdown-filter {
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

.dropdown-select {
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    background: white;
}

/* Ensure parent containers don't clip dropdown */
.info-card,
.card-body,
.info-row {
    overflow: visible !important;
}

.btn-clear {
    align-self: flex-start;
    padding: 0.25rem 0.5rem;
    border: 1px solid #6c757d;
    border-radius: 4px;
    background-color: #fff;
    color: #6c757d;
    cursor: pointer;
}

.btn-clear:hover {
    background-color: #6c757d;
    color: #fff;
}

/* Composite component styles */
.editable-coordinates,
.editable-address {
    /* Inherits from .editable-field */
}

.composite-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: #495057;
    /*margin-bottom: 0.5rem;*/
}

.composite-value {
    cursor: pointer;
    /*padding: 0.5rem;*/    
    border-radius: 4px;
    color: #212529;
}

.coordinate-grid,
.address-grid {
    display: grid;
    gap: 0.75rem;
}

.coordinate-grid {
    grid-template-columns: 1fr 1fr 1fr;
}

.address-grid {
    grid-template-columns: 1fr;
}

.field-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 0.75rem;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.field-group label {
    font-size: 0.75rem;
    color: #6c757d;
    font-weight: 500;
}

.field-group input,
.field-group select {
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

.field-group input.dirty {
    border-color: #ffc107;
    background-color: #fff8e1;
}

.field-group input.invalid {
    border-color: #dc3545;
    background-color: #f8d7da;
}

.field-error {
    color: #dc3545;
    font-size: 0.75rem;
}

.button-group {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.btn-save,
.btn-cancel {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.btn-save {
    background-color: #28a745;
    color: #fff;
}

.btn-save:hover {
    background-color: #218838;
}

.btn-cancel {
    background-color: #6c757d;
    color: #fff;
}

.btn-cancel:hover {
    background-color: #5a6268;
}

/* Dirty state indicators for table rows */
.dirty-row {
    background-color: #fff8e1 !important;
    border-left: 4px solid #ffc107;
}

.dirty-row:hover {
    background-color: #fff3cd !important;
}

/* Dirty state for overview component */
.dirty-state {
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 1rem;
    background-color: #fffbf0;
}

.dirty-state::before {
    content: "⚠ Niet opgeslagen wijzigingen";
    display: block;
    padding: 0.5rem 1rem;
    margin: -1rem -1rem 1rem -1rem;
    background-color: #ffc107;
    color: #212529;
    font-weight: 600;
    border-radius: 6px 6px 0 0;
}

/* State: Error (failed to load) */
.editable-field--error {
    border-color: #dc3545;
    background-color: #fff5f5;
}

.editable-field__value--error {
    color: #dc3545;
    cursor: pointer;
}

.editable-field__value--error:hover {
    background-color: #f8d7da;
    text-decoration: underline;
}

/* EditableLookupField specific styles */
.editable-lookup .dropdown-container {
    position: relative;
}

.editable-lookup .dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 250px;
    overflow-y: auto;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.editable-lookup .dropdown-item {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.editable-lookup .dropdown-item:hover {
    background-color: #e9ecef;
}

.editable-lookup .dropdown-item:last-child {
    border-bottom: none;
}

.editable-lookup .dropdown-info {
    padding: 0.5rem 0.75rem;
    color: #6c757d;
    font-size: 0.875rem;
    font-style: italic;
    background-color: #f8f9fa;
}

.editable-lookup .editable-field__select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1rem;
    color: #495057;
    background-color: #fff;
}

/* EditableDepth specific styles */
.editable-depth .depth-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.75rem;
    align-items: end;
}

.editable-depth .depth-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

/* EditablePersonName specific styles */
.editable-person-name .person-grid {
    display: grid;
    padding: 0.4rem;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    align-items: end;
}

.editable-person-name .person-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

/* Focus visible styles for accessibility */
.editable-field__value:focus-visible,
.composite-value:focus-visible {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

.editable-lookup .dropdown-item:focus-visible {
    outline: 2px solid #0d6efd;
    outline-offset: -2px;
    background-color: #e9ecef;
}

/* Screen reader only class */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .coordinate-grid {
        grid-template-columns: 1fr;
    }

    .field-row {
        grid-template-columns: 1fr;
    }

    .editable-depth .depth-grid {
        grid-template-columns: 1fr;
    }

    .editable-person-name .person-grid {
        grid-template-columns: 1fr;
    }
}

/* Editor Toolbar Styles */
.editor-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.editor-toolbar .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.editor-toolbar .btn-icon {
    font-size: 1rem;
}

.editor-toolbar .btn.btn-primary {
    background-color: #0d6efd;
    color: #fff;
}

.editor-toolbar .btn.btn-primary:hover:not(:disabled) {
    background-color: #0b5ed7;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.3);
}

.editor-toolbar .btn.btn-secondary {
    background-color: #6c757d;
    color: #fff;
}

.editor-toolbar .btn.btn-secondary:hover:not(:disabled) {
    background-color: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

.editor-toolbar .btn.btn-success {
    background-color: #28a745;
    color: #fff;
}

.editor-toolbar .btn.btn-success:hover:not(:disabled) {
    background-color: #218838;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.editor-toolbar .btn.btn-info {
    background-color: #17a2b8;
    color: #fff;
}

.editor-toolbar .btn.btn-info:hover:not(:disabled) {
    background-color: #138496;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(23, 162, 184, 0.3);
}

.editor-toolbar .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.editor-toolbar .btn .badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.375rem;
    margin-left: 0.375rem;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Unsaved Changes Banner */
.unsaved-changes-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid #ffc107;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 6px rgba(255, 193, 7, 0.2);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.unsaved-changes-banner .banner-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.unsaved-changes-banner .banner-text {
    flex: 1;
    font-weight: 600;
    color: #856404;
    font-size: 0.875rem;
}

.unsaved-changes-banner .btn {
    padding: 0.375rem 0.875rem;
    font-size: 0.875rem;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.unsaved-changes-banner .btn.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.8125rem;
}

.unsaved-changes-banner .btn-success {
    background-color: #28a745;
    color: #fff;
}

.unsaved-changes-banner .btn-success:hover {
    background-color: #218838;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.unsaved-changes-banner .btn-secondary {
    background-color: #6c757d;
    color: #fff;
}

.unsaved-changes-banner .btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.3);
}

/* Responsive adjustments for toolbar */
@media (max-width: 768px) {
    .editor-toolbar {
        flex-wrap: wrap;
    }

    .editor-toolbar .btn {
        flex: 1;
        min-width: 0;
        justify-content: center;
    }

    .unsaved-changes-banner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .unsaved-changes-banner .banner-text {
        margin-bottom: 0.5rem;
    }

    .unsaved-changes-banner .btn {
        width: 100%;
    }
}

/* ==============================================
   Field Type Indicators - Edit Mode Visual Cues
   ============================================== */

/* Common styles for field type indicators */
.editable-field__dropdown-value,
.editable-field__text-value,
.editable-field__multi-value {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    cursor: pointer;
}

/* Text input indicator (pencil icon) */
.editable-field__text-value {
    border-bottom: 1px dashed #ced4da;
}

.editable-field__text-value .text-value-content {
    flex: 1;
}

.editable-field__text-value .text-indicator {
    color: #6c757d;
    font-size: 0.75rem;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.editable-field__text-value:hover .text-indicator {
    opacity: 1;
    color: #0066CC;
}

/* Multiline text value (for TextArea) */
.editable-field__text-value--multiline {
    align-items: flex-start;
    border: 1px dashed #ced4da;
    border-radius: 4px;
    padding: 0.5rem;
    min-height: 3rem;
}

.text-value-content--multiline {
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.5;
}

/* Textarea styling */
.editable-field__textarea {
    width: 100%;
    min-height: 80px;
    padding: 0.5rem;
    font-family: inherit;
    font-size: inherit;
    line-height: 1.5;
    border: 1px solid #80bdff;
    border-radius: 4px;
    resize: vertical;
}

.editable-field__textarea:focus {
    outline: none;
    border-color: #0066CC;
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.15);
}

/* Dropdown indicator (caret-down icon) */
.editable-field__dropdown-value {
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    background-color: #fff;
}

.editable-field__dropdown-value .dropdown-value-text {
    flex: 1;
}

.editable-field__dropdown-value .dropdown-indicator {
    color: #6c757d;
    font-size: 0.875rem;
    transition: transform 0.2s ease, color 0.2s ease;
}

.editable-field__dropdown-value:hover {
    border-color: #0066CC;
    background-color: #f8f9fa;
}

.editable-field__dropdown-value:hover .dropdown-indicator {
    color: #0066CC;
}

/* Dropdown display container */
.dropdown-display {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    cursor: pointer;
}

/* Description label below dropdown value */
.dropdown-description-label {
    font-size: 0.8rem;
    color: #495057;
    font-style: italic;
    padding: 0.25rem 0.5rem;
    line-height: 1.4;
    background-color: #f8f9fa;
    border-left: 2px solid #0d6efd;
    margin-top: 0.125rem;
    border-radius: 0 4px 4px 0;
}

/* Multi-select indicator (list icon) */
.editable-field__multi-value {
    flex-wrap: wrap;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    background-color: #fff;
}

.editable-field__multi-value .urns-display {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    flex: 1;
}

.editable-field__multi-value .multi-indicator {
    color: #6c757d;
    font-size: 0.875rem;
    transition: color 0.2s ease;
    flex-shrink: 0;
}

.editable-field__multi-value:hover {
    border-color: #0066CC;
    background-color: #f8f9fa;
}

.editable-field__multi-value:hover .multi-indicator {
    color: #0066CC;
}

/* URN Badge styling for multi-select */
.urn-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.5rem;
    background: linear-gradient(135deg, #e8f4f8 0%, #d4edff 100%);
    color: #0066CC;
    border: 1px solid #b8daff;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

.urn-badge:hover {
    background: linear-gradient(135deg, #d4edff 0%, #b8daff 100%);
}

/* No value placeholder */
.editable-field__multi-value .no-value,
.editable-field__dropdown-value .no-value,
.text-value-content--placeholder {
    color: #6c757d;
    font-style: italic;
}

/* ========================================
   Locaties Table Detail Panel Styles
   ======================================== */

/* Full-width info rows (for Description, Remarks) */
.info-row-fullwidth {
    grid-column: 1 / -1 !important;
    flex-direction: column !important;
    align-items: stretch !important;
}

.info-row-fullwidth .label {
    margin-bottom: 0.5rem;
}

.info-row-fullwidth .value {
    width: 100%;
}

.info-row-fullwidth .value .editable-field {
    width: 100%;
}

.info-row-fullwidth .value .editable-field textarea {
    width: 100%;
    min-height: 80px;
}

/* Address grid - 2 columns */
.address-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.address-grid-2col .address-item {
    display: flex;
    align-items: center;
}

.address-grid-2col .reference-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #495057;
}

.address-grid-2col .reference-badge i {
    color: #6c757d;
}

@media (max-width: 768px) {
    .address-grid-2col {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Lookup Field with Group Filter - Compact Design
   ======================================== */

.dropdown-container--grouped {
    position: relative;
}

/* Main search row - all elements inline */
.lookup-search-row {
    display: flex;
    align-items: stretch;
    gap: 1px;
    background: #ced4da;
    border-radius: 6px;
    overflow: hidden;
}

/* Category select */
.lookup-group-select {
    flex: 0 0 auto;
    min-width: 100px;
    max-width: 180px;
    padding: 0.5rem 0.6rem;
    font-size: 0.8rem;
    border: none;
    background: #f8f9fa;
    color: #495057;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.lookup-group-select:hover:not(:disabled) {
    background: #e9ecef;
}

.lookup-group-select:focus {
    outline: none;
    background: #e9ecef;
}

.lookup-group-select:disabled {
    background: #e9ecef;
    color: #adb5bd;
    cursor: not-allowed;
}

/* Search input container */
.lookup-search-input {
    flex: 1;
    display: flex;
    align-items: center;
    background: #fff;
    min-width: 0;
}

.lookup-search-input i {
    padding: 0 0.6rem;
    color: #adb5bd;
    font-size: 0.8rem;
}

.lookup-search-input input {
    flex: 1;
    padding: 0.5rem 0.5rem 0.5rem 0;
    font-size: 0.85rem;
    border: none;
    background: transparent;
    color: #212529;
    min-width: 0;
}

.lookup-search-input input:focus {
    outline: none;
}

.lookup-search-input input::placeholder {
    color: #adb5bd;
}

/* Action buttons */
.lookup-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    min-height: 38px;
    padding: 0;
    border: none;
    cursor: pointer;
    transition: filter 0.15s ease;
}

.lookup-btn-icon {
    font-size: 1.1rem;
    color: #fff;
    font-weight: bold;
    line-height: 1;
}

.lookup-btn:hover:not(:disabled) {
    filter: brightness(1.1);
}

.lookup-btn:active:not(:disabled) {
    filter: brightness(0.95);
}

.lookup-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.lookup-btn--save {
    background: #28a745;
}

.lookup-btn--cancel {
    background: #fd7e14;
}

/* Dropdown results info */
.dropdown-results-info {
    padding: 0.4rem 0.75rem;
    font-size: 0.7rem;
    color: #6c757d;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.dropdown-results-filter {
    font-weight: 500;
    color: #0d6efd;
}

/* Dropdown info improvements */
.dropdown-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dropdown-info i {
    color: #6c757d;
}

.dropdown-info--empty {
    justify-content: center;
    padding: 1rem;
    color: #6c757d;
}

.dropdown-info--empty i {
    font-size: 1rem;
}

/* Dropdown item with group badge */
.dropdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.dropdown-item-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-item-group {
    flex-shrink: 0;
    font-size: 0.65rem;
    padding: 0.1rem 0.35rem;
    background: linear-gradient(135deg, #e7f1ff 0%, #cfe2ff 100%);
    border: 1px solid #b6d4fe;
    border-radius: 3px;
    color: #084298;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ========================================
   Vervallen (Deprecated) Status Styles
   ======================================== */

/* Status indicator in the dropdown value display (view mode) */
.dropdown-value-status {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    margin-left: 0.35rem;
}

.dropdown-value-status--vervallen {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeeba 100%);
    border: 1px solid #ffc107;
    color: #856404;
}

/* Status indicator in dropdown items */
.dropdown-item-status {
    flex-shrink: 0;
    font-size: 0.65rem;
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    margin-left: 0.25rem;
}

.dropdown-item-status--vervallen {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeeba 100%);
    border: 1px solid #ffc107;
    color: #856404;
}

/* Styling for dropdown items that are vervallen */
.dropdown-item--vervallen {
    background: linear-gradient(135deg, #fffbf0 0%, #fff8e6 100%);
    border-left: 3px solid #ffc107;
}

.dropdown-item--vervallen:hover {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeeba 100%);
}

.dropdown-item--vervallen .dropdown-item-text {
    color: #856404;
    font-style: italic;
}


/* ========================================
   User Preferences: Hide Field Descriptions
   ======================================== */

/* Hide dropdown description labels when user preference is disabled */
/* Applied to body element via JavaScript for global effect */
body.hide-descriptions .dropdown-description-label {
    display: none !important;
}
