/* Hot-streak flame badge — single source of truth for web.
   Injected into <head> by app.js on every HTML page (alongside /js/hot-streak-badges.js).
   Standard placement: a circular badge pinned to the avatar's bottom-right corner
   (.global-hot-streak-badge--avatar); size tiers follow the avatar (regular ≥40px,
   --compact 28–39px, --mini <28px). The inline variant (.hot-streak-badge /
   .identity-name-badge-host) is only a fallback for identities with no avatar. */
.hot-streak-identity-link {
  position: relative;
  overflow: visible !important;
}
.hot-streak-badge-host {
  position: relative;
  overflow: visible !important;
}
.identity-name-badge-host {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
}
.identity-name-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.identity-name-badge-host > .global-hot-streak-badge,
.identity-name-badge-host > .hot-streak-badge {
  flex: 0 0 auto;
  margin-left: 0;
}
.hot-streak-identity-link > img { border-radius: inherit; }
.hot-streak-badge-host > img { border-radius: inherit; }
.global-hot-streak-badge,
.hot-streak-badge {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 22px !important;
  min-width: 22px;
  height: 22px !important;
  margin-left: 4px;
  box-sizing: border-box;
  border: 2px solid #484848;
  border-radius: 50%;
  background: #171717;
  color: #fb4f64;
  line-height: 1;
  vertical-align: middle;
}
.global-hot-streak-badge svg,
.hot-streak-badge svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}
.hot-streak-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 30;
  width: max-content;
  max-width: min(240px, calc(100vw - 24px));
  box-sizing: border-box;
  padding: 10px 11px;
  border: 1px solid color-mix(in srgb, var(--hot-streak-accent) 48%, #484848);
  border-radius: 6px;
  background-color: #181818;
  background-image:
    linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
  background-size: 16px 16px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .5), inset 3px 0 0 var(--hot-streak-accent);
  color: #f5f5f5;
  font: 500 12px/1.35 "DM Sans", sans-serif;
  letter-spacing: 0;
  text-align: left;
  white-space: normal;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity .12s ease, transform .12s ease, visibility .12s ease;
}
.hot-streak-tooltip::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 12px;
  width: 9px;
  height: 9px;
  border-right: 1px solid color-mix(in srgb, var(--hot-streak-accent) 48%, #484848);
  border-bottom: 1px solid color-mix(in srgb, var(--hot-streak-accent) 48%, #484848);
  background: #181818;
  transform: rotate(45deg);
}
.hot-streak-tooltip.hot-streak-tooltip--fixed {
  position: fixed;
  right: auto;
  bottom: auto;
  transform: none !important;
}
.hot-streak-tooltip.hot-streak-tooltip--fixed::after {
  left: var(--hot-streak-tooltip-arrow-left, 12px);
}
.tooltip-below .hot-streak-tooltip {
  top: calc(100% + 8px);
  bottom: auto;
}
.tooltip-below .hot-streak-tooltip.hot-streak-tooltip--fixed {
  bottom: auto;
}
.tooltip-below .hot-streak-tooltip::after {
  top: -5px;
  bottom: auto;
  border: 0;
  border-top: 1px solid color-mix(in srgb, var(--hot-streak-accent) 48%, #484848);
  border-left: 1px solid color-mix(in srgb, var(--hot-streak-accent) 48%, #484848);
}
.hot-streak-tooltip__head {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}
.hot-streak-tooltip__icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--hot-streak-accent);
  border-radius: 50%;
  background: #222;
  color: var(--hot-streak-accent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--hot-streak-accent) 30%, transparent);
}
.hot-streak-tooltip__icon svg { width: 17px; height: 17px; fill: currentColor; }
.hot-streak-tooltip__copy { display: grid; gap: 1px; min-width: 0; }
.hot-streak-tooltip__title { color: #fff; font-size: 12px; font-weight: 700; }
.hot-streak-tooltip__count { color: var(--hot-streak-accent); font-size: 11px; font-weight: 700; }
.hot-streak-tooltip__meter { display: flex; align-items: end; gap: 2px; height: 18px; }
.hot-streak-tooltip__meter i {
  display: block;
  width: 3px;
  border-radius: 1px;
  background: var(--hot-streak-accent);
  box-shadow: 0 0 7px color-mix(in srgb, var(--hot-streak-accent) 45%, transparent);
}
.hot-streak-tooltip__meter i:nth-child(1) { height: 7px; opacity: .55; }
.hot-streak-tooltip__meter i:nth-child(2) { height: 12px; opacity: .75; }
.hot-streak-tooltip__meter i:nth-child(3) { height: 18px; }
.hot-streak-tooltip__detail {
  display: block;
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid rgba(255, 255, 255, .09);
  color: #aaa;
  font-size: 10px;
  font-weight: 500;
}
.global-hot-streak-badge--avatar .hot-streak-tooltip,
.pick-card__name .hot-streak-tooltip {
  left: 0;
  transform: translate(0, 4px);
}
.global-hot-streak-badge:hover .hot-streak-tooltip,
.global-hot-streak-badge:focus .hot-streak-tooltip,
.global-hot-streak-badge.tooltip-open .hot-streak-tooltip,
.hot-streak-badge:hover .hot-streak-tooltip,
.hot-streak-badge:focus .hot-streak-tooltip,
.hot-streak-badge.tooltip-open .hot-streak-tooltip {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}
.global-hot-streak-badge:hover,
.global-hot-streak-badge:focus,
.global-hot-streak-badge.tooltip-open,
.hot-streak-badge:hover,
.hot-streak-badge:focus,
.hot-streak-badge.tooltip-open {
  z-index: 29;
}
.global-hot-streak-badge--avatar:hover .hot-streak-tooltip,
.global-hot-streak-badge--avatar:focus .hot-streak-tooltip,
.global-hot-streak-badge--avatar.tooltip-open .hot-streak-tooltip,
.pick-card__name .global-hot-streak-badge:hover .hot-streak-tooltip,
.pick-card__name .global-hot-streak-badge:focus .hot-streak-tooltip,
.pick-card__name .global-hot-streak-badge.tooltip-open .hot-streak-tooltip {
  transform: translate(0, 0);
}
.hot-streak-tier--hot { --hot-streak-accent: #fb4f64; color: #fb4f64 !important; }
.hot-streak-tier--blazing { --hot-streak-accent: #fb923c; color: #fb923c !important; box-shadow: 0 0 8px rgba(251, 146, 60, .32); }
.hot-streak-tier--inferno { --hot-streak-accent: #facc15; color: #facc15 !important; box-shadow: 0 0 12px rgba(251, 191, 36, .55); }
.hot-streak-tier--white-hot { --hot-streak-accent: #67e8f9; color: #67e8f9 !important; box-shadow: 0 0 14px rgba(103, 232, 249, .62); }
.global-hot-streak-badge--avatar {
  position: absolute;
  right: -3px;
  bottom: -3px;
  z-index: 1;
  margin: 0;
  pointer-events: auto;
}
.pick-card__avatar > .global-hot-streak-badge--avatar {
  right: -2px;
  bottom: -2px;
  width: 18px !important;
  min-width: 18px;
  height: 18px !important;
}
.pick-card__avatar > .global-hot-streak-badge--avatar svg {
  width: 11px;
  height: 11px;
}
.global-hot-streak-badge--avatar.global-hot-streak-badge--compact {
  right: -2px;
  bottom: -2px;
  width: 18px !important;
  min-width: 18px;
  height: 18px !important;
}
.global-hot-streak-badge--avatar.global-hot-streak-badge--compact svg {
  width: 11px;
  height: 11px;
}
.global-hot-streak-badge--avatar.global-hot-streak-badge--mini {
  right: -3px;
  bottom: -3px;
  width: 14px !important;
  min-width: 14px;
  height: 14px !important;
  border-width: 1.5px;
}
.global-hot-streak-badge--avatar.global-hot-streak-badge--mini svg {
  width: 9px;
  height: 9px;
}
.global-hot-streak-badge.action-menu-open .hot-streak-tooltip,
.hot-streak-badge.action-menu-open .hot-streak-tooltip {
  opacity: 0 !important;
  visibility: hidden !important;
}
.hot-streak-action-popover {
  position: fixed;
  z-index: 31;
  display: grid;
  min-width: 172px;
  box-sizing: border-box;
  padding: 6px;
  border: 1px solid #484848;
  border-radius: 6px;
  background: #181818;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .52);
  font: 600 12px/1.2 "DM Sans", sans-serif;
}
.hot-streak-action-popover[hidden] { display: none; }
.hot-streak-action-popover a {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 4px;
  color: #f5f5f5;
  text-decoration: none;
  white-space: nowrap;
}
.hot-streak-action-popover a:hover,
.hot-streak-action-popover a:focus-visible {
  background: rgba(255, 255, 255, .08);
  outline: none;
}
.hot-streak-action-popover a:last-child { color: var(--hot-streak-menu-accent, #fb4f64); }

/* Server-rendered avatar badges: style the host before the script adds
   .hot-streak-badge-host / .hot-streak-identity-link at runtime. */
:has(> .global-hot-streak-badge--avatar) {
  position: relative;
  overflow: visible !important;
}
:has(> .global-hot-streak-badge--avatar) > img { border-radius: inherit; }
