/*********************************************************
 * BetEngine Enterprise – DESKTOP CSS (LIVE BASE)
 * Dropdown base unification (Odds/Language/Tools/User)
 * Row 1 stability: prevent logged-in drift (desktop-only)
 * Scroll-Hide Logic  added
 *********************************************************/

/* =======================================================
   DESKTOP VISIBILITY & SCROLL HIDE LOGIC
======================================================= */

/* desktop.css */

.header-desktop { 
  display: block; 
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-main, #0a0c12);
  /* REMOVED: transition and will-change */
}

/* NEW: JS will attach this after rasterization is complete */
.header-desktop.is-ready {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}
/* =======================================================
   RELOAD PAINT GUARD — DO NOT REMOVE
   Suppresses GPU compositing layer promotion during the
   initial state sync on page reload. Lifted after two rAFs
   by header-loader.js once the browser has completed a full
   paint cycle. Without this, header.js applying header-hidden
   immediately after injection causes Chromium to create a GPU
   layer for an off-screen element whose tiles are never
   rasterized → black bar on scroll-back.
======================================================= */
.header-desktop.be-header-init {
    transition: none !important;
    will-change: auto !important;
}

.header-mobile  { display: none; }

/* The JS will add this class when scrolling down */
.header-desktop.header-hidden {
  /* This pushes the entire header (Row 1 + 2 + 3) up by exactly its own total height */
  transform: translateY(-100%);
}

@media (max-width: 900px) {
    .header-desktop { display: none; }
    .header-mobile  { display: block; }
}

/* =======================================================
   ROW 1 (TOP BAR)
======================================================= */

.row-top {
    min-height: 42px;
    position: relative;
    z-index: 300;
    border-bottom: 1px solid rgba(80, 85, 88, 0.35);
}

.row-top .left { flex: 1; }

.row-top .right {
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

.header-desktop .row-top .right:has(.btn-auth.register) {
  padding-right: 32px;
}

.header-desktop .header-row.row-top {
    padding-top: 0;
    padding-bottom: 0;
}

/* =======================================================
   AUTH USER 
======================================================= */

.header-desktop .row-top .auth-user-toggle {
  position: relative;
  z-index: 1;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  background: rgba(0, 234, 255, 0.08);
  border: 1px solid rgba(0, 234, 255, 0.25);
  border-radius: 0;
  padding: 0 22px 0 0;
  gap: 1px;
  min-width: 210px; 
  box-sizing: border-box;
}
.header-desktop .row-top .auth-user-toggle .auth-user-name {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.92);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.1;
}
.header-desktop .row-top .auth-user-toggle .auth-user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    margin-right: 12px;
    max-width: 130px;
}

