/*
 * BMC V77 — premium animated capsule header
 * Header-only override. Keeps all existing navigation, account, notification,
 * drawer and theme behaviour while replacing the public wordmark presentation.
 */

:root{
  --bmc-header-v77-bg:#05070c;
  --bmc-header-v77-bg-2:#0b0e15;
  --bmc-header-v77-border:rgba(255,255,255,.30);
  --bmc-header-v77-inner-line:rgba(255,255,255,.07);
  --bmc-header-v77-text:#fff;
}

/* A wider capsule without increasing its desktop height. */
.topbar .container.topbar-inner{
  width:min(1580px,calc(100% - 16px))!important;
  max-width:1580px!important;
  height:66px!important;
  min-height:66px!important;
  padding:7px 10px 7px 18px!important;
  gap:12px!important;
  border:1px solid var(--bmc-header-v77-border)!important;
  border-radius:25px!important;
  background:
    radial-gradient(circle at 18% -60%,rgba(255,255,255,.09),transparent 34%),
    linear-gradient(180deg,var(--bmc-header-v77-bg-2),var(--bmc-header-v77-bg))!important;
  box-shadow:
    0 14px 36px rgba(0,0,0,.34),
    inset 0 1px 0 rgba(255,255,255,.08),
    inset 0 -1px 0 rgba(255,255,255,.025)!important;
  overflow:visible!important;
}

/* The header itself stays black in both light and dark mode. */
html[data-theme="light"] .topbar .container.topbar-inner,
html[data-theme="dark"] .topbar .container.topbar-inner,
html:not([data-theme]) .topbar .container.topbar-inner,
body[data-theme="light"] .topbar .container.topbar-inner,
body[data-theme="dark"] .topbar .container.topbar-inner,
.theme-light .topbar .container.topbar-inner,
.theme-dark .topbar .container.topbar-inner{
  background:
    radial-gradient(circle at 18% -60%,rgba(255,255,255,.09),transparent 34%),
    linear-gradient(180deg,var(--bmc-header-v77-bg-2),var(--bmc-header-v77-bg))!important;
  border-color:var(--bmc-header-v77-border)!important;
  box-shadow:
    0 14px 36px rgba(0,0,0,.34),
    inset 0 1px 0 rgba(255,255,255,.08),
    inset 0 -1px 0 rgba(255,255,255,.025)!important;
}

html[data-theme="light"] .topbar .container.topbar-inner,
body[data-theme="light"] .topbar .container.topbar-inner,
.theme-light .topbar .container.topbar-inner{
  --bmc-header-v77-border:rgba(255,255,255,.54);
  box-shadow:
    0 15px 34px rgba(16,21,31,.20),
    inset 0 1px 0 rgba(255,255,255,.11),
    inset 0 -1px 0 rgba(255,255,255,.03)!important;
}

/* Animated text-only BMC identity. */
.topbar .brand.bmc-wordmark{
  position:relative;
  isolation:isolate;
  flex:0 0 132px!important;
  width:132px!important;
  min-width:132px!important;
  max-width:132px!important;
  height:48px;
  padding:0 7px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  overflow:hidden;
  border-radius:16px;
  color:var(--bmc-header-v77-text)!important;
  background:transparent!important;
}

.topbar .brand.bmc-wordmark::before{
  content:"";
  position:absolute;
  z-index:-1;
  inset:7px 4px;
  border-radius:13px;
  background:linear-gradient(90deg,rgba(255,255,255,.065),rgba(255,255,255,.015));
  border:1px solid rgba(255,255,255,.07);
  opacity:.76;
}

.topbar .brand.bmc-wordmark::after{
  content:"";
  position:absolute;
  top:8px;
  bottom:8px;
  left:-42%;
  width:34%;
  transform:skewX(-18deg);
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.55),transparent);
  filter:blur(.2px);
  animation:bmc-v77-shine 5.4s cubic-bezier(.22,.61,.36,1) infinite;
  pointer-events:none;
}

.bmc-wordmark-text{
  position:relative;
  display:inline-flex;
  align-items:center;
  gap:1px;
  color:#fff!important;
  font-size:30px;
  font-weight:1000;
  line-height:1;
  letter-spacing:-2.2px;
  text-transform:uppercase;
  text-shadow:0 0 18px rgba(255,255,255,.18);
}

.bmc-wordmark-text i{
  display:inline-block;
  min-width:.72em;
  color:#fff!important;
  font-style:normal;
  transform-origin:50% 70%;
  animation:bmc-v77-letter 4.8s ease-in-out infinite;
}
.bmc-wordmark-text i:nth-child(2){animation-delay:.10s}
.bmc-wordmark-text i:nth-child(3){animation-delay:.20s}

