/* ==========================================================
   Football Fixtures – custom styles
   Tailwind handles most styling. This file holds reusable
   component classes and effects that are cleaner in plain CSS.
   ========================================================== */

:root {
  --navy-900: #0a142b;
  --navy-800: #0f1d3d;
  --emerald: #10b981;
  --emerald-dark: #059669;
  --slate-200: #e2e8f0;
  --slate-500: #64748b;
}

/* Offset anchor jumps so the sticky header doesn't cover section titles */
section[id] {
  scroll-margin-top: 4.5rem;
}

/* Accessible "skip to content" link */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 50;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  background: var(--emerald);
  color: var(--navy-900);
  font-weight: 600;
}
.skip-link:focus {
  top: 1rem;
}

/* ---------- Navigation ---------- */
.nav-link {
  display: inline-block;
  padding: 0.5rem 0.875rem;
  border-radius: 0.5rem;
  color: #cbd5e1;
  transition: color 0.15s, background-color 0.15s;
}
.nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.mobile-link {
  display: block;
  padding: 0.75rem 0.75rem;
  border-radius: 0.5rem;
  color: #e2e8f0;
}
.mobile-link:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* ---------- Hero: faint pitch markings ---------- */
.hero-pitch {
  background-image:
    radial-gradient(circle at 85% 40%, transparent 0 5.5rem, rgba(255, 255, 255, 0.06) 5.5rem 5.6rem, transparent 5.6rem),
    linear-gradient(90deg, transparent calc(85% - 1px), rgba(255, 255, 255, 0.06) calc(85% - 1px) 85%, transparent 85%),
    linear-gradient(135deg, #0a142b 0%, #10224a 60%, #0b3b35 100%);
}

/* ---------- Headings ---------- */
.section-title {
  font-size: 1.625rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--navy-900);
}

/* ---------- Dashboard cards ---------- */
.stat-card {
  border-radius: 1rem;
  background: #fff;
  padding: 1.1rem 1.25rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 24px -12px rgba(15, 23, 42, 0.18);
  border: 1px solid var(--slate-200);
}
.stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
}
.stat-label {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--slate-500);
}
.stat-value {
  font-size: 1.875rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--navy-900);
  font-variant-numeric: tabular-nums;
}

/* ---------- Form controls ---------- */
.input {
  display: block;
  width: 100%;
  min-height: 2.75rem; /* comfortable touch target on mobile */
  padding: 0.55rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.6rem;
  background: #fff;
  color: #0f172a;
  font-size: 1rem; /* 16px prevents iOS zoom on focus */
  transition: border-color 0.15s, box-shadow 0.15s;
}
@media (min-width: 640px) {
  .input { font-size: 0.925rem; }
}
.input:focus {
  outline: none;
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}
.input:disabled {
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
}
.input[aria-invalid="true"] {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}
.filter-label,
.form-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
}
.req {
  color: #ef4444;
}
.field-error {
  margin-top: 0.3rem;
  font-size: 0.78rem;
  color: #dc2626;
}
.field-error:empty {
  display: none;
}

/* ---------- Buttons ---------- */
.btn-primary,
.btn-secondary,
.btn-danger-outline,
.status-filter,
.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  border-radius: 0.6rem;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
  cursor: pointer;
}
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.btn-danger-outline:focus-visible,
.status-filter:focus-visible,
.icon-btn:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 2px;
}
.btn-primary {
  min-height: 2.75rem;
  padding: 0.6rem 1.1rem;
  background: var(--navy-800);
  color: #fff;
}
.btn-primary:hover {
  background: #1f3363;
}
.btn-secondary {
  min-height: 2.75rem;
  padding: 0.6rem 1rem;
  background: #fff;
  color: #334155;
  border: 1px solid #cbd5e1;
}
.btn-secondary:hover {
  background: #f1f5f9;
}
.btn-danger-outline {
  min-height: 2.5rem;
  padding: 0.5rem 0.95rem;
  font-size: 0.875rem;
  background: #fff;
  color: #dc2626;
  border: 1px solid #fecaca;
}
.btn-danger-outline:hover {
  background: #fef2f2;
}

/* Status filter pills */
.status-filter {
  padding: 0.45rem 0.95rem;
  font-size: 0.875rem;
  border: 1px solid var(--slate-200);
  background: #f8fafc;
  color: #475569;
  border-radius: 999px;
}
.status-filter:hover {
  background: #eef2f7;
}
.status-filter[aria-pressed="true"] {
  background: var(--navy-800);
  border-color: var(--navy-800);
  color: #fff;
}

/* Small square icon buttons (edit / delete) */
.icon-btn {
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  color: #475569;
  border: 1px solid var(--slate-200);
  background: #fff;
}
.icon-btn:hover {
  background: #f1f5f9;
  color: var(--navy-900);
}
.icon-btn.danger:hover {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

/* ---------- Match cards ---------- */
.match-card {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.match-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -14px rgba(15, 23, 42, 0.35);
}

/* Team logo / initials placeholder */
.team-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f1f5f9;
  border: 1px solid var(--slate-200);
}
.team-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.25rem;
}
.team-logo.sm {
  width: 1.9rem;
  height: 1.9rem;
}
.team-initials {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
}
.team-logo.sm .team-initials {
  font-size: 0.6rem;
}

/* Pulsing dot for LIVE badges */
.live-dot {
  position: relative;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: currentColor;
}
.live-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: currentColor;
  animation: live-pulse 1.6s ease-out infinite;
}
@keyframes live-pulse {
  from { transform: scale(1); opacity: 0.7; }
  to   { transform: scale(2.6); opacity: 0; }
}

.score {
  font-variant-numeric: tabular-nums;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  z-index: 60;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: calc(100% - 2rem);
  padding: 0.75rem 1.1rem;
  border-radius: 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #fff;
  background: var(--navy-900);
  box-shadow: 0 12px 32px -10px rgba(0, 0, 0, 0.45);
  pointer-events: none; /* never block clicks on buttons underneath */
  animation: toast-in 0.2s ease-out;
}
.toast[hidden] { display: none; }
.toast.success { background: #047857; }
.toast.error   { background: #b91c1c; }
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
