/* ============================================================
   Quiniela Mundial 2026 — components
   ============================================================ */

/* ---------- crest (flag emoji) ---------- */
.crest {
  display: inline-flex; align-items: center; justify-content: center;
  flex: none; line-height: 1; overflow: hidden; user-select: none;
  background: transparent;
}

/* ---------- app header ---------- */
.hdr {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px 12px;
  flex: none;
}
.hdr__title { font-family: var(--font-display); font-weight: 600; font-size: 26px; letter-spacing: -.02em; margin: 0; }
.hdr__sub { font-size: 13px; color: var(--text-muted); margin: 1px 0 0; white-space: nowrap; }
.hdr__spacer { flex: 1; }
.iconbtn {
  width: 42px; height: 42px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); flex: none;
  box-shadow: var(--shadow-card);
  transition: transform .12s var(--ease), background .2s;
}
.iconbtn:active { transform: scale(.92); }
.iconbtn .ico { display: grid; }

/* ---------- pills / segmented ---------- */
.seg {
  display: flex; gap: 4px; padding: 4px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-pill); margin: 2px 20px 0;
}
.seg__btn {
  flex: 1; padding: 9px 6px; border-radius: var(--r-pill);
  font-family: var(--font-display); font-weight: 600; font-size: 13.5px;
  color: var(--text-muted); transition: color .2s, background .25s var(--ease);
  white-space: nowrap;
}
.seg__btn.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-card); }
[data-theme="dark"] .seg__btn.is-active { background: var(--surface-3); }

/* day chips row */
.chiprow { display: flex; gap: 8px; overflow-x: auto; padding: 14px 20px 4px; scrollbar-width: none; }
.chiprow::-webkit-scrollbar { display: none; }
.daychip {
  flex: none; padding: 9px 15px; border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--border);
  font-weight: 600; font-size: 13px; color: var(--text-muted);
  display: flex; flex-direction: column; align-items: center; gap: 1px; line-height: 1.1;
}
.daychip b { font-family: var(--font-display); font-size: 14px; color: var(--text); }
.daychip.is-active { background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.daychip.is-active b { color: var(--accent-ink); }

/* ---------- section label ---------- */
.seclabel {
  display: flex; align-items: center; gap: 8px;
  padding: 18px 20px 8px; font-size: 12.5px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint);
}
.seclabel .ico { color: var(--text-faint); display: grid; }

/* ---------- match card ---------- */
.mlist { display: flex; flex-direction: column; gap: 10px; padding: 4px 16px; }
.mcard {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-card); padding: 14px 16px;
  box-shadow: var(--shadow-card);
  transition: transform .14s var(--ease), border-color .2s;
}
.mcard:active { transform: scale(.985); }
.mcard__top {
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; color: var(--text-faint); font-weight: 600;
  margin-bottom: 12px; letter-spacing: .02em;
}
.mcard__top .grp {
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 2px 8px; border-radius: var(--r-pill); color: var(--text-muted);
}
.mcard__top .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-faint); }
.mcard__row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.side { display: flex; align-items: center; gap: 11px; min-width: 0; }
.side.away { flex-direction: row-reverse; text-align: right; }
.side__name { font-family: var(--font-display); font-weight: 600; font-size: 15.5px; letter-spacing: -.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mid { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 58px; }
.scorebox {
  font-family: var(--font-display); font-variant-numeric: tabular-nums; font-weight: 600;
  font-size: 22px; letter-spacing: .04em; display: flex; align-items: center; gap: 7px;
}
.scorebox .sep { color: var(--text-faint); font-size: 16px; }
.kick { font-family: var(--font-display); font-weight: 600; font-size: 17px; }
.kick small { display: block; font-family: var(--font-body); font-weight: 600; font-size: 10.5px; color: var(--text-faint); text-align: center; }

/* status badges */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 700;
  padding: 3px 8px; border-radius: var(--r-pill); letter-spacing: .03em; }
