/* --- Premium Expanding Search Bar --- */
.search-box-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    width: 38px; /* Initial icon width */
    height: 38px;
    overflow: visible; /* Allow dropdown to show outside wrapper bounds */
}

/* Active State (Expanded) */
.search-input-wrapper.active {
    width: 300px; /* Matches dropdown width */
    background: #141414;
    border-color: #333;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    overflow: visible; /* Keep visible so dropdown shows */
}

.search-input {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    color: #fff;
    padding: 0 40px 0 16px; /* Space for icons */
    font-size: 14px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.search-input-wrapper.active .search-input {
    opacity: 1;
    pointer-events: auto;
}

.search-input:focus {
    outline: none;
}

.search-icon-btn, .search-close-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: color 0.2s;
}

.search-icon-btn {
    right: 8px; /* Icon stays on right */
    width: 24px;
    height: 24px;
    z-index: 2;
}


.search-close-btn {
    right: 60px; /* Moved left — mic now sits to its right */
    font-size: 18px;
    color: #aaa;
    z-index: 3;
    width: 24px;
    height: 24px;
}

.search-mic-btn {
    position: absolute;
    top: 58%;
    transform: translateY(-50%);
    right: 36px; /* Now sits between close btn and search icon */
    width: 26px;
    height: 26px;
    border: none;
    background: transparent;
    color: #aaa;
    font-size: 20px;
    cursor: pointer;
    z-index: 3;
    display: none; /* JS will enable if supported */
    transition: color 0.2s;
}

.search-mic-btn:hover {
    color: #e50914;
}

.search-mic-btn.listening {
    color: #e50914;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: translateY(-50%) scale(1); opacity: 1; }
    50% { transform: translateY(-50%) scale(1.2); opacity: 0.8; }
    100% { transform: translateY(-50%) scale(1); opacity: 1; }
}

.search-close-btn:hover {
    color: #fff;
}

/* Suggestions Dropdown */
.search-suggestions {
    position: absolute;
    top: 100%;
    right: 0;
    width: 280px; /* Matches Expanded Input */
    background: #141414;
    border: 1px solid #333;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    z-index: 1000;
    margin-top: 4px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
}

.premium-search-header {
    padding: 10px 16px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #e50914;
    background: #1a1a1a;
    border-bottom: 1px solid #2a2a2a;
}

.premium-search-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid #222;
    text-decoration: none !important;
    transition: background 0.2s;
}

.premium-search-item:hover {
    background: #2a2a2a;
}

.search-poster {
    width: 32px;
    height: 44px;
    border-radius: 3px;
    object-fit: cover;
    margin-right: 12px;
    background: #333;
}

.search-info h6 {
    font-size: 13px;
    margin: 0;
    color: #fff;
    line-height: 1.2;
}

.search-info span {
    font-size: 11px;
    color: #999;
}

.search-empty {
    padding: 20px;
    text-align: center;
    font-size: 13px;
    color: #777;
}
 /* Premium OTT Search Dropdown Styles */
#search-suggestions {
    background: #141414; /* Deep Dark Background */
    border: 1px solid #333;
    border-top: none;
    box-shadow: 0 15px 40px rgba(0,0,0,0.7);
    backdrop-filter: blur(10px);
    border-radius: 0 0 12px 12px;
    width: 300px; /* Slightly wider for comfort */
    left: auto;
    right: 0;
    overflow: hidden;
    margin-top: 2px;
    z-index: 1060;
    display: flex;
    flex-direction: column;
    max-height: 480px; /* Cap dropdown height */
}

/* Scrollable results area inside the dropdown */
#search-suggestions .search-scroll-area {
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 400px; /* Hard cap — scroll kicks in after this */
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: #e50914 #1a1a1a;
    scroll-behavior: smooth;
}

/* Webkit custom scrollbar */
#search-suggestions .search-scroll-area::-webkit-scrollbar {
    width: 4px;
}
#search-suggestions .search-scroll-area::-webkit-scrollbar-track {
    background: #1a1a1a;
}
#search-suggestions .search-scroll-area::-webkit-scrollbar-thumb {
    background: #e50914;
    border-radius: 2px;
}
#search-suggestions .search-scroll-area::-webkit-scrollbar-thumb:hover {
    background: #ff1a1a;
}

/* Sticky section header */
#search-suggestions .premium-search-header {
    position: sticky;
    top: 0;
    z-index: 10;
}

/* View-all footer link */
.search-view-all {
    display: block;
    text-align: center;
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #e50914;
    background: #1a1a1a;
    border-top: 1px solid #2a2a2a;
    text-decoration: none !important;
    letter-spacing: 0.5px;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}
.search-view-all:hover {
    background: #222;
    color: #ff4444;
}

