/* Location Selector Component Styles */

/* Ensure the selector inherits font styles from parent form */
#location-selector-container .form-select,
#location-selector-container .form-input,
#modal-location-selector-container .form-select,
#modal-location-selector-container .form-input {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    height: auto; /* Ensure proper height calculation with padding */
}

/* Municipality group specific styles */
.municipality-group {
    position: relative;
}

/* Municipality input wrapper - matches password input wrapper style */
.municipality-input-wrapper {
    position: relative;
    /* Ensure dropdown is positioned relative to this wrapper */
}

.municipality-input-wrapper .form-input {
    padding-right: 45px;
}

/* Search button - matches password toggle style */
.municipality-search-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 5px;
    font-size: 16px;
    z-index: 1;
    transition: color 0.2s;
}

.municipality-search-btn:hover:not(:disabled) {
    color: #374151;
}

.municipality-search-btn:disabled {
    cursor: not-allowed;
    opacity: 0.3;
    color: #d1d5db;
}

/* Municipality dropdown */
.municipality-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 250px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08), 0 6px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
}

/* Municipality items */
.municipality-item {
    padding: 10px 14px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
    color: #374151;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.municipality-item:hover {
    background-color: #f9fafb;
}

.municipality-item.selected {
    background-color: #eff6ff;
    color: #003b5a;
    font-weight: 500;
}

.municipality-item:last-child {
    border-bottom: none;
}

/* Municipality item name and code */
.municipality-item-name {
    font-weight: 500;
    color: inherit;
}

.municipality-item-code {
    font-size: 12px;
    color: #9ca3af;
    margin-left: 8px;
    font-weight: 400;
}

/* No results message */
.no-results {
    padding: 14px;
    text-align: center;
    color: #9ca3af;
    font-style: italic;
    font-size: 13px;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Scrollbar styling for dropdown */
.municipality-dropdown::-webkit-scrollbar {
    width: 6px;
}

.municipality-dropdown::-webkit-scrollbar-track {
    background: #f9fafb;
    border-radius: 3px;
}

.municipality-dropdown::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.municipality-dropdown::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Focus states for accessibility */
.municipality-item:focus {
    outline: 2px solid #60a5fa;
    outline-offset: -2px;
}

/* Mobile adjustments */
@media (max-width: 767px) {
    .municipality-dropdown {
        max-height: 200px;
    }
}