/* =========================================
   PREMIUM SEARCH OVERLAY (Apple Style)
   ========================================= */

.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    /* JS ile açılacak */
    align-items: flex-start;
    /* İçeriği yukarı hizala */
    justify-content: center;
    padding-top: 15vh;
}

/* JS ile tetiklenen görünürlük */
.search-overlay.show {
    display: flex;
}

/* Arka Plan (Buzlu Cam) */
.search-overlay-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    transition: opacity 0.3s ease;
    cursor: pointer;
}

/* Dark Mode Arka Plan */
[data-theme="dark"] .search-overlay-backdrop {
    background: rgba(5, 7, 10, 0.9);
}

/* İçerik Kutusu */
.search-overlay-content {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 800px;
    padding: 0 1.5rem;
    animation: slideDownFade 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDownFade {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.98);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Input Formu */
.search-form-premium {
    position: relative;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    border-bottom: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

[data-theme="dark"] .input-wrapper {
    border-color: #334155;
}

.input-wrapper:focus-within {
    border-color: var(--bs-primary);
    transform: scale(1.02);
}

/* İCON / BUTTON */
.btn-search-submit {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    transition: transform 0.2s ease;
}

.btn-search-submit:hover {
    transform: scale(1.1);
}

.btn-search-submit:active {
    transform: scale(0.95);
}

.search-icon-large {
    font-size: 2rem;
    color: #94a3b8;
    transition: color 0.3s ease;
}

/* Input doluysa veya focus varsa ikon rengi değişsin */
.input-wrapper:focus-within .search-icon-large,
.search-form-premium:valid .search-icon-large {
    color: var(--bs-primary);
}

/* INPUT ALANI */
.search-input-premium {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 2rem;
    font-weight: 600;
    color: #1e293b;
    padding: 1.5rem 0;
    outline: none;
}

[data-theme="dark"] .search-input-premium {
    color: #f8fafc;
}

.search-input-premium::placeholder {
    color: #cbd5e1;
    font-weight: 400;
}

[data-theme="dark"] .search-input-premium::placeholder {
    color: #475569;
}

/* KAPATMA BUTONU */
.btn-close-premium {
    background: transparent;
    border: none;
    color: #64748b;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-close-premium:hover {
    background: #f1f5f9;
    color: #dc2626;
    /* Kırmızı */
    transform: rotate(90deg);
}

[data-theme="dark"] .btn-close-premium:hover {
    background: #334155;
}

/* ÖNERİLER (Suggestions) */
.search-suggestions-help {
    margin-top: 1.5rem;
    font-size: 0.95rem;
    color: #64748b;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    opacity: 0;
    animation: fadeIn 0.5s ease 0.2s forwards;
    /* Gecikmeli gel */
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.search-suggestions-help span {
    font-weight: 500;
}

.search-suggestions-help a {
    color: var(--bs-primary);
    text-decoration: none;
    background: rgba(var(--bs-primary-rgb), 0.1);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    transition: all 0.2s;
    font-weight: 500;
}

.search-suggestions-help a:hover {
    background: var(--bs-primary);
    color: #fff;
    transform: translateY(-2px);
}

/* MOBİL İÇİN DÜZELTMELER */
@media (max-width: 768px) {
    .search-overlay {
        padding-top: 10vh;
    }

    .search-input-premium {
        font-size: 1.5rem;
        padding: 1rem 0;
    }

    .search-icon-large {
        font-size: 1.5rem;
    }
}