/* Style the input field to match the dark theme */
#search-query {
    background-color: #141414 !important;
    border: 1px solid #333 !important;
    color: #fff !important;
    padding-left: 15px;
    border-radius: 4px; /* Slightly rounded */
    height: 45px; /* Comfortable height */
}

#search-query:focus {
    background-color: #191919 !important;
    border-color: transparent !important; /* Removed red search focus border */
    box-shadow: none !important;
    color: #fff !important;
}

#search-query::placeholder {
    color: #888;
}

.premium-search-header {
    padding: 10px 16px;
    font-size: 0.7rem;
    font-weight: 800;
    color: #e50914; /* Brand Red */
    text-transform: uppercase;
    letter-spacing: 1.2px;
    background: #1a1a1a;
    border-bottom: 1px solid #2a2a2a;
}

.premium-search-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid #222;
    transition: all 0.2s ease;
    text-decoration: none !important;
    background: #141414;
    position: relative;
}

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

.premium-search-item:hover {
    background: #1f1f1f;
    padding-left: 20px; /* Subtle slide effect */
}

.premium-search-item:hover .search-title {
    color: #e50914;
}

.search-poster-container {
    position: relative;
    flex-shrink: 0;
    margin-right: 12px;
}

.search-poster {
    width: 40px;
    height: 56px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
    background-color: #333;
}

.search-info {
    flex-grow: 1;
    min-width: 0;
}

