/* =========================================
   FORMS
   ========================================= */


/* .page-header / .page-title now live in base/base.css. */

.form-group {
  display: flex;
  flex-direction: column;
  margin: 1rem 0 2rem;
}
/* Row Layout: Label Left, Input Right */
.form-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
  margin: 1rem 0;
  font-size: 1rem;
}


.form-label {
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 700;
  margin-bottom: 1rem;
}


.form-input, .form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 1rem;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s;
  background: var(--surface);
}
.form-input:hover, .form-textarea:hover { border-color: var(--ink-4); }
.form-input::placeholder { color: var(--ink-4); font-style: italic; }
.form-input:focus { border-color: var(--ink-3); }

/* Helper / hint text under inputs.
   See docs/style-guide.html#forms. */
.form-help {
  margin: 0.25rem 0 0;
  color: var(--ink-3);
  font-size: 0.92rem;
  line-height: 1.4;
}
.form-help--subtle {
  font-size: 0.85rem;
  color: var(--ink-3);
  opacity: 0.85;
}
.form-help--warn { color: var(--warning); }

/* Checkbox-with-label row: aligns the checkbox with text without forcing a
   form-label uppercase eyebrow above. Used for boolean toggles like
   seasons.multi_game_matches. */
.form-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
}

.form-checkbox-label input[type="checkbox"] {
  cursor: pointer;
}

.form-checkbox-text {
  font-weight: 600;
  color: var(--ink);
}

/* Sport Tiles */
.sport-options {
  display: flex;
  gap: 1rem;
}

.sport-label-wrapper input { display: none; }

.sport-tile {
  display: inline-block;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--bg-2);
  border-radius: 10px;
  color: var(--ink-3);
  cursor: pointer;
  transition: all 0.2s;
  min-width: 120px;
  text-align: center;
  text-transform: uppercase;
}

/* Selected State (Light Blue) */
.sport-label-wrapper input:checked + .sport-tile {
  background-color: var(--accent-light);
  color: var(--ink);
  border-color: var(--accent);
}

/* Terms agreement (epic 0065 §8.1) — one checkbox row, on every screen where
   somebody joins RecHero: the request form, the invite page, the user-token
   page. Shared partial, shared style, so consent never looks different. */
.terms-agree {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--ink-2);
  line-height: 1.4;
  cursor: pointer;
}
.terms-agree input { margin-top: 0.15rem; flex-shrink: 0; width: 16px; height: 16px; }
.terms-agree--error { color: var(--danger-dark); font-weight: 600; }

/* Toggle switch (epic 0065 §7.1) — "a switch, not a checkbox": it takes
   effect on change, with no Save button. Shared by Go and HQ so the same
   setting looks the same on both. */
.switch { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.switch__input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__track {
  width: 32px; height: 18px; border-radius: 999px; background: var(--ink-4);
  position: relative; display: inline-block; flex-shrink: 0; transition: background 0.15s;
}
.switch__track::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: left 0.15s;
}
.switch__input:checked + .switch__track { background: var(--accent); }
.switch__input:checked + .switch__track::after { left: 16px; }
.switch__input:disabled + .switch__track { opacity: 0.55; }
.switch__input:focus-visible + .switch__track { box-shadow: var(--focus-ring); }
.switch__label { font-size: 0.85rem; font-weight: 600; color: var(--ink-2); }

/* A pending email change (epic 0065 §6.14) — the account keeps its address
   until the new inbox confirms, so both Settings surfaces say so out loud and
   offer the way out. */
.pending-email {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--warning);
  border-radius: var(--r-sm);
  background: var(--warning-soft);
  font-size: var(--text-sm);
  color: var(--ink-2);
}
.pending-email form { display: inline; }
