/* ============================================================
   GAMINGPAPPSEN'S VALVAKA — V4.8 BROADCAST POLISH
   Visual-only overrides + source-patched milestone mark.
   ============================================================ */

/* ---------- POPUP / ALERT ---------- */

.alertShade{
  background:rgba(1,6,16,.48) !important;
  backdrop-filter:brightness(.86) saturate(.88) !important;
}

.alert{
  width:min(60vw,1120px) !important;
  max-width:1120px !important;
  min-height:0 !important;
  border-width:3px !important;
  box-shadow:
    8px 8px 0 rgba(0,0,0,.68),
    inset 0 0 0 2px rgba(255,255,255,.035) !important;
}

.alert::before{
  opacity:.42 !important;
}

/* Keep party actor strong without giant obstruction */
.alert.v3HasActor .v3AlertActor{
  width:27% !important;
  max-width:320px !important;
  overflow:visible !important;
}

.v3AlertActor [class*="Badge"],
.v3AlertActor [class*="badge"]{
  display:none !important;
}

/* Generic progress / majority mark */
.v3AlertMark{
  width:176px !important;
  height:112px !important;
  display:grid !important;
  place-items:center !important;
  background:
    repeating-linear-gradient(0deg,rgba(255,255,255,.04) 0 2px,transparent 2px 6px),
    #071528 !important;
  border:4px solid #ffe13d !important;
  box-shadow:
    7px 7px 0 #000,
    inset 0 0 0 3px #0b213a,
    0 0 20px rgba(255,225,61,.17) !important;
  color:#ffe13d !important;
  font:900 42px/1 "Courier New",monospace !important;
  letter-spacing:-.06em !important;
  text-shadow:4px 4px 0 #000 !important;
  clip-path:polygon(10px 0,100% 0,100% calc(100% - 10px),calc(100% - 10px) 100%,0 100%,0 10px) !important;
}

/* Milestone events: percentage is the artwork */
.alert[data-event-type="milestone"] .v3AlertMark{
  width:190px !important;
  height:126px !important;
  font-size:46px !important;
  color:#19e9ff !important;
  border-color:#19e9ff !important;
  box-shadow:
    7px 7px 0 #000,
    inset 0 0 0 3px #0b213a,
    0 0 24px rgba(25,233,255,.22) !important;
}

/* Majority / 175 */
.alert[data-event-type="majority"] .v3AlertMark{
  color:#ffe13d !important;
  border-color:#ff2d9d !important;
}

/* Threshold */
.alert[data-event-type="threshold_up"] .v3AlertMark,
.alert[data-event-type="threshold_down"] .v3AlertMark{
  color:#ffe13d !important;
  border-color:#ffe13d !important;
}

/* ---------- EVENT ENGINE BURST ---------- */

/* The giant "EVENT ENGINE ONLINE" flash should be atmosphere, not content. */
.burst{
  opacity:.22 !important;
  max-width:62% !important;
  max-height:38% !important;
  pointer-events:none !important;
  filter:saturate(.8) brightness(.9) !important;
}

/* ---------- REACTION ARENA ---------- */

.showArea{
  isolation:isolate !important;
}

.showArea .eventFeed{
  display:grid !important;
  align-content:start !important;
  gap:7px !important;
  overflow:hidden !important;
}

.showArea .eventFeed > *{
  min-height:56px !important;
  padding:8px 10px !important;
  margin:0 !important;
  background:rgba(5,16,37,.80) !important;
  border-width:1px !important;
  box-shadow:
    inset 3px 0 0 currentColor,
    3px 3px 0 rgba(0,0,0,.35) !important;
}

.showArea .eventFeed b,
.showArea .eventFeed strong{
  font-size:12px !important;
  line-height:1.08 !important;
  letter-spacing:.025em !important;
  color:#fff !important;
  text-shadow:2px 2px 0 #000 !important;
}

.showArea .eventFeed span,
.showArea .eventFeed small{
  font-size:10px !important;
  line-height:1.12 !important;
  color:#b9d3e5 !important;
  white-space:normal !important;
}

