/* =========================================================================
   home.css — landing page (extracted from views/home.js).
   The page-level palette uses the unified tokens (tokens.css). Older custom
   props (--ink, --accent, --surface-soft) are kept as legacy aliases inside
   tokens.css so this file can use either naming.
   ========================================================================= */

body.page-home {
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 112, 67, 0.18), transparent 45%),
    radial-gradient(circle at 88% 18%, rgba(236, 64, 122, 0.12), transparent 42%),
    radial-gradient(circle at 50% 0%, rgba(255, 138, 101, 0.16), transparent 48%),
    linear-gradient(180deg, #ffffff 0%, #fff6f2 38%, #fff1ea 68%, #ffffff 100%);
  color: var(--ink);
  margin: 0;
  font-family: var(--font-body);
  position: relative;
  overflow-x: hidden;
  min-height: 100vh;
}

body.page-home .main-header {
  background: var(--header-bg);
  margin-bottom: 0;
}

body.page-home .main-header,
body.page-home .main-header * {
  font-family: var(--font-body);
}

/* ---------------------------------------------------------------------------
   Three-column layout: left ad rail / main content / right ad rail.
   Used by the home page only; player/team have their own layouts.
   --------------------------------------------------------------------------- */
body.page-home .page-container {
  display: flex !important;
  min-height: calc(100vh - 70px) !important;
  margin: 0 auto !important;
  max-width: 1800px !important;
  gap: 0 !important;
}

body.page-home .page-sidebar-left,
body.page-home .page-sidebar-right {
  width: 320px;
  flex: 0 0 320px;
  display: flex;
  justify-content: center;
  padding: 20px 10px;
  position: sticky;
  top: 20px;
  align-self: flex-start;
}

body.page-home .page-sidebar-right {
  border-left: none;
}

body.page-home .ad-sky {
  width: 300px;
  height: 600px;
  background: #f3f4f6;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 14px;
}

body.page-home .page-content {
  flex: 1 !important;
  min-width: 0 !important;
  display: flex !important;
  gap: 10px !important;
  padding: 20px !important;
}

/* Inner columns inside .page-content */
.home-main-column {
  flex: 1 !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 20px !important;
}

@media screen and (min-width: 769px) {
  .home-main-column {
    min-width: 650px !important;
  }
}

.home-sidebar-column {
  width: 320px !important;
  flex: 0 0 320px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 20px !important;
}

/* ---------------------------------------------------------------------------
   Card primitive (used by home widgets)
   --------------------------------------------------------------------------- */
.card {
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--line);
  overflow: hidden;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-sunken);
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.card-subtitle {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 4px 0 0 0;
}

.card-body {
  padding: 0;
}

/* Today's matches list */
.today-matches-list {
  display: flex;
  flex-direction: column;
}

.empty-matches {
  padding: 40px 20px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 14px;
}

.today-comp-group {
  border-bottom: 1px solid var(--line);
}

.today-comp-header {
  padding: 10px 16px;
  background: var(--surface-muted);
  font-weight: 700;
  font-size: 13px;
  color: var(--ink);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Competition name is already shown as the group header on home — hide the
   per-card inline competition badge and the empty broadcast slot. */
.today-matches-list .gw-competition-inline { display: none; }
.today-matches-list .match-broadcast       { display: none; }

/* Sidebar widget */
.sidebar-widget {
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 16px;
}

.sidebar-widget-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 12px 0;
}

.sidebar-widget-text {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0;
}

/* ---------------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------------- */
@media screen and (max-width: 1600px) {
  body.page-home .page-sidebar-left,
  body.page-home .page-sidebar-right {
    width: 200px;
    flex: 0 0 200px;
  }
  body.page-home .ad-sky {
    width: 180px;
  }
}

@media screen and (max-width: 1400px) {
  body.page-home .page-sidebar-right { display: none; }
}

@media screen and (max-width: 1200px) {
  body.page-home .page-sidebar-left { display: none; }
}

@media screen and (max-width: 1024px) {
  body.page-home .page-content {
    flex-direction: column;
  }
  .home-sidebar-column {
    width: 100%;
    flex: 1;
    order: -1;
  }
}

@media screen and (max-width: 768px) {
  .home-main-column {
    min-width: 0;
    width: 100%;
  }
  body.page-home .page-content {
    padding: 10px !important;
  }
}
