/* ═══════════════════════════════════════════════════════════
   Vortex TV Admin — Page components (deep polish)
   ═══════════════════════════════════════════════════════════ */

/* ── Alerts icon slot ── */
.alert-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.alert-icon svg { width: 18px; height: 18px; }

/* ── Button with icon ── */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.btn-icon svg { width: 14px; height: 14px; }
.btn:has(.btn-icon) {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ── Quick links (dashboard) ── */
.quick-link .icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-3);
}
.quick-link .icon svg { width: 22px; height: 22px; }

/* ── Home banner preview ── */
.preview-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
  box-shadow: var(--shadow);
}
.preview-card img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
}
.banner-history .list-item {
  align-items: center;
}
.banner-thumb {
  width: 72px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

/* ── Match cards (matches.php) ── */
.match-card {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.match-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}
.match-card.is-live {
  border-color: rgba(16, 185, 129, 0.35);
  background: linear-gradient(135deg, var(--surface) 0%, var(--success-bg) 100%);
}
.match-card-main { flex: 1; min-width: 0; }
.match-teams {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-2);
}
.match-teams strong {
  font-size: 15px;
  font-weight: 700;
}
.match-meta {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
}
.match-channel {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--space-2);
  font-size: 12px;
  color: var(--muted);
}
.match-channel svg { width: 14px; height: 14px; flex-shrink: 0; }
.match-card-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex-shrink: 0;
}
.match-inline-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-2);
  margin-top: var(--space-3);
  align-items: center;
}
.match-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
}
.match-status-pill.is-live {
  background: var(--success-bg);
  color: var(--success);
}
.match-status-pill.is-scheduled {
  background: var(--accent-soft);
  color: var(--accent);
}
.match-status-pill.is-finished {
  background: var(--surface-3);
  color: var(--muted);
}

/* ── Schedule accordion (deep) ── */
.schedule-day-accordion {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  transition: box-shadow var(--transition);
}
.schedule-day-accordion[open] {
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}
.schedule-day-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  cursor: pointer;
  list-style: none;
  background: var(--surface-2);
  transition: background var(--transition);
}
.schedule-day-summary::-webkit-details-marker { display: none; }
.schedule-day-summary:hover { background: var(--surface-3); }
.schedule-day-summary-main {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}
.schedule-day-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.schedule-day-icon svg { width: 20px; height: 20px; }
.schedule-day-text strong {
  display: block;
  font-size: 15px;
  margin-bottom: 2px;
}
.schedule-day-text span {
  font-size: 12px;
  color: var(--muted);
}
.schedule-day-summary-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}
.schedule-chevron {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: transform var(--transition);
}
.schedule-chevron svg { width: 18px; height: 18px; }
.schedule-day-accordion[open] .schedule-chevron { transform: rotate(180deg); }
.schedule-day-panel {
  padding: var(--space-4) var(--space-5) var(--space-5);
  border-top: 1px solid var(--border);
}
.schedule-match-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  margin-bottom: var(--space-3);
  overflow: hidden;
}
.schedule-match-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
}
.schedule-match-line {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}
.schedule-team {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}
.schedule-team-away { justify-content: flex-end; text-align: end; }
.schedule-team-name {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.schedule-time {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  white-space: nowrap;
}
.schedule-edit-box {
  border-top: 1px solid var(--border);
}
.schedule-edit-box > summary {
  padding: var(--space-2) var(--space-4);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  list-style: none;
}
.schedule-edit-box > summary::-webkit-details-marker { display: none; }
.schedule-edit-box .form-grid {
  padding: 0 var(--space-4) var(--space-4);
}
.card-body-divider {
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px dashed var(--border);
}
.subform-title {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 var(--space-3);
}

/* ── Notifications log ── */
.notif-item {
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.notif-item + .notif-item { margin-top: var(--space-2); }
.notif-type {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: var(--space-2);
}
.notif-type.is-welcome { background: var(--success-bg); color: var(--success); }
.notif-type.is-match { background: var(--warning-bg); color: var(--warning); }
.notif-body {
  font-size: 13px;
  color: var(--text-2);
  white-space: pre-line;
  line-height: 1.6;
  margin: var(--space-2) 0;
}
.notif-meta {
  font-size: 11px;
  color: var(--muted);
}

/* ── App update modes ── */
.mode-grid { display: grid; gap: var(--space-3); }
.mode-option {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.mode-option:hover { border-color: var(--border-strong); }
.mode-option.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.mode-option input { margin-top: 4px; accent-color: var(--accent); }
.mode-option strong { display: block; margin-bottom: 4px; font-size: 14px; }
.mode-option span { color: var(--muted); font-size: 13px; line-height: 1.6; }
.update-preview {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  background: var(--surface);
  text-align: center;
}
.update-preview-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
  margin-bottom: var(--space-3);
  font-size: 13px;
}

/* ── Streams info card ── */
.info-steps {
  margin: 0;
  padding-right: 20px;
  line-height: 1.9;
  color: var(--text-2);
}
.info-steps li + li { margin-top: var(--space-1); }

/* ── Settings code blocks ── */
.code-block {
  display: block;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-family: ui-monospace, 'Cascadia Code', monospace;
  font-size: 12px;
  word-break: break-all;
  direction: ltr;
  text-align: left;
  color: var(--accent);
}

.streams-info-card { max-width: 760px; }
.match-list { gap: var(--space-3); }

@media (max-width: 768px) {
  .match-card { flex-direction: column; }
  .schedule-match-line {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .schedule-team-away { justify-content: center; }
}
