/**
 * Styles pour l'auto-complétion des villes
 */

.location-autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 5px 5px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    margin-top: -1px;
}

.location-autocomplete ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.location-autocomplete li {
    padding: 12px 15px;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.location-autocomplete li:last-child {
    border-bottom: none;
}

.location-autocomplete li:hover {
    background: #f8f9fa;
}

.location-autocomplete li strong {
    color: #0A0E27;
    font-weight: 600;
}

.location-autocomplete li .count {
    color: #666;
    font-size: 13px;
    margin-left: 8px;
}

/* Wrapper pour l'input location */
.location-input-wrapper {
    position: relative;
    width: 100%;
}

/* Villes sélectionnées - à l'intérieur du champ */
.selected-cities {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px 6px 2px 6px;
    min-height: 0;
}

.selected-cities:empty {
    display: none;
}

/* Ajuster l'input quand il y a des tags */
.location-input-wrapper input[type="text"] {
    width: 100%;
}

.selected-cities:not(:empty) + input[type="text"] {
    padding-top: 6px !important;
}

.city-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #30D54A;
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    pointer-events: auto;
}

.city-tag i {
    cursor: pointer;
    font-size: 12px;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.city-tag i:hover {
    opacity: 1;
}

/* Conteneur du formulaire */
.form-group {
    position: relative;
}

/* Responsive */
@media (max-width: 768px) {
    .location-autocomplete {
        max-height: 200px;
    }
    
    .selected-cities {
        margin-top: 8px;
    }
    
    .city-tag {
        font-size: 13px;
        padding: 5px 10px;
    }
}

/* Animation d'apparition */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.location-autocomplete {
    animation: slideDown 0.2s ease;
}

/* Scrollbar personnalisée */
.location-autocomplete::-webkit-scrollbar {
    width: 8px;
}

.location-autocomplete::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 0 0 5px 0;
}

.location-autocomplete::-webkit-scrollbar-thumb {
    background: #30D54A;
    border-radius: 4px;
}

.location-autocomplete::-webkit-scrollbar-thumb:hover {
    background: #28b83f;
}
