/* ===========================================================================
 * Empty Net Goal
 * Component : Team pages - styles
 * Version   : 1.0.0
 * Released  : 2026-09-22
 *
 * Purpose   : Layout for the Rangers schedule page only. Every colour, font and
 *             container here comes from eng.css, which is loaded first - the
 *             variables (--base, --raise, --line, --ice, --dim, --red, --head,
 *             --body) and .wrap are not redefined, only used. Breakpoints match
 *             the ones the site already uses: 820, 720, 640, 560.
 *
 * History   : 1.0.0 - first release.
 * ======================================================================== */

/* The team's own colours come from teams.inc.php via --tc / --tc2 on the page. */
.tm-page { --tc: #8A8F9C; --tc2: #8A8F9C; }

/* The site has no screen-reader-only utility, and adding one to eng.css would
   be editing a global stylesheet for one page's benefit. Scoped here instead. */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------- page head -- */
.tm-head { padding: 26px 0 6px; }
.tm-head h1 {
  font-family: var(--head); font-weight: 700; margin: 0 0 6px;
  font-size: clamp(34px, 6.4vw, 60px); line-height: .96; text-transform: uppercase;
}
.tm-head h1 em { font-style: normal; color: var(--tc); }
.tm-head .tm-sub { margin: 0; color: var(--dim); font-size: 14px; }

.tm-mark {
  display: inline-flex; align-items: center; font-family: var(--head); font-weight: 700;
  font-size: 14px; letter-spacing: .16em; margin-bottom: 12px; padding: 4px 10px;
  border-radius: 4px; background: var(--tc); color: #0A0A0C; border-bottom: 3px solid var(--tc2);
}

/* ----------------------------------------------------------- stats strip -- */
.tm-stats-wrap { margin: 18px 0 4px; }
.tm-stats {
  display: grid; grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
  border-radius: 10px; overflow: hidden;
}
.tm-stat { background: var(--base); padding: 14px 8px; text-align: center; min-width: 0; }
.tm-stat b {
  display: block; font-family: var(--head); font-weight: 600;
  font-size: clamp(20px, 2.6vw, 28px); line-height: 1; color: var(--ice);
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
.tm-stat span {
  display: block; margin-top: 6px; font-size: 10px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--dimmer); white-space: nowrap;
}
.tm-stat.eng { background: linear-gradient(180deg, rgba(255,30,30,.10), rgba(255,30,30,.02)), var(--base); }
.tm-stat.eng span { color: var(--red); }
.tm-more { margin: 10px 0 0; font-size: 12.5px; color: var(--dim); display: flex; flex-wrap: wrap; gap: 4px 14px; }
@media (max-width: 640px) {
  .tm-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tm-stat { padding: 12px 6px; }
}

/* ------------------------------------------------------------ team news -- */
.tm-newsgrid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 16px; margin: 26px 0 6px; align-items: start; }
@media (max-width: 820px) { .tm-newsgrid { grid-template-columns: 1fr; } }
.tm-box { border: 1px solid var(--line); border-radius: 12px; background: var(--raise); padding: 16px 18px; }
.tm-box h2 { margin: 0 0 4px; font-family: var(--head); font-weight: 700; font-size: 22px; letter-spacing: .06em; text-transform: uppercase; }
.tm-box .tm-boxsub { margin: 0 0 10px; font-size: 12px; color: var(--dimmer); }
.tm-news { list-style: none; margin: 0; padding: 0; }
.tm-news li { display: grid; grid-template-columns: 112px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid rgba(38,38,47,.7); }
.tm-news li:first-child { border-top: 0; }
.tm-news .w { font-family: var(--head); font-size: 14px; letter-spacing: .05em; text-transform: uppercase; color: var(--dim); }
.tm-news .t { color: var(--ice); font-size: 14.5px; }
.tm-news .t a { color: var(--ice); text-decoration: none; border-bottom: 1px solid var(--line); }
.tm-news .t a:hover { border-bottom-color: var(--red); }
.tm-news .e { display: block; margin-top: 3px; font-size: 12.5px; color: var(--red); }
.tm-news li.k-w .t b { color: #48B77E; }
.tm-news li.k-l .t b { color: var(--dim); }
.tm-news li.k-otl .t b { color: #C9A227; }
.tm-news li.k-live .w, .tm-news li.k-today .w { color: var(--red); }
@media (max-width: 560px) { .tm-news li { grid-template-columns: 1fr; gap: 2px; } }
.tm-none { color: var(--dim); font-size: 14px; margin: 6px 0; }

a.tm-game, a.tm-row { color: inherit; text-decoration: none; }
a.tm-game:focus-visible, a.tm-row:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* -------------------------------------------------------- month controls -- */
.tm-controls {
  display: flex; align-items: center; gap: 12px; margin: 26px 0 14px;
  flex-wrap: wrap;
}
.tm-arrow {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; flex: none; background: var(--raise);
  border: 1px solid var(--line); border-radius: 9px; color: var(--ice);
  font: inherit; font-size: 15px; cursor: pointer;
  transition: border-color .18s ease, background .18s ease;
}
.tm-arrow:hover:not(:disabled) { border-color: var(--red); background: var(--raise-2); }
.tm-arrow:disabled { opacity: .3; cursor: not-allowed; }
.tm-arrow:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.tm-period { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tm-period-label {
  font-family: var(--head); font-weight: 700; font-size: clamp(20px, 3.4vw, 28px);
  letter-spacing: .05em; text-transform: uppercase; line-height: 1;
}
.tm-count { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--dimmer); }

.tm-select-wrap { margin-left: auto; }
.tm-select {
  background: var(--raise); color: var(--ice); border: 1px solid var(--line);
  border-radius: 999px; padding: 9px 15px; font: inherit; font-size: 13px;
  min-height: 44px; cursor: pointer;
}
.tm-select:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* --------------------------------------------------------------- legend -- */
.tm-legend {
  display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0 0 14px;
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--dimmer);
}
.tm-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tm-legend i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }

