/* See who is away: page-only styles. Prefix: .away- */

.away-firm { font-size: var(--text-s); font-weight: var(--weight-medium); color: var(--ink-2); }
.away-ask { font-size: var(--text-l); font-weight: var(--weight-medium); letter-spacing: var(--track-heading); line-height: 1.2; margin: var(--space-3xs) 0 var(--space-m); }

/* Three big job buttons. */
.away-jobs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-s); }
.away-job {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  min-height: 84px; padding: var(--space-s) var(--space-m);
  border: var(--line-w) solid var(--line); border-radius: var(--radius-panel); background: var(--white);
  text-align: left; line-height: 1.25;
  transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.away-job:hover { border-color: var(--ink); }
.away-job__name { font-size: 20px; font-weight: var(--weight-medium); letter-spacing: -0.01em; }
.away-job__dates { font-size: var(--text-s); color: var(--ink-2); }
.away-job[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.away-job[aria-pressed="true"] .away-job__dates { color: var(--on-ink); }

/* Result: the heads-up (once a job is picked), then the grid. */
.away-result { margin-top: var(--space-xl); padding-top: var(--space-l); border-top: var(--rule-w) solid var(--rule); }
.away-heads { margin-bottom: var(--space-l); }
.away-summary { font-size: var(--text-l); font-weight: var(--weight-medium); line-height: 1.35; letter-spacing: -0.015em; max-width: 46ch; }
.away-summary b { display: inline-flex; align-items: center; gap: var(--space-2xs); font-weight: var(--weight-medium); }
.away-summary b::before { content: ""; flex: none; width: 18px; height: 18px; background: var(--stage); box-shadow: inset 0 0 0 2px var(--ink); border-radius: 3px; }
.away-summary.is-clear b::before { background: var(--white); border-radius: 50%; }

.away-keys { display: none; flex-wrap: wrap; align-items: center; gap: var(--space-xs) var(--space-s); margin-top: var(--space-m); }
.away-keys__label { font-size: var(--text-s); color: var(--ink-2); }

.away-gridhead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-xs) var(--space-m); }
.away-cal { font-size: var(--text-s); font-weight: var(--weight-medium); }
.away-weeks { display: none; }

/* The grid builds on the shared .rota strip: ten working days. */
.away-grid { margin-top: var(--space-m); --cols: 10; grid-template-columns: 72px repeat(var(--cols), minmax(0, 1fr)); }
.away-grid .rota__day { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; line-height: 1.2; padding: 6px 0; border-radius: 4px; }
.away-day__num { color: var(--ink); font-weight: var(--weight-medium); font-size: var(--text-s); }
.away-day__key { margin-top: 4px; color: var(--ink); font-weight: var(--weight-medium); font-size: var(--text-xs); line-height: 1.1; text-align: center; }
.away-grid .rota__day.is-key { background: var(--stage); color: var(--ink); }
.away-grid .rota__cell.is-key { box-shadow: inset 0 0 0 2px var(--stage); background: var(--white); }
.away-grid .rota__name { font-size: var(--text-s); min-height: 44px; }
.away-grid .rota__cell { min-height: 44px; }
.away-grid .rota__block { min-height: 44px; }

/* A clash: away on a key date. */
.away-clash {
  z-index: 2; display: flex; align-items: center; justify-content: center; min-height: 44px;
  background: var(--stage); color: var(--ink); border: 2.5px solid var(--ink); border-radius: 4px;
  font-size: var(--text-xs); font-weight: var(--weight-medium);
  animation: site-fade var(--dur) var(--ease) both;
}

.away-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-s) var(--space-l); margin-top: var(--space-m); }
.away-legend { display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-l); font-size: var(--text-xs); }
.away-legend li { display: inline-flex; align-items: center; gap: var(--space-2xs); }
.away-legend__chip { width: 22px; height: 16px; border-radius: 3px; }
.away-legend__chip--away { background: var(--ink); }
.away-legend__chip--key { background: var(--stage); }
.away-legend__chip--clash { background: var(--stage); box-shadow: inset 0 0 0 2px var(--ink); }

.away-src { margin-top: var(--space-l); font-size: var(--text-s); color: var(--ink-2); }

@media (max-width: 1100px) {
  /* Ten days no longer fit comfortably: show one week at a time. */
  .away-weeks { display: block; }
  .away-grid { --cols: 5; }
}
@media (max-width: 900px) {
  .away-jobs { grid-template-columns: 1fr; }
  .away-job { min-height: 64px; flex-direction: row; justify-content: space-between; align-items: center; flex-wrap: wrap; column-gap: var(--space-s); }
}
@media (max-width: 600px) {
  .away-ask { font-size: 22px; }
  .away-job { flex-direction: column; align-items: flex-start; }
  .away-grid { grid-template-columns: 56px repeat(var(--cols), minmax(0, 1fr)); column-gap: 3px; }
  .away-day__key { display: none; }
  .away-keys { display: flex; }
  .away-gridhead { flex-direction: column; align-items: stretch; }
  .away-weeks .segmented { display: grid; grid-template-columns: 1fr 1fr; }
  .away-weeks .segmented__option span { width: 100%; justify-content: center; padding: 0 var(--space-xs); }
  .away-summary { font-size: 22px; }
}
