/* Event calendar look, scoped so the house mast keeps its own colors.
   WordPress embeds depend on these classes. */

.trials {
  --ink: #141617;
  --paper: #ffffff;
  --line: #d7dce3;
  --soft: #f2f3f5;
  --green: #681e12;
  --accent: #681e12;
  color: var(--ink);
  font: 15px/1.45 Raleway, "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;
}
.trials a { color: var(--accent); text-decoration: underline; }
.trials h2 { font-size: 20px; margin: 0; }

.trials .views {
  display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: baseline; margin: 0 0 4px;
}
.trials .views a { text-decoration: none; font-weight: 600; }
.trials .views a.on { color: var(--ink); border-bottom: 2px solid var(--green); }

.trials .embed-bar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  font-size: 13px; padding: 0 0 6px;
}
.trials .embed-bar a { text-decoration: none; font-weight: 600; }
.trials .embed-bar a.on { color: var(--ink); border-bottom: 2px solid var(--green); }
.trials .embed-bar .legend { color: #55606e; font-size: 12px; margin-left: auto; }

.trials .legend {
  display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center;
  color: #55606e; font-size: 13px; margin-top: 16px;
  border: 0; padding: 0;
}
.trials .chip {
  display: inline-block; width: 11px; height: 11px; border-radius: 2px;
  margin-right: 4px; padding: 0; background: transparent; vertical-align: baseline;
}

.trials form.filters {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  background: var(--soft); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 10px; margin: 12px 0;
}
.trials form.filters select,
.trials form.filters input[type=text] {
  font: inherit; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; background: #fff;
}
.trials form.filters label { font-size: 13px; color: #444; }
.trials form.filters button {
  font: inherit; padding: 4px 12px; border-radius: 6px;
  border: 1px solid var(--green); background: var(--green); color: #fff;
}

.trials .month-band {
  background: var(--green); color: #fff; text-align: center; font-weight: 800;
  letter-spacing: .06em; padding: 5px 8px; border-radius: 4px; margin-top: 18px;
}
.trials table.events { width: 100%; border-collapse: collapse; margin-top: 6px; }
.trials table.events th {
  text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
  color: #55606e; padding: 4px 8px;
}
.trials table.events td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.trials tr.ev td:first-child { white-space: nowrap; font-weight: 600; }
.trials tr.ev { border-left: 6px solid transparent; }
.trials tr.ev .title { font-weight: 600; }
.trials tr.ev .meta { font-size: 12.5px; color: #55606e; }
.trials tr.canceled .title,
.trials tr.canceled td:first-child { text-decoration: line-through; }
.trials .badge {
  display: inline-block; font-size: 11px; font-weight: 700; border-radius: 4px;
  padding: 1px 6px; color: #fff; vertical-align: middle; text-decoration: none;
}
.trials .badge.cancel { background: #a02020; }
.trials .badge.postponed { background: #b07a10; }
.trials .badge.hidden { background: #55606e; }
.trials .stakes { font-size: 12px; color: #33404f; }
.trials .empty, .trials .hint { color: #55606e; font-size: 14px; }

.trials .cal-nav { display: flex; align-items: center; gap: 12px; margin: 12px 0 6px; }
.trials .cal-nav h2 { margin: 0; font-size: 20px; }
.trials .cal-nav a { text-decoration: none; font-weight: 700; }
.trials table.cal { width: 100%; border-collapse: collapse; table-layout: fixed; }
.trials table.cal th { background: var(--soft); border: 1px solid var(--line); font-size: 12px; padding: 4px; }
.trials table.cal td {
  border: 1px solid var(--line); vertical-align: top; height: 84px; padding: 2px 3px; font-size: 12px;
}
.trials table.cal td.other { background: #fafbfc; color: #aab2bd; }
.trials table.cal td.today { outline: 2px solid var(--accent); outline-offset: -2px; }
.trials .daynum { font-weight: 700; font-size: 11px; }
.trials .cal-ev {
  display: block; color: #fff; border-radius: 3px; padding: 1px 4px; margin: 2px 0;
  font-size: 11px; line-height: 1.25; text-decoration: none; overflow: hidden;
}
.trials .cal-ev.canceled { text-decoration: line-through; opacity: .55; }

.trials .grid-scroll { overflow-x: auto; }
.trials table.regiongrid {
  width: 100%; min-width: 760px; border-collapse: collapse; table-layout: fixed; margin-top: 4px;
}
.trials table.regiongrid th { color: #fff; font-size: 13px; padding: 6px 4px; border: 1px solid var(--line); }
.trials table.regiongrid th.datecol { background: var(--ink); width: 84px; }
.trials table.regiongrid td { border: 1px solid var(--line); vertical-align: top; padding: 3px; font-size: 12.5px; }
.trials table.regiongrid td.datecol { font-weight: 700; white-space: nowrap; background: var(--soft); }
.trials .gcell {
  display: block; text-decoration: none; color: var(--ink); border-left: 4px solid transparent;
  padding: 3px 5px; margin: 2px 0; border-radius: 3px; background: var(--soft);
}
.trials .gcell:hover { background: #e8ebef; }
.trials .gcell .gclub { font-weight: 600; display: block; }
.trials .gcell .gtype { display: block; font-size: 11px; color: #55606e; font-style: italic; }
.trials .gcell .gloc { display: block; font-size: 11.5px; color: #55606e; }
.trials .gcell.canceled .gclub { text-decoration: line-through; }
.trials .gcell .canceled-label { color: #a02020; font-style: normal; }
.trials .gcell.band { background: #efe6e4; border-left: 4px solid #681e12; font-weight: 600; }
.trials .bandrow td { background: #faf7f6; }

.trials .detail-card {
  max-width: 620px; border: 1px solid var(--line); border-radius: 8px; padding: 16px 22px;
}
.trials .detail-card h2 { margin: 4px 0 2px; }
.trials .detail-card .meta { color: #55606e; margin: 0 0 8px; }
.trials table.detail th {
  text-align: left; padding: 5px 14px 5px 0; vertical-align: top;
  white-space: nowrap; font-size: 13px; color: #55606e;
}
.trials table.detail td { padding: 5px 0; }
.trials .notes { white-space: pre-wrap; }

.trials .print-title { text-align: center; font-size: 20px; margin: 0 0 14px; }
.trials table.print-sheet { width: 100%; border-collapse: collapse; }
.trials table.print-sheet th {
  text-align: left; font-size: 11px; text-transform: uppercase;
  padding: 3px 6px; border-bottom: 2px solid #234d20;
}
.trials table.print-sheet td { padding: 4px 6px; border-bottom: 1px solid #ccc; }
.trials table.print-sheet tr.band td {
  background: #234d20; color: #fff; text-align: center; font-weight: 800; letter-spacing: .08em;
}
.trials table.print-sheet tr.ev td:first-child { white-space: nowrap; font-weight: 600; }
.trials table.print-sheet tr.canceled { text-decoration: line-through; color: #888; }

body:has(.trials[data-embed="1"]) { background: #fff; }
body:has(.trials[data-embed="1"]) main .wrap { padding-block: 8px 16px; }

@media (max-width: 640px) {
  .trials table.events .hide-sm { display: none; }
  .trials table.cal td { height: 56px; }
}
@media print {
  .mast, footer, .trials .views, .trials .embed-bar, .trials form.filters, .trials .legend { display: none !important; }
}
