/* ------------------- */
/* SUCHFUNKTION STYLES */
/* ------------------- */

.search-overlay {
    position: fixed;
    right: -25%;
    top: 0;
    width: 25%;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 15px rgba(0,0,0,0.2);
    transition: right 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.search-overlay.active {
    right: 0;
}

.close-btn {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 24px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
    z-index: 1002;
    color: #666;
}

.search-container {
    padding: 60px 20px 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#search-input {
    width: calc(100% - 30px);
    padding: 15px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 25px;
    margin: 0 15px;
    transition: border-color 0.3s ease;
}

#search-input:focus {
    border-color: #969696;
    outline: none;
}

.search-results {
    order: 1;
    max-height: 60vh;
    overflow-y: auto;
    padding: 0 15px;
}

.search-results a {
    display: block;
    padding: 15px;
    margin: 10px 0;
    background: #f9f9f9;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: background 0.2s ease;
}

.search-results a:hover {
    background: #f1f1f1;
}

.search-examples {
    order: 2;
    margin-top: -10px;
    padding: 15px;
    border-top: 1px solid #eee;
}

.example-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.example-list li {
    padding: 12px 15px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 8px;
    margin: 5px 0;
    display: flex;
    align-items: center;
}

.example-list li:hover {
    background: #f5f5f5;
    color: #000;
}

.example-list li::before {
    content: "🔍";
    margin-right: 10px;
    font-size: 0.9em;
    opacity: 0.7;
}

.search-toggle {
    position: fixed;
    bottom: 30px;
    right: 20px;
    background: #c2c2c2;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Mobile Styles ZUERST (Media-Query-Reihenfolge korrigieren) */
@media (max-width: 768px) {
    /* ... bestehende 768px Styles ... */
}

/* SPEZIFISCHE 390px-ANPASSUNGEN (muss NACH allgemeinen Mobile-Styles kommen) */
@media (max-width: 390px) {
    .search-toggle {
        width: 55px !important; 
        height: 55px !important;
        bottom: 25px;
        right: 25px;
    }
    
    .search-toggle::after {
        font-size: 25px !important; 
        transform: scale(1.5) translateY(2px); /* Skalierung + manuelle Korrektur */
    }
    
    /* Overlay-Anpassungen für kleine Screens */
    .search-overlay {
        right: -100%; /* Vollbild auf Mobilgeräten */
        width: 100%;
    }
    
    .search-overlay.active {
        right: 0 !important;
    }
}



.search-toggle:hover {
    transform: scale(1.1);
    background: #969696;
}

.search-toggle::after {
    content: "🔍";
    font-size: 28px;
    color: white;
}

.search-toggle.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(100px);
    pointer-events: none;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .search-overlay {
        width: 100%;
        right: -100%;
    }
    
    .search-container {
        padding: 80px 15px 15px;
    }

    #search-input {
        font-size: 18px;
        padding: 20px;
        border-radius: 30px;
    }

    .example-list li {
        padding: 15px;
        font-size: 16px;
    }

    .close-btn {
        right: 25px;
        top: 25px;
        font-size: 32px;
    }

    .search-toggle {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
}

/* Zusätzliche Hilfsklassen */
.no-results {
    text-align: center;
    color: #666;
    padding: 20px;
}

.hidden {
    display: none !important;
}