/* ===================================================
   HPB Media - Festive Mid-Autumn Top Bar
   Design: Deep Ruby Red & Warm Gold Glow
   =================================================== */

#top-bar {
    background: linear-gradient(90deg, #700f24 0%, #9f1239 25%, #be123c 50%, #b91c1c 75%, #780f22 100%) !important;
    border-bottom: 1px solid rgba(254, 240, 138, 0.3) !important;
    padding: 6px 0 !important;
    box-shadow: 0 2px 10px rgba(112, 15, 36, 0.25) !important;
    position: relative;
    z-index: 30;
}

#top-bar .flex-row {
    align-items: center !important;
    min-height: 34px !important;
}

/* Mid-Autumn Promo Box */
.hpb-midautumn-bar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: nowrap;
    text-align: center;
    margin: 0;
    padding: 0;
}

.hpb-midautumn-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(254, 240, 138, 0.18);
    border: 1px solid rgba(254, 240, 138, 0.45);
    border-radius: 100px;
    padding: 3px 10px;
    color: #fef08a;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
}

.hpb-lantern-icon {
    font-size: 13px;
    line-height: 1;
}

.hpb-midautumn-text {
    font-size: 13.5px;
    color: #ffffff;
    font-weight: 400;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.hpb-midautumn-text strong {
    color: #fef08a;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(254, 240, 138, 0.4);
}

.hpb-midautumn-cta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #fef08a 0%, #facc15 100%);
    color: #700f24 !important;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 100px;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.hpb-midautumn-cta svg {
    width: 11px;
    height: 11px;
    fill: currentColor;
    transition: transform 0.2s ease;
}

.hpb-midautumn-cta:hover {
    background: #ffffff;
    color: #881337 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(254, 240, 138, 0.5);
}

.hpb-midautumn-cta:hover svg {
    transform: translateX(2px);
}

/* Language Switcher Styling */
.custom.html_topbar_right {
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
    border-radius: 100px !important;
    padding: 2px 4px !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
}

.custom.html_topbar_right a {
    color: #ffffff !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    padding: 3px 8px !important;
    border-radius: 100px !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
}

.custom.html_topbar_right a.active {
    background: rgba(255, 255, 255, 0.28) !important;
    color: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.custom.html_topbar_right a:hover {
    background: rgba(255, 255, 255, 0.22) !important;
}

.custom.html_topbar_right img {
    margin-right: 5px !important;
    width: 15px !important;
    border-radius: 2px !important;
}

/* Search Icon Button in Top Bar */
.nav.top-bar-nav .header-search,
.nav.top-bar-nav .header-search a {
    cursor: pointer !important;
}

.nav.top-bar-nav .header-search a {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.16) !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
    color: #ffffff !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.25s ease !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
}

.nav.top-bar-nav .header-search a:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    transform: scale(1.06) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2) !important;
}

/* Responsive Top Bar */
@media (max-width: 1200px) {
    .hpb-midautumn-text {
        font-size: 12.5px;
    }
    .hpb-midautumn-bar {
        gap: 8px;
    }
}

/* ===================================================
   Full-Screen Spotlight Search Modal
   Fixing: Position, Layout, Close Button, Empty Dividers
   =================================================== */

/* Search Overlay Container */
.t-search {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    min-width: 100vw !important;
    background: rgba(15, 23, 42, 0.8) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    z-index: 999999 !important;
    margin: 0 !important;
    padding: 130px 20px 40px !important;
    box-sizing: border-box !important;
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: none !important;
    transition: opacity 0.25s ease, visibility 0.25s ease !important;
    overflow-y: auto !important;
}

.t-search.show-search {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Fixed Close Button (Top Right of Screen) */
.t-search .t-search-close-btn {
    position: fixed !important;
    top: 24px !important;
    right: 28px !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    transition: all 0.25s ease !important;
    z-index: 1000001 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
}

.t-search .t-search-close-btn:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    transform: scale(1.08) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35) !important;
}

/* Hide legacy icon injected by congminh.js */
.t-search i.fa-times-circle {
    display: none !important;
}

/* Center Search Container */
.t-search > li {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: 620px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    list-style: none !important;
    animation: hptSpotlightDrop 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

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

.t-search .header-search-form-wrapper {
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
}

/* Search Box Pill */
.t-search .header-search-form-wrapper .flex-row {
    background: #ffffff !important;
    border-radius: 100px !important;
    padding: 5px 6px 5px 22px !important;
    box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.2) !important;
    border: none !important;
    align-items: center !important;
}

.t-search .header-search-form-wrapper .flex-row .search-field {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    font-size: 16px !important;
    color: #0f172a !important;
    height: 46px !important;
    padding: 0 12px 0 0 !important;
    outline: none !important;
    width: 100% !important;
    font-weight: 500 !important;
}

.t-search .header-search-form-wrapper .flex-row .search-field::placeholder {
    color: #94a3b8 !important;
    font-weight: 400 !important;
}

/* Search Submit Button */
.t-search .header-search-form-wrapper .flex-row .ux-search-submit {
    border-radius: 100px !important;
    background: #1a56db !important;
    color: #ffffff !important;
    width: 44px !important;
    height: 44px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    min-height: auto !important;
}

.t-search .header-search-form-wrapper .flex-row .ux-search-submit:hover {
    background: #1e40af !important;
    transform: scale(1.05) !important;
}

.t-search .header-search-form-wrapper .flex-row .ux-search-submit i {
    font-size: 15px !important;
}

/* Keyboard hint below search box */
.t-search-hint {
    text-align: center !important;
    font-size: 12.5px !important;
    color: rgba(255, 255, 255, 0.6) !important;
    margin-top: 14px !important;
    letter-spacing: 0.2px !important;
}

.t-search-hint kbd {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    font-size: 11px !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    font-family: inherit !important;
}

/* FIX: Kill empty white horizontal line below search pill */
.t-search .live-search-results,
.t-search .autocomplete-suggestions {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Hide empty live search container */
.t-search .live-search-results:empty,
.t-search .autocomplete-suggestions:empty {
    display: none !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Style live search results ONLY when populated */
.t-search .live-search-results:not(:empty),
.t-search .autocomplete-suggestions:not(:empty) {
    display: block !important;
    background: #ffffff !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3) !important;
    margin-top: 14px !important;
    overflow: hidden !important;
    max-height: 400px !important;
    overflow-y: auto !important;
    border: 1px solid #e2e8f0 !important;
    width: 100% !important;
}

/* Mobile Search Tweaks */
@media (max-width: 768px) {
    .t-search {
        padding: 90px 16px 30px !important;
    }
    .t-search .t-search-close-btn {
        top: 16px !important;
        right: 16px !important;
    }
    .t-search .header-search-form-wrapper .flex-row {
        padding-left: 16px !important;
    }
}
