/* Host-shell globals. The shell paints with the HSL tokens below — a separate
   system from the widget tokens in theme/tokens.css. */

@import url('../base/global.css');

[data-brand='caliente'] {
  --background: 0 0% 97%;
  --card: 0 0% 100%;
  --foreground: 0 0% 8%;
  --border: 0 0% 90%;
  --muted-foreground: 0 0% 48%;
  --elevated: 0 0% 100%;
  --primary: 0 100% 43%;
  --primary-foreground: 0 0% 100%;
  --destructive: 354 69% 48%;

  /* Pressed/hover red. Aliases the accent's hover so a retint carries here. */
  --cl-red-hover: var(--color-AccentYellowHover);

  --pm-page-max-width: 1400px;

  /* Onboarding (PRED-627). VSiN's layout in Caliente's values — no Caliente
     frame exists yet. The card is a fixed 530 centred on the page, so the
     column is the page's width. Literals: head-loaded before theme.css. */
  --pm-onboarding-canvas: #f7f7f7;
  --pm-onboarding-max-width: 87.5rem;
  --pm-onboarding-page-padding: 1.5rem 1rem;
  --pm-onboarding-page-padding-lg: 1.75rem 1.5rem 4rem;

  /* League sidebar. The module is token-driven by design, so the skin is values
     rather than selectors. Literals: this sheet is head-loaded before theme.css,
     so a var() would flash unstyled. */
  --pm-category-sidebar-width: 100%;
  --pm-cat-nav-pad-right: 0;
  --pm-cat-nav-gap: 8px;
  --pm-cat-nav-bg: #ffffff;
  --pm-cat-nav-border: 1px solid #e5e5e5;
  --pm-cat-nav-radius: 16px;
  --pm-cat-nav-pad: 16px;
  --pm-cat-nav-title-color: #7b7b7b;
  --pm-cat-nav-item-color: #141414;
  --pm-cat-nav-item-pad: 8px;
  --pm-cat-nav-item-gap: 8px;
  --pm-cat-nav-margin-top: 0;
  /* Expanded events sit under a dashed rule that runs the height of the list. */
  --pm-cat-nav-event-indent: 15px;
  /* 1px so the rule clears the list's clip edge and the marker can sit centred
     on it; the row's own inset is --pm-cat-nav-event-row-indent. */
  --pm-cat-nav-event-pad: 1px;
  --pm-cat-nav-event-row-indent: 12px;
  --pm-cat-nav-event-rule: 1px dashed #e5e5e5;
  /* Cap so the rail keeps its height whatever a tag holds; the list scrolls. */
  --pm-cat-nav-event-max-height: 600px;
  --pm-cat-nav-event-scroll-thumb: #e5e5e5;
  /* Count badge on each row: ink pill, white numeral; red when its row is
     selected (PRED-586). */
  --pm-cat-nav-count-bg: #141414;
  --pm-cat-nav-count-color: #ffffff;
  --pm-cat-nav-count-active-bg: #e93544;
  --pm-cat-nav-count-active-color: #ffffff;
  /* Active row: the pill an expanded tag wears; its label, count and icon go
     red. */
  --pm-cat-nav-active-bg: #f7f7f7;
  --pm-cat-nav-active-ring: inset 0 0 0 1px #e5e5e5;
  --pm-cat-nav-active-radius: 8px;
  --pm-cat-nav-active-color: #e93544;
  --pm-cat-nav-active-weight: 600;
  --pm-cat-nav-icon-active-filter: brightness(0) drop-shadow(4rem 0 0 #e93544);
  --pm-cat-nav-icon-active-shift: translateX(-4rem);
  /* Hover mirrors the active row exactly — each token points at its active
     counterpart, so the two states never drift. */
  --pm-cat-nav-row-hover-bg: var(--pm-cat-nav-active-bg);
  --pm-cat-nav-row-hover-ring: var(--pm-cat-nav-active-ring);
  --pm-cat-nav-hover-color: var(--pm-cat-nav-active-color);
  --pm-cat-nav-hover-weight: var(--pm-cat-nav-active-weight);
  --pm-cat-nav-count-hover-bg: var(--pm-cat-nav-count-active-bg);
  --pm-cat-nav-count-hover-color: var(--pm-cat-nav-count-active-color);
  --pm-cat-nav-icon-hover-filter: var(--pm-cat-nav-icon-active-filter);
  --pm-cat-nav-icon-hover-shift: var(--pm-cat-nav-icon-active-shift);
  /* Selected event: a rail centred on the dashed rule. The offset backs out the
     list's 1px pad, the row's 12px indent and the rule's 1px. */
  --pm-cat-nav-event-marker-width: 3px;
  --pm-cat-nav-event-marker-color: var(--pm-cat-nav-active-color);
  --pm-cat-nav-event-marker-left: -14px;
  --pm-cat-nav-event-marker-inset: 6px;
  --pm-cat-nav-height: 100%;
  --pm-cat-nav-position: static;

  /* All-Markets tag row (Figma 1205:49067). 50px radius and -0.084px tracking
     are the design's own values, off every ramp. */
  --am-pills-gap: 2px;
  --am-pill-height: 28px;
  --am-pill-padding: 4px 16px;
  --am-pill-radius: 50px;
  --am-pill-color: #7b7b7b;
  --am-pill-weight: 500;
  --am-pill-line-height: 1.25rem;
  --am-pill-font-features: 'cv09' 1, 'ss11' 1, 'calt' 0, 'liga' 0;
  --am-pill-active-bg: rgba(14, 18, 27, 0.1);
  --am-pill-active-color: #141414;
  --am-pill-active-weight: 500;

  /* A gradient fade with a caret, not a bordered circle: an 85px panel pulled
     back over the pills so the row dissolves under it. */
  --am-chevron-width: 85px;
  --am-chevron-height: 42px;
  --am-chevron-radius: 0;
  --am-chevron-border: none;
  --am-chevron-bg: transparent;
  --am-chevron-bg-hover: transparent;
  --am-chevron-color: #7b7b7b;
  --am-chevron-color-hover: #7b7b7b;
  --am-chevron-font-size: 20px;
  --am-chevron-overlap: -85px;
  /* The panel is pulled back over the pills, so only the caret may take clicks
     — otherwise the fade eats taps on the last visible pill. */
  --am-chevron-pointer-events: none;
  --am-chevron-justify-left: flex-start;
  --am-chevron-justify-right: flex-end;
  /* The card the pills sit in, not the page: a page-grey fade over the white
     All-Markets card painted a visible band (PRED-630). */
  --am-chevron-image-left: linear-gradient(
    to right,
    hsl(var(--card)) 40%,
    hsl(var(--card) / 0)
  );
  --am-chevron-image-right: linear-gradient(
    to left,
    hsl(var(--card)) 40%,
    hsl(var(--card) / 0)
  );
  /* Mobile bottom nav. 4.125rem is Figma's 8 + 58px, the part that doesn't
     move; the rest tracks the bar's own bottom padding, so a home-indicator
     inset taller than 1.25rem grows the reserve with it instead of leaving that
     slice of the page stuck under the bar. Replaces base's 68px. */
  --bottom-toolbar-height: calc(
    4.125rem + max(1.25rem, env(safe-area-inset-bottom))
  );

  /* Mobile league nav (LAYOUT.lobbyTagNav). Adjustable here (shell token block —
     global.css head-loads before theme.css). Transparent band so the header's
     shared radial flows through; light labels, translucent-white active pill.
     Right-edge fade = #141414, the band's colour past the radial. */
  --pm-lobby-tag-bg: transparent;
  --pm-lobby-tag-color: hsl(var(--primary-foreground) / 0.72);
  --pm-lobby-tag-active-bg: hsl(var(--primary-foreground) / 0.24);
  --pm-lobby-tag-active-color: hsl(var(--primary-foreground));
  --pm-lobby-tag-arrow-color: hsl(var(--primary-foreground));
}

/* Uncap .header so the gradient is full-bleed; --cl-gutter re-insets the content
   to a centred 87.5rem (1400px) column, at Figma's 20px minimum. */
[data-brand='caliente'] .header {
  max-width: none;
  --cl-gutter: max(1.25rem, calc((100% - 87.5rem) / 2 + 1.25rem));
}

/* One radial across the main bar + league nav so the red flows continuously
   through both (per the design). Scoped to .header__top so it does NOT reach the
   exchange-state banner below it, which keeps its own background. Both bands are
   transparent over this. */
[data-brand='caliente'] .header__top {
  background-color: #141414;
  background-image: radial-gradient(
    251.9px 278.2px at 0 0,
    #b20000 0%,
    #8b0505 25%,
    #630a0a 50%,
    #3c0f0f 75%,
    #281212 87.5%,
    #141414 100%
  );
}

/* Header bar. Figma's radial is a ~252x278px ellipse at the top-left corner,
   rotated ~17deg — CSS can't rotate a radial-gradient, but the bar is 72px tall
   so only the unrotated-looking top sliver is ever visible. */
[data-brand='caliente'] .header__main-bar {
  min-height: 72px;
  padding-block: 16px;
  padding-inline: var(--cl-gutter);
  gap: 24px;
  /* Transparent: the radial now lives on .header and spans both bands. */
  background: transparent;

  --foreground: 0 0% 100%;
  --muted-foreground: 0 0% 82%;
  /* The bar is dark while the page is light, so the widgets mounted in it
     (portfolio + balance previews) need the inverted text tokens too. */
  --pm-text: #ffffff;
  --pm-text-secondary: #d1d1d1;
  --pm-text-muted: #d1d1d1;
}

/* The search dropdown is a light popover, but a DOM child of the dark bar, so it
   has to take the page's text tokens back. */
[data-brand='caliente'] .pm-search-dropdown {
  --pm-text: var(--color-PrimaryText);
  --pm-text-secondary: var(--color-SecondaryText);
  --pm-text-muted: var(--color-TertiaryText);
}

/* 2.5rem above and below the page, on the content wrapper so the sidebar and the
   main column stay aligned. Desktop-only: the sidebar is what this offset
   exists to align against and it is hidden below 1024px (header-layout.css).
   Figma agrees on both halves — desktop event page puts the content Container
   at y=110 under a 70px header (= 40px), and both mobile frames put the first
   content row at y=24 under the 126px header. So on mobile the 40px is wrong and
   0 is wrong: the target is 24, applied to the routes' own top inset below,
   because the two routes ship different defaults (12 lobby / 16 event). */
[data-brand='caliente'] .header-layout__content {
  margin-block: 2.5rem;
}

/* `.header-layout__content` already gives the page its vertical inset. The
   shared 100px assumes a taller header than this brand's 72px bar. */
[data-brand='caliente'] .market-page-container {
  --header-height: 4.5rem;

  gap: 1rem;
  /* `.header-layout__with-sidebar` already insets the column above 1024. */
  padding-inline: 0;
}

/* Two columns: `.header-layout__content`'s margin is the only vertical inset.
   Left alone below this, where the shared 120px clears the fixed ticket. */
@media (min-width: 1120px) {
  [data-brand='caliente'] .market-page-container {
    padding-block: 0;
  }
}

/* The wrapper drops its inset with the league sidebar, so the column takes over. */
@media (max-width: 1023.98px) {
  [data-brand='caliente'] .market-page-container {
    padding-inline: 1.5rem;
  }
}

/* Pins 16px under the header. Must stay below the column's own start (header +
   the 40px content margin) or sticky displaces it down and it never scrolls. */
[data-brand='caliente'] .market-page-sidebar {
  /* Starts level with the hero card: clears the back-button row above it, its
     22px line box plus the gap below it. */
  margin-top: calc(1.4375rem + var(--pm-back-button-gap, 0.875rem));
  top: calc(var(--header-height) + 1rem);
}

@media (max-width: 1023.98px) {
  [data-brand='caliente'] .header-layout__content {
    margin-block: 0;
  }

  /* Figma mobile: first content row at y=24 under the header, on both the
     lobby ("Home - Genral layout" / Guest user, 393w) and the event page
     ("Event page - Soccer", 393w). Same number on both, so the two pages start
     level — which is the alignment this pair of rules exists to guarantee. */
  [data-brand='caliente'] .lobby__page,
  [data-brand='caliente'] .market-page-container {
    padding-top: 1.5rem;
  }
}

[data-brand='caliente'] .header__logo-img {
  height: 40px;
}

/* Caliente navigates by the leagues sidebar, not the header strip. LAYOUT
   .categoryNav only gates the category page's own nav, so hide this one here. */
[data-brand='caliente'] .header__category-bar {
  display: none;
}

/* Mobile league nav (LAYOUT.lobbyTagNav). Transparent so the header's shared
   radial flows through — the red continues from the main bar and fades to black
   toward the right (per the design). Active pill is a translucent white so the
   red shows through it. Pill shape + the fade/caret chevron come from the
   brand-root --am-* tokens; the colours are re-tuned here for the dark surface.
   The right fade is #141414 (the band is already black on the right, past the
   radial), the left fade a dark red to match the band there — so the chevrons
   dissolve the pills into the gradient instead of boxing over it. */
/* Portfolio / Balance previews. Label and value on one row, as vidamarkets does.
   The --wc-stat-* overrides sit on .wc-statistic itself, not on the bar:
   statistic.css declares its defaults on that element, so an ancestor
   declaration would inherit in and lose to them. StatPreview renders
   variant="success", which is what paints the value green. */
[data-brand='caliente']
  :is(.header__right-section, .side-menu__stats)
  .wc-statistic {
  flex-direction: row;
  gap: 0.5rem;

  --wc-stat-title-size: 0.875rem;
  --wc-stat-title-color: #d1d1d1;
  --wc-stat-value-size: 0.875rem;
  --wc-stat-value-weight: var(--pm-weight-medium, 500);
  --wc-stat-value-color: #ffffff;
  --wc-stat-color-success: #ffffff;
}

[data-brand='caliente'] .side-menu__stats .wc-statistic {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.125rem; /* 2px */
}

[data-brand='caliente'] .header__search-section {
  max-width: 400px;
  margin: 0;
}

[data-brand='caliente'] .header__icon-button--menu {
  color: hsl(var(--foreground));
}

/* Auth CTAs. NB the base markup swaps these class names: `--register` is on the
   Log in button and `--login` is on Sign up (HeaderMainBar.tsx). */
[data-brand='caliente'] .header__auth-buttons {
  gap: 8px;
}

[data-brand='caliente'] .header__auth-button.header__auth-button--register,
[data-brand='caliente'] .header__auth-button.header__auth-button--login,
[data-brand='caliente'] .header__deposit-button,
[data-brand='caliente'] .header__withdraw-button,
[data-brand='caliente'] .side-menu .side-menu__withdraw {
  height: 2.25rem;
  padding: 0 1rem;
  border-radius: 0.625rem;
  font-size: 0.875rem;
  font-weight: var(--pm-weight-medium, 500);
  line-height: 1.25rem;
  box-shadow: 0 0.0625rem 0.0625rem rgba(10, 13, 20, 0.03);
  cursor: pointer;
  white-space: nowrap;
}

[data-brand='caliente'] .header__auth-button.header__auth-button--register {
  background: #333333;
  color: hsl(var(--primary-foreground));
}

[data-brand='caliente']
  :is(.header__main-bar, .side-menu)
  .header__auth-buttons
  .header__auth-button.header__auth-button--register:hover {
  background: #3d3d3d;
  color: hsl(var(--primary-foreground));
  opacity: 1;
}

/* Ant re-adds a tinted 1px border on hover/focus, which both recolours the
   button and nudges its box. Hold a transparent border in every state so only
   the fill changes. */
[data-brand='caliente']
  :is(.header__main-bar, .side-menu)
  :is(.header__deposit-button, .header__auth-button, .side-menu__withdraw) {
  border: 1px solid transparent;
  outline: none;
  transition:
    background-color 0.18s ease,
    opacity 0.18s ease;
}

/* Header Withdraw is the secondary of the Deposit/Withdraw pair — outline, not
   filled. The palette cannot be --card/--border/--foreground here the way it is
   on a light bar: the bar re-scopes --foreground to white for its dark ground
   (see .header__main-bar above) but leaves --card and --border at the page's
   light :root values, so the three together paint a white pill carrying a white
   label. The outline is drawn in the bar's own ink instead, which tracks that
   re-scope. VSiN keeps the shared light-bar treatment — its bar is white. */
[data-brand='caliente'] .header__main-bar .header__withdraw-button {
  background: transparent;
  border: 1px solid hsl(var(--foreground) / 0.4);
  box-shadow: none;
  color: hsl(var(--foreground));
  outline: none;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    opacity 0.18s ease;
}

[data-brand='caliente'] .header__main-bar .header__withdraw-button:hover {
  background: hsl(var(--foreground) / 0.08);
  color: hsl(var(--foreground));
}

/* Same reason as the transparent-border hold above, opposite value: antd
   recolours the border on hover/focus/active, so pin the stroke. */
[data-brand='caliente']
  .header__main-bar
  .header__withdraw-button:is(:hover, :focus, :focus-visible, :active) {
  border-color: hsl(var(--foreground) / 0.4);
}

[data-brand='caliente']
  :is(.header__main-bar, .side-menu)
  :is(
    .header__deposit-button,
    .header__auth-button,
    .side-menu__withdraw
  ):hover,
[data-brand='caliente']
  :is(.header__main-bar, .side-menu)
  :is(
    .header__deposit-button,
    .header__auth-button,
    .side-menu__withdraw
  ):focus,
[data-brand='caliente']
  :is(.header__main-bar, .side-menu)
  :is(
    .header__deposit-button,
    .header__auth-button,
    .side-menu__withdraw
  ):focus-visible,
[data-brand='caliente']
  :is(.header__main-bar, .side-menu)
  :is(
    .header__deposit-button,
    .header__auth-button,
    .side-menu__withdraw
  ):active {
  border-color: transparent;
  box-shadow: 0 0.0625rem 0.0625rem rgba(10, 13, 20, 0.03);
  transform: none;
}

/* Ant paints an outlined button's hover from its own colorPrimary (#B56BFF), at
   a specificity the shared header rule loses to — pin the brand red instead. */
[data-brand='caliente']
  .header__main-bar
  .header__right-section
  .header__deposit-button:is(:hover, :focus, :focus-visible, :active) {
  background: var(--cl-red-hover);
  color: hsl(var(--primary-foreground));
}

/* ---- Mobile search ------------------------------------------------------
   The shared header already renders a search icon inside
   `.header__mobile-icons`, but base only reveals that group — and only opens
   the search panel — for a signed-in customer. Caliente wants search in both
   states; the hamburger inside the group stays hidden by the rule below, so
   revealing the group gives guests search alone.

   Deposit is deliberately NOT brought onto the mobile bar: base hides the
   authenticated right section at this width and it stays hidden. The side menu
   keeps its own Deposit CTA. */
@media (max-width: 639.98px) {
  [data-brand='caliente'] .header__mobile-icons {
    display: flex;
  }

  /* Guest bar keeps the login / signup CTAs on the header (PRED-563): the right
     section stays visible so base's `!important` reveal of `.header__auth-buttons`
     applies. Search and the language picker live in the mobile-icons group at
     this width, so hide this section's duplicate language trigger — base already
     hides its mobile search icon and menu trigger for guests. */
  [data-brand='caliente']
    .header:not(.header--authenticated)
    .header__right-section
    .header__language {
    display: none;
  }

  /* Base pushes the right section to the far edge with margin-left: auto; drop it
     on mobile so the auth CTAs sit next to the mobile-icons group. Scoped + in
     the mobile block so desktop and other brands keep base's spacing. */
  [data-brand='caliente'] .header__right-section {
    margin-left: 0;
  }

  /* The opened panel takes a row of its own, so the bar has to be allowed to
     wrap for guests too — base only sets this on the authenticated bar. */
  [data-brand='caliente']
    .header:not(.header--authenticated)
    .header__main-bar {
    flex-wrap: wrap;
  }

  [data-brand='caliente'] .header__search-section--open {
    display: block;
    flex-basis: 100%;
    max-width: none;
    margin: 0;
    order: 3;
    padding-top: 8px;
  }
}

/* ---- Dropdown scroll lock ------------------------------------------------
   Radix locks body scroll while a Select is open (react-remove-scroll), and its
   default `gapMode: 'margin'` writes `margin-right: <scrollbar>px !important`
   on `body[data-scroll-locked]` to stand in for the scrollbar it hides. On this
   layout that lands as a visible ~10px shift of the whole page when the sort
   dropdown opens.

   Scoped to the brand and to the locked state, so it only applies while a
   dropdown is open and no other brand's compensation changes. `overflow` is
   left alone — the page still must not scroll behind the open menu. */
body[data-brand='caliente'][data-scroll-locked] {
  margin-right: 0 !important;
  padding-right: 0 !important;
}

/* ==================== hamburger side menu (PRED-465) ==================== */

[data-brand='caliente']
  .header:not(.header--authenticated)
  .header__menu-trigger,
[data-brand='caliente'] .header__mobile-icons .header__menu-trigger {
  display: none;
}

[data-brand='caliente'] .side-menu {
  --side-menu-bg: #141414;
  --side-menu-text: #ffffff;
  --side-menu-text-muted: #a3a3a3;
  --side-menu-divider: #333333;
  --side-menu-item-hover-bg: #292929;
  --side-menu-secondary-bg: #333333;
  --side-menu-secondary-bg-hover: #3d3d3d;
  --side-menu-dropdown-inset: var(--cl-gutter, 1.25rem);
}

[data-brand='caliente'] .side-menu .side-menu__item {
  height: 2.25rem;
  gap: 0.5rem;
  padding: 0 0.75rem;
  border-radius: 0.5rem;
}

[data-brand='caliente'] .side-menu .side-menu__label {
  font-size: 0.875rem;
  line-height: 1.25rem;
  letter-spacing: -0.006em;
}

[data-brand='caliente'] .side-menu .side-menu__item--danger .side-menu__label,
[data-brand='caliente'] .side-menu .side-menu__item--danger .side-menu__icon {
  color: var(--side-menu-text-muted);
}

[data-brand='caliente']
  .side-menu
  .side-menu__item--danger:hover
  .side-menu__label,
[data-brand='caliente']
  .side-menu
  .side-menu__item--danger:hover
  .side-menu__icon {
  color: var(--side-menu-text);
}

[data-brand='caliente'] .side-menu--dropdown {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  padding: 0.5rem;
  border: 1px solid #333333;
  border-radius: 1rem;
  box-shadow:
    0 1.5rem 3rem -0.75rem rgba(10, 13, 18, 0.18),
    0 0.25rem 0.25rem -0.125rem rgba(10, 13, 18, 0.04);
}

/* Inline inset matches the header above, so the rows line up with the close
   button rather than sitting 8px further in. */
[data-brand='caliente'] .side-menu--drawer .ant-drawer-body {
  padding: 0 0.75rem 1.5rem;
}

[data-brand='caliente'] .side-menu--drawer .ant-drawer-header {
  padding: 0.5rem 0.75rem;
  border-bottom: none;
}

[data-brand='caliente'] .side-menu--drawer .ant-drawer-title {
  display: none;
}

[data-brand='caliente'] .side-menu--drawer .ant-drawer-close {
  width: 1.75rem;
  height: 1.75rem;
  margin: 0;
  border-radius: 50%;
  background: #333333;
  color: #ffffff;
  font-size: 1rem;
}

[data-brand='caliente'] .side-menu .side-menu__group--divided {
  margin-top: 0;
  padding-top: 0.125rem;
  border-top: none;
}

[data-brand='caliente'] .side-menu__stats {
  column-gap: 0.5rem;
  padding: 0.5rem 0.5rem 0.25rem;
}

[data-brand='caliente'] .side-menu__stat:first-child {
  border-inline-end: none;
}

/* Shrink each half to its content instead of the grid's default stretch. */
[data-brand='caliente'] .side-menu__stat {
  justify-self: start;
}

[data-brand='caliente'] .side-menu__ctas {
  padding-inline: 0.5rem;
}

[data-brand='caliente'] .side-menu__auth {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  margin-block-start: 0.5rem;
  padding-inline: 0.5rem;
}

[data-brand='caliente'] .side-menu__auth > * {
  flex: 0 0 auto;
  width: 100%;
}

[data-brand='caliente']
  .side-menu
  :is(.header__deposit-button, .header__auth-button--login):hover {
  background: #b20000;
  color: hsl(var(--primary-foreground));
  opacity: 1;
}

[data-brand='caliente'] .side-menu__leagues {
  --pm-cat-nav-bg: transparent;
  --pm-cat-nav-border: none;
  --pm-cat-nav-radius: 0;
  --pm-cat-nav-pad: 0;
  --pm-cat-nav-height: auto;
  --pm-cat-nav-title-color: #a3a3a3;
  --pm-cat-nav-item-color: #ffffff;
  --pm-cat-nav-count-bg: #f5f5f5;
  --pm-cat-nav-count-color: #333333;
  --pm-cat-nav-item-hover-bg: #1f1f1f;
  --pm-cat-nav-active-bg: #292929;
  --pm-cat-nav-active-color: #fb3748;
  --pm-cat-nav-active-weight: 600;
  --pm-cat-nav-active-ring: inset 0 0 0 1px rgba(153, 160, 174, 0.24);
  --pm-cat-nav-event-rule: 1px dashed #333333;
  --pm-cat-nav-event-scroll-thumb: #333333;
  --pm-cat-nav-icon-filter: brightness(0) drop-shadow(4rem 0 0 #ffffff);
  --pm-cat-nav-icon-active-filter: brightness(0) drop-shadow(4rem 0 0 #fb3748);
  --pm-cat-nav-icon-shift: translateX(-4rem);
}

[data-brand='caliente'] .side-menu__leagues [data-slug='live'] img {
  --pm-cat-nav-icon-filter: none;
  --pm-cat-nav-icon-active-filter: none;
  --pm-cat-nav-icon-shift: none;
}

/* ========================= header language selector ========================= */
/* The panel wears the side-menu classes; it is light while the hamburger menu
   stays dark, so the palette is redeclared on the language panel only. */

[data-brand='caliente'] .header__language-trigger {
  gap: 0.125rem;
  padding: 0 0.25rem 0 0.375rem;
  border-radius: 0.5rem;
}

/* Guests: the selector sits before Log in / Sign up. */
[data-brand='caliente']
  .header:not(.header--authenticated)
  .header__right-section
  .header__language {
  order: -1;
}

[data-brand='caliente'] .header__language-trigger[aria-expanded='true'] {
  background: rgba(255, 255, 255, 0.16);
}

[data-brand='caliente']
  .header__language-trigger[aria-expanded='true']
  .header__language-chevron {
  transform: rotate(180deg);
}

[data-brand='caliente'] .header__language-flag,
[data-brand='caliente'] .side-menu--language .side-menu__icon--flag {
  width: 1.25rem;
  height: 1.25rem;
}

[data-brand='caliente'] .side-menu--dropdown.side-menu--language {
  --side-menu-bg: #ffffff;
  --side-menu-text: #141414;
  --side-menu-text-muted: #141414;
  --side-menu-item-hover-bg: #f5f5f5;
  --side-menu-divider: #e5e5e5;
  width: 13.75rem;
  margin-top: 1.75rem;
  padding: 0.375rem;
  border-color: #e5e5e5;
  border-radius: 0.75rem;
  box-shadow: 0 1rem 2rem -0.75rem rgba(14, 18, 27, 0.1);
}

/* Heading from the panel's own translated aria-label. */
[data-brand='caliente'] .side-menu--language::before {
  content: attr(aria-label);
  display: block;
  padding: 0.5rem 0.625rem 0.375rem;
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 0.75rem;
  letter-spacing: 0.0138rem;
  text-transform: uppercase;
  color: #7b7b7b;
}

[data-brand='caliente']
  .side-menu--dropdown.side-menu--language
  .side-menu__item {
  height: 2.5rem;
  gap: 0.625rem;
  padding: 0 0.625rem;
}

[data-brand='caliente'] .side-menu--language .side-menu__language-tick {
  font-size: 1rem;
}

/* Phone: the panel hangs from the bar's right gutter, not from the flag, so it
   stays on screen; guests get search, flag, Log in and Sign up on one row at
   the Figma's 6px spacing. */
@media (max-width: 639.98px) {
  [data-brand='caliente'] .header__main-bar {
    position: relative;
  }

  [data-brand='caliente'] .header__mobile-icons .header__language {
    position: static;
  }

  [data-brand='caliente']
    .header__mobile-icons
    .side-menu--dropdown.side-menu--language {
    right: var(--cl-gutter);
    margin-top: 0.5rem;
  }

  [data-brand='caliente']
    .header:not(.header--authenticated)
    :is(.header__main-bar, .header__mobile-icons) {
    column-gap: 0.375rem;
  }
}

/* Phone language sheet: the brand band and dark disc close of the modals,
   then a white panel of radio cards. */
[data-brand='caliente'] .language-sheet .ant-drawer-section {
  border-radius: 1.5rem 1.5rem 0 0;
  overflow: hidden;
  background-color: var(--pm-modal-bg, #141414);
  background-image: var(--pm-brand-band-image);
  background-repeat: no-repeat;
  background-position: top center;
  background-size: 100% auto;
}

[data-brand='caliente'] .language-sheet .ant-drawer-header {
  position: relative;
  padding: 1.5rem 1rem 1.25rem;
  border-bottom: none;
}

[data-brand='caliente'] .language-sheet .ant-drawer-title {
  text-align: center;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.75rem;
  letter-spacing: -0.025rem;
  color: var(--pm-modal-title-color, #ffffff);
}

[data-brand='caliente'] .language-sheet .ant-drawer-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 1.75rem;
  height: 1.75rem;
  margin: 0;
  border-radius: 50%;
  background: var(--pm-modal-close-bg, rgba(14, 18, 27, 0.24));
  backdrop-filter: blur(2px);
  color: var(--pm-modal-close-color, #ffffff);
  font-size: 1rem;
}

[data-brand='caliente'] .language-sheet .ant-drawer-body {
  padding: 1.5rem 1.5rem 2.5rem;
  border-radius: 1.25rem 1.25rem 0 0;
  background: #ffffff;
}

[data-brand='caliente'] .language-sheet .language-sheet__prompt {
  letter-spacing: -0.084px;
  color: #141414;
}

[data-brand='caliente'] .language-sheet .language-sheet__option {
  border-color: #e5e5e5;
  background: #ffffff;
  color: #141414;
}

[data-brand='caliente']
  .language-sheet
  .language-sheet__option.language-sheet__option--active {
  border-color: #141414;
  box-shadow: inset 0 0 0 0.5px #141414;
}

[data-brand='caliente'] .language-sheet .language-sheet__label {
  letter-spacing: -0.176px;
}

[data-brand='caliente'] .language-sheet .language-sheet__radio {
  border-color: #d1d1d1;
}

[data-brand='caliente']
  .language-sheet
  .language-sheet__option--active
  .language-sheet__radio {
  border-color: #141414;
}

/* ====================== mobile bottom nav (PRED-466) ====================== */
/* Reuses the shared .bottom-toolbar; the tabs are CMS config
   (LAYOUT.bottomToolbar.mobile in the caliente seed), so only the skin is here.
   Ant fallback icons paint with currentColor, which is what lets the active tab
   take --foreground while the idle ones keep --muted-foreground. The bar is dark
   against a light page, so it pins both tokens instead of inheriting the shell's. */
[data-brand='caliente'] .bottom-toolbar {
  background-color: #292929;
  border-top: 1px solid rgba(242, 242, 242, 0.06);
  box-shadow: 0 -1px 8px rgba(0, 0, 0, 0.08);
  gap: 0.25rem;
  padding: 0.5rem 0.5rem 1.25rem;
  /* Figma's 20px bottom padding doubles as the iOS home-indicator reserve. */
  padding-bottom: max(1.25rem, env(safe-area-inset-bottom));

  --muted-foreground: 0 0% 64%; /* #a3a3a3 — idle icon + label */
  --foreground: 0 0% 100%; /* active tab */
}

/* Equal thirds, as the design's flex-1 items — base spaces them around instead. */
[data-brand='caliente'] .bottom-toolbar__item {
  flex: 1;
  gap: 0.375rem;
  padding-block: 0.375rem;
}

[data-brand='caliente'] .bottom-toolbar__label {
  line-height: 1rem;
}

/* The bar belongs to the mobile header layout, which starts at 640px for this
   brand (logo | Deposit | search bell menu). Base brings the shared toolbar up
   below 768px, which would leave 640–767px with a tablet header and a bottom bar;
   .header-layout__content's offset is zeroed there for the same reason. */
@media (min-width: 640px) {
  [data-brand='caliente'] .bottom-toolbar {
    display: none;
  }

  [data-brand='caliente'] .header-layout__content {
    padding-bottom: 0;
  }
}

/* ============================== footer ============================== */
/* --footer-max-width belongs on .footer-rich, not on [data-brand]: the shared
   sheet declares it on that element, so an inherited value would lose to it. */
[data-brand='caliente'] .footer-rich {
  --footer-max-width: 1400px;
  --footer-text: #ffffff;
  /* Transparent so the regions don't paint over the watermark below — the band
     colour lives on this element instead (same trick as vidamarkets' glow). */
  --footer-dark-bg: transparent;
  --footer-dark-text: #ffffff;
  --footer-dark-divider: rgba(255, 255, 255, 0.06);
  --footer-icon: #ffffff;

  background-color: #141414;
  border-radius: 24px 24px 0 0;
  overflow: hidden;
  /* Own stacking context so the watermark's z-index stays local to the band. */
  position: relative;
  isolation: isolate;
}

/* Watermark. On its own layer because CSS has no background-opacity — an
   absolutely positioned pseudo-element is the only way to fade just the image
   and not the text over it. */
[data-brand='caliente'] .footer-rich::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url('https://pub-c2d4edf10c04429da9c98587dfe672cb.r2.dev/Vector_ac25a8acba.png')
    no-repeat 50% 0;
  opacity: 5%;
  pointer-events: none;
}

/* Lift the bands over the watermark: an absolutely positioned pseudo-element
   otherwise paints above static in-flow siblings. */
[data-brand='caliente'] .footer-rich__region {
  position: relative;
  z-index: 1;
}

[data-brand='caliente'] .footer-rich__menu-link,
[data-brand='caliente'] .footer-rich__copyright {
  color: #a3a3a3;
  font-size: 0.875rem;
  line-height: 1.25rem;
}

[data-brand='caliente'] .footer-rich__menu-title {
  font-weight: var(--pm-weight-medium, 500);
  margin-bottom: 12px;
}

/* Figma separates the links by spacing alone; the shared sheet rules each row. */
[data-brand='caliente'] .footer-rich__menu-item {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 12px;
}

[data-brand='caliente'] .footer-rich__logo {
  height: 40px;
}

[data-brand='caliente'] .footer-rich__social-icons {
  gap: 24px;
}

[data-brand='caliente'] .footer-rich__mask-icon,
[data-brand='caliente'] .footer-rich__img-icon {
  width: 20px;
  height: 20px;
}

/* Horizontal layout only. The shared sheet stacks the row at 850px, and these
   [data-brand] rules (0,2,0) would out-specify those mobile rules from outside a
   media query — same gate vidamarkets uses, for the same reason. */
@media (min-width: 851px) {
  /* 64px minimum gutter, widening to centre a 1400px column. `- max-width) / 2`
     without the gutter term so the column reaches its full width rather than
     1400 minus two gutters. */
  [data-brand='caliente'] .footer-rich__region {
    padding-inline: max(64px, calc((100% - var(--footer-max-width)) / 2));
  }

  [data-brand='caliente'] .footer-rich__region:first-child {
    padding-block: 80px 50px;
  }

  [data-brand='caliente'] .footer-rich__region:last-child {
    padding-block: 0 30px;
  }

  /* Logo above the icon row, the pair pushed apart against the menu's height. */
  [data-brand='caliente'] .footer-rich__social-row {
    flex-direction: column;
    align-self: stretch;
  }

  [data-brand='caliente'] .footer-rich__row {
    justify-content: space-between;
    gap: 0;
  }

  /* Shared rule is flex:1 0 0, which eats the space `space-between` needs. */
  [data-brand='caliente'] .footer-rich__menu {
    flex: 0 0 auto;
    gap: 120px;
  }

  /* Columns hug their content instead of splitting the row evenly, so labels
     like "Browse Markets" keep to one line. */
  [data-brand='caliente'] .footer-rich__menu-column {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

/* The shared sheet stacks the two link columns on mobile; keep them side by
   side, spread across the width it already sets to 100%. */
@media (max-width: 639.98px) {
  [data-brand='caliente'] .footer-rich__menu {
    flex-direction: row;
    justify-content: space-between;
    flex-wrap: wrap;
    column-gap: 4.375rem;
    row-gap: 3rem;
  }

  /* Height follows the width so the script scales rather than squashes. */
  [data-brand='caliente'] .footer-rich::before {
    background-size: 400px auto;
  }
}

/* "Powered by ProphetX LLC" is the legal region's text line. It closes the
   copyright row, on the right, and drops under the copyright on mobile. The
   bottom bar unwraps into the region so both lines share one row; the rule
   keeps 32px under it, as inside the bottom bar. */
[data-brand='caliente']
  .footer-rich__region:has(> .footer-rich__region-text[data-region='legal']) {
  flex-flow: row wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

[data-brand='caliente']
  .footer-rich__region:has(> .footer-rich__region-text[data-region='legal'])
  > .footer-rich__bottombar {
  display: contents;
}

[data-brand='caliente']
  .footer-rich__region:has(> .footer-rich__region-text[data-region='legal'])
  .footer-rich__divider {
  margin-bottom: 16px;
}

[data-brand='caliente']
  .footer-rich__region-text[data-region='legal']
  .footer-rich__region-text-para {
  margin: 0;
  font-size: 12px;
  line-height: 16px;
  color: var(--footer-dark-text);
}

@media (max-width: 639.98px) {
  [data-brand='caliente']
    .footer-rich__region:has(> .footer-rich__region-text[data-region='legal']) {
    flex-direction: column;
  }
}

/* antd puts the dialog 100px from the top; Figma centres it (576:33124 sits at
   y=213 of 900 for a 474 card). Flex beats antd's inline-block + ::before trick. */
[data-brand='caliente'] .pm-auth-modal-host .ant-modal-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-brand='caliente'] .pm-auth-modal-host .ant-modal {
  top: 0;
  margin: 0;
  padding-bottom: 0;
}

/* The dialog is 436 wide (host prop, shared with investing) but this card is
   400, so centre it in there rather than fight the inline width. */
[data-brand='caliente'] .pm-auth-modal-host .ant-modal-container {
  display: flex;
  justify-content: center;
}

/* ── Lobby ──────────────────────────────────────────────────────────────── */

/* The sidebar column owns the page gutters, and it only exists above this
   width; below it the route's own inset is the only gutter there is. */
@media (min-width: 1024px) {
  [data-brand='caliente'] .lobby__page {
    padding: 0;
  }
}

/* Fixed row so the trending panel scrolls internally instead of growing. */
[data-brand='caliente'] .lobby__top-row {
  height: 450px;
  gap: 16px;
}

/* Figma caps the trending panel at 360px; the shared rule allows 400px. */
[data-brand='caliente']
  .lobby__trending
  > #prediction-market-trending-events-container {
  max-width: 360px;
  /* The panel's hairline and its clip. Literals: this sheet is head-loaded
     before theme.css, so --pm-border and --pm-radius-lg are not resolved yet. */
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid #e5e5e5;
}

/* Sharing the fixed row with a sidebar banner, the panel is content-height and
   grows past it; this hands it what the banner leaves, so it scrolls instead. */
@media (min-width: 768px) {
  [data-brand='caliente']
    .lobby__trending:has(.banner-widget .embla)
    > #prediction-market-trending-events-container {
    flex: 1;
    min-height: 0;
  }
}

/* The slide's wrapper chain is block-level, so the hero card fills the fixed
   row only once every level stretches (plaee-frontend-new#2961). */
[data-brand='caliente'] .lobby__top-row > *:first-child,
[data-brand='caliente'] .lobby__top-row > *:first-child > div,
[data-brand='caliente'] .lobby__top-row > *:first-child > div > div {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

/* Already `flex: 1` + a flex column in the widget's own sheet. */
[data-brand='caliente']
  .lobby__top-row
  > *:first-child
  .pm-trade-stream-wrapper {
  height: 100%;
  min-height: 0;
}

/* The panel stays on mobile as a horizontal carousel
   (WIDGETS_CONFIG.trendingEvents.props.mobileLayout); the row unstacks. */
@media (max-width: 767.98px) {
  [data-brand='caliente'] .lobby__trending {
    display: contents;
  }

  [data-brand='caliente'] .lobby__top-row {
    flex-direction: column;
    height: auto;
  }

  /* The panel is the row's last child; full width instead of the 340px column. */
  [data-brand='caliente'] .lobby__top-row > *:last-child {
    width: auto;
  }

  /* page.module.css caps every div inside trending at 400px, not just the
     mount container; tablet widths would leave the panel half-filled. */
  [data-brand='caliente'] .lobby__trending div,
  [data-brand='caliente']
    .lobby__trending
    > #prediction-market-trending-events-container {
    max-width: none;
  }
}

/* ── Portfolio ──────────────────────────────────────────────────────────── */

/* The route opens tighter than its shared 24px; the bottom keeps it. */
[data-brand='caliente'] .portfolio__page {
  padding-block-start: 0.5rem; /* 8px */
}

/* Tighter than the route's shared 30px; the var feeds the back row's offset. */
@media (min-width: 1024px) {
  [data-brand='caliente'] .portfolio__page {
    --pm-page-row-gap: 1rem; /* 16px */
    grid-template-columns: 1fr 1fr;
  }
}

/* `← Back to markets` is off by default in the route; this opts the brand in.
   Inert in practice: `portfolio/page.module.css`'s `.page > div` (0,1,1)
   already beats the module's `.backRow` (0,1,0), so the row is visible at every
   width regardless. Kept because that win is incidental to the portfolio grid,
   not a decision about this row. */
@media (min-width: 640px) {
  [data-brand='caliente'] .portfolio__page > .portfolio__back-row {
    display: block;
  }
}

/* Same rule for the account-statement route, but unconditional: this row shows
   at every width, alongside the bottom toolbar's Home item on mobile. That
   matches /portfolio, which has always rendered its row on mobile — not via the
   640px block above but because `portfolio/page.module.css`'s
   `.page > div { display: flex }` (0,1,1) outranks the module's `.backRow`
   (0,1,0). Kept as its own block rather than a shared selector list — the two
   routes are free to diverge, and a merged list reads as if they must not. */
[data-brand='caliente']
  .account-statement__page
  > .account-statement__back-row {
  display: block;
}

[data-brand='caliente'] .pm-app-loader-icon {
  width: 100px;
  height: 100px;
  animation: caliente-app-loader-pulse 1.2s ease-in-out infinite;
}

@keyframes caliente-app-loader-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.6;
  }
}
