/* =============================================================================
   contract-team.css — the contract on a team's link, /contract.html?team=CODE.
   -----------------------------------------------------------------------------
   Two things only: the team banner above the steps, and the event fields the
   team decided — locked, a small lock by each label, and one "Set by your
   team" line for the step. Everything
   else on the page is style.css, untouched — on any other contract nothing
   here applies, because nothing here is drawn.

   A LOCKED FIELD STILL READS AS A FIELD. It keeps its box and its text at full
   strength (it is the answer that goes on the agreement, and it is read in
   sunlight), loses only what invites a tap — the select arrow, the date
   picker — and says why in the accent.
   ========================================================================== */

/* ---------------------------------------------------------------- banner -- */
/* As drawn in Figma (09a, "Contract 2 · Athlete & event · Team booking"):
   above the steps, outlined in the accent, the team on the left and the
   note and "set by your team" on the right; stacked on a phone. */
.team-banner {
  display: grid; gap: var(--space-4) var(--space-7); align-items: center;
  grid-template-columns: minmax(0, 1fr);
  margin: var(--space-5) 0 var(--space-6);
  padding: clamp(var(--space-5), 2.4vw, 32px);
  background: var(--bg-raised);
  border: 1px solid var(--accent); border-radius: var(--radius-lg);
}
@media (min-width: 900px) {
  .team-banner { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
}
.team-banner[hidden] { display: none; }
.team-banner p { margin: 0; }
.team-banner__team, .team-banner__side { display: grid; gap: var(--space-3); min-width: 0; }
.team-banner__eyebrow { margin: 0 0 var(--space-1) !important; }
.team-banner__title {
  margin: 0;
  font-family: var(--font-display); font-weight: 800; font-size: clamp(1.5rem, 3.2vw, 2.125rem);
  line-height: 1.05; text-transform: uppercase; letter-spacing: 0.01em; overflow-wrap: anywhere;
}
.team-banner__when { color: var(--ink); overflow-wrap: anywhere; }
.team-banner__note {
  padding: var(--space-3) var(--space-4);
  background: var(--bg-inset); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--ink); overflow-wrap: anywhere;
}
.team-banner__set { display: flex; gap: var(--space-2); align-items: flex-start; color: var(--ink-muted); font-size: 0.875rem; }
.team-banner__set svg { width: 14px; height: 14px; flex: none; margin-top: 0.2em; }
.team-banner__set a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
/* The lock is for a team that has actually filled the form in. */
.team-banner:not([data-state='open']) .team-banner__set svg { display: none; }

/* While asking, and when the answer is "not this time": the accent outline is
   for a team that is actually filling the form in. */
.team-banner[data-state='loading'] { border-color: var(--line-strong); }
.team-banner[data-state='loading'] .team-banner__title { color: var(--ink-muted); }
.team-banner[data-state='closed'],
.team-banner[data-state='unknown'],
.team-banner[data-state='failed'] { border-color: var(--warn); }
.team-banner:not([data-state='open']) .team-banner__set { color: var(--ink); font-size: 0.9375rem; }

/* --------------------------------------------------------- locked fields -- */
.field.is-team-locked .field__input {
  border-color: var(--line);
  background-color: var(--bg-raised-2);
  color: var(--ink); -webkit-text-fill-color: var(--ink);
  opacity: 1; cursor: default;
}
/* Readonly is not enough on every phone: some open the date and time pickers
   for a readonly input anyway. The value is the team's, so there is nothing to
   tap for — it can still be focused and read. */
.field.is-team-locked input[readonly] { pointer-events: none; }
.field.is-team-locked input[readonly]::-webkit-calendar-picker-indicator { display: none; }
/* A select cannot be readonly, so a locked one is disabled — and drawn as
   text in a box, not greyed out, with no arrow that offers a choice. */
.field.is-team-locked select:disabled { background-image: none; padding-right: var(--space-4); }

/* The one "Set by your team" line on step 2, under its lede, and the small
   lock beside each locked field's label. */
.team-lock {
  display: flex; align-items: center; gap: 6px; margin: var(--space-3) 0 var(--space-4);
  color: var(--accent); font-size: 0.875rem; font-weight: 600;
}
.team-lock svg { width: 13px; height: 13px; flex: none; }
.team-lock-icon { display: inline-flex; vertical-align: -1px; margin-left: 4px; color: var(--accent); }
.team-lock-icon svg { width: 13px; height: 13px; }
