/* ==========================================
   STYLES POUR LE COMPOSANT LOCATION PICKER
   Utilise les couleurs du thème principal
   ========================================== */

.location-picker {
    position: relative;
}

.location-picker .search-container {
    position: relative;
}

.location-picker .input-group {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    overflow: hidden;
}

.location-picker .input-group-text {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.location-picker .form-control {
    border: none;
    border-radius: 0;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.location-picker .form-control:focus {
    box-shadow: none;
    border-color: var(--primary-color);
}

.location-picker .btn-outline-secondary {
    border: none;
    background-color: var(--light-gray);
    color: var(--dark-gray);
    border-left: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.location-picker .btn-outline-secondary:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.location-picker .btn-outline-secondary:disabled {
    background-color: var(--secondary-gray);
    color: white;
    cursor: not-allowed;
}

/* Suggestions de recherche */
#search-suggestions {
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 0.5rem 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background-color: white;
}

.suggestion-item {
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    border-bottom: 1px solid #f8f9fa;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background-color: var(--primary-color);
    color: white;
}

.suggestion-item:hover .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

.suggestion-item .fw-bold {
    font-size: 0.95rem;
}

.suggestion-item .text-muted {
    font-size: 0.85rem;
    line-height: 1.3;
}

/* Carte interactive */
#location-map {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

#location-map:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}



/* Instructions */
.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #17a2b8;
}

.alert-info ul {
    padding-left: 1.5rem;
}

.alert-info li {
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.alert-info li:last-child {
    margin-bottom: 0;
}

/* Responsive design */
@media (max-width: 768px) {
    .location-picker .input-group {
        flex-direction: column;
    }
    
    .location-picker .input-group-text {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 0.5rem 0.5rem 0 0;
    }
    
    .location-picker .form-control {
        border-radius: 0;
        border-bottom: 1px solid #dee2e6;
    }
    
    .location-picker .btn-outline-secondary {
        border-left: none;
        border-top: 1px solid #dee2e6;
        border-radius: 0 0 0.5rem 0.5rem;
    }
    
    #location-info .row {
        flex-direction: column;
    }
    
    #location-info .col-md-6 {
        margin-bottom: 1rem;
    }
    
    #location-info .col-md-6:last-child {
        margin-bottom: 0;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.location-picker .alert {
    animation: fadeInUp 0.4s ease-out;
}

/* États de chargement */
.location-picker .btn-outline-secondary:disabled {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Amélioration de l'accessibilité */
.location-picker .form-control:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.location-picker .btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Mode sombre */
[data-theme="dark"] .location-picker .form-control {
    background-color: var(--bg-light);
    color: var(--dark-gray);
    border-color: var(--border-gray);
}

[data-theme="dark"] #search-suggestions {
    background-color: var(--bg-light);
    border-color: var(--border-gray);
}

[data-theme="dark"] .suggestion-item {
    background-color: var(--bg-light);
    color: var(--dark-gray);
    border-color: var(--border-gray);
}

[data-theme="dark"] .suggestion-item:hover {
    background-color: var(--primary-color);
    color: white;
}

[data-theme="dark"] .alert-info {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: var(--bg-white);
    border-left-color: var(--primary-color);
}


