/* Components: the session rows, their tap-to-expand detail and the list
   footer, and their mobile and desktop overrides (kept in this file, after
   the base rules, so they win the cascade). Contract: DESIGN.md >
   Component conventions > Session row, Tap-to-expand detail. Phone first
   (390x844); desktop widens the time column. The filter-card brand
   element lives in sheets.css with the sheets that render it. */

/* ---- Day group: header above one white container of rows -------------- */
.day-rows {
  background: var(--color-fresh-sheet);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* ---- Row -------------------------------------------------------------- */
.session-card {
  position: relative;
  border-bottom: 1px solid var(--color-border-light);
}
.session-card:last-child { border-bottom: 0; }

/* The category bar: decorative, inset 10px top and bottom (the category
   name is in the toggle's visually hidden text). */
.session-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--color-cat-gray);
  transition: width 0.15s ease-out;
  pointer-events: none;
}
.session-card[data-color="blue"]::before { background: var(--color-cat-blue); }
.session-card[data-color="red"]::before { background: var(--color-cat-red); }
.session-card[data-color="amber"]::before { background: var(--color-cat-amber); }
.session-card[data-color="purple"]::before { background: var(--color-cat-purple); }
.session-card[data-color="teal"]::before { background: var(--color-cat-teal); }
.session-card[data-color="pink"]::before { background: var(--color-cat-pink); }
.session-card[data-color="green"]::before { background: var(--color-cat-green); }
.session-card[data-color="orange"]::before { background: var(--color-cat-orange); }
/* The signature motion: the bar widens from 3px to 4px on hover. */
.session-card:hover::before { width: 4px; }
/* Desktop selection, kept in sync with the row's map pin (DESIGN.md >
   Session row > Desktop selection; x-listing-ui2 > map > desktop_sync).
   A ring with no fill; an outline, so it draws over the toggle's hover
   tint. */
.session-card.is-selected {
  outline: 2px solid var(--color-ice-blue);
  outline-offset: -2px;
}

/* The disclosure toggle is the row's three columns. */
.row-toggle {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) auto;
  column-gap: 12px;
  align-items: start;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.row-toggle:focus-visible {
  outline: 2px solid var(--color-ice-blue);
  outline-offset: -2px;
}
/* Hover tint only where the pointer hovers, so a tap leaves no stuck
   fill (DESIGN.md > Session row > Hover). */
@media (hover: hover) {
  .row-toggle:hover { background: var(--color-border-light); }
}
.time { display: flex; flex-direction: column; }
.row-start {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--color-boards);
}
.row-start-sub {
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
  line-height: 1.3;
  color: var(--color-text-secondary);
}
.row-main { display: flex; flex-direction: column; min-width: 0; }
.row-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-boards);
}
.row-meta {
  margin-top: 2px;
  font-size: var(--font-size-sm);
  line-height: 1.35;
  color: var(--color-text-secondary);
}
.row-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
/* The row's tags (DESIGN.md > Session row > Tags): "In N min" in rink
   blue, "Goalies only" in boards on blue-line, "Goalies free" in
   money-green-text on the success tint (4.6:1), then the shape they
   share. */
.soon-tag {
  background: var(--color-accent-light);
  color: var(--color-rink-blue);
}
.goalies-only-tag {
  background: var(--color-blue-line);
  color: var(--color-boards);
}
.goalies-tag {
  background: var(--color-success-light);
  color: var(--color-money-green-text);
}
.goalies-only-tag,
.soon-tag,
.goalies-tag {
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}
.row-distance {
  padding-top: 2px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--color-text-secondary);
  text-align: right;
  white-space: nowrap;
}

/* A row in the map's peek sheet: two columns, time | title and meta (the
   day), no distance (x-listing-ui2 > map > peek_rows). */
.session-card--peek .row-toggle {
  grid-template-columns: 66px minmax(0, 1fr);
}

/* ---- Today's finished sessions (DESIGN.md > Session row > Finished
   sessions): the fold row, and the revealed rows de-emphasized by colour,
   never by opacity on text (boards-light on the ice sheet keeps 4.5:1). */
