/* Shared styles for the OCAvailability block. Loaded alongside
   /availability-block.js on index/tickets/account. Day/night theme
   inherits via existing CSS vars (--text, --salmon, --accent, etc). */

.oc-avail-block {
  margin: .55rem 0 .15rem;
  font-family: inherit;
  font-size: .78rem;
  letter-spacing: .04em;
  line-height: 1.55;
}

.oc-avail-block > div {
  margin: .1rem 0;
}

.oc-avail-bar {
  font-family: inherit;
  white-space: nowrap;
  letter-spacing: 0;          /* preserves bar cell alignment */
}

.oc-avail-bar-label {
  letter-spacing: .04em;
}

.oc-avail-velocity {
  font-size: .72rem;
  letter-spacing: .06em;
  opacity: .85;
}

.oc-avail-helper {
  font-size: .78rem;
  letter-spacing: .06em;
  font-weight: 500;
}

/* Distinct from .soldout-flicker: faster cadence, no x-shift, just
   pulsing opacity + glow on the helper line so the "selling fast"
   callout reads as live without lurching the layout. */
@keyframes oc-avail-flicker {
  0%, 88%   { opacity: 1;   text-shadow: 0 0 6px color-mix(in srgb, currentColor 35%, transparent); }
  89%       { opacity: .45; text-shadow: none; }
  90%       { opacity: 1;   text-shadow: 0 0 10px color-mix(in srgb, currentColor 35%, transparent); }
  91%       { opacity: .65; text-shadow: none; }
  92%, 100% { opacity: 1;   text-shadow: 0 0 6px color-mix(in srgb, currentColor 35%, transparent); }
}
.oc-avail-flicker {
  animation: oc-avail-flicker 3.6s ease-in-out infinite;
  display: inline-block;
}

.oc-avail-block[data-kind="soldout"] .oc-avail-flicker {
  text-shadow: 0 0 6px var(--accent-glow);
}

/* Solid scarcity badge (ALMOST GONE / SELLING FAST / JUST DROPPED) — sits
   next to the outlined [N LEFT] / [SOLD OUT] .oc-pill in a listing's time
   row. Filled background instead of .oc-pill's outline so it reads as a
   distinct, louder signal at a glance. */
.oc-tag-solid {
  display: inline-block;
  flex-shrink: 0;
  font-size: .58rem;
  letter-spacing: .12em;
  font-weight: 700;
  text-transform: uppercase;
  padding: .2rem .45rem;
  border-radius: 3px;
  color: #000;
  white-space: nowrap;
  line-height: 1;
  margin-right: .35rem;
}

/* ── Dot-grid availability bar ─────────────────────────────────────
   Step-density design: sold = tight bright dots, unsold = loose dim
   dots. Full card width via flex. --oc-bar-color is set inline on
   .oc-dot-bar-wrap so every state (surging/limited/soldout/teal)
   carries its own color without extra modifier classes.

   Fill animates from startPct → targetPct via IntersectionObserver
   (initBarAnimations in availability-block.js) as the bar enters
   the viewport, so visitors see the 7-day sales growth live. */

.oc-dot-bar-wrap {
  display: flex;
  align-items: stretch;
  width: 100%;
  margin: .3rem 0 .2rem;
}

.oc-dot-bar-bracket {
  color: var(--oc-bar-color, var(--salmon));
  font-size: 3rem;
  line-height: 1;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  font-family: inherit;
  letter-spacing: 0;
  user-select: none;
}

.oc-dot-bar {
  flex: 1;
  height: 54px;
  position: relative;
  overflow: hidden;
  /* Unsold area: loose, dim dots */
  background-image: radial-gradient(
    circle,
    color-mix(in srgb, var(--oc-bar-color, var(--salmon)) 16%, transparent) 1.2px,
    transparent 1.2px
  );
  background-size: 11px 10px;
  background-position: 0 0;
}

.oc-dot-bar-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0;
  /* Sold area: tight, bright dots — step density creates visual contrast */
  background-image: radial-gradient(
    circle,
    color-mix(in srgb, var(--oc-bar-color, var(--salmon)) 88%, transparent) 1.6px,
    transparent 1.6px
  );
  background-size: 6px 6px;
  background-position: 0 0;
  transition: width 1.4s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: width;
}

/* ── Uncapped attendee counter (roster grid) ─────────────────────────
   Renders in place of the block above when show.capacity is null — see
   OCAvailability.uncappedHtml(). Sits bare inside .timeslot-block (which
   only ever contributes a dashed top rule, no card chrome of its own),
   same as .oc-avail-block does today — no extra border/box-shadow here.
   VT323 + Share Tech Mono are real Offline brand fonts already used
   elsewhere (404-hub.html, host-agreement.html, new-show.html) that
   just aren't wired up as CSS vars — importing them fresh here. */
@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=VT323&display=swap');

.oc-uncapped-block {
  margin: .55rem 0 .15rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.oc-uncapped-cap {
  font-family: 'Share Tech Mono', 'Courier New', monospace;
  font-size: .72rem;
  letter-spacing: .08em;
  color: #FFD700;
}

.oc-uncapped-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 4px;
  font-size: 13px;
  line-height: 1;
}

.oc-uncapped-seat {
  color: var(--green-dim);
  text-shadow: 0 0 6px rgba(0,255,65,.25);
}

.oc-uncapped-seat--fresh {
  color: var(--off-yellow, #FFD23C);
  animation: oc-uncapped-pop .5s steps(4) both;
}

@keyframes oc-uncapped-pop {
  0%   { opacity: .15; text-shadow: none; }
  100% { opacity: 1;   text-shadow: 0 0 8px rgba(255,210,60,.8); }
}

.oc-uncapped-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .3rem .8rem;
  border-top: 1px solid var(--border-dim, #002a0a);
  padding-top: .6rem;
}

.oc-uncapped-count-wrap {
  display: flex;
  align-items: baseline;
  gap: .4rem;
}

.oc-uncapped-count {
  font-family: 'VT323', monospace;
  font-size: 2.6rem;
  line-height: .9;
  color: var(--green);
  text-shadow: 0 0 12px rgba(0,255,65,.5);
}

.oc-uncapped-count-label {
  font-family: 'Share Tech Mono', 'Courier New', monospace;
  font-size: .72rem;
  letter-spacing: .08em;
  color: var(--green-dim);
}

.oc-uncapped-recent {
  font-size: .68rem;
  letter-spacing: .08em;
  color: var(--off-yellow, #FFD23C);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .oc-uncapped-seat--fresh { animation: none; opacity: 1; text-shadow: 0 0 8px rgba(255,210,60,.8); }
}
