/* CoreScore styles - Estatisticas ao vivo (live stats UI).
   Extraido de css/styles.css em 22/05/2026 (FASE E).
   Carregar APOS styles.css (vars) pra que cascade funcione. */

/* ─── Estatísticas ao vivo ───────────────────────────────────────────────── */
.live-stats-layout      { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.live-top-row           { display: grid; grid-template-columns: 280px 1fr; gap: 14px; align-items: start; margin-bottom: 12px; }
.live-top-controls      { min-width: 0; }
.live-top-attack        { min-width: 0; }
.live-top-attack--full  { margin-bottom: 12px; }
.live-period-switch     { display: inline-flex; gap: 8px; margin-bottom: 12px; padding: 4px; background: var(--bg3); border: 1.5px solid var(--border); border-radius: 999px; }
.live-period-row        { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.live-period-row .live-period-switch { margin-bottom: 0; }
.live-refresh-countdown { font-size: 10px; font-weight: 700; color: var(--text3); background: var(--bg3); border: 1px solid var(--border); border-radius: 999px; padding: 4px 10px; white-space: nowrap; letter-spacing: .3px; }
.live-period-btn        { border: none; background: transparent; color: var(--text2); font-size: 12px; font-weight: 700; padding: 8px 14px; border-radius: 999px; cursor: pointer; transition: all .18s; }
.live-period-btn.active { background: var(--accent); color: #fff; }
.live-period-btn.is-unavailable { opacity: .55; }
.live-period-note      { margin-top: -4px; margin-bottom: 12px; font-size: 11px; color: var(--text2); }
.live-period-empty     { background: var(--card); border: 1.5px solid var(--border); border-radius: 10px; padding: 16px; font-size: 12px; color: var(--text2); }
.live-col               { min-width: 0; }
.live-col-title         { font-size: 11px; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.live-col-card          { background: var(--card); border: 1.5px solid var(--border); border-radius: 10px; padding: 12px; }
.live-col-teams         { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 12px; font-weight: 700; }
.live-team-home         { color: #10b981; }
.live-team-away         { color: #2563eb; }
.live-summary           { margin-top: 14px; background: var(--card); border: 1.5px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.live-summary-title     { font-size: 11px; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 10px; }
.live-summary p         { font-size: 12px; color: var(--text); line-height: 1.65; margin-bottom: 8px; }
.live-summary p:last-child { margin-bottom: 0; }
.attack-map-section    { margin-top: 14px; }
.attack-map            { position: relative; background: var(--card); border: 1.5px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.live-top-attack .attack-map-section { margin-top: 0; }
.attack-map-head       { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.attack-map-head-main  { display: flex; align-items: center; gap: 8px; min-width: 0; }
.attack-map-title      { font-size: 11px; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.attack-map-badge      { display: inline-flex; align-items: center; font-size: 10px; font-weight: 700; color: #f59e0b; background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.28); padding: 3px 8px; border-radius: 999px; white-space: nowrap; margin-bottom: 8px; }
.attack-map-badge--derived { color: #60a5fa; background: rgba(96,165,250,.12); border-color: rgba(96,165,250,.30); cursor: help; }
.attack-map-empty      { background: var(--card); border: 1.5px solid var(--border); border-radius: 10px; padding: 14px 16px; font-size: 12px; color: var(--text2); }
.attack-expand-btn     { border: 1.5px solid var(--border); background: transparent; color: var(--text2); font-size: 11px; font-weight: 700; padding: 6px 12px; border-radius: 999px; cursor: pointer; transition: all .18s; }
.attack-expand-btn:hover { border-color: var(--accent); color: var(--accent); }
.attack-map-chart      { position: relative; height: 104px; border-radius: 10px; overflow: visible; background: linear-gradient(180deg, rgba(16,185,129,.10) 0%, rgba(16,185,129,.10) 49%, rgba(37,99,235,.10) 51%, rgba(37,99,235,.10) 100%); border: 1px solid var(--border); margin-top: 30px; margin-bottom: 28px; }
.attack-map-progress   { position: absolute; left: 0; top: 0; bottom: 0; max-width: 100%; }
.attack-map-half-line  { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--border); z-index: 2; }
.attack-map-mid-line   { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: rgba(255,255,255,.65); z-index: 2; }
.attack-map-markers    { position: absolute; left: 12px; right: 12px; top: 0; bottom: 0; z-index: 4; pointer-events: none; }
.attack-map-markers--outside { left: 28px; right: 28px; top: 26px; bottom: 26px; }
.attack-map-top-team   { position: absolute; left: 10px; top: -18px; font-size: 11px; font-weight: 700; color: #10b981; z-index: 3; white-space: nowrap; }
.attack-map-bottom-team{ position: absolute; left: 10px; bottom: -18px; font-size: 11px; font-weight: 700; color: #2563eb; z-index: 3; white-space: nowrap; }
.attack-map-bars       { position: absolute; left: 0; right: 0; display: flex; align-items: flex-end; gap: 1px; padding: 0 12px; z-index: 1; }
.attack-map-bars--top  { top: 12px; height: calc(50% - 12px); }
.attack-map-bars--bottom { bottom: 12px; height: calc(50% - 12px); }
.attack-bar-wrap       { flex: 1; display: flex; align-items: flex-end; justify-content: center; height: 100%; min-width: 4px; }
.attack-bar            { width: 100%; border-radius: 1px 1px 0 0; min-height: 0; }
.attack-bar.home       { background: #10b981; }
.attack-bar.away       { background: #3b82f6; }
.attack-map-bars--bottom .attack-bar-wrap { align-items: flex-start; }
.attack-map-bars--bottom .attack-bar { border-radius: 0 0 1px 1px; }
.attack-marker         { position: absolute; transform: translateX(-50%); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px rgba(15,17,23,.55); }
.attack-marker.home    { top: -14px; }
.attack-marker.away    { top: calc(100% + 2px); }
.attack-marker.goal    { width: 15px; height: 15px; border-radius: 50%; background: #fff; color: #111827; font-size: 10px; line-height: 1; }
.attack-marker.goal.home { border: 2px solid #10b981; }
.attack-marker.goal.away { border: 2px solid #3b82f6; }
.attack-marker.red     { width: 10px; height: 16px; border-radius: 1px; background: #dc2626; }
.attack-marker.yellow  { width: 9px; height: 15px; border-radius: 1px; background: #facc15; }
.attack-map-footer     { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 10px; font-weight: 700; color: var(--text3); padding: 0 2px; }
.live-stat-row          { margin-bottom: 6px; }
.live-stat-row:last-child { margin-bottom: 0; }
.live-stat-row--featured { margin-bottom: 10px; }
.live-stat-header       { display: flex; justify-content: space-between; align-items: center; margin-bottom: 3px; }
.live-stat-name         { font-size: 11px; color: var(--text2); text-align: center; flex: 1; padding: 0 6px; }
.live-stat-val          { font-size: 12px; font-weight: 700; color: var(--text); min-width: 24px; }
.live-stat-val.right    { text-align: right; }
.live-bars              { display: flex; gap: 2px; height: 4px; }
.bar-home               { flex: 1; background: var(--bg3); border-radius: 2px; overflow: hidden; display: flex; justify-content: flex-end; }
.bar-home-fill          { height: 100%; background: #10b981; border-radius: 2px; }
.bar-away               { flex: 1; background: var(--bg3); border-radius: 2px; overflow: hidden; }
.bar-away-fill          { height: 100%; background: #2563eb; border-radius: 2px; }
.possession-bar         { height: 8px; border-radius: 4px; overflow: hidden; display: flex; margin-bottom: 6px; }
.poss-home              { background: #10b981; display: flex; align-items: center; justify-content: flex-start; padding-left: 5px; }
.poss-away              { background: #2563eb; display: flex; align-items: center; justify-content: flex-end; padding-right: 5px; }
.poss-lbl               { font-size: 9px; font-weight: 700; color: #fff; }

@media (max-width: 900px) {
  .lineup-layout { grid-template-columns: 1fr; }
  .live-top-row { grid-template-columns: 1fr; }
  .live-stats-layout { grid-template-columns: 1fr; }
  .live-period-switch { display: flex; width: 100%; justify-content: center; flex-wrap: wrap; border-radius: 16px; }
}

body.monitor-mode .header,
body.monitor-mode .date-nav,
body.monitor-mode .status-nav,
body.monitor-mode .league-nav,
body.monitor-mode .sidebar,
body.monitor-mode .tabs,
body.monitor-mode #tp-bet,
body.monitor-mode #tp-p,
body.monitor-mode #tp-f,
body.monitor-mode #tp-s,
body.monitor-mode #tp-lu,
body.monitor-mode #tp-stand,
body.monitor-mode #tp-b365,
body.monitor-mode #tp-ov,
body.monitor-mode #tp-alert {
  display: none !important;
}

.alert-tab {
  display: grid;
  gap: 14px;
}

.alert-card,
.alert-metric-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}

.alert-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.alert-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
}

.alert-subtitle {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text2);
  line-height: 1.5;
}

.alert-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.alert-minute {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text);
  font-weight: 700;
}

.alert-minute input {
  width: 74px;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text);
}

.alert-btn {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid #2563eb;
  background: transparent;
  color: #60a5fa;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.alert-btn--danger {
  border-color: #dc2626;
  color: #f87171;
}

.alert-status {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
}

.alert-status.ready {
  background: rgba(37, 99, 235, 0.12);
  color: #93c5fd;
  border: 1px solid rgba(96, 165, 250, 0.25);
}

.alert-status.active {
  background: rgba(220, 38, 38, 0.14);
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.3);
}

.alert-status.error {
  background: rgba(220, 38, 38, 0.14);
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.3);
}

.alert-status.muted {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text2);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.alert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.alert-tab,
.alert-grid,
.alert-metric-card,
.alert-rule,
.alert-rule-value,
.alert-rule-stepper {
  position: relative;
}

.alert-metric-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
}

.alert-rule-list {
  display: grid;
  gap: 10px;
}

.alert-rule {
  display: grid;
  grid-template-columns: 1fr 114px 136px;
  align-items: center;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text2);
  border-radius: 12px;
  overflow: hidden;
}

.alert-rule.active {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.12);
}

.alert-rule.invalid {
  border-color: rgba(248, 113, 113, 0.7);
  background: rgba(127, 29, 29, 0.18);
}

.alert-rule-label {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.alert-rule-input {
  width: 100%;
  min-height: 42px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  outline: none;
  padding: 0 6px;
}

.alert-rule-input::placeholder {
  color: var(--text3);
}

.alert-rule-value {
  display: grid;
  grid-template-columns: 1fr 26px;
  min-height: 42px;
  border-left: 1px solid rgba(148, 163, 184, 0.2);
  border-right: 1px solid rgba(148, 163, 184, 0.2);
}

.alert-rule-stepper {
  display: grid;
  grid-template-rows: 1fr 1fr;
  border-left: 1px solid rgba(148, 163, 184, 0.2);
}

.alert-step-btn {
  border: 0;
  background: transparent;
  color: var(--text2);
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.alert-step-btn + .alert-step-btn {
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.alert-step-btn:hover {
  background: rgba(37, 99, 235, 0.14);
  color: #bfdbfe;
}

.alert-rule-btn {
  min-height: 42px;
  border: 0;
  background: transparent;
  color: var(--text2);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  padding: 0 12px;
  white-space: nowrap;
}

.alert-rule-btn.active {
  background: rgba(37, 99, 235, 0.18);
  color: #bfdbfe;
}

.alert-minute input,
.alert-actions .alert-btn,
.alert-rule-input,
.alert-step-btn,
.alert-rule-btn {
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

body:not([data-theme="dark"]) .alert-rule-btn.active {
  background: rgba(37, 99, 235, 0.22);
  color: #1d4ed8;
}

.alert-rule-btn:disabled {
  background: rgba(220, 38, 38, 0.18);
  color: #fca5a5;
  cursor: not-allowed;
}

.alert-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.alert-overlay.hidden {
  display: none;
}