.finished-fold {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px 0 14px;
  background: var(--color-ice-sheet);
  border-bottom: 1px solid var(--color-border-light);
}
.finished-fold:last-child { border-bottom: 0; }
.finished-fold-label {
  font-size: var(--font-size-sm);
  line-height: 1.35;
  color: var(--color-boards-light);
}
.finished-fold-show {
  min-height: 44px;
  min-width: 44px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--color-rink-blue);
  font: inherit;
  font-size: var(--font-size-sm);
  font-weight: 600;
  cursor: pointer;
}
.finished-fold-show:focus-visible {
  outline: 2px solid var(--color-ice-blue);
  outline-offset: -2px;
}
.session-card--finished {
  background: var(--color-ice-sheet);
}
.session-card--finished .row-start {
  color: var(--color-boards-light);
}
.session-card--finished .row-title {
  color: var(--color-boards-light);
}
.session-card--finished::before {
  opacity: 0.45;
}

/* ---- Tap-to-expand detail: all three columns, under a dashed rule ------ */
.row-detail {
  margin: 0 14px;
  padding: 12px 0 14px;
  border-top: 1px dashed var(--color-border);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}
.row-detail[hidden] { display: none; }
.detail-address {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
}
.detail-directions {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  color: var(--color-rink-blue);
  white-space: nowrap;
}
.detail-facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 14px;
  margin: 8px 0 12px;
}
.detail-facts dt { font-weight: 600; color: var(--color-text-secondary); }
.detail-facts dd { color: var(--color-boards); }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.detail-action,
.detail-action:hover {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-fresh-sheet);
  color: var(--color-boards);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}
.detail-action.is-deep,
.detail-action.is-deep:hover {
  background: var(--color-boards-deep);
  border-color: var(--color-boards-deep);
  color: #fff;
}
.detail-action:focus-visible,
.detail-directions:focus-visible,
.also-chip:focus-visible {
  outline: 2px solid var(--color-ice-blue);
  outline-offset: 2px;
}
.detail-action-icon { flex-shrink: 0; }
.save-rink-icon { fill: none; }
.save-rink[aria-pressed="true"] .save-rink-icon {
  fill: var(--color-rink-blue);
  color: var(--color-rink-blue);
}
.save-rink-error:empty { display: none; }
.save-rink-error {
  margin-top: 6px;
  color: var(--color-red-line);
  font-weight: 600;
}
.detail-also { margin-top: 14px; }
.detail-also-heading {
  margin-bottom: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-text-secondary);
}
.detail-also-chips { display: flex; flex-wrap: wrap; gap: 8px 6px; }
/* 36px visual inside a 44px hit area (DESIGN.md > Spacing > Touch targets). */
.also-chip {
  position: relative;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-fresh-sheet);
  color: var(--color-boards);
  font-family: var(--font-body);
  font-size: 12.5px;
  cursor: pointer;
}
.also-chip::after { content: ""; position: absolute; inset: -4px 0; }
.also-chip-time {
  font-family: var(--font-mono);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ---- List footer --------------------------------------------------------- */
.list-footer {
  padding: 22px 20px 8px;
  font-size: 12.5px;
  line-height: 1.5;
  text-align: center;
  color: var(--color-text-secondary);
}

/* ---- Widen: the empty state's offer and the short list's row ----------
   DESIGN.md > Component conventions > Session row > Widen. Both links
   are Deep buttons (sheets.css .btn-deep) and plain GET navigations. */
.empty-state--widen {
  margin: 20px 0 0;
  padding: 22px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-fresh-sheet);
  color: var(--color-text-secondary);
}
.empty-state-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--color-text);
}
.empty-state--widen p {
  margin-top: 6px;
  font-size: var(--font-size-sm);
}
.empty-state-widen {
  width: 100%;
  margin-top: 14px;
}
.widen-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px dashed var(--color-blue-line);
  border-radius: var(--radius-lg);
  background: var(--color-fresh-sheet);
}
.widen-row p {
  flex: 1;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--color-text-secondary);
}
.widen-row strong { color: var(--color-text); }
.widen-row-link { flex: none; }
.empty-state-widen:hover,
.widen-row-link:hover { text-decoration: none; }

@media (max-width: 767px) {
  /* The meta line wraps to two lines at most on the phone. */
  .row-meta {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }
}

@media (min-width: 1024px) {
  .row-toggle {
    grid-template-columns: 80px minmax(0, 1fr) auto;
  }
  .session-card--peek .row-toggle {
    grid-template-columns: 80px minmax(0, 1fr);
  }
}
