/* =====================================================================
   CigarPass — the site's top bar, on the forum (loaded by the CigarPass Bridge add-on).
   Same look as the site header (assets/css/site.css §2). Everything is scoped to .cpbar
   so it can't touch XenForo's own styles. Menu content comes from Admin → Menu.
   ===================================================================== */
.cpbar {
  --brass: #D49A42; --brass-hi: #F0C47A; --brass-lo: #8A5F22; --parchment: #EAE0D5; --parchment-dim: #B8A999; --live-red: #D9453B;
  --font-plaque: "Cinzel", "Trajan Pro", Georgia, serif; --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  position: relative; z-index: 210;
  height: 60px;
  background: linear-gradient(180deg, rgba(31,14,9,.97), rgba(22,10,6,.97));
  border-bottom: 1px solid rgba(212,154,66,.35);
  box-shadow: 0 6px 24px rgba(0,0,0,.55);
  font-family: var(--font-ui); color: var(--parchment); line-height: 1.4;
}
.cpbar *, .cpbar *::before, .cpbar *::after { box-sizing: border-box; }
.cpbar a { text-decoration: none; }
.cpbar__inner {
  max-width: 1280px; height: 100%; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.cpbar .visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* crest */
.cpbar .crest { display: flex; align-items: baseline; gap: .55em; font-family: var(--font-plaque); color: var(--brass); white-space: nowrap; flex: none; }
.cpbar .crest__name { font-size: 20px; font-weight: 700; letter-spacing: .06em; }
.cpbar .crest__est  { font-size: 11.2px; letter-spacing: .22em; color: var(--parchment-dim); text-transform: uppercase; }
.cpbar .crest__text { display: flex; align-items: baseline; gap: .55em; }
.cpbar .crest:hover .crest__name { text-shadow: 0 0 12px rgba(212,154,66,.5); }
.cpbar .crest.has-logo { align-items: center; gap: 12px; }
.cpbar .crest__logo { display: block; height: var(--logo-h, 46px); width: auto; max-width: 240px; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,0,0,.6)); transition: filter .25s ease; }
.cpbar .crest:hover .crest__logo { filter: drop-shadow(0 2px 4px rgba(0,0,0,.6)) drop-shadow(0 0 10px rgba(212,154,66,.35)); }

/* menu */
.cpbar .header-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 25.6px; align-items: center; }
.cpbar .header-nav a { font-family: var(--font-plaque); font-size: 13.12px; font-weight: 600; letter-spacing: .08em; color: var(--parchment); }
.cpbar .header-nav a:hover, .cpbar .header-nav a:focus-visible { color: var(--brass-hi); text-shadow: 0 0 10px rgba(212,154,66,.6); }
.cpbar .header-nav a.is-active, .cpbar .header-nav a.is-here { color: var(--brass-hi); }
.cpbar .header-nav a.is-cta { color: var(--brass); border: 1px solid var(--brass-lo); padding: .35em .9em; border-radius: 3px; }
.cpbar .header-nav a.is-cta:hover, .cpbar .header-nav a.is-cta.is-here { border-color: var(--brass); background: rgba(212,154,66,.08); }
.cpbar .header-nav .has-sub { position: relative; display: flex; align-items: center; gap: 3.2px; }
.cpbar .sub-toggle {
  display: inline-flex; align-items: center; gap: .35em; padding: .3em .2em; border: 0; background: none; cursor: pointer;
  font-family: var(--font-plaque); font-size: 13.12px; font-weight: 600; letter-spacing: .08em; color: var(--parchment);
}
.cpbar .sub-toggle::after {
  content: ""; width: .4em; height: .4em; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: translateY(-.15em) rotate(45deg); transition: transform .2s ease; opacity: .8;
}
.cpbar .sub-toggle:hover, .cpbar .sub-toggle:focus-visible, .cpbar .sub-toggle.is-active { color: var(--brass-hi); }
.cpbar .has-sub.is-open > .sub-toggle::after { transform: translateY(.1em) rotate(-135deg); }
.cpbar .header-nav .sub-menu {
  position: absolute; top: calc(100% + 14.4px); left: -17.6px; z-index: 5; display: block; min-width: 224px;
  margin: 0; padding: 7.2px 0; list-style: none; border-radius: 6px;
  background: linear-gradient(180deg, #1b100a, #110906); border: 1px solid rgba(212,154,66,.35);
  box-shadow: 0 18px 40px rgba(0,0,0,.65), inset 0 1px 0 rgba(255,220,160,.06);
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .18s ease, transform .18s ease, visibility 0s .18s;
}
.cpbar .header-nav .sub-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -16px; height: 16px; }
.cpbar .has-sub.is-open > .sub-menu, .cpbar .has-sub:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
@media (hover: hover) { .cpbar .has-sub:hover > .sub-menu { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; } }
.cpbar .header-nav .sub-menu ul, .cpbar .header-nav .sub-menu { flex-direction: column; align-items: stretch; gap: 0; }
.cpbar .header-nav .sub-menu a { display: block; padding: 9.6px 18.4px; font-size: 12.8px; white-space: nowrap; }
.cpbar .header-nav .sub-menu a:hover, .cpbar .header-nav .sub-menu a:focus-visible { background: rgba(212,154,66,.1); text-shadow: none; }
.cpbar .header-nav .has-sub.is-active-branch > a { color: var(--brass-hi); }

