/**
 * WISHLIST ENRICHMENT - Styles pour l'enrichissement automatique
 * Animations et styles pour la fonctionnalité d'enrichissement des lieux
 */

/* Animation de déverrouillage des champs */
.field-unlock {
    animation: fieldUnlock 0.3s ease-out;
    border-color: #4CAF50 !important;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.3) !important;
}

@keyframes fieldUnlock {
    0% {
        transform: scale(1);
        border-color: #ddd;
    }
    50% {
        transform: scale(1.02);
        border-color: #4CAF50;
        box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
    }
    100% {
        transform: scale(1);
        border-color: #4CAF50;
        box-shadow: 0 0 5px rgba(76, 175, 80, 0.3);
    }
}

/* États des champs */
.form-field-readonly {
    background-color: #f8f9fa !important;
    color: #6c757d !important;
    cursor: not-allowed;
    border-style: dashed !important;
}

.form-field-editable {
    background-color: white !important;
    color: #333 !important;
    cursor: text;
    border-style: solid !important;
    transition: all 0.3s ease;
}

.form-field-editable:focus {
    border-color: #4CAF50 !important;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.3) !important;
}

/* Bouton d'enrichissement */
#wishlist-btn-enrich {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#wishlist-btn-enrich:hover {
    background: linear-gradient(135deg, #45a049, #3d8b40);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

#wishlist-btn-enrich:active {
    transform: translateY(0);
}

#wishlist-btn-enrich:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Animation de chargement pour le bouton */
#wishlist-btn-enrich:disabled::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 20px;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Suggestions dropdown améliorées */
.suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.suggestion-item:hover {
    background-color: #f8f9fa;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-main {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.suggestion-detail {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 4px;
}

.suggestion-country {
    font-size: 0.8em;
    color: #888;
    display: flex;
    align-items: center;
    gap: 4px;
}

.suggestion-loading,
.suggestion-no-results {
    padding: 16px;
    text-align: center;
    color: #666;
    font-style: italic;
}

.suggestion-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    #wishlist-btn-enrich {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .suggestions-dropdown {
        max-height: 200px;
    }
    
    .suggestion-item {
        padding: 10px 12px;
    }
}

/* Amélioration des hints */
.form-hint {
    font-size: var(--font-xs);
    color: var(--gray-500);
    margin-top: var(--space-1);
    min-height: 1.2rem;
    font-weight: 400;
}

.form-hint.success {
    color: #4CAF50;
    animation: fadeInSuccess 0.3s ease-out;
}

@keyframes fadeInSuccess {
    0% {
        opacity: 0;
        transform: translateY(-5px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Indicateur de progression pour l'enrichissement */
.enrichment-progress {
    position: relative;
    margin-top: 8px;
    height: 4px;
    background: #f0f0f0;
    border-radius: 2px;
    overflow: hidden;
}

.enrichment-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    border-radius: 2px;
    transition: width 0.3s ease;
    position: relative;
}

.enrichment-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: progressShine 1.5s infinite;
}

@keyframes progressShine {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}