/* ============================================================
   Charlotte VM 2026 — Component styles
   ============================================================ */

/* ---------- Phone shell ---------- */
.stage {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.phone {
  position: relative;
  width: 412px;
  height: 880px;
  max-height: calc(100vh - 32px);
  background: var(--paper);
  border-radius: 46px;
  box-shadow: 0 0 0 12px #15110c, 0 0 0 14px #2c241a, var(--sh-3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
@media (max-width: 480px) {
  .stage { padding: 0; }
  .phone {
    width: 100vw; height: 100vh; max-height: none;
    border-radius: 0;
    box-shadow: none;
  }
}

/* status bar */
.statusbar {
  height: 44px; flex: 0 0 44px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 26px 0 30px;
  font-size: 14px; font-weight: 700;
  color: var(--ink);
  z-index: 30;
}
.statusbar.on-dark { color: #fff; }
.statusbar .sb-icons { display: flex; align-items: center; gap: 6px; }

/* scroll area */
.screen {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
}
.screen-pad { padding: 0 18px 124px; }

/* ---------- Bottom nav ---------- */
.bottomnav {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 86px;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(255,249,240,0.86);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  z-index: 40;
  padding-bottom: 14px;
}
.navbtn {
  border: none; background: none; padding: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  color: var(--muted);
  transition: color .2s var(--ease-std), transform .2s var(--ease-out);
}
.navbtn span { font-size: 11px; font-weight: 700; letter-spacing: -0.01em; }
.navbtn.active { color: var(--brand-hero-1); }
.navbtn.active.lovebtn { color: var(--love-600); }
.navbtn:active { transform: scale(0.9); }
.navbtn .navdot {
  width: 5px; height: 5px; border-radius: 50%; background: currentColor;
  opacity: 0; transition: opacity .2s;
}
.navbtn.active .navdot { opacity: 1; }

/* ---------- Section header ---------- */
.eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
}
.sec-title {
  font-size: 20px; font-weight: 900; letter-spacing: -0.02em; color: var(--ink);
  margin: 0;
}
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.group-head { display: flex; flex-direction: column; gap: 10px; }
.group-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}
.group-chip {
  width: 100%;
  padding: 6px 0;
  font-size: 12px;
  font-weight: 900;
  justify-content: center;
  border: none;
}
.group-chip.active {
  background: var(--ink);
  color: #fff;
}

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-1);
}