/* Keep every existing nav item, with a calm dark capsule. */
.topbar .nav{
  min-height:50px!important;
  padding:5px!important;
  border:1px solid rgba(255,255,255,.08)!important;
  background:rgba(255,255,255,.025)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035)!important;
}
.topbar .nav a{color:rgba(245,247,251,.78)!important}
.topbar .nav a:hover{color:#fff!important}
.topbar .nav a.active{color:#fff!important}

/* Light mode never turns controls or text dark while the header remains black. */
html[data-theme="light"] .topbar .nav,
html[data-theme="light"] .topbar .notification-bell,
html[data-theme="light"] .topbar .account-chip,
html[data-theme="light"] .topbar .header-login-btn,
body[data-theme="light"] .topbar .nav,
body[data-theme="light"] .topbar .notification-bell,
body[data-theme="light"] .topbar .account-chip,
body[data-theme="light"] .topbar .header-login-btn,
.theme-light .topbar .nav,
.theme-light .topbar .notification-bell,
.theme-light .topbar .account-chip,
.theme-light .topbar .header-login-btn{
  color:#fff!important;
  background:rgba(255,255,255,.04)!important;
  border-color:rgba(255,255,255,.13)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04)!important;
}
html[data-theme="light"] .topbar .nav a,
body[data-theme="light"] .topbar .nav a,
.theme-light .topbar .nav a,
html[data-theme="light"] .topbar .account-chip span,
body[data-theme="light"] .topbar .account-chip span,
.theme-light .topbar .account-chip span{
  color:rgba(255,255,255,.82)!important;
}
html[data-theme="light"] .topbar .nav a:hover,
body[data-theme="light"] .topbar .nav a:hover,
.theme-light .topbar .nav a:hover{
  color:#fff!important;
  background:rgba(255,255,255,.065)!important;
  border-color:rgba(255,255,255,.10)!important;
}

/* Replace the old red text glyph with three crisp white bars. */
.topbar .icon-btn.mobile-menu.bmc-menu-toggle{
  color:#fff!important;
  border-color:rgba(255,255,255,.15)!important;
  background:rgba(255,255,255,.04)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05)!important;
}
html[data-theme="light"] .topbar .icon-btn.mobile-menu.bmc-menu-toggle,
body[data-theme="light"] .topbar .icon-btn.mobile-menu.bmc-menu-toggle,
.theme-light .topbar .icon-btn.mobile-menu.bmc-menu-toggle{
  color:#fff!important;
  border-color:rgba(255,255,255,.15)!important;
  background:rgba(255,255,255,.04)!important;
}
.bmc-menu-lines{
  width:20px;
  height:15px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}
.bmc-menu-lines i{
  display:block;
  width:100%;
  height:2px;
  border-radius:999px;
  background:#fff;
  box-shadow:0 0 8px rgba(255,255,255,.18);
  transition:transform .18s ease,width .18s ease;
}
.bmc-menu-lines i:nth-child(2){width:75%;align-self:flex-end}
.bmc-menu-toggle:hover .bmc-menu-lines i:nth-child(2){width:100%}

@keyframes bmc-v77-letter{
  0%,72%,100%{transform:translateY(0) scale(1);filter:brightness(1)}
  6%{transform:translateY(-2px) scale(1.035);filter:brightness(1.35)}
  13%{transform:translateY(0) scale(1);filter:brightness(1)}
}
@keyframes bmc-v77-shine{
  0%,62%{left:-42%;opacity:0}
  67%{opacity:.68}
  83%{left:118%;opacity:0}
  100%{left:118%;opacity:0}
}

@media(max-width:1320px) and (min-width:1101px){
  .topbar .container.topbar-inner{width:calc(100% - 12px)!important;padding-left:13px!important;padding-right:8px!important}
  .topbar .brand.bmc-wordmark{flex-basis:106px!important;width:106px!important;min-width:106px!important;max-width:106px!important}
  .bmc-wordmark-text{font-size:27px}
}

@media(max-width:1100px){
  .topbar .container.topbar-inner{
    width:calc(100% - 14px)!important;
    height:64px!important;
    min-height:64px!important;
    padding:7px 9px!important;
  }
  .topbar .brand.bmc-wordmark{
    flex:1 1 auto!important;
    width:auto!important;
    min-width:0!important;
    max-width:none!important;
  }
  .bmc-wordmark-text{font-size:29px}
}

@media(max-width:720px){
  .topbar .container.topbar-inner{
    width:calc(100% - 12px)!important;
    height:60px!important;
    min-height:60px!important;
    padding:6px 7px!important;
    border-radius:22px!important;
  }
  .topbar .brand.bmc-wordmark{height:44px;padding-left:5px!important}
  .topbar .brand.bmc-wordmark::before{inset:6px 2px}
  .bmc-wordmark-text{font-size:25px;letter-spacing:-1.8px}
  .topbar .icon-btn.mobile-menu.bmc-menu-toggle{display:inline-flex!important}
}

@media(max-width:390px){
  .topbar .container.topbar-inner{gap:5px!important}
  .bmc-wordmark-text{font-size:22px}
  .topbar .brand.bmc-wordmark::after{display:none}
}

@media(prefers-reduced-motion:reduce){
  .bmc-wordmark-text i,
  .topbar .brand.bmc-wordmark::after{animation:none!important}
  .bmc-menu-lines i{transition:none!important}
}