/* badges: green chat count, red LIVE, the vHerf line under its menu item */
.cpbar .chat-count { display: inline-grid; place-items: center; min-width: 1.35em; height: 1.35em; margin-left: .3em; padding: 0 .35em;
  border-radius: 99px; vertical-align: .1em; font-family: var(--font-ui); font-size: .76em; font-weight: 700; letter-spacing: 0; line-height: 1;
  color: #06210f; background: linear-gradient(180deg, #5ee08a, #24a552); box-shadow: 0 0 0 1px rgba(0,0,0,.35), 0 0 10px rgba(70,220,120,.45); }
.cpbar .vh-badge { display: inline-flex; align-items: center; gap: .3em; margin-left: .45em; padding: .22em .5em .2em; border-radius: 3px; vertical-align: .12em;
  font-family: var(--font-ui); font-size: .62em; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; line-height: 1;
  color: #fff; background: var(--live-red); box-shadow: 0 0 12px rgba(217,69,59,.55); }
.cpbar .vh-badge::before { content: ""; width: .5em; height: .5em; border-radius: 50%; background: #fff; animation: cpbar-blink 1.6s infinite; }
.cpbar .chat-count[hidden], .cpbar .vh-badge[hidden] { display: none; }
/* Today's Smoke: mahogany circle with today's count beside its menu link */
.cpbar .smoke-count { display: inline-grid; place-items: center; min-width: 1.75em; height: 1.75em; margin-left: .4em; padding: 0 .3em; border-radius: 99px; vertical-align: .05em;
  font-family: var(--font-ui, "Inter", system-ui, sans-serif); font-size: .72em; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 0; line-height: 1; text-transform: none; text-shadow: 0 1px 0 rgba(0,0,0,.6);
  color: #f6d48f; background: radial-gradient(circle at 35% 28%, #8a4a24 0%, #5a2a12 45%, #34160a 100%);
  box-shadow: 0 0 0 1px #c8913c, 0 0 0 2.5px #2a140a, 0 0 0 3px rgba(240,196,122,.45), 0 2px 6px rgba(0,0,0,.5); }
.cpbar .smoke-count[hidden] { display: none; }
.cpbar .smoke-count.is-tick { animation: cpbar-smoke-tick .7s ease-out; }
@keyframes cpbar-smoke-tick { 30% { transform: scale(1.28); box-shadow: 0 0 0 1px #f0c47a, 0 0 0 2.5px #2a140a, 0 0 0 3px rgba(240,196,122,.7), 0 0 14px rgba(240,196,122,.75); } }
@media (prefers-reduced-motion: reduce) { .cpbar .smoke-count.is-tick { animation: none; } }
/* the forum's slide-out menu */
.cpbar-ocm .smoke-count { display: inline-grid; place-items: center; min-width: 1.75em; height: 1.75em; margin-left: .4em; border-radius: 99px; font-size: .72em; font-weight: 700; color: #f6d48f; background: radial-gradient(circle at 35% 28%, #8a4a24, #34160a); box-shadow: 0 0 0 1px #c8913c; }
.cpbar-ocm .smoke-count[hidden] { display: none; }

.cpbar .vh-sub { display: none; }
.cpbar .header-nav a:has(> .vh-sub) { position: relative; }
.cpbar .header-nav .vh-sub { display: block; position: absolute; left: 50%; top: calc(100% + 2px); transform: translateX(-50%); white-space: nowrap; pointer-events: none;
  font-family: var(--font-ui); font-size: 9.92px; font-weight: 600; letter-spacing: .04em; line-height: 1; color: rgba(236,220,190,.62); text-shadow: none; }
.cpbar .header-nav .vh-sub:empty { display: none; }
.cpbar .header-nav .vh-sub--today { color: var(--brass-hi); }
.cpbar .header-nav .vh-sub--live, .cpbar .header-nav .vh-sub--room { color: #ff9b92; font-weight: 700; }
.cpbar .header-nav .sub-menu .vh-sub { position: static; transform: none; display: block; margin: .3em 0 0; font-size: 10.56px; }
@keyframes cpbar-blink { 50% { opacity: .35; } }

/* "Members only" / "Guests only" links (Admin → Menu → Who sees it); XenForo marks the page */
html[data-logged-in="false"] .cpbar [data-aud="members"], html[data-logged-in="true"] .cpbar [data-aud="guests"] { display: none !important; }

/* tablets: menu goes into XenForo's slide-out menu (the ☰ here opens it) */
.cpbar__menuBtn { display: none; flex: none; width: 42px; height: 38px; padding: 0; border: 1px solid var(--brass-lo); border-radius: 3px; background: none; color: var(--brass); cursor: pointer; }
.cpbar__menuBtn span, .cpbar__menuBtn span::before, .cpbar__menuBtn span::after { display: block; width: 20px; height: 2px; margin: 0 auto; position: relative; background: currentColor; }
.cpbar__menuBtn span::before, .cpbar__menuBtn span::after { content: ""; position: absolute; left: 0; }
.cpbar__menuBtn span::before { top: -6px; } .cpbar__menuBtn span::after { top: 6px; }
@media (max-width: 1000px) {
  .cpbar .header-nav { display: none; }
  .cpbar__menuBtn { display: block; }
}
/* phones: one header, not two. XenForo's own row (☰ · logo · avatar/inbox/alerts/search) is the header,
   and its ☰ menu carries both the Forum menu and the site's menu. */
@media (max-width: 650px) {
  .cpbar { display: none; }
}

/* the forum's own rows under the bar: no second logo row, no duplicate section links */
.cpbar ~ .p-header { display: none; }
.cpbar ~ .p-sectionLinks, .cpbar ~ .p-navSticky .p-sectionLinks { display: none; }

/* XenForo's slide-out menu: the site's links under "The Lounge" */
.cpbar-ocm-head { padding: 12px 10px 4px; font-family: "Cinzel", Georgia, serif; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #D49A42; }
.cpbar-ocm .offCanvasMenu-link .vh-badge { font-size: 10px; padding: 2px 5px; border-radius: 3px; color: #fff; background: #D9453B; margin-left: 6px; letter-spacing: .1em; }
.cpbar-ocm .offCanvasMenu-link .vh-sub, .cpbar-ocm .offCanvasMenu-link .chat-count { display: none; }
.cpbar-ocm .offCanvasMenu-link.u-indentDepth1 { padding-left: 24px; }
html[data-logged-in="false"] .cpbar-ocm [data-aud="members"], html[data-logged-in="true"] .cpbar-ocm [data-aud="guests"] { display: none !important; }

@media (prefers-reduced-motion: reduce) { .cpbar .vh-badge::before { animation: none; } }

/* ---- The lounge backdrop: the homepage background, blurred and dimmed, fixed behind the forum ----
   (cp-bar.js turns it on once the small image has loaded; Admin → Menu → Forum menu switches it) */
html.cp-backdrop { background-color: #0D0705; }
html.cp-backdrop body { background: transparent !important; }
html.cp-backdrop body::before {                 /* the photo, blurred as set in the admin */
  content: ""; position: fixed; inset: var(--cp-backdrop-bleed, 0); z-index: -2; pointer-events: none;
  background: var(--cp-backdrop) center top / cover no-repeat;
  filter: blur(var(--cp-backdrop-blur, 0)) saturate(1.08);
  opacity: 0; transition: opacity .8s ease;
}
html.cp-backdrop body::after {                  /* the shade on top (Darkness) + a light fade under the menu */
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(13,7,5,.35) 0%, transparent 18%),
    linear-gradient(180deg, rgba(13,7,5,var(--cp-backdrop-dim, .45)) 0%, rgba(13,7,5,var(--cp-backdrop-dim2, .49)) 100%);
  opacity: 0; transition: opacity .8s ease;
}
html.cp-backdrop--in body::after { opacity: 1; }
html.cp-backdrop--in body::before { opacity: 1; }
@media (prefers-reduced-motion: reduce) { html.cp-backdrop body::before, html.cp-backdrop body::after { transition: none; } }
html.cp-backdrop .p-pageWrapper, html.cp-backdrop .p-body { background: transparent !important; }

/* Keep the forum bar on one line as the menu grows (same steps as the site header) */
.cpbar .header-nav a { white-space: nowrap; }
@media (max-width: 1500px) { .cpbar .crest__est { display: none; } .cpbar .header-nav ul { gap: 19.2px; } }
@media (max-width: 1280px) { .cpbar .header-nav ul { gap: 14.4px; } .cpbar .header-nav > ul > li > a, .cpbar .header-nav .has-sub > a { letter-spacing: .04em; } }
@media (max-width: 1140px) { .cpbar .crest.has-logo .crest__name { display: none; } .cpbar .header-nav ul { gap: 11.2px; } }

/* Bordered menu buttons are the same height whether or not they have a dropdown (▾) */
.cpbar .header-nav a.is-cta { display: inline-block; line-height: 1.5; }

.cpbar .smoke-count.game-count.is-live, .cpbar-ocm .smoke-count.game-count.is-live { min-width: 0; padding: 0 7px; font-size: 9px; letter-spacing: .12em; color: #fff; background: radial-gradient(circle at 35% 28%, #e0574a, #8e1c14); box-shadow: 0 0 0 1px #f08a7f; }

/* The bar comes back the moment you scroll up (cp-bar.js adds .cpbar-peek / .is-away; Admin → Menu → Forum menu).
   XenForo's own sticky bar sits under it while it's showing (--cpbar-pin = the bar's height, or 0 while it's away). */
.cpbar-peek .cpbar { position: sticky; top: 0; transition: transform .28s ease, box-shadow .28s ease; will-change: transform; }
.cpbar-peek .cpbar.is-away { transform: translateY(-100%); box-shadow: none; }
.cpbar-peek .p-navSticky { top: var(--cpbar-pin, 0px) !important; transition: top .28s ease; }