/* ---------- Channel badge ---------- */
.chan {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.01em;
  padding: 3px 8px; border-radius: var(--r-pill);
  white-space: nowrap;
}
.chan-dot { width: 6px; height: 6px; border-radius: 50%; }
.chan.svt { background: #E8F0FF; color: #134a9e; }
.chan.svt .chan-dot { background: #1c6ae4; }
.chan.tv4 { background: #FFE9D6; color: #b6471a; }
.chan.tv4 .chan-dot { background: #ff6a2b; }

/* ---------- Nösund badge ---------- */
.nosund {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 800;
  padding: 3px 8px 3px 6px; border-radius: var(--r-pill);
  background: var(--green-100); color: var(--green-700);
}

/* ---------- Match card ---------- */
.mc {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 10px;
  box-shadow: var(--sh-1);
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out);
}
.mc:active { transform: scale(0.99); }
.mc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mc-meta { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: var(--muted); }
.mc-grp { background: var(--paper-2); color: var(--ink-soft); padding: 2px 7px; border-radius: var(--r-pill); font-size: 10px; font-weight: 800; }
.mc-team { display: flex; align-items: center; gap: 9px; min-width: 0; }
.mc-team .fl { font-size: 24px; line-height: 1; filter: drop-shadow(0 1px 1px rgba(0,0,0,.12)); }
.mc-team .nm { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-side { display: flex; align-items: center; justify-content: space-between; }
.mc-score {
  font-size: 19px; font-weight: 900; letter-spacing: 0.02em; color: var(--ink);
  font-variant-numeric: tabular-nums; min-width: 22px; text-align: center;
}
.mc-vs { font-size: 13px; font-weight: 800; color: var(--muted); }
.mc-time { font-size: 18px; font-weight: 900; color: var(--ink); font-variant-numeric: tabular-nums; }
.mc-rows { display: flex; flex-direction: column; gap: 9px; }
.dim { opacity: .42; }

.live-pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 900; letter-spacing: .06em;
  color: #fff; background: #E03b3b; padding: 2px 8px; border-radius: var(--r-pill);
}
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: livepulse 1.2s infinite; }
@keyframes livepulse { 0%,100% { opacity: 1 } 50% { opacity: .25 } }

/* Sweden standout match card */
.mc.sweden {
  background: linear-gradient(150deg, #0061B0 0%, #0a4f8e 58%, #023a6b 100%);
  border: none;
  color: #fff;
  box-shadow: 0 10px 26px rgba(0,69,126,0.34);
  position: relative;
  overflow: hidden;
}
.mc.sweden::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(120px 120px at 86% 10%, rgba(255,205,0,0.32), transparent 70%),
    radial-gradient(160px 160px at 0% 110%, rgba(255,205,0,0.16), transparent 70%);
  pointer-events: none;
}
.mc.sweden .mc-team .nm,
.mc.sweden .mc-score,
.mc.sweden .mc-time { color: #fff; }
.mc.sweden .mc-vs { color: rgba(255,255,255,.7); }
.mc.sweden .mc-grp { background: rgba(255,205,0,0.22); color: var(--se-yellow); }
.mc.sweden .mc-meta { color: rgba(255,255,255,.8); }
.se-tag {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase;
  color: var(--se-yellow);
}
.mc.sweden > * { position: relative; z-index: 1; }
.mc.sweden .chan.svt { background: rgba(255,255,255,.92); }
.mc.sweden .nosund { background: rgba(255,205,0,0.18); color: var(--se-yellow); }

/* ---------- Pred (tippning) ---------- */
.pred-stepper { display: flex; align-items: center; gap: 8px; }
.stepbtn {
  width: 30px; height: 30px; border-radius: 10px;
  border: 1px solid var(--line-2); background: var(--paper);
  font-size: 18px; font-weight: 800; color: var(--ink-soft);
  display: grid; place-items: center; line-height: 1;
  transition: transform .12s var(--ease-out), background .15s;
}
.stepbtn:active { transform: scale(0.86); }
.stepbtn.plus { background: var(--green-600); color: #fff; border-color: var(--green-600); }
.stepval {
  font-size: 26px; font-weight: 900; min-width: 30px; text-align: center;
  font-variant-numeric: tabular-nums;
}
.lockchip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 800; color: var(--muted);
  background: var(--paper-2); padding: 4px 9px; border-radius: var(--r-pill);
}
.outcome-tag {
  font-size: 11px; font-weight: 900; padding: 3px 9px; border-radius: var(--r-pill);
}
.outcome-tag.hit { background: var(--green-100); color: var(--green-700); }
.outcome-tag.miss { background: #FBE4E0; color: var(--loss); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 15px; font-weight: 800; letter-spacing: -0.01em;
  padding: 13px 18px; border-radius: var(--r-md); border: none;
  transition: transform .15s var(--ease-out), filter .2s, box-shadow .2s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-green { background: var(--green-600); color: #fff; box-shadow: var(--sh-green); }
.btn-love { background: var(--love-600); color: #fff; box-shadow: var(--sh-love); }
.btn-gold { background: var(--gold-500); color: var(--ink); }
.btn-ghost { background: var(--paper-2); color: var(--ink); }
.btn-block { width: 100%; }

/* ---------- Tippduell ---------- */
.duel { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.duel-side {
  border: 2px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: var(--r-md); padding: 12px 10px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  transition: transform .15s var(--ease-out), box-shadow .2s;
}
.duel-side:active { transform: scale(0.97); }
.duel-side.on { color: #fff; box-shadow: var(--sh-2); }
.duel-side.on .duel-name, .duel-side.on .duel-pts { color: #fff; }
.duel-emoji { font-size: 24px; line-height: 1; }
.duel-name { font-size: 14px; font-weight: 800; }
.duel-pts { font-size: 12px; font-weight: 700; color: var(--muted); }

.other-tip {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 14px; padding: 9px 12px; border-radius: var(--r-sm);
  background: var(--paper-2); font-size: 13px; font-weight: 700; color: var(--ink-soft);
}
.other-tip strong { font-weight: 900; }

.grade-line {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; background: var(--paper-2); border-radius: var(--r-sm);
}

/* ---------- Sync chip ---------- */
.sync {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 700; color: var(--ink-soft);
  background: var(--card); border: 1px solid var(--line);
  padding: 7px 12px 7px 11px; border-radius: var(--r-pill);
}
.sync .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green-500); box-shadow: 0 0 0 3px var(--green-100); }
.sync .dot.stale { background: var(--gold-500); box-shadow: 0 0 0 3px var(--gold-100); }
.sync .dot.err { background: var(--loss); box-shadow: 0 0 0 3px #FBE4E0; }
.spin { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Toggle (Sverigefokus) ---------- */
.toggle {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 6px 10px 6px 12px;
  font-size: 12.5px; font-weight: 800; color: var(--ink);
}
.switch {
  width: 40px; height: 23px; border-radius: 999px; background: var(--line-2);
  position: relative; transition: background .25s var(--ease-std); flex: 0 0 auto;
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 19px; height: 19px; border-radius: 50%; background: #fff;
  box-shadow: var(--sh-1); transition: transform .25s var(--ease-out);
}
.switch.on { background: var(--se-blue); }
.switch.on::after { transform: translateX(17px); background: var(--se-yellow); }

/* ---------- Chips / filter ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px; }
.chip {
  flex: 0 0 auto;
  font-size: 13px; font-weight: 800; color: var(--ink-soft);
  background: var(--card); border: 1px solid var(--line);
  padding: 8px 14px; border-radius: var(--r-pill);
  transition: all .18s var(--ease-std);
  white-space: nowrap;
}
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Standings table ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th {
  font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); text-align: center; padding: 8px 4px;
}
.table th.lft, .table td.lft { text-align: left; }
.table td { padding: 11px 4px; font-size: 14px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; border-top: 1px solid var(--line); }
.table tr.is-se td { background: linear-gradient(90deg, rgba(0,97,176,.07), rgba(255,205,0,.07)); }
.table .pos { color: var(--muted); font-weight: 800; width: 22px; }
.table .qual { box-shadow: inset 3px 0 0 var(--green-500); }
.tbl-team { display: inline-flex; align-items: center; gap: 8px; }
.tbl-team .fl { font-size: 18px; }
.tbl-pts { font-weight: 900; color: var(--ink); }

/* ---------- Charlotte points ---------- */
.points-hero {
  background: linear-gradient(150deg, var(--love-600), #c12a59);
  border-radius: var(--r-lg);
  color: #fff; padding: 22px;
  box-shadow: var(--sh-love);
  position: relative; overflow: hidden;
}
.points-hero::after {
  content: "♥"; position: absolute; right: -10px; bottom: -28px;
  font-size: 140px; color: rgba(255,255,255,0.12); line-height: 1;
}
.points-num { font-size: 64px; font-weight: 900; line-height: 1; letter-spacing: -0.03em; }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 14px 12px; text-align: center;
}
.stat .v { font-size: 26px; font-weight: 900; letter-spacing: -0.02em; }
.stat .l { font-size: 11px; font-weight: 700; color: var(--muted); margin-top: 2px; }

/* points bar chart */
.barchart { display: flex; align-items: flex-end; gap: 4px; height: 110px; }
.bar-col { flex: 0 0 30px; height: 110px; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; }
.bar {
  width: 100%; max-width: 30px; border-radius: 7px 7px 3px 3px;
  background: linear-gradient(var(--green-400), var(--green-600));
  transition: height .6s var(--ease-out);
}
.bar.zero { background: var(--line-2); }
.bar-lab { font-size: 10px; font-weight: 700; color: var(--muted); }

/* ---------- Mood timeline ---------- */
.mood-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.mood-emoji { font-size: 30px; width: 46px; height: 46px; display: grid; place-items: center; background: var(--paper-2); border-radius: 50%; flex: 0 0 auto; }
.mood-pick { display: flex; gap: 8px; }
.mood-opt {
  font-size: 24px; width: 46px; height: 46px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--card);
  display: grid; place-items: center;
  transition: transform .15s var(--ease-out), border-color .15s;
}
.mood-opt:active { transform: scale(0.88); }
.mood-opt.sel { border-color: var(--love-500); background: var(--love-100); transform: scale(1.06); }

/* ---------- Love message cards ---------- */
.love-card {
  border-radius: var(--r-md); padding: 16px; border: 1px solid var(--line);
  background: var(--card); display: flex; gap: 13px; align-items: flex-start;
  transition: transform .2s var(--ease-out);
}
.love-card.locked { background: var(--paper-2); border-style: dashed; border-color: var(--line-2); }
.love-card:active { transform: scale(0.99); }
.love-emoji { font-size: 26px; flex: 0 0 auto; }
.love-locked-ico { color: var(--muted); }

/* ---------- Love overlay ---------- */
.love-overlay {
  position: absolute; inset: 0; z-index: 80;
  display: flex; align-items: center; justify-content: center;
  padding: 28px;
  opacity: 1;
  background: radial-gradient(circle at 50% 40%, rgba(226,62,107,0.40), rgba(20,8,12,0.74));
  backdrop-filter: blur(6px);
  animation: fadein .35s var(--ease-out);
}
@keyframes fadein { from { opacity: 0 } to { opacity: 1 } }
.love-modal {
  background: var(--paper); border-radius: var(--r-xl);
  padding: 30px 24px 24px; max-width: 320px; width: 100%; text-align: center;
  box-shadow: var(--sh-3);
  position: relative;
  opacity: 1;
  animation: pop .45s var(--ease-out);
}
@keyframes pop { 0% { transform: scale(.8) translateY(20px); opacity: 0 } 100% { transform: scale(1) translateY(0); opacity: 1 } }
.love-modal .big-emoji { font-size: 56px; line-height: 1; }
.love-modal h3 { font-size: 23px; font-weight: 900; letter-spacing: -0.02em; margin: 12px 0 8px; }
.love-modal p { font-size: 15.5px; line-height: 1.55; color: var(--ink-soft); margin: 0 0 20px; }
.love-sign { font-size: 13px; font-weight: 700; color: var(--love-600); margin-top: 6px; }

/* floating hearts */
.heart-float {
  position: absolute; bottom: -30px; font-size: 22px;
  animation: floatup linear forwards; pointer-events: none; z-index: 81;
}
@keyframes floatup {
  to { transform: translateY(-700px) rotate(var(--rot)); opacity: 0; }
}

/* ---------- Confetti ---------- */
.confetti-piece {
  position: absolute; top: -20px; width: 9px; height: 14px; border-radius: 2px;
  z-index: 90; pointer-events: none;
  animation: conffall linear forwards;
}
@keyframes conffall {
  0% { transform: translateY(0) rotate(0); opacity: 1; }
  100% { transform: translateY(960px) rotate(720deg); opacity: 0.9; }
}

/* ---------- Misc ---------- */
.divider { height: 1px; background: var(--line); border: none; margin: 0; }
.countpill {
  display: inline-flex; align-items: baseline; gap: 4px;
  font-variant-numeric: tabular-nums;
}
.hint { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.pill-soft {
  display:inline-flex; align-items:center; gap:6px;
  font-size: 12px; font-weight: 800; padding: 5px 11px; border-radius: var(--r-pill);
  background: var(--paper-2); color: var(--ink-soft);
}

/* Sverigefokus tint on whole screen */
.screen.se-focus { background:
  linear-gradient(180deg, rgba(0,97,176,0.05), rgba(255,205,0,0.04) 240px, transparent 460px); }

/* path to knockout */
.path-step { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.path-node {
  width: 38px; height: 38px; border-radius: 12px; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 16px; font-weight: 900;
  background: var(--paper-2); color: var(--muted);
}
.path-node.done { background: var(--green-600); color: #fff; }
.path-node.next { background: var(--se-blue); color: var(--se-yellow); }
.path-line { width: 2px; height: 18px; background: var(--line-2); margin-left: 18px; }
