/* ═══════════════════════════════════════════════
   EBOL. — LIVE PAGE
   Sports broadcast dashboard — multi-match tracker
   Mini scoreboards with live energy
   ═══════════════════════════════════════════════ */

/* ── LIVE PAGE CONTAINER ── */

.live-page {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ── REFRESH BAR ── */

.live-refresh-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-display);
  font-size: 0.65rem;
  color: var(--text-muted);
  padding: 0 0.5rem;
}

.live-refresh-update {
  font-weight: 500;
}

.live-refresh-countdown {
  font-weight: 500;
}

.live-refresh-countdown span,
.live-refresh-update span {
  font-weight: 700;
  color: var(--text-secondary);
}

/* ── HORIZONTAL MATCH BAR ── */

.live-bar {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 0.6rem 0 0.25rem 0;
  mask-image: linear-gradient(
    to right,
    black 0%,
    black 98%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to right,
    black 0%,
    black 98%,
    transparent 100%
  );
}

.live-bar::-webkit-scrollbar {
  display: none;
}

.live-bar-inner {
  display: flex;
  gap: 0.6rem;
  padding: 0.25rem 0;
}

/* ── LIVE CARD — Mini scoreboard ── */

.live-card {
  position: relative;
  min-width: 210px;
  max-width: 240px;
  flex-shrink: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(27, 67, 50, 0.05);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  cursor: pointer;
}

.live-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(27, 67, 50, 0.08);
}

/* Active state — green highlight */
.live-card-active {
  border-color: var(--green-mid);
  box-shadow: 0 2px 12px rgba(45, 106, 79, 0.15);
}

.live-card-active:hover {
  border-color: var(--green-mid);
  box-shadow: 0 4px 16px rgba(45, 106, 79, 0.2);
}


/* ── ADD MORE CARD ── */

.live-card-add {
  min-width: 140px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--bg-surface);
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: var(--text-muted);
  transition: all 0.2s ease;
  cursor: pointer;
}

.live-card-add:hover {
  border-color: var(--green-primary);
  color: var(--green-primary);
  background: rgba(45, 106, 79, 0.03);
  transform: translateY(-1px);
}

.live-card-add span {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ── CARD LINK ── */

.live-card-link {
  display: block;
  padding: 1.2rem 0.85rem 0.75rem;
  text-decoration: none;
  color: inherit;
  position: relative;
}

/* ── CARD LABEL ── */

.live-card-label {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  z-index: 2;
}

.live-card-label-my_team {
  background: var(--green-primary);
  color: white;
  border-color: var(--green-primary);
}

.live-card-label-dry_target {
  background: var(--red-warning);
  color: white;
  border-color: var(--red-warning);
}

/* ── CARD TEAMS + SCORE ── */

.live-card-teams {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.live-card-team {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  text-align: center;
}

.live-card-score {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  padding: 0.15rem 0;
}

.live-card-x {
  font-size: 0.6rem;
  font-weight: 400;
  color: var(--text-muted);
}

/* ── CARD META ── */

.live-card-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.3rem;
}

.live-card-comp {
  font-family: var(--font-display);
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

/* ── CARD REMOVE BUTTON ── */

.live-card-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  padding: 0;
  z-index: 2;
}

.live-card-remove:hover {
  background: var(--red-warning);
  border-color: var(--red-warning);
  color: white;
}

/* ── LIVE BUTTON (Add/Remove) — used on competitions + match detail ── */

.live-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.6rem;
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  line-height: 1;
}

.live-btn svg {
  flex-shrink: 0;
}

/* Add — outline style */
.live-btn-add {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.live-btn-add:hover {
  border-color: var(--green-mid);
  color: var(--green-primary);
  background: var(--green-wash);
}

/* Remove — filled/active style */
.live-btn-remove {
  background: var(--green-wash);
  color: var(--green-primary);
  border: 1px solid rgba(45, 106, 79, 0.25);
}

.live-btn-remove:hover {
  background: rgba(220, 38, 38, 0.06);
  color: var(--red-warning);
  border-color: rgba(220, 38, 38, 0.25);
}

/* ── RESPONSIVE ── */

@media (max-width: 768px) {
  .live-card {
    min-width: 180px;
    max-width: 200px;
  }

  .live-card-link {
    padding: 1.1rem 0.7rem 0.6rem;
  }

  .live-card-score {
    font-size: 1.2rem;
  }

  .live-card-team {
    font-size: 0.65rem;
  }

}

@media (max-width: 480px) {
  .live-bar-inner {
    gap: 0.45rem;
    padding: 0.2rem 0.35rem;
  }

  .live-card {
    min-width: 160px;
    max-width: 180px;
  }

  .live-card-score {
    font-size: 1.1rem;
  }

  .live-card-team {
    font-size: 0.6rem;
  }
}

/* ── DARK THEME ── */

[data-theme="dark"] .live-card {
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .live-card:hover {
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .live-card-active {
  box-shadow: 0 2px 12px rgba(82, 183, 136, 0.15);
}

[data-theme="dark"] .live-card-remove {
  background: var(--bg-card);
  border-color: var(--border);
}

[data-theme="dark"] .live-card-remove:hover {
  background: var(--red-warning);
  border-color: var(--red-warning);
  color: #1a1a1a;
}
