/* ======================================================================
   MOVEEASY24 - ORTSBEZOGENE STADT-SUCHE STYLING
   Custom CSS für City-Search Komponente
   ====================================================================== */

/* Search Container */
#citySearch {
    transition: all 0.3s ease;
}

#citySearch:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Suchergebnis-Box */
#searchResult {
    border-radius: 8px;
    animation: slideDown 0.3s ease;
}

#searchResult.hidden {
    display: none;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Auto-Complete Suggestions */
#suggestions {
    border-radius: 8px;
    animation: fadeIn 0.2s ease;
}

#suggestions.hidden {
    display: none;
}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #e5e7eb;
}

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

.suggestion-item:hover {
    background: #eff6ff;
    padding-left: 20px;
}

.suggestion-item strong {
    color: #1f2937;
    font-weight: 600;
}

.suggestion-item .text-gray-500 {
    font-size: 0.875rem;
    margin-left: 8px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Mobile Optimierung */
@media (max-width: 640px) {
    #citySearch {
        font-size: 16px; /* Verhindert Auto-Zoom auf iOS */
    }
    
    .suggestion-item {
        padding: 10px 12px;
    }
}

/* Search Button Hover-Effekt */
button[onclick="searchCity()"] {
    position: relative;
    overflow: hidden;
}

button[onclick="searchCity()"]::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button[onclick="searchCity()"]:hover::before {
    width: 300px;
    height: 300px;
}

/* Beliebte Städte Tags */
.mt-4 a[href^="/umzugsfirma"] {
    display: inline-block;
    transition: all 0.2s ease;
}

.mt-4 a[href^="/umzugsfirma"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Pulsing Animation für Search-Box */
@keyframes pulse-search {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(59, 130, 246, 0);
    }
}

.mt-8.bg-white\/95 {
    animation: pulse-search 3s ease-in-out infinite;
}

/* Loading State */
#citySearch.loading {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Success/Error States */
#searchResult.success {
    background: #d1fae5;
    border-color: #10b981;
    color: #065f46;
}

#searchResult.error {
    background: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
}

#searchResult.warning {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
}