.showArea .heroStats{
  text-shadow:2px 2px 0 #000 !important;
}

/* ---------- RIKSDAGEN ---------- */

.seatsBox .seatmap{
  position:relative !important;
  gap:3px !important;
  padding:12px !important;
  background:
    radial-gradient(ellipse at 50% 118%,rgba(25,233,255,.085),transparent 58%),
    repeating-linear-gradient(90deg,rgba(25,233,255,.025) 0 1px,transparent 1px 12px),
    rgba(2,9,20,.28) !important;
  border:1px solid rgba(25,233,255,.22) !important;
  box-shadow:
    inset 0 0 28px rgba(0,0,0,.32),
    inset 0 -3px 0 rgba(255,45,157,.06) !important;
}

.seatsBox .seatmap .seat{
  border:1px solid rgba(1,5,12,.92) !important;
  box-shadow:
    inset 0 -2px 0 rgba(0,0,0,.26),
    0 0 4px color-mix(in srgb,currentColor 28%,transparent) !important;
  transition:
    background-color .55s ease,
    box-shadow .55s ease,
    transform .3s ease !important;
}

/* Make the first seat of each logical row act like a subtle aisle marker */
.seatsBox .seatmap .seat:nth-child(29n+1){
  margin-left:2px !important;
}

/* ---------- MANDATKAMPEN ---------- */

.majority .track{
  position:relative !important;
  min-height:28px !important;
  background:
    repeating-linear-gradient(90deg,rgba(255,255,255,.045) 0 2px,transparent 2px 12px),
    #020914 !important;
}

.majority .track::after{
  content:"175";
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  z-index:8;
  min-width:34px;
  padding:3px 5px;
  text-align:center;
  color:#09101d;
  background:#f4f8ff;
  border:2px solid #09101d;
  box-shadow:3px 3px 0 #000;
  font:900 10px/1 "Courier New",monospace;
}

.majority .majorityLabel{
  color:#d8e7f3 !important;
  text-shadow:2px 2px 0 #000 !important;
}

/* ---------- VALPULS / TICKER ---------- */

.ticker{
  background:#020914 !important;
  border-top:3px solid #19e9ff !important;
}

.ticker::before{
  background:
    repeating-linear-gradient(0deg,rgba(255,255,255,.06) 0 2px,transparent 2px 5px),
    linear-gradient(135deg,#f51b8a 0 50%,#8428d9 50% 100%) !important;
  border-right:3px solid #19e9ff !important;
  box-shadow:
    inset -4px 0 0 rgba(0,0,0,.22),
    4px 0 0 #000 !important;
  text-shadow:2px 2px 0 #000 !important;
}

.ticker .marquee{
  color:#f2f7ff !important;
  text-shadow:2px 2px 0 #000 !important;
  letter-spacing:.035em !important;
}

/* ---------- TOP STAT READABILITY ---------- */

.stat .label{
  color:#c8dbea !important;
}

.stat .districtPct,
.stat small{
  color:#b6ccdc !important;
}

/* ---------- PARTY NAME READABILITY ---------- */

.parties .party .name{
  font-size:10.5px !important;
  letter-spacing:-.02em !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}

/* ---------- 9:16 ---------- */

body[data-pixel-layout="9"] .alert{
  width:86% !important;
  max-width:none !important;
}

body[data-pixel-layout="9"] .alert.v3HasActor .v3AlertActor{
  width:34% !important;
  max-width:none !important;
}

body[data-pixel-layout="9"] .v3AlertMark{
  width:160px !important;
  height:110px !important;
  font-size:38px !important;
}

body[data-pixel-layout="9"] .showArea .eventFeed > *{
  min-height:64px !important;
}

body[data-pixel-layout="9"] .showArea .eventFeed b,
body[data-pixel-layout="9"] .showArea .eventFeed strong{
  font-size:13px !important;
}

body[data-pixel-layout="9"] .showArea .eventFeed span,
body[data-pixel-layout="9"] .showArea .eventFeed small{
  font-size:11px !important;
}