.header-desktop .row-top .auth-user-toggle .auth-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 0;
    object-fit: cover;
    margin-right: 12px;
    flex: 0 0 auto;
}
.header-desktop .row-top .auth-user-toggle .auth-user-roi {
    font-size: 10px;
    font-weight: 700;
    margin-top: 2px;
    letter-spacing: 0.04em;
    color: #888ba1;
}
.header-desktop .row-top .auth-user-toggle .icon-caret {
    width: 14px;
    height: 14px;
    margin-left: auto;
    opacity: 0.9;
    transition: opacity 0.2s ease, transform 0.15s ease;
}
.header-desktop .row-top .auth-user-toggle .auth-user-roi.text-green { color: #0ce815; }
.header-desktop .row-top .auth-user-toggle .auth-user-roi.text-red { color: #ff4d4f; }

.header-desktop .auth-user:has(.auth-user-dropdown.show) .auth-user-toggle .icon-caret {
  transform: rotate(180deg);
}

.header-desktop .row-top .auth-user-toggle:hover .icon-caret {
    opacity: 1;
}
/* =======================================================
   ENTERPRISE FIX: AUTH LAYOUT SHIFT (CLS) PREVENTION
   Locks the physical space to match .auth-user-toggle
======================================================= */
.header-auth-wrapper {
    min-width: 210px; 
    min-height: 42px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out;
}

html.auth-resolved .header-auth-wrapper {
    opacity: 1;
    pointer-events: auto;
}

/* =======================================================
   ROW 2 - ORIGINAL ARCHITECTURE (NO SHIFTING)
======================================================= */

.row-main {
    min-height: 58px;
    display: grid;
    grid-template-columns: 240px 1fr 360px;
    align-items: center;
    gap: 18px;
    position: relative;
    z-index: 250;
    padding: 8px 24px;
}

.row-main .brand {
    display: flex;
    align-items: center;
    height: 100%;
    /* Prevents the brand container from forcing the grid to expand */
    min-width: 0; 
}

.row-main .brand .logo {
    /* Fits perfectly inside the 58px row minus the 16px padding */
    height: 42px;
    width: auto;
    max-width: 100%;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    object-fit: contain;
    margin: 0;
    padding: 0;
}

.row-main nav.main-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
    white-space: nowrap;
    padding-right: 60px;
}

.row-main .main-nav .nav-item {
    font-size: 15px;
    letter-spacing: 0.06em;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.main-nav .nav-item {
    position: relative;
    font-size: 13px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted, #b3b3b3);
    padding: 6px 0;
}

.main-nav .nav-item.active {
    color: var(--text-secondary, #00eaff);
}

.main-nav .nav-item.active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: var(--text-secondary, #00eaff);
}

.premium-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.premium-link .premium-star {
    font-size: 18px;
    position: relative;
    top: -2px;
}

/* ==========================================
   ROW 2 MAIN NAV — AQUA CYAN GRADIENT TEXT
========================================== */

.header-desktop .row-main .main-nav .nav-item{
  color: rgb(0,234,255); 
  background-image: linear-gradient(
    90deg,
    rgba(0,234,255, 0.65) 0%,
    rgba(0,234,255, 0.95) 45%,
    rgba(0,234,255, 0.65) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow:
    0 0 10px rgba(0,234,255, 0.18),
    0 0 18px rgba(0,234,255, 0.10);
}

.header-desktop .row-main .main-nav .nav-item:hover{
  background-image: linear-gradient(
    90deg,
    rgba(0,234,255, 0.75) 0%,
    rgba(0,234,255, 1.00) 45%,
    rgba(0,234,255, 0.75) 100%
  );
  text-shadow:
    0 0 12px rgba(0,234,255, 0.26),
    0 0 26px rgba(0,234,255, 0.16);
}

.header-desktop .row-main .main-nav .nav-item.active::after{
  height: 1px; 
  background: linear-gradient(
    90deg,
    rgba(0,234,255, 0.00),
    rgba(0,234,255, 0.95),
    rgba(0,234,255, 0.00)
  );
  box-shadow: 0 0 10px rgba(0,234,255, 0.28);
}

.header-desktop .row-main .main-nav .premium-link .premium-star{
  background-image: inherit;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0.95;
}

/* =======================================================
   SEARCH + NOTIFICATION
======================================================= */

.row-main .search-notify {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-shrink: 0;
}

.search-notify {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--bg-panel-soft, #181824);
    min-width: 220px;
}

.search-icon {
    width: 14px;
    height: 14px;
}

.search-box input {
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-secondary, #00eaff);
    font-size: 13px;
    width: 140px;
    box-sizing: border-box;
}

.header-desktop .search-box {
    width: 210px;
    height: 40px;
    display: flex;
    align-items: center;
    flex: 0 0 210px;
    overflow: hidden;
}

.search-box:focus-within input {
    width: 170px;
    transition: width .2s ease;
}

.header-desktop .notif-button {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 50%;
    background: var(--bg-panel-soft, #181824);
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-desktop .notif-icon {
    width: 24px;
    height: 24px;
    display: block;
    opacity: 1;
}

/* =======================================================
   DESKTOP NOTIFICATIONS (OVERLAY + PANEL)
======================================================= */

:root {
    --be-row1-h: 42px;
    --be-row2-h: 58px;
    --be-row-sep-h: 0.5px;
    --be-row3-top: calc(var(--be-row1-h) + var(--be-row-sep-h) + var(--be-row2-h) + var(--be-row-sep-h));
    --be-row3-h: 44px;
    --be-notif-min-h: calc(var(--be-row3-h) * 2);
    --be-notif-panel-w: 283px;
    --be-notif-side-pad: 0px; 
}

.be-notif-overlay[hidden],
.be-notif-panel[hidden] {
    display: none !important;
}

.be-notif-overlay {
    position: fixed;
    top: var(--be-row3-top);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 640;
    background: rgba(0, 0, 0, 0.35);
}

.be-notif-panel {
    position: fixed;
    top: var(--be-row3-top);     
    right: var(--be-notif-side-pad);
    width: var(--be-notif-panel-w);
    max-width: 100vw;
    min-height: var(--be-notif-min-h);
    z-index: 1000;
    background-color: rgb(17, 20, 29);
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    border: 1px solid rgba(80, 85, 88, 0.35);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-top-right-radius: 0;
    border-botton-right-radius: 0;
}

.be-notif-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(80, 85, 88, 0.35);
}

.be-notif-title {
    flex: 1 1 auto;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;

    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--text-secondary, #00eaff);
    line-height: 1;
    min-width: 0;
}

.be-notif-close {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;

    color: #ffffff;
}

.be-notif-close span {
    font-size: 22px;
    line-height: 1;
    color: #ffffff; 
}

.be-notif-panel-body {
    padding: 10px 14px;
    overflow: auto;
    max-height: calc(100vh - var(--be-row3-top) - 120px);
}

.be-notif-empty span,
.be-notif-panel-body span,
.be-notif-panel-body li {
    font-size: 13px;
    color: var(--text-muted, #b3b3b3);
}

.be-notif-panel-footer {
    padding: 10px 14px;
    border-top: 1px solid rgba(80, 85, 88, 0.35);
}

.be-notif-view-all {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    letter-spacing: 0.08em;
}

.be-notif-view-all:hover,
.be-notif-view-all:focus-visible {
    color: var(--text-secondary, #00eaff);
    outline: none;
}

.be-notif-panel-header img{
  width: 18px !important;
  height: 18px !important;
}

/* =======================================================
   ROW 3 (SUB NAVIGATION) 
======================================================= */

.row-sub {
    padding: 6px 44px;
    min-height: 48px;
    height: 48px;          
    display: flex;
    align-items: center;
    position: relative;
    z-index: 200;
    overflow: visible;     
}

.row-sub .subnav-group {
    display: none;
    align-items: center;
    gap: 22px;
}

.row-sub .sub-item {
    padding: 6px 8px;
    font-size: 14px;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 4px;

}

.row-sub .subnav-group {
    display: none;
    align-items: center;
    gap: 22px;
}

.row-sub .subnav-group.active {
    display: flex;
}

.sub-item {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted, #b3b3b3);
    padding: 4px 0;
    cursor: pointer;
}

.sub-item:hover {
    color: var(--text-secondary, #00eaff);
}

.sub-item-tools {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    position: relative;
}

.sub-item-tools .caret {
    width: 14px;
    height: 14px;
}

.header-desktop .sub-item-tools:has(.tools-dropdown.show) .caret {
  transform: rotate(180deg);
}

.header-desktop .row-sub .sub-item {
  border-bottom: 2px solid transparent;
}

.header-desktop .row-sub .sub-item.active {
  color: #ffffff;
  border-bottom-color: #00eaff;
}


/* =======================================================
   ENTERPRISE ANTI-SHAKE (BUTTONS & ICONS)
======================================================= */
.header-desktop .odds-toggle,
.header-desktop .language-toggle,
.header-desktop .row-top .auth-user-toggle,
.header-desktop .auth-user-dropdown .auth-user-item,
.header-desktop .auth-user-dropdown .auth-user-logout,
.header-desktop .odds-dropdown .item,
.header-desktop .language-dropdown .item,
.header-desktop .tools-dropdown .item {
    outline: none;
    box-shadow: none;
    -webkit-tap-highlight-color: transparent;
}

.header-desktop .odds-toggle:active,
.header-desktop .language-toggle:active,
.header-desktop .row-top .auth-user-toggle:active,
.header-desktop .auth-user-dropdown .auth-user-item:active,
.header-desktop .auth-user-dropdown .auth-user-logout:active,
.header-desktop .odds-dropdown .item:active,
.header-desktop .language-dropdown .item:active,
.header-desktop .tools-dropdown .item:active {
    transform: none !important;
    margin: 0 !important;
    outline: none !important;
}

/* =======================================================
   DROPDOWNS
======================================================= */
.header-desktop .caret,
.header-desktop .icon-caret {
    transition: transform 0.15s ease;
    transform-origin: center center;
    display: inline-block;
    vertical-align: middle;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

.odds-dropdown,
.language-dropdown,
.auth-user-dropdown,
.tools-dropdown {
    position: absolute;
    z-index: 999;
    margin-top: 1.5px;
}

.header-desktop .odds-format,
.header-desktop .language-selector,
.header-desktop .auth-user,
.header-desktop .sub-item-tools {
    position: relative;
}

.header-desktop .language-selector:has(.language-dropdown.show) .caret,
.header-desktop .language-selector:has(.language-dropdown.show) .icon-caret {
  transform: rotate(180deg);
}

.header-desktop .odds-format:has(.odds-dropdown.show) .caret,
.header-desktop .odds-format:has(.odds-dropdown.show) .icon-caret {
  transform: rotate(180deg);
}

.header-desktop .odds-dropdown,
.header-desktop .language-dropdown,
.header-desktop .tools-dropdown,
.header-desktop .auth-user-dropdown {
    top: calc(100% + 6px);
    right: auto;
    left: 0;
    padding: 6px 0;
    background-color: rgb(17, 20, 29);
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    border-radius: 0px;
}

.header-desktop .odds-dropdown {
    min-width: 210px;
}

.header-desktop .odds-dropdown .item,
.header-desktop .language-dropdown .item,
.header-desktop .tools-dropdown .item,
.header-desktop .auth-user-dropdown .auth-user-item,
.header-desktop .auth-user-dropdown .auth-user-logout {
    display: block;
    width: 100%;
}

.header-desktop .sub-item-tools .tools-dropdown {
    left: 0;
    right: auto;
}

.odds-dropdown,
.language-dropdown,
.tools-dropdown {
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    will-change: opacity, transform;
    z-index: 300;
}

.odds-dropdown.show,
.language-dropdown.show,
.tools-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.odds-dropdown .item,
.language-dropdown .item,
.tools-dropdown .item {
    padding: 8px 12px;
    font-size: 13px;
    color: var(--text-muted, #b3b3b3);
    cursor: pointer; /* ENTERPRISE FIX: Hand cursor on hover */
}

.odds-dropdown .item:hover,
.language-dropdown .item:hover,
.tools-dropdown .item:hover {
    background: var(--bg-panel-soft, #181824);
    color: var(--text-secondary, #00eaff);
}

.language-dropdown {
    max-height: 260px;
    overflow-y: auto;
}

.language-dropdown .item.active,
.odds-dropdown .item.active {
    color: var(--text-secondary, #00eaff);
}

.header-desktop .language-dropdown{
  scrollbar-width: thin; 
  scrollbar-color: rgba(255,255,255,0.07) rgb(17,20,29) ; 
}

.header-desktop .language-dropdown::-webkit-scrollbar{
  width: 1px; 
}

.header-desktop .language-dropdown::-webkit-scrollbar-track{
  background: rgb(17,20,29); 
}

.header-desktop .language-dropdown::-webkit-scrollbar-thumb{
  background-color: rgba(255,255,255,0.16);
  border-radius: 999px;
}

.header-desktop .language-dropdown::-webkit-scrollbar-thumb:hover{
  background-color: rgba(255,255,255,0.26);
}


/* =======================================================
   USER DROPDOWN
======================================================= */

.header-desktop .auth-user-dropdown {
    min-width: 210px;
    width: 210px;
    display: none; /* Ndryshuar nga flex ne none */
    flex-direction: column;
    align-items: stretch;
    top: 100%;
    left: auto;
    right: 0;
    transform: none;
}

.header-desktop .auth-user-dropdown.show {
    display: flex;
}

.header-desktop .auth-user-dropdown .auth-user-item,
.header-desktop .auth-user-dropdown .auth-user-logout {
    padding: 10px 14px;
    font-size: 13px;
    text-align: left;
    background: none;
    border: none;
    font-family: inherit;
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    cursor: pointer;
    letter-spacing:0.08em;
}

.header-desktop .auth-user-dropdown .auth-user-item:hover,
.header-desktop .auth-user-dropdown .auth-user-logout:hover,
.header-desktop .auth-user-dropdown .auth-user-item:focus-visible,
.header-desktop .auth-user-dropdown .auth-user-logout:focus-visible,
.header-desktop .auth-user-dropdown .auth-user-item.active,
.header-desktop .auth-user-dropdown .auth-user-logout.active {
    color: rgb(0, 234, 255);
    background: var(--bg-panel-soft, #181824);
}

.header-desktop .auth-user-dropdown .auth-user-separator {
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 6px 0;
}

/* =======================================================
   RESPONSIVE DESKTOP TWEAKS
======================================================= */

@media (max-width: 1200px) {
    .row-main {
        grid-template-columns: 200px 1fr auto;
    }
    .main-nav { gap: 16px; }
}

@media (max-width: 1050px) {
    .row-main {
        grid-template-columns: 180px 1fr auto;
    }
    .main-nav {
        gap: 14px;
    }
}

.header-desktop .language-selector {
    position: relative;
}

.header-desktop .language-dropdown {
    width: 100%;
    min-width: unset !important;
    max-width: unset !important;
    right: 0;
    left: auto;
}

.header-desktop .row-main .main-nav .nav-item,
.header-desktop .row-main .main-nav .nav-item:hover,
.header-desktop .row-main .main-nav .nav-item.active{
  text-shadow: none !important;
  filter: none !important;
}

/* ====================================================
   SCROLLBAR PATCH: Prevents Layout Shift on Modals
   ==================================================== */
html {
  /* Reserves space for the scrollbar even when overflow is hidden */
  scrollbar-gutter: stable;
}

/* Custom Enterprise Scrollbar for Chrome/Edge/Safari */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #1a1a1a; /* Matches your background color */
}

::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 10px;
  border: 2px solid #1a1a1a;
}

::-webkit-scrollbar-thumb:hover {
  background: #00eaff; /* Matches your accent color */
}
/* =======================================================
   ENTERPRISE FIX: STABLE HEADER (NO HTML WRAPPER NEEDED)
   Blocks label shifting by stabilizing the auth buttons
======================================================= */

/* 1. Give auth buttons a consistent size to prevent shifting */
.header-desktop .btn-auth {
    min-width: 90px;
    justify-content: center;
}

/* 2. Lock the profile toggle width so it doesn't push labels */
.header-desktop .auth-user {
    min-width: 180px;
    justify-content: flex-end;
}

/* 3. OPTIMISTIC UI: Hide Login/Register instantly if logged-in */
html.be-ui-logged-in .header-desktop .btn-auth.login,
html.be-ui-logged-in .header-desktop .btn-auth.register {
    display: none !important;
}

/* 4. OPTIMISTIC UI: Show Profile instantly if logged-in */
html.be-ui-logged-in .header-desktop .auth-user {
    display: flex !important;
}
/* =======================================================
   SEARCH MODULE (BASE & DESKTOP OVERRIDES)
======================================================= */
.be-search { width: 100%; max-width: 1100px; margin: 24px auto; padding: 18px; border-radius: 14px; background: var(--c-search-bg); border: 1px solid var(--c-search-border-subtle); box-shadow: var(--shadow-search); color: var(--c-search-text); }
.be-search-header { margin-bottom: 14px; }
.be-search-title { margin: 0 0 6px 0; font-size: 16px; font-weight: 700; letter-spacing: 0.2px; color: var(--c-search-accent); }
.be-search-subtitle { margin: 0; font-size: 12px; line-height: 1.4; color: var(--c-search-text-subtitle); }
.be-search-input-wrapper { position: relative; display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.be-search-input { flex: 1; height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--c-search-border-input); background: var(--c-search-input-bg); color: var(--c-search-text); font-size: 14px; outline: none; }
.be-search-input::-webkit-search-decoration, .be-search-input::-webkit-search-results-button, .be-search-input::-webkit-search-results-decoration { display: none; }
.be-search-input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; }
.be-search-input::placeholder { color: var(--c-search-placeholder); }
.be-search-input:focus { border-color: var(--c-search-focus-border); box-shadow: 0 0 0 3px var(--c-search-accent-soft); }
.be-search-clear { height: 42px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--c-search-border-btn); background: var(--c-search-input-bg); color: var(--c-search-clear-text); font-size: 13px; cursor: pointer; }
.be-search-clear:hover { border-color: var(--c-search-border-btn-hover); background: var(--c-search-clear-hover-bg); }
.be-search-states { margin-top: 0; }
.be-search-loading { padding: 10px 12px; border-radius: 10px; border: 1px dashed var(--c-search-border-btn); background: var(--c-search-loading-bg); display: none !important; }
.be-search-empty { display: none !important; }
.be-search-loading-text, .be-search-empty-text { font-size: 12px; color: var(--c-search-text-state); }
.be-search-results { margin: 12px 0 0 0; padding: 0; list-style: none; border-radius: 12px; overflow: hidden; border: 1px solid var(--c-search-border-subtle); }
.be-search-result { display: flex; align-items: center; gap: 10px; padding: 12px; background: var(--c-search-bg); border-top: 1px solid var(--c-search-border-subtle); cursor: pointer; }
.be-search-result:first-child { border-top: none; }
.be-search-result:hover { background: var(--c-search-row-hover-bg); }
.be-search-result.is-active { background: var(--c-search-accent-soft); }
.be-search-result-icon { width: 28px; height: 28px; border-radius: 8px; background: var(--c-search-border-subtle); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; color: var(--c-search-icon-text); flex: 0 0 28px; }
.be-search-result-content { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.be-search-result-title { font-size: 13px; font-weight: 600; color: var(--c-search-title-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.be-search-result-meta { font-size: 11px; color: var(--c-search-text-meta); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.be-search-results:empty { border: none; }

/* Desktop Header Overrides */
.header-desktop .be-search { margin: 0; padding: 0; max-width: none; background: transparent; border: none; box-shadow: none; border-radius: 0; height: 42px; width: 245px; flex-shrink: 0; position: relative; transition: width 0.3s ease; }
.header-desktop .be-search-input { height: 42px; line-height: 42px; padding: 0 36px 0 12px; box-sizing: border-box; font-size: 11px; }
.header-desktop .be-search-icon { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; opacity: 0.75; pointer-events: none; }
.header-desktop .be-search-header { display: none; }
.header-desktop .be-search-results { background: var(--c-search-results-bg-desktop); position: absolute; top: 100%; left: 0; right: 0; margin: 0; max-height: 320px; overflow-y: auto; z-index: 2000; }
.header-desktop .be-search-input-wrapper { margin-top: 0; height: 42px; display: flex; align-items: center; position: relative; }
.header-desktop .be-search-results[hidden], .header-desktop .be-search-states[hidden] { display: none; }
.header-desktop .be-search-clear[hidden] { display: none !important; }
.header-desktop .be-search-states { position: absolute; top: 100%; left: 0; right: 0; margin: 0; z-index: 2000; }
.header-desktop .be-search-clear { position: absolute; top: 50%; right: 38px; transform: translateY(-50%); width: 22px; height: 22px; padding: 0; margin: 0; display: flex; align-items: center; justify-content: center; background: none; border: none; border-radius: 0; box-shadow: none; cursor: pointer; font-size: 0; line-height: 0; color: transparent; opacity: 0.90; }
.header-desktop .be-search-clear::before { content: "×"; color: var(--c-search-text); font-size: 22px; line-height: 1; font-weight: 500; }
.header-desktop .be-search-clear:hover { opacity: 1; }

/* =======================================================
   ENTERPRISE FIX: Sub-pixel tearing prevention 
   Fixes the transparent gap between Row 1 and Row 2
======================================================= */

.header-desktop .row-top {
    background-color: var(--bg-main, #0a0c12);
    transform: translateZ(0); 
}
.header-desktop .row-main {
    background-color: var(--bg-main, #0a0c12);
    margin-top: -1px; 
    padding-top: 9px; 
    border-top: 1px solid var(--bg-main, #0a0c12); 
    transform: translateZ(0);
}