.badge--live { background: var(--live-soft); color: var(--live); }
.badge--ft { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }

/* prediction strip under a match */
.predstrip {
  display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 12px;
  border-top: 1px dashed var(--border-2); font-size: 12.5px; color: var(--text-muted);
}
.predstrip .lbl { font-weight: 600; }
.predstrip .myscore { font-family: var(--font-display); font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.predstrip .cta { margin-left: auto; color: var(--accent); font-weight: 700; display: flex; align-items: center; gap: 2px; }
.predstrip .ko-count { font-weight: 600; white-space: nowrap; }
/* estados del contador: caja con padding y fondo tenue */
.predstrip.is-ok, .predstrip.is-urgent, .predstrip.is-closed {
  border-top: none; margin-top: 12px; padding: 10px 12px; border-radius: 12px;
}
.predstrip.is-ok      { background: rgba(25,164,99,.10); }
.predstrip.is-urgent  { background: rgba(224,38,59,.10); }
.predstrip.is-closed  { background: var(--surface-2); }
.predstrip.is-ok .ko-count      { color: #19a463; }
.predstrip.is-urgent .ko-count  { color: #e0263b; }
.predstrip.is-closed .ko-count  { color: var(--text-faint); }

.pchip { font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: var(--r-pill); margin-left: auto; }
.pchip--exact { background: var(--good-soft); color: var(--good); }
.pchip--ok { background: var(--accent-soft); color: var(--accent); }
.pchip--miss { background: var(--surface-2); color: var(--text-faint); border: 1px solid var(--border); }

/* locked tag */
.lockrow { display: inline-flex; align-items: center; gap: 5px; color: var(--text-faint); font-size: 11.5px; font-weight: 600; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-display); font-weight: 600; font-size: 15.5px;
  padding: 14px 20px; border-radius: 16px; transition: transform .12s var(--ease), background .2s, opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:disabled { background: var(--surface-3); color: var(--text-faint); box-shadow: none; cursor: not-allowed; }
.btn--ghost { background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.btn--block { width: 100%; }
.btn--lg { padding: 16px 22px; font-size: 16.5px; }

/* ---------- bottom tab bar ---------- */
.tabbar {
  flex: none; height: var(--tab-h);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: color-mix(in oklab, var(--surface) 86%, transparent);
  backdrop-filter: blur(18px) saturate(1.4);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: var(--text-faint); font-size: 10.5px; font-weight: 700; letter-spacing: .01em;
  position: relative; transition: color .2s;
}
.tab .ico { display: grid; transition: transform .2s var(--ease); }
.tab.is-active { color: var(--accent); }
.tab.is-active .ico { transform: translateY(-1px); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tab-h) + 22px);
  transform: translate(-50%, 14px); opacity: 0; pointer-events: none;
  background: var(--text); color: var(--bg);
  font-weight: 600; font-size: 13.5px; padding: 11px 18px; border-radius: var(--r-pill);
  box-shadow: var(--shadow-pop); z-index: 60; transition: transform .3s var(--ease), opacity .3s; max-width: 80%; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast--good { background: var(--good); color: #fff; }

/* ---------- empty state ---------- */
.empty { text-align: center; padding: 50px 30px; color: var(--text-faint); }
.empty .ico { display: inline-grid; margin-bottom: 10px; opacity: .7; }
.empty h4 { font-family: var(--font-display); color: var(--text-muted); margin: 0 0 4px; font-size: 16px; }
.empty p { margin: 0; font-size: 13px; }

/* ---------- brand footer ---------- */
.brandfoot { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 24px 8px; text-align: center; }
.brandfoot img { height: 60px; width: auto; opacity: .9; }
.brandfoot span { font-size: 11.5px; color: var(--text-faint); font-weight: 600; max-width: 24ch; line-height: 1.4; }
[data-theme="dark"] .brandfoot img { background: #fff; padding: 8px 12px; border-radius: 14px; }

/* ---------- credits ---------- */
.credits { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 2px 24px 14px; text-align: center; }
.credits span { font-size: 11px; color: var(--text-faint); font-weight: 600; }
.credits a { font-size: 12px; color: var(--accent); font-weight: 700; text-decoration: none; }
.credits a:active { opacity: .7; }

/* ---------- nav card (home → tournament) ---------- */
.navcard { display: flex; align-items: center; gap: 13px; width: 100%; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
  box-shadow: var(--shadow-card); transition: transform .12s var(--ease); text-align: left; }
.navcard:active { transform: scale(.985); }
.navcard__ic { width: 40px; height: 40px; border-radius: 12px; flex: none; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); }
.navcard__t { flex: 1; min-width: 0; }
.navcard__t b { font-family: var(--font-display); font-weight: 600; font-size: 15px; display: block; }
.navcard__t span { font-size: 12.5px; color: var(--text-muted); }
.navcard__chev { color: var(--text-faint); display: grid; }

/* ---------- portada (home cover) ---------- */
.portada { position: relative; overflow: hidden; border-radius: 24px; padding: 22px 20px 18px;
  text-align: center; color: #fff;
  background: linear-gradient(158deg, #c4164e 0%, #8e0f38 55%, #6c0b2b 100%); }
.portada__deco { position: absolute; inset: 0; pointer-events: none; background:
  radial-gradient(120% 80% at 85% -10%, rgba(255,255,255,.18), transparent 55%),
  radial-gradient(80% 60% at 8% 112%, rgba(0,0,0,.28), transparent 60%); }
.portada > * { position: relative; }
.portada__logo { display: flex; justify-content: center; margin-bottom: 14px; }
.portada__logo img { height: 50px; background: #fff; padding: 8px 13px; border-radius: 14px; }
.portada__badge { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .02em;
  padding: 5px 13px; border-radius: 999px; background: rgba(255,255,255,.16); color: #fff; }
.portada__title { font-family: var(--font-display); font-weight: 600; font-size: 34px; letter-spacing: -.02em; margin: 12px 0 6px; }
.portada__dates { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: rgba(255,255,255,.85); }
.portada__dates .ico { display: grid; }
.cd { display: flex; align-items: center; justify-content: center; gap: 5px; margin: 16px 0 8px; }
.cdbox { background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.2); border-radius: 13px;
  padding: 8px 0 6px; min-width: 54px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.cdbox b { font-family: var(--font-display); font-variant-numeric: tabular-nums; font-weight: 600; font-size: 25px; line-height: 1; }
.cdbox span { font-size: 9.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: rgba(255,255,255,.78); }
.cdsep { font-family: var(--font-display); font-weight: 600; font-size: 20px; color: rgba(255,255,255,.5); }
.portada__hint { font-size: 11px; font-weight: 600; color: rgba(255,255,255,.7); margin-top: 4px; }

/* ---------- points strip ---------- */
.ptstrip { display: flex; align-items: center; gap: 14px; width: 100%; padding: 13px 16px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-card); text-align: left; }
.ptstrip:active { transform: scale(.99); }
.ptstrip__pts { font-family: var(--font-display); font-weight: 600; font-size: 24px; color: var(--accent); flex: none; }
.ptstrip__pts small { font-size: 12px; font-weight: 600; margin-left: 2px; }
.ptstrip__t { flex: 1; min-width: 0; }
.ptstrip__t b { font-family: var(--font-display); font-weight: 600; font-size: 15px; display: block; }
.ptstrip__t span { font-size: 12px; color: var(--text-muted); }

/* ---------- quick-access grid ---------- */
.navgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 2px 16px 8px; }
.navtile { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px;
  border-radius: 18px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-card);
  text-align: left; transition: transform .12s var(--ease); }
.navtile:active { transform: scale(.97); }
.navtile__ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); }
.navtile__t b { font-family: var(--font-display); font-weight: 600; font-size: 14.5px; display: block; }
.navtile__t span { font-size: 11.5px; color: var(--text-muted); }
