/**
 * Season Schedule: the schedule table and the next-game band. Forked from the
 * store/activities tokens so a schedule row reads as the same family; on
 * phones the table re-stacks into game cards instead of squeezing.
 */

.rt-schedule {
  max-width: var(--rt-maxw, 1120px);
  margin: 0 auto;
}

.rt-schedule-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border: 1px solid var(--rt-line, #e7e2d6);
  border-radius: var(--rt-radius, 10px);
  overflow: hidden;
  box-shadow: var(--rt-shadow, 0 6px 24px rgba(0, 0, 0, 0.12));
}

.rt-schedule-table thead th {
  padding: 12px 16px;
  background: var(--rt-black, #141414);
  color: var(--rt-white, #ffffff);
  font-family: var(--rt-font-display, "RT Display", "Arial Narrow", sans-serif);
  font-weight: var(--rt-font-display-weight, 400);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: left;
  font-size: 0.95rem;
}

.rt-schedule-table tbody td {
  padding: 12px 16px;
  border-top: 1px solid var(--rt-line, #e7e2d6);
  vertical-align: middle;
}
.rt-schedule-table tbody tr:first-child td {
  border-top: 0;
}
.rt-schedule-table tbody tr:hover {
  background: var(--rt-cream, #fbf6ec);
}

.rt-schedule-date {
  white-space: nowrap;
  font-weight: 600;
}

/* Opponent cell: helmet, vs/at, name, theme badge, in one line that wraps. */
.rt-schedule-opp {
  min-width: 220px;
}
.rt-schedule-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 10px;
}
.rt-schedule-vs {
  color: var(--rt-gray, #6b6b6b);
  font-weight: 600;
  font-size: 0.85rem;
}
.rt-schedule-oppname {
  font-weight: 700;
}
a.rt-schedule-oppname {
  color: inherit;
  text-decoration: none;
}
a.rt-schedule-oppname:hover {
  text-decoration: underline;
}

.rt-schedule-venue a {
  color: inherit;
  font-weight: 600;
  text-decoration: none;
}
.rt-schedule-venue a:hover {
  text-decoration: underline;
}
.rt-schedule-venue .fa-location-dot {
  color: var(--rt-secondary, #d99a00);
  font-size: 0.85em;
}

/* Theme nights and the cancelled state: the store's quiet chip family. */
.rt-schedule-chip {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--rt-line, #e7e2d6);
  color: var(--rt-gray, #6b6b6b);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  vertical-align: middle;
}
.rt-schedule-chip--theme {
  background: var(--rt-primary, #f4b41c);
  color: var(--rt-on-primary, #141414);
}

/* W/L/T. Semantic colors on purpose: a brand palette has no word for
   "we lost", and Friday's result must read at a glance. */
.rt-schedule-result {
  font-weight: 800;
  white-space: nowrap;
}
.rt-schedule-result--w {
  color: #1a7f37;
}
.rt-schedule-result--l {
  color: #b32d2e;
}
.rt-schedule-result--t {
  color: var(--rt-gray, #6b6b6b);
}

.rt-schedule-links {
  display: inline-flex;
  gap: 12px;
  margin-left: 10px;
}
.rt-schedule-links a {
  color: var(--rt-secondary, #d99a00);
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
}
.rt-schedule-links a:hover {
  text-decoration: underline;
}

.rt-schedule-bye {
  color: var(--rt-gray, #6b6b6b);
  font-weight: 600;
  font-style: italic;
}
.is-cancelled .rt-schedule-oppname {
  color: var(--rt-gray, #6b6b6b);
  text-decoration: line-through;
}

/* ---- Phones: cards, not a squished table ---------------------------------- */

@media (max-width: 759px) {
  .rt-schedule-table {
    display: block;
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }
  .rt-schedule-table thead {
    display: none;
  }
  .rt-schedule-table tbody,
  .rt-schedule-table tr,
  .rt-schedule-table td {
    display: block;
  }
  .rt-schedule-table tbody tr {
    margin: 0 0 14px;
    background: #fff;
    border: 1px solid var(--rt-line, #e7e2d6);
    border-radius: var(--rt-radius, 10px);
    overflow: hidden;
    box-shadow: var(--rt-shadow, 0 6px 24px rgba(0, 0, 0, 0.12));
  }
  .rt-schedule-table tbody tr:hover {
    background: #fff;
  }
  .rt-schedule-table tbody td {
    border: 0;
    padding: 6px 16px;
  }
  /* The date becomes the card's header band. */
  .rt-schedule-date {
    padding: 10px 16px;
    background: var(--rt-black, #141414);
    color: var(--rt-white, #ffffff);
    font-family: var(--rt-font-display, "RT Display", "Arial Narrow", sans-serif);
    font-weight: var(--rt-font-display-weight, 400);
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }
  .rt-schedule-opp {
    padding-top: 12px;
    min-width: 0;
  }
  .rt-schedule-score {
    padding-bottom: 14px;
  }
  /* Labeled rows inside the card, from the cells' data-label. */
  td[data-label] {
    display: flex;
    align-items: baseline;
    gap: 10px;
  }
  td[data-label]::before {
    content: attr(data-label);
    flex: none;
    min-width: 76px;
    color: var(--rt-gray, #6b6b6b);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }
  .rt-schedule-bye {
    padding: 14px 16px;
  }
}

/* ---- The next-game band ---------------------------------------------------- */

.rt-nextgame {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  max-width: var(--rt-maxw, 1120px);
  margin: 0 auto;
  padding: 18px 22px;
  background: var(--rt-black, #141414);
  color: var(--rt-white, #ffffff);
  border-radius: var(--rt-radius, 10px);
  box-shadow: var(--rt-shadow, 0 6px 24px rgba(0, 0, 0, 0.12));
}

.rt-nextgame-label {
  flex: none;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--rt-primary, #f4b41c);
  color: var(--rt-on-primary, #141414);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.rt-nextgame-logo {
  flex: none;
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.rt-nextgame-body {
  flex: 1 1 240px;
  min-width: 0;
}

.rt-nextgame-matchup {
  margin: 0 0 2px;
  font-family: var(--rt-font-display, "RT Display", "Arial Narrow", sans-serif);
  font-weight: var(--rt-font-display-weight, 400);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 1.4rem;
  line-height: 1.15;
}

.rt-nextgame-when {
  margin: 0;
  font-size: 0.95rem;
  color: #dddddd;
  color: color-mix(in srgb, var(--rt-white, #ffffff) 78%, transparent);
}
.rt-nextgame-when a {
  color: inherit;
  text-decoration: underline;
}

.rt-nextgame-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-left: auto;
}

.rt-nextgame-btn {
  display: inline-block;
  padding: 7px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--rt-primary, #f4b41c);
  color: var(--rt-on-primary, #141414) !important;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  line-height: inherit;
  text-decoration: none;
  cursor: pointer;
}
.rt-nextgame-btn:hover {
  background: var(--rt-primary-bright, #ffc845);
}
.rt-nextgame-btn--ghost {
  background: transparent;
  border: 1px solid var(--rt-primary, #f4b41c);
  color: var(--rt-primary, #f4b41c) !important;
}
.rt-nextgame-btn--ghost:hover {
  background: var(--rt-primary, #f4b41c);
  color: var(--rt-on-primary, #141414) !important;
}
/* Not a button: the "Free entry" badge a no-tickets game wears instead. */
.rt-nextgame-btn--free {
  background: transparent;
  border: 1px dashed var(--rt-primary, #f4b41c);
  color: var(--rt-primary, #f4b41c) !important;
  cursor: default;
}

@media (max-width: 599px) {
  .rt-nextgame-ctas {
    margin-left: 0;
    width: 100%;
  }
}

/* ---- The standings table --------------------------------------------------- */

/* Same family as the schedule table. One deliberate difference: on phones the
   standings do NOT re-stack into cards. A standings grid is one team column
   plus many narrow numeric columns, and a ranking only reads as a ranking when
   the rows stay side by side, so the wrapper scrolls sideways instead. */

.rt-standings {
  max-width: var(--rt-maxw, 1120px);
  margin: 0 auto;
}

.rt-standings-title {
  margin: 0 0 14px;
  font-family: var(--rt-font-display, "RT Display", "Arial Narrow", sans-serif);
  font-weight: var(--rt-font-display-weight, 400);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 1.5rem;
}

.rt-standings-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--rt-radius, 10px);
  box-shadow: var(--rt-shadow, 0 6px 24px rgba(0, 0, 0, 0.12));
}

.rt-standings-table {
  width: 100%;
  min-width: 520px;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border: 1px solid var(--rt-line, #e7e2d6);
  border-radius: var(--rt-radius, 10px);
  overflow: hidden;
}

.rt-standings-table thead th {
  padding: 12px 14px;
  background: var(--rt-black, #141414);
  color: var(--rt-white, #ffffff);
  font-family: var(--rt-font-display, "RT Display", "Arial Narrow", sans-serif);
  font-weight: var(--rt-font-display-weight, 400);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.9rem;
  text-align: center;
  white-space: nowrap;
}
.rt-standings-table thead th:first-child {
  text-align: left;
}

.rt-standings-table tbody th,
.rt-standings-table tbody td {
  padding: 10px 14px;
  border-top: 1px solid var(--rt-line, #e7e2d6);
  text-align: center;
  white-space: nowrap;
}
.rt-standings-table tbody tr:first-child th,
.rt-standings-table tbody tr:first-child td {
  border-top: 0;
}
.rt-standings-table tbody tr:hover {
  background: var(--rt-cream, #fbf6ec);
}

.rt-standings-table .rt-standings-team {
  text-align: left;
  font-weight: 700;
}

/* Standalone scope (foreign theme): supply the type scaffold the plugin gets
   from no theme, as the other modules' standalone scopes do. */
.rt-schedule-standalone {
  font-family: var(--rt-font, "Helvetica Neue", Arial, "Segoe UI", system-ui, sans-serif);
  color: var(--rt-ink, #1f1f1f);
  line-height: 1.6;
}

/* ---- "Add this schedule to your calendar" (family subscribe menu) --------
   A CSS-only <details> disclosure rendered under a team's table. Themed off the
   site palette so it reads as branded on every fleet site; no script. */
.rt-cal-sub { margin: 16px 0 2px; text-align: right; }
.rt-cal-sub--top { margin: 2px 0 14px; }
.rt-cal-sub details { display: inline-block; position: relative; text-align: left; }
.rt-cal-sub-toggle {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--rt-radius, 8px);
  border: 2px solid var(--rt-primary, #1f6fb2);
  color: var(--rt-on-primary, #fff);
  background: var(--rt-primary, #1f6fb2);
  font-weight: 700;
  font-size: 0.95rem;
}
.rt-cal-sub-toggle::-webkit-details-marker { display: none; }
.rt-cal-sub-toggle::marker { content: ""; }
.rt-cal-sub-toggle:hover,
.rt-cal-sub details[open] .rt-cal-sub-toggle {
  background: var(--rt-primary-bright, var(--rt-primary, #1f6fb2));
  border-color: var(--rt-primary-bright, var(--rt-primary, #1f6fb2));
  color: var(--rt-on-primary, #fff);
}
.rt-cal-sub-menu {
  position: absolute;
  right: 0;
  z-index: 30;
  margin-top: 6px;
  min-width: 230px;
  background: var(--rt-white, #fff);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--rt-radius, 8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  padding: 6px;
  display: flex;
  flex-direction: column;
}
.rt-cal-sub-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--rt-ink, #1f1f1f);
  text-decoration: none;
  font-weight: 600;
}
.rt-cal-sub-menu a:hover { background: var(--rt-section-tint, #f2f4f7); }
.rt-cal-sub-menu a i { width: 18px; text-align: center; color: var(--rt-primary, #1f6fb2); }
@media (max-width: 600px) {
  .rt-cal-sub, .rt-cal-sub details { display: block; }
  .rt-cal-sub-toggle { width: 100%; justify-content: center; }
  .rt-cal-sub-menu { position: static; box-shadow: none; }
}

/* ---- Per-game tickets, riding the Time cell ------------------------------- */

.rt-schedule-tickets {
  display: inline-block;
  margin-left: 10px;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--rt-primary, #f4b41c);
  color: var(--rt-on-primary, #141414) !important;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  white-space: nowrap;
}
a.rt-schedule-tickets:hover {
  background: var(--rt-primary-bright, var(--rt-primary, #f4b41c));
  text-decoration: none;
}
/* Free entry: the celebration chip, not a sales button. */
.rt-schedule-tickets--free {
  background: transparent;
  color: var(--rt-ink, #1f1f1f) !important;
  border: 2px dashed var(--rt-primary, #f4b41c);
}

/* Time + tickets stay on one line on desktop; the phone cards wrap freely. */
.rt-schedule-time { white-space: nowrap; }
@media (max-width: 759px) {
  .rt-schedule-time { white-space: normal; }
}
/* The table keeps its own alignment even under a centered page. */
.rt-schedule-table tbody td { text-align: left; }
