/* ---- event header / rules ---- */
#event_header {
  display: flex;
  align-items: center;
  gap: 0.6em;
}
#event_icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
}
#event_header h1 {
  margin: 0;
}
#event_rules {
  border-radius: 4px;
  padding: 0.6em 0.8em;
  margin: 0.5em 0;
}
#event_cheat {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  box-sizing: border-box;
}
.cheat-card {
  display: block;
  width: fit-content;
  margin: 0.5em 0 0.5em auto;
}
.cheat-card::part(body) {
  padding: 0;
}
#event_tracker {
  font-weight: bold;
  margin: 0.3em 0;
}
/* rolled a 1 on the shot put, busted the freeze/run-up budget, etc. --
   shifts the warning callout from yellow to orange so an invalid
   attempt reads as more severe than a routine "no roll yet" state. */
#roll_info.wa-warning-orange {
  --wa-color-warning-fill-quiet: var(--wa-color-orange-95);
  --wa-color-warning-fill-normal: var(--wa-color-orange-90);
  --wa-color-warning-fill-loud: var(--wa-color-orange-80);
  --wa-color-warning-border-quiet: var(--wa-color-orange-80);
  --wa-color-warning-border-normal: var(--wa-color-orange-70);
  --wa-color-warning-border-loud: var(--wa-color-orange-50);
  --wa-color-warning-on-quiet: var(--wa-color-orange-40);
  --wa-color-warning-on-normal: var(--wa-color-orange-30);
  --wa-color-warning-on-loud: var(--wa-color-orange-10);
}
#event_score_line {
  font-weight: bold;
}
#event_extra:empty {
  display: none;
}
#event_extra {
  margin: 0.5em 0;
}

/* ---- score sheet ---- */
#score .subtitle {
  font-weight: bold;
}
#score tr.active-event {
  background-color: var(--wa-color-warning-fill-quiet);
}
#score tr.coming-soon {
  opacity: 0.55;
}
#score .soon {
  font-size: 0.8em;
  font-style: italic;
  color: var(--site-muted);
}
.row_icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 5px;
}
#score .atts {
  display: flex;
  gap: 4px;
  margin-bottom: 2px;
}
#score .best {
  font-weight: bold;
}

/* ---- freeze affordance (Discus and future freeze-based events) ----
   Scoped to #roll_result.has-freeze so non-freeze events (e.g. Hurdles),
   whose dice never carry .freezable/.frozen, aren't dimmed by mistake. */
#roll_result.has-freeze .die {
  cursor: default;
}
#roll_result.has-freeze .die.freezable {
  cursor: pointer;
}
#roll_result.has-freeze .die:not(.freezable):not(.frozen) {
  opacity: 0.55;
}

/* ---- hold/free hover overlays (carried for future freeze-based events) ---- */
.SS span.hold {
  display: none;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 557 557" height="557" width="557"> <g> <rect fill="red" fill-opacity="0.27" stroke="red" stroke-width="10" stroke-linejoin="miter" stroke-miterlimit="4" stroke-opacity="1" stroke-dasharray="none" width="547" height="547" x="5" y="5" rx="67.690636" /> <text font-size="210px" font-style="normal" font-variant="normal" font-weight="normal" font-stretch="normal" line-height="125%" letter-spacing="0px" word-spacing="0px" fill="red" fill-opacity="1" stroke="none" font-family="sans-serif" > <tspan y="278" x="278" text-anchor="middle" dominant-baseline="central">Hold</tspan> </text> </g> </svg>')
    no-repeat;
  background-size: cover;
}
#roll_result.has-freeze .die.freezable span.free:hover {
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 557 557" height="557" width="557"> <g> <rect fill="green" fill-opacity="0.27" stroke="green" stroke-width="10" stroke-linejoin="miter" stroke-miterlimit="4" stroke-opacity="1" stroke-dasharray="none" width="547" height="547" x="5" y="5" rx="67.690636" /> <text font-size="210px" font-style="normal" font-variant="normal" font-weight="normal" font-stretch="normal" line-height="125%" letter-spacing="0px" word-spacing="0px" fill="green" fill-opacity="1" stroke="none" font-family="sans-serif" > <tspan y="278" x="278" text-anchor="middle" dominant-baseline="central">Hold</tspan> </text> </g> </svg>')
    no-repeat;
  background-size: cover;
}