.search-title {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-meta {
    font-size: 0.7rem;
    color: #aaa;
    margin-top: 3px;
    display: flex;
    align-items: center;
    gap: 6px;
}
/* =========================================================
   QAUSAINFLIX — DESKTOP SEARCH MICROPHONE FIX
   ========================================================= */


/* =========================================================
   QAUSAINFLIX — DESKTOP SEARCH CLEAN IMPLEMENTATION
   ========================================================= */

/* =========================================================
   QAUSAINFLIX — FINAL DESKTOP SEARCH CONTROL
   Single search button / no microphone / no red ring
   ========================================================= */

@media (min-width: 1200px) {

    /* Search container */
    header > nav.navbar.iq-navbar
    .search-box-container {
        position: relative !important;
        width: 42px !important;
        height: 42px !important;
        min-width: 42px !important;
        z-index: 50 !important;
    }

    /* Wrapper NEVER draws a second border/ring */
    header > nav.navbar.iq-navbar
    .search-box-container
    .search-input-wrapper,
    header > nav.navbar.iq-navbar
    .search-box-container
    .search-input-wrapper.active {
        position: relative !important;

        width: 42px !important;
        height: 42px !important;
        min-width: 42px !important;

        background: transparent !important;

        border: 0 !important;
        outline: 0 !important;
        box-shadow: none !important;

        border-radius: 12px !important;

        overflow: visible !important;

        transition: none !important;
    }

    /* Remove browser/focus decoration from wrapper */
    header > nav.navbar.iq-navbar
    .search-box-container
    .search-input-wrapper:focus,
    header > nav.navbar.iq-navbar
    .search-box-container
    .search-input-wrapper:focus-within,
    header > nav.navbar.iq-navbar
    .search-box-container
    .search-input-wrapper.active:focus,
    header > nav.navbar.iq-navbar
    .search-box-container
    .search-input-wrapper.active:focus-within {
        border: 0 !important;
        outline: 0 !important;
        box-shadow: none !important;
    }

    /* Actual search button */
    header > nav.navbar.iq-navbar
    .search-box-container
    .search-icon-btn {
        position: absolute !important;

        top: 50% !important;
        right: 0 !important;

        transform: translateY(-50%) !important;

        width: 42px !important;
        height: 42px !important;
        min-width: 42px !important;
        min-height: 42px !important;

        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;

        padding: 0 !important;
        margin: 0 !important;

        background: rgba(255,255,255,.065) !important;

        border: 1px solid rgba(255,255,255,.10) !important;
        outline: 0 !important;
        box-shadow: none !important;

        border-radius: 12px !important;

        color: rgba(255,255,255,.92) !important;

        z-index: 100 !important;
    }

    /* Same appearance when active/focused */
    header > nav.navbar.iq-navbar
    .search-box-container
    .search-input-wrapper.active
    .search-icon-btn,
    header > nav.navbar.iq-navbar
    .search-box-container
    .search-icon-btn:focus,
    header > nav.navbar.iq-navbar
    .search-box-container
    .search-icon-btn:focus-visible,
    header > nav.navbar.iq-navbar
    .search-box-container
    .search-icon-btn:active {
        background: rgba(255,255,255,.065) !important;

        border: 1px solid rgba(255,255,255,.10) !important;

        outline: 0 !important;
        box-shadow: none !important;

        color: rgba(255,255,255,.92) !important;
    }

    /* Hover only */
    header > nav.navbar.iq-navbar
    .search-box-container
    .search-icon-btn:hover {
        background: rgba(255,255,255,.105) !important;
        border-color: rgba(255,255,255,.16) !important;
    }

    /* Completely remove microphone */
    header > nav.navbar.iq-navbar
    .search-box-container
    .search-mic-btn {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        width: 0 !important;
        height: 0 !important;
    }

    /* No pseudo-element can create another ring */
    header > nav.navbar.iq-navbar
    .search-box-container::before,
    header > nav.navbar.iq-navbar
    .search-box-container::after,
    header > nav.navbar.iq-navbar
    .search-input-wrapper::before,
    header > nav.navbar.iq-navbar
    .search-input-wrapper::after,
    header > nav.navbar.iq-navbar
    .search-icon-btn::before,
    header > nav.navbar.iq-navbar
    .search-icon-btn::after {
        content: none !important;
        display: none !important;

        border: 0 !important;
        outline: 0 !important;
        box-shadow: none !important;
        background: transparent !important;
    }

    /* Do not allow the old red active icon styling */
    header > nav.navbar.iq-navbar
    .search-box-container
    .search-input-wrapper.active
    .search-icon-btn {
        color: rgba(255,255,255,.92) !important;
    }
}


/* =========================================================
   QAUSAINFLIX — FINAL SEARCH SINGLE-FRAME FIX
   Remove outer wrapper frame; keep one premium button only
   ========================================================= */

@media (min-width: 1200px) {

    header > nav.navbar.iq-navbar
    .search-box-container {
        width: 42px !important;
        min-width: 42px !important;
        height: 42px !important;
        min-height: 42px !important;
        padding: 0 !important;
        margin: 0 !important;
        border: 0 !important;
        outline: 0 !important;
        box-shadow: none !important;
        background: transparent !important;
    }

    header > nav.navbar.iq-navbar
    .search-box-container
    .search-input-wrapper,
    header > nav.navbar.iq-navbar
    .search-box-container
    .search-input-wrapper.active {
        width: 42px !important;
        min-width: 42px !important;
        height: 42px !important;
        min-height: 42px !important;
        padding: 0 !important;
        margin: 0 !important;
        border: 0 !important;
        outline: 0 !important;
        box-shadow: none !important;
        background: transparent !important;
    }

    header > nav.navbar.iq-navbar
    .search-box-container
    .search-icon-btn {
        width: 42px !important;
        min-width: 42px !important;
        height: 42px !important;
        min-height: 42px !important;

        padding: 0 !important;
        margin: 0 !important;

        border: 1px solid rgba(255,255,255,.10) !important;
        border-radius: 12px !important;

        background: rgba(255,255,255,.065) !important;

        outline: 0 !important;
        box-shadow: none !important;
    }

    header > nav.navbar.iq-navbar
    .search-box-container
    .search-icon-btn:hover {
        border-color: rgba(255,255,255,.16) !important;
        background: rgba(255,255,255,.105) !important;
    }

    header > nav.navbar.iq-navbar
    .search-box-container
    .search-icon-btn:focus,
    header > nav.navbar.iq-navbar
    .search-box-container
    .search-icon-btn:focus-visible,
    header > nav.navbar.iq-navbar
    .search-box-container
    .search-icon-btn:active {
        border-color: rgba(255,255,255,.12) !important;
        outline: 0 !important;
        box-shadow: none !important;
    }
}


/* =========================================================
   QAUSAINFLIX — REMOVE FINAL WHITE SEARCH EDGE
   ========================================================= */

@media (min-width: 1200px) {

    header > nav.navbar.iq-navbar
    .search-box-container,
    header > nav.navbar.iq-navbar
    .search-box-container *,
    header > nav.navbar.iq-navbar
    .search-input-wrapper,
    header > nav.navbar.iq-navbar
    .search-input-wrapper.active {
        outline: none !important;
        box-shadow: none !important;
    }

    header > nav.navbar.iq-navbar
    .search-box-container:focus,
    header > nav.navbar.iq-navbar
    .search-box-container:focus-within,
    header > nav.navbar.iq-navbar
    .search-input-wrapper:focus,
    header > nav.navbar.iq-navbar
    .search-input-wrapper:focus-within {
        outline: none !important;
        border-color: transparent !important;
        box-shadow: none !important;
    }

    header > nav.navbar.iq-navbar
    .search-icon-btn {
        outline: none !important;
        box-shadow: none !important;
        -webkit-appearance: none !important;
        appearance: none !important;
    }

    header > nav.navbar.iq-navbar
    .search-icon-btn:focus,
    header > nav.navbar.iq-navbar
    .search-icon-btn:focus-visible,
    header > nav.navbar.iq-navbar
    .search-icon-btn:active {
        outline: none !important;
        box-shadow: none !important;
    }
}


/* =========================================================
   QAUSAINFLIX — FINAL SEARCH FUNCTIONAL STATE
   Closed = 42px button
   Active = expanding search field
   ========================================================= */

@media (min-width: 1200px) {

    /* CLOSED */
    header > nav.navbar.iq-navbar
    .search-box-container
    .search-input-wrapper:not(.active) {
        width: 42px !important;
        min-width: 42px !important;
        height: 42px !important;
        min-height: 42px !important;

        background: transparent !important;
        border: 0 !important;
        outline: 0 !important;
        box-shadow: none !important;
    }

    /* ACTIVE — THIS MUST EXPAND */
    header > nav.navbar.iq-navbar
    .search-box-container
    .search-input-wrapper.active {
        width: 300px !important;
        min-width: 300px !important;
        height: 42px !important;
        min-height: 42px !important;

        background: rgba(14,15,22,.96) !important;

        border: 1px solid rgba(255,255,255,.12) !important;
        border-radius: 12px !important;

        outline: 0 !important;
        box-shadow: 0 10px 30px rgba(0,0,0,.28) !important;

        overflow: visible !important;
    }

    /* INPUT BECOMES VISIBLE ONLY WHEN ACTIVE */
    header > nav.navbar.iq-navbar
    .search-box-container
    .search-input-wrapper.active
    .search-input {
        width: 100% !important;
        height: 42px !important;

        opacity: 1 !important;
        pointer-events: auto !important;

        color: #fff !important;
    }

    /* SEARCH BUTTON REMAINS ON RIGHT */
    header > nav.navbar.iq-navbar
    .search-box-container
    .search-input-wrapper.active
    .search-icon-btn {
        right: 0 !important;
        top: 50% !important;

        width: 42px !important;
        height: 42px !important;

        background: transparent !important;
        border: 0 !important;

        outline: 0 !important;
        box-shadow: none !important;

        color: rgba(255,255,255,.92) !important;
    }

    /* No red focus */
    header > nav.navbar.iq-navbar
    .search-box-container
    .search-input-wrapper.active
    .search-input:focus {
        outline: none !important;
        box-shadow: none !important;
    }

    /* No microphone */
    header > nav.navbar.iq-navbar
    .search-box-container
    .search-mic-btn {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
}


/* =========================================================
   QAUSAINFLIX — PREMIUM SEARCH RESULTS SCROLLBAR
   Subtle neutral scrollbar — no red
   ========================================================= */

@media (min-width: 1200px) {

    header > nav.navbar.iq-navbar
    #search-suggestions
    .search-scroll-area {
        scrollbar-width: thin !important;
        scrollbar-color:
            rgba(255,255,255,.20)
            rgba(255,255,255,.025) !important;
    }

    header > nav.navbar.iq-navbar
    #search-suggestions
    .search-scroll-area::-webkit-scrollbar {
        width: 5px !important;
    }

    header > nav.navbar.iq-navbar
    #search-suggestions
    .search-scroll-area::-webkit-scrollbar-track {
        background: rgba(255,255,255,.025) !important;
        border-radius: 10px !important;
    }

    header > nav.navbar.iq-navbar
    #search-suggestions
    .search-scroll-area::-webkit-scrollbar-thumb {
        background: rgba(255,255,255,.20) !important;
        border-radius: 10px !important;
        border: 1px solid rgba(0,0,0,.20) !important;
    }

    header > nav.navbar.iq-navbar
    #search-suggestions
    .search-scroll-area::-webkit-scrollbar-thumb:hover {
        background: rgba(255,255,255,.34) !important;
    }

    /* Keep View All footer clean */
    header > nav.navbar.iq-navbar
    #search-suggestions
    .search-view-all {
        color: rgba(255,255,255,.82) !important;
        background: rgba(8,9,13,.96) !important;
        border-top: 1px solid rgba(255,255,255,.08) !important;
    }

    header > nav.navbar.iq-navbar
    #search-suggestions
    .search-view-all:hover {
        color: #fff !important;
        background: rgba(255,255,255,.06) !important;
    }
}


/* =========================================================
   QAUSAINFLIX — SEARCH RESULT ARROW FINAL POLISH
   Remove red accent from result navigation arrows
   ========================================================= */

@media (min-width: 1200px) {

    #search-suggestions .premium-search-item::after {
        color: rgba(255,255,255,.72) !important;
        border-color: rgba(255,255,255,.72) !important;
        background: transparent !important;
    }

    #search-suggestions .premium-search-item:hover::after {
        color: rgba(255,255,255,.96) !important;
        border-color: rgba(255,255,255,.96) !important;
    }

    #search-suggestions .premium-search-item i,
    #search-suggestions .premium-search-item .search-arrow {
        color: rgba(255,255,255,.72) !important;
    }

    #search-suggestions .premium-search-item:hover i,
    #search-suggestions .premium-search-item:hover .search-arrow {
        color: rgba(255,255,255,.96) !important;
    }
}