/* ------------------------------------------------------------- calendar -- */
.tm-grid {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden;
}
.tm-dow {
  background: var(--raise); padding: 9px 6px; text-align: center;
  font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--dimmer);
}
.tm-cell {
  background: var(--base); min-height: 104px; padding: 7px 7px 9px;
  display: flex; flex-direction: column; gap: 6px; position: relative;
}
.tm-cell.tm-empty { background: #0D0D11; }
.tm-cell.tm-is-today { background: #101018; }
.tm-date { font-family: var(--head); font-size: 14px; color: var(--dimmer); line-height: 1; }
.tm-cell.tm-is-today .tm-date { color: var(--ice); }

/* --------------------------------------------------------------- a game -- */
.tm-game {
  flex: 1; display: flex; flex-direction: column; justify-content: center;
  gap: 3px; padding: 7px 8px; border-radius: 8px; background: var(--raise);
  border: 1px solid var(--line); border-left: 3px solid var(--opp, var(--dim));
  transition: border-color .18s ease, transform .18s ease;
}
.tm-game:hover { border-color: var(--line); transform: translateY(-1px); }
.tm-opp { font-family: var(--head); font-weight: 700; font-size: 17px; line-height: 1; letter-spacing: .04em; }
.tm-time { font-size: 12px; color: var(--ice); }
.tm-loc { font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--dimmer); }
.tm-oppname { font-size: 11px; color: var(--dim); }
.tm-state { font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--dimmer); }
.tm-result { display: flex; align-items: baseline; gap: 6px; }
.tm-wl { font-family: var(--head); font-size: 16px; font-weight: 700; line-height: 1; }
.tm-wl-w { color: #48B77E; }
.tm-wl-l { color: var(--dim); }
.tm-wl-otl { color: #C9A227; }
.tm-score { font-family: var(--head); font-size: 15px; color: var(--ice); font-weight: 600; }

/* A result is never carried by colour alone: the W/L/OTL letter and FINAL are
   always present as text. These borders are reinforcement, not the message. */
.tm-res-w { border-top-color: rgba(72,183,126,.5); }
.tm-res-l { border-top-color: rgba(255,30,30,.35); }
.tm-res-otl { border-top-color: rgba(201,162,39,.45); }

.tm-today { box-shadow: 0 0 0 1px var(--red) inset; }
.tm-live { color: var(--red); }
.tm-off { color: var(--dim); text-decoration: line-through; }
.tm-postponed, .tm-cancelled { opacity: .72; }

/* ------------------------------------------------- non-game calendar event */
.tm-event {
  flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 2px;
  padding: 7px 8px; border-radius: 8px; background: #0F0F14;
  border: 1px dashed var(--line);
}
.tm-event-label {
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--dim); line-height: 1.25;
}
.tm-event-venue { font-size: 9.5px; color: var(--dimmer); }

/* ---------------------------------------------------------- foot controls */
.tm-foot { display: flex; gap: 10px; margin: 14px 0 0; flex-wrap: wrap; }
.tm-foot button {
  background: var(--raise); border: 1px solid var(--line); border-radius: 999px;
  color: var(--dim); font: inherit; font-size: 11.5px; letter-spacing: .12em;
  text-transform: uppercase; padding: 10px 16px; min-height: 44px; cursor: pointer;
  transition: color .18s ease, border-color .18s ease;
}
.tm-foot button:hover { color: var(--ice); border-color: var(--red); }
.tm-foot button:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* ----------------------------------------------------------- mobile list -- */
.tm-list { display: none; }
.tm-row {
  display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: center;
  padding: 13px 14px; background: var(--raise); border: 1px solid var(--line);
  border-left: 3px solid var(--opp, var(--dim)); border-radius: 10px; margin-bottom: 9px;
}
.tm-row-date {
  font-family: var(--head); font-size: 14px; letter-spacing: .05em;
  text-transform: uppercase; color: var(--dim);
}
.tm-row-body { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 12px; }
.tm-row-event { border-left-style: dashed; border-left-color: var(--line); background: #0F0F14; }
.tm-none { color: var(--dim); font-size: 14px; }

/* ------------------------------------------------------------ responsive -- */
@media (max-width: 820px) {
  .tm-cell { min-height: 92px; }
  .tm-opp { font-size: 15px; }
}

@media (max-width: 720px) {
  /* A seven-column grid at this width crushes every cell past reading. The same
     fixtures render as a chronological list instead - nothing is dropped. */
  .tm-grid { display: none; }
  .tm-list { display: block; }
  .tm-select-wrap { margin-left: 0; width: 100%; }
  .tm-select { width: 100%; }
}

@media (max-width: 560px) {
  .tm-row { grid-template-columns: 1fr; gap: 6px; }
  .tm-row-date { font-size: 13px; }
  .tm-stat { padding: 12px 9px; }
}

/* Movement is decoration here; the page is entirely legible without it. */
@media (prefers-reduced-motion: reduce) {
  .tm-game, .tm-arrow, .tm-foot button { transition: none; }
  .tm-game:hover { transform: none; }
}
