/**
 * Add Teammate Wizard Styles
 * ============================================
 * Tier 1 consistency pass (CONSISTENCY_PLAN §1.5): chrome is now the canonical
 * .modal / .modal-header / .modal-body / .modal-footer / .btn / .form-input
 * vocabulary. Only the wizard's unique components live here:
 *   - step counter pill in the header
 *   - board indicator strip
 *   - progress bar
 *   - city suggestions + selected-city card (Tier 2 will swap these for the
 *     shared .suggestions-dropdown / .selected-timezone-card)
 *   - visual time-range track (Phase 1.1 will replace with TimeRangePicker)
 *   - flexible-schedule checkbox row, hours preview, optional badge
 *   - Step 3 connect cards
 *   - footer button-row spacer (footer is .modal-footer; spacer pushes back
 *     button to the left)
 *   - validation hint pill
 *   - mobile responsive overrides
 */

/* ============================================
   CONTENT — wider than canonical 560px because the wizard has three steps
   ============================================ */

.atw-content {
  /* Mirror #event-modal sizing (style.css #event-modal .modal-content): wider +
     a flex column with a scrollable body so header/footer pin and only the
     middle scrolls — kills the "tall stack forces page-scroll" problem the
     create/propose event modal already solved. 2026-06-26. */
  max-width: 760px;
  width: 95%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.atw-content .modal-header,
.atw-content .atw-board-indicator,
.atw-content .atw-progress,
.atw-content .modal-footer {
  flex-shrink: 0;
}

.atw-content .modal-body {
  flex: 0 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* ============================================
   HEADER EXTRAS — step counter "Step X of 3" inside .modal-header-actions
   ============================================ */

.atw-step-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary, #64748b);
  padding: 4px 10px;
  background: var(--slate-100, #f1f5f9);
  border-radius: var(--radius-full, 9999px);
  white-space: nowrap;
}

body.dark-mode .atw-step-label {
  background: var(--slate-700, #334155);
  color: var(--slate-300, #cbd5e1);
}

/* ============================================
   BOARD INDICATOR — "Adding to: [board name]" strip between header and body
   ============================================ */

.atw-board-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 24px;
  background: var(--slate-50, #f8fafc);
  border-bottom: 1px solid var(--slate-100, #f1f5f9);
  font-size: 0.8rem;
  color: var(--text-secondary, #64748b);
}

.atw-board-indicator i {
  font-size: 0.75rem;
  opacity: 0.7;
}

.atw-board-indicator strong {
  color: var(--text-primary, #1e293b);
  font-weight: 600;
}

body.dark-mode .atw-board-indicator {
  background: var(--slate-900, #0f172a);
  border-bottom-color: var(--slate-700, #334155);
  color: var(--slate-400, #94a3b8);
}

body.dark-mode .atw-board-indicator strong {
  color: var(--slate-200, #e2e8f0);
}

/* ============================================
   PROGRESS BAR
   ============================================ */

.atw-progress {
  height: 3px;
  background: var(--slate-200, #e2e8f0);
}

.atw-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-500, #14b8a6), var(--primary-400, #2dd4bf));
  border-radius: 0 2px 2px 0;
  transition: width 0.4s ease;
  width: 33.33%;
}

body.dark-mode .atw-progress {
  background: var(--slate-700, #334155);
}

/* ============================================
   STEP CONTAINER — per-step fade-in
   ============================================ */

.atw-step {
  animation: atwFadeIn 0.3s ease;
}

@keyframes atwFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   OPTIONAL BADGE — sits next to "Email" label
   ============================================ */

.atw-optional-badge {
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  padding: 2px 6px;
  background: var(--slate-100, #f1f5f9);
  border-radius: 4px;
  color: var(--text-secondary, #94a3b8);
  margin-left: auto;
}

body.dark-mode .atw-optional-badge {
  background: var(--slate-700, #334155);
}

/* ============================================
   FORM-INPUT validation states (extends canonical .form-input)
   ============================================ */

.form-input.valid {
  border-color: var(--green-400, #4ade80);
}

.form-input.invalid {
  border-color: var(--red-400, #f87171);
}

/* ============================================
   VALIDATION HINTS — inline error pill under each field
   ============================================ */

.atw-validation-hint {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--red-500, #ef4444);
  margin-top: 6px;
}

.atw-validation-hint i {
  font-size: 0.75rem;
}

/* ============================================
   CITY SEARCH / SUGGESTIONS
   ============================================ */

/* .atw-loading removed 2026-08-26 along with the markup it styled. It was
   display:none and no code ever toggled it, so the spinner could never render.
   City search is synchronous (in-memory city map), so there is no pending
   state to indicate. See the note in add-teammate-wizard.js. */

.atw-suggestions {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--surface-primary, #ffffff);
  border: 1px solid var(--slate-200, #e2e8f0);
  border-radius: var(--radius-lg, 12px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 1100;
  max-height: 240px;
  overflow-y: auto;
}

.atw-suggestions.active {
  display: block;
}

body.dark-mode .atw-suggestions {
  background: var(--surface-secondary, #1e293b);
  border-color: var(--slate-600, #475569);
}

.atw-suggestion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.15s ease;
  border-bottom: 1px solid var(--slate-100, #f1f5f9);
}

.atw-suggestion:last-child {
  border-bottom: none;
}

.atw-suggestion:hover {
  background: var(--primary-50, rgba(20, 184, 166, 0.05));
}

body.dark-mode .atw-suggestion:hover {
  background: var(--slate-700, #334155);
}

.atw-suggestion.atw-no-results {
  color: var(--text-secondary, #94a3b8);
  cursor: default;
  justify-content: center;
  font-size: 0.85rem;
}

.atw-suggestion-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary, #1e293b);
}

body.dark-mode .atw-suggestion-name {
  color: var(--slate-200, #e2e8f0);
}

.atw-suggestion-offset {
  font-size: 0.78rem;
  color: var(--text-secondary, #64748b);
  white-space: nowrap;
}

/* Selected city display — unified with the canonical .selected-timezone-card
   look used by the Add-Timezone modal (gradient surface, 40px gradient icon,
   hover lift, semantic offset colour) so both surfaces read identically.
   2026-06-26. */
.atw-selected-city {
  display: none;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #f0fdfa 0%, #f5f3ff 100%);
  border: 1.5px solid var(--primary-200, #99f6e4);
  border-radius: var(--radius-md, 12px);
  margin-top: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.atw-selected-city:hover {
  border-color: var(--primary-300, #5eead4);
  box-shadow: 0 2px 8px rgba(20, 184, 166, 0.1);
}

body.dark-mode .atw-selected-city {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.10) 0%, rgba(124, 58, 237, 0.10) 100%);
  border-color: var(--primary-400, #2dd4bf);
}

/* Gradient leading icon — mirrors .selected-tz-icon. */
.atw-city-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-500, #14b8a6), var(--primary-600, #0d9488));
  border-radius: var(--radius-sm, 8px);
  color: #fff;
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(20, 184, 166, 0.3);
}

.atw-city-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.atw-city-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--slate-800, #1e293b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.dark-mode .atw-city-name {
  color: var(--slate-100, #f1f5f9);
}

.atw-city-offset {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary-600, #0d9488);
}

/* Semantic offset colours, matching .selected-city-offset.plus/.minus. */
.atw-city-offset.minus {
  color: #7c3aed;
}

body.dark-mode .atw-city-offset {
  color: var(--primary-300, #5eead4);
}

.atw-city-clear {
  background: none;
  border: 1px solid var(--slate-200, #e2e8f0);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-secondary, #94a3b8);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.atw-city-clear:hover {
  background: rgba(20, 184, 166, 0.08);
  border-color: var(--primary-300, #5eead4);
  color: var(--primary-600, #0d9488);
}

body.dark-mode .atw-city-clear {
  border-color: var(--slate-700, #334155);
}

/* ============================================
   STEP 2: TIME PICKER
   ============================================ */

.atw-time-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.atw-time-input-group {
  flex: 1;
}

.atw-time-input {
  width: 100%;
  padding: 10px 12px;
  background: var(--surface-primary, #ffffff);
  border: 1.5px solid var(--slate-200, #e2e8f0);
  border-radius: var(--radius-lg, 10px);
  font-size: 0.9rem;
  color: var(--text-primary, #1e293b);
  outline: none;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.atw-time-input:focus {
  border-color: var(--primary-500, #14b8a6);
  box-shadow: var(--focus-ring-shadow);
}

body.dark-mode .atw-time-input {
  background: var(--surface-secondary, #0f172a);
  border-color: var(--slate-600, #475569);
  color: var(--slate-100, #f1f5f9);
}

.atw-time-arrow {
  color: var(--text-secondary, #94a3b8);
  font-size: 0.85rem;
  flex-shrink: 0;
}

.atw-duration-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: var(--primary-50, rgba(20, 184, 166, 0.08));
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary-600, #0d9488);
  white-space: nowrap;
  flex-shrink: 0;
}

body.dark-mode .atw-duration-badge {
  background: rgba(20, 184, 166, 0.12);
  color: var(--primary-300, #5eead4);
}

/* Visual time picker track */
.atw-time-picker {
  transition: opacity 0.3s ease;
}

.atw-time-labels {
  display: flex;
  justify-content: space-between;
  padding: 0 2px;
  margin-bottom: 6px;
  font-size: 0.65rem;
  color: var(--text-secondary, #94a3b8);
  user-select: none;
}

.atw-time-track {
  position: relative;
  height: 32px;
  background: var(--slate-100, #f1f5f9);
  border-radius: 8px;
  cursor: crosshair;
  overflow: hidden;
}

body.dark-mode .atw-time-track {
  background: var(--slate-700, #334155);
}

.atw-time-track.selecting {
  cursor: col-resize;
}

.atw-time-markers {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent calc(100% / 24 - 1px),
    var(--slate-200, #e2e8f0) calc(100% / 24 - 1px),
    var(--slate-200, #e2e8f0) calc(100% / 24)
  );
  opacity: 0.3;
}

.atw-time-selection {
  position: absolute;
  top: 2px;
  bottom: 2px;
  /* 2026-07-11: was a SOLID --status-working fill + decorative drop-shadow, which
     read as a filled box rather than the board's working-hours BRACKET. Aligned to
     the same tokenized bracket the canonical picker uses (see css/time-range-picker.css
     .atw-time-selection): a faint interior tint + a 4-side inset bracket at the board's
     --work-bracket-arm thickness. time-range-picker.css loads AFTER this file and
     already paints the bracket, so this is the matching fallback (keeps the bracket
     look if that sheet ever fails to load, instead of a solid green box). */
  --sel-arm: var(--work-bracket-arm, 2.5px);
  /* Work-bracket BLUE fallback (2026-07-16, matches the canonical picker + board
     --work-bracket recolour green→blue). Live hue painted inline by JS variantColor(). */
  --sel-bracket: var(--event-work, #3b82f6);
  background: color-mix(in srgb, var(--sel-bracket) 16%, transparent);
  border-radius: 6px;
  transition: left 0.1s ease, width 0.1s ease;
  box-shadow:
    inset var(--sel-arm) 0 0 0 var(--sel-bracket),
    inset calc(-1 * var(--sel-arm)) 0 0 0 var(--sel-bracket),
    inset 0 var(--sel-arm) 0 0 var(--sel-bracket),
    inset 0 calc(-1 * var(--sel-arm)) 0 0 var(--sel-bracket);
}

.atw-time-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.8rem;
}

#atw-time-summary-text {
  font-weight: 500;
  color: var(--text-primary, #1e293b);
}

body.dark-mode #atw-time-summary-text {
  color: var(--slate-200, #e2e8f0);
}

#atw-time-summary-duration {
  color: var(--text-secondary, #64748b);
}

/* Flexible schedule checkbox */
.atw-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: var(--slate-50, #f8fafc);
  border-radius: var(--radius-lg, 10px);
  cursor: pointer;
  transition: background 0.2s ease;
  margin-bottom: 0 !important;
}

.atw-checkbox-row:hover {
  background: var(--slate-100, #f1f5f9);
}

body.dark-mode .atw-checkbox-row {
  background: var(--slate-900, #0f172a);
}

body.dark-mode .atw-checkbox-row:hover {
  background: var(--slate-700, #334155);
}

.atw-checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--primary-500, #14b8a6);
  flex-shrink: 0;
}

.atw-checkbox-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.atw-checkbox-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary, #1e293b);
}

body.dark-mode .atw-checkbox-label {
  color: var(--slate-200, #e2e8f0);
}

.atw-checkbox-hint {
  font-size: 0.78rem;
  color: var(--text-secondary, #64748b);
}

body.dark-mode .atw-checkbox-hint {
  color: var(--slate-400, #94a3b8);
}

/* Hours preview */
.atw-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--primary-50, rgba(20, 184, 166, 0.05));
  border-radius: var(--radius-lg, 10px);
  font-size: 0.82rem;
  color: var(--text-secondary, #64748b);
  margin-top: 16px;
}

.atw-preview i {
  color: var(--primary-500, #14b8a6);
}

.atw-preview strong {
  color: var(--text-primary, #1e293b);
}

body.dark-mode .atw-preview {
  background: rgba(20, 184, 166, 0.08);
  color: var(--slate-400, #94a3b8);
}

body.dark-mode .atw-preview strong {
  color: var(--slate-100, #f1f5f9);
}

/* ============================================
   STEP 3: CONNECT OPTIONS
   ============================================ */

.atw-connect-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.atw-connect-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px;
  background: var(--surface-primary, #ffffff);
  border: 2px solid var(--slate-200, #e2e8f0);
  border-radius: var(--radius-lg, 12px);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.atw-connect-card:hover {
  border-color: var(--primary-500, #14b8a6);
  background: var(--primary-50, rgba(20, 184, 166, 0.03));
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* PENDING ADD (2026-08-26, owner: "add teammate is slow perhaps a loading
   spinner on click").
   beginSubmit() already set `disabled = true` on these cards to block a double
   submit, but .atw-connect-card had NO disabled styling — so the one visible
   consequence of the click was nothing at all. The add is a real server write
   (one round-trip per ticked board, plus the invite send), so the wait is
   genuine and needs saying. This is the honest opposite of the dead city-search
   spinner removed in 85844980: that field is a synchronous in-memory lookup
   with no pending state to show; this one waits on the network.
   The arrow becomes the spinner, so the card does not resize mid-press. */
.atw-connect-card[disabled],
.atw-connect-card:disabled {
  cursor: progress;
  opacity: 0.75;
  transform: none;
  box-shadow: none;
}

/* Hover must not fight the pending look on a card that cannot be pressed. */
.atw-connect-card[disabled]:hover,
.atw-connect-card:disabled:hover {
  border-color: var(--slate-200, #e2e8f0);
  background: var(--surface-primary, #ffffff);
  transform: none;
  box-shadow: none;
}

/* The card being submitted says so; the other just dims. */
.atw-connect-card.atw-pending {
  opacity: 1;
  border-color: var(--primary-500, #14b8a6);
  background: var(--primary-50, rgba(20, 184, 166, 0.03));
}

/* The GLYPH swap is done in JS (beginSubmit swaps fa-chevron-right for
   fa-spinner), not here: Font Awesome sets `content` on .fa-*::before, and a
   rule of equal specificity in this file loses to the later-loaded FA sheet —
   measured, the ::before content stayed empty. Only the spin lives in CSS. */
.atw-connect-card.atw-pending .atw-connect-arrow i {
  animation: atwSpin 0.7s linear infinite;
}

@keyframes atwSpin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .atw-connect-card.atw-pending .atw-connect-arrow i {
    animation: none;
  }
}

body.dark-mode .atw-connect-card {
  background: var(--surface-secondary, #0f172a);
  border-color: var(--slate-600, #475569);
}

body.dark-mode .atw-connect-card[disabled]:hover,
body.dark-mode .atw-connect-card:disabled:hover {
  border-color: var(--slate-600, #475569);
  background: var(--surface-secondary, #0f172a);
}

body.dark-mode .atw-connect-card:hover {
  border-color: var(--primary-400, #2dd4bf);
  background: rgba(20, 184, 166, 0.05);
}

/* The DIRECT-mode confirmation ("Add teammate") is the terminal action of the
   whole wizard, but rendered as a plain slate card it read as just another
   neutral option (2026-07-27). Give it the teal border + tint so the commit
   step is unmistakably the primary action. */
.atw-connect-card--confirm {
  border-color: var(--primary-500, #14b8a6);
  background: var(--primary-50, rgba(20, 184, 166, 0.06));
  box-shadow: 0 1px 3px rgba(20, 184, 166, 0.12);
}
.atw-connect-card--confirm:hover {
  border-color: var(--primary-600, #0d9488);
  background: var(--primary-100, rgba(20, 184, 166, 0.12));
  box-shadow: 0 4px 14px rgba(20, 184, 166, 0.22);
}
.atw-connect-card--confirm .atw-connect-title {
  color: var(--primary-700, #0f766e);
  font-weight: 650;
}
body.dark-mode .atw-connect-card--confirm {
  border-color: var(--primary-500, #14b8a6);
  background: rgba(20, 184, 166, 0.10);
}
body.dark-mode .atw-connect-card--confirm:hover {
  border-color: var(--primary-400, #2dd4bf);
  background: rgba(20, 184, 166, 0.16);
}
body.dark-mode .atw-connect-card--confirm .atw-connect-title {
  color: var(--primary-300, #5eead4);
}

.atw-connect-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.atw-connect-icon.atw-connect-primary {
  background: linear-gradient(135deg, var(--primary-100, #ccfbf1), var(--primary-200, #99f6e4));
  color: var(--primary-600, #14b8a6);
}

body.dark-mode .atw-connect-icon.atw-connect-primary {
  background: rgba(20, 184, 166, 0.15);
  color: var(--primary-300, #5eead4);
}

.atw-connect-icon.atw-connect-secondary {
  background: var(--slate-100, #f1f5f9);
  color: var(--text-secondary, #64748b);
}

body.dark-mode .atw-connect-icon.atw-connect-secondary {
  background: var(--slate-700, #334155);
  color: var(--slate-400, #94a3b8);
}

.atw-connect-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.atw-connect-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
}

body.dark-mode .atw-connect-title {
  color: var(--slate-100, #f1f5f9);
}

.atw-connect-desc {
  font-size: 0.78rem;
  color: var(--text-secondary, #64748b);
  line-height: 1.4;
}

body.dark-mode .atw-connect-desc {
  color: var(--slate-400, #94a3b8);
}

.atw-connect-note {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: var(--text-secondary, #94a3b8);
  margin-top: 2px;
}

.atw-connect-note i {
  font-size: 0.7rem;
}

.atw-connect-arrow {
  color: var(--text-secondary, #cbd5e1);
  font-size: 0.85rem;
  flex-shrink: 0;
  transition: transform 0.2s ease, color 0.2s ease;
}

.atw-connect-card:hover .atw-connect-arrow {
  transform: translateX(3px);
  color: var(--primary-500, #14b8a6);
}

body.dark-mode .atw-connect-arrow {
  color: var(--slate-600, #475569);
}

/* ============================================
   FOOTER — extends .modal-footer with a spacer that pushes Back
   to the left while Cancel + Next stay flex-end.
   ============================================ */

.modal-footer.atw-footer {
  justify-content: flex-start;
}

.atw-footer-spacer {
  flex: 1;
}

/* Back button is a low-emphasis ghost link; opt out of the canonical
   .modal-footer .btn { min-width: 100px } rule so the arrow + label
   stay compact on the left. */
.modal-footer.atw-footer .btn-ghost.atw-btn-back {
  min-width: 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 480px) {
  .atw-content {
    width: 100%;
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .atw-time-row {
    flex-wrap: wrap;
  }

  .atw-time-input-group {
    flex: 1;
    min-width: 100px;
  }

  .atw-duration-badge {
    width: 100%;
    justify-content: center;
    margin-top: 4px;
  }
}

/* ============================================
   BOARD-CONTEXT BANNER + MULTI-BOARD CHECKLIST (2026-06-26)
   Replaces the old subtle .atw-board-indicator. Shows WHICH board + its
   privacy norm; direct mode adds a tick-list of destination groups.
   ============================================ */

.atw-board-banner {
  border-bottom: 1px solid var(--slate-100, #f1f5f9);
  background: var(--slate-50, #f8fafc);
}

body.dark-mode .atw-board-banner {
  background: var(--slate-900, #0f172a);
  border-bottom-color: var(--slate-700, #334155);
}

/* "Require a group" state (2026-07-10): when real groups exist but none is
   picked yet, the destination banner reads as an unfilled required field — a
   soft amber wash + left accent so "Choose a group" is clearly a to-do, not a
   silent default that could drop the invite on Home. Clears the moment a group
   is ticked. */
.atw-board-banner.atw-board-banner--required {
  background: color-mix(in srgb, var(--status-tentative, #f59e0b) 10%, var(--slate-50, #f8fafc));
  box-shadow: inset 3px 0 0 var(--status-tentative, #f59e0b);
}
.atw-board-banner.atw-board-banner--required .atw-board-banner-priv {
  color: var(--amber-700, #b45309);
}
body.dark-mode .atw-board-banner.atw-board-banner--required {
  background: color-mix(in srgb, var(--status-tentative, #f59e0b) 16%, var(--slate-900, #0f172a));
}
body.dark-mode .atw-board-banner.atw-board-banner--required .atw-board-banner-priv {
  color: var(--amber-300, #fcd34d);
}
.atw-group-required-hint {
  color: var(--amber-700, #b45309);
  padding: 6px 16px 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85em;
}
body.dark-mode .atw-group-required-hint {
  color: var(--amber-300, #fcd34d);
}

/* The banner main row is a <button> in direct mode (expands the checklist) and
   a plain div in invite mode — style both the same. */
.atw-board-banner-main {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 24px;
  background: none;
  border: none;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: default;
}
button.atw-board-banner-main { cursor: pointer; }

.atw-board-banner-icon {
  font-size: 1rem;
  color: var(--primary-600, #0d9488);
  flex-shrink: 0;
}

.atw-board-banner-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.atw-board-banner-line {
  font-size: 0.85rem;
  color: var(--text-secondary, #64748b);
}
.atw-board-banner-line strong {
  color: var(--text-primary, #1e293b);
  font-weight: 600;
}
body.dark-mode .atw-board-banner-line strong { color: var(--slate-100, #f1f5f9); }

.atw-board-banner-priv {
  font-size: 0.75rem;
  color: var(--text-secondary, #94a3b8);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.atw-board-banner-priv i { opacity: 0.85; }

.atw-board-banner-caret {
  font-size: 0.75rem;
  color: var(--text-secondary, #94a3b8);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.atw-board-banner-main.is-open .atw-board-banner-caret { transform: rotate(180deg); }

/* The destination checklist.
   Cap the height and scroll internally (2026-07-12, user: "adding to a group
   list UI seems inconsistent, also likely we need a scroll"). The banner sits
   ABOVE the wizard's scrollable body, so an uncapped list of many groups pushed
   the Name/Location form off-screen and made the whole modal feel unbounded.
   ~40vh holds ~6 rows before scrolling; overscroll-contain keeps the wheel from
   bleeding into the page once the list bottoms out. */
.atw-board-list {
  padding: 4px 24px 12px;
  border-top: 1px dashed var(--slate-200, #e2e8f0);
  max-height: 40vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
body.dark-mode .atw-board-list { border-top-color: var(--slate-700, #334155); }

.atw-board-list-hint {
  font-size: 0.75rem;
  color: var(--text-secondary, #94a3b8);
  margin: 8px 0;
}

/* Destination rows read as tappable cards (2026-07-17 mobile-clarity pass).
   Each row is a bordered pill with a comfortable ≥44px touch target; the whole
   row is the label, so tapping anywhere toggles its checkbox. A hairline
   divider is no longer needed — the gap + per-row border separates them. */
.atw-board-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: pointer;
  border: 1px solid var(--slate-200, #e2e8f0);
  border-radius: 10px;
  background: var(--bg-primary, #fff);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
body.dark-mode .atw-board-row {
  background: var(--slate-800, #1e293b);
  border-color: var(--slate-700, #334155);
}
.atw-board-row:hover {
  border-color: var(--primary-300, #5eead4);
  background: var(--primary-50, rgba(20, 184, 166, 0.05));
}
body.dark-mode .atw-board-row:hover {
  background: var(--slate-700, #334155);
  border-color: var(--primary-600, #0d9488);
}
/* Selected state: teal border + wash so ticked destinations are obvious at a
   glance (the whole point of the multi-select checklist). :has() is supported
   across the app's evergreen target; the checkbox's own accent-color is the
   fallback if it ever isn't. */
.atw-board-row:has(.atw-board-check:checked) {
  border-color: var(--primary-500, #14b8a6);
  background: var(--primary-50, rgba(20, 184, 166, 0.08));
  box-shadow: inset 0 0 0 1px var(--primary-500, #14b8a6);
}
body.dark-mode .atw-board-row:has(.atw-board-check:checked) {
  background: color-mix(in srgb, var(--primary-500, #14b8a6) 18%, var(--slate-800, #1e293b));
  border-color: var(--primary-400, #2dd4bf);
  box-shadow: inset 0 0 0 1px var(--primary-400, #2dd4bf);
}
.atw-board-row:focus-within {
  outline: 2px solid var(--primary-500, #14b8a6);
  outline-offset: 1px;
}

.atw-board-check {
  width: 20px;
  height: 20px;
  accent-color: var(--primary-500, #14b8a6);
  flex-shrink: 0;
  cursor: pointer;
}

.atw-board-row-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.dark-mode .atw-board-row-name { color: var(--slate-100, #f1f5f9); }

/* Privacy label as a compact pill so it reads as metadata, not floating text,
   and stays legible next to a long board name on a narrow phone. */
.atw-board-row-priv {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  background: var(--slate-100, #f1f5f9);
  border-radius: 999px;
  padding: 3px 9px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  flex-shrink: 0;
}
body.dark-mode .atw-board-row-priv {
  color: var(--slate-300, #cbd5e1);
  background: var(--slate-700, #334155);
}
.atw-board-row-priv.is-locked {
  color: #6d28d9;
  background: color-mix(in srgb, #7c3aed 12%, transparent);
}
body.dark-mode .atw-board-row-priv.is-locked {
  color: #c4b5fd;
  background: color-mix(in srgb, #7c3aed 26%, transparent);
}

/* "+ Create a board" — previously an UNSTYLED native <button> that rendered as
   a broken-looking grey box crammed against the last row (user 2026-07-17:
   improve this area, mobile clarity). Now a full-width dashed teal "add"
   affordance that reads as the way to make a new destination. */
.atw-board-create-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  margin-top: 2px;
  padding: 10px 12px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-700, #0f766e);
  background: transparent;
  border: 1.5px dashed var(--primary-300, #5eead4);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.atw-board-create-row:hover {
  color: var(--primary-800, #115e59);
  background: var(--primary-50, rgba(20, 184, 166, 0.08));
  border-color: var(--primary-500, #14b8a6);
}
.atw-board-create-row:focus-visible {
  outline: 2px solid var(--primary-500, #14b8a6);
  outline-offset: 2px;
}
.atw-board-create-row i { font-size: 0.85em; }
body.dark-mode .atw-board-create-row {
  color: var(--primary-300, #5eead4);
  border-color: var(--primary-700, #0f766e);
}
body.dark-mode .atw-board-create-row:hover {
  color: var(--primary-200, #99f6e4);
  background: var(--slate-800, #1e293b);
  border-color: var(--primary-500, #14b8a6);
}

/* Comfortable spacing on narrow phones: give the list a touch more breathing
   room and let a long board name + privacy pill share the row without collision
   (name ellipsizes, pill stays intact). */
@media (max-width: 480px) {
  .atw-board-list { padding-left: 16px; padding-right: 16px; }
  .atw-board-row { gap: 10px; padding: 10px; }
  .atw-board-row-name { font-size: 0.9rem; }
}

/* ============================================
   STEP 2 — timezone caption + per-day link
   ============================================ */

.atw-hours-tz {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 0.82rem;
  color: var(--text-secondary, #64748b);
}
.atw-hours-tz i { color: var(--primary-600, #0d9488); }
.atw-hours-tz strong { color: var(--text-primary, #1e293b); font-weight: 600; }
body.dark-mode .atw-hours-tz strong { color: var(--slate-100, #f1f5f9); }
.atw-hours-tz-note { color: var(--text-secondary, #94a3b8); }

.atw-perday-link { margin: 12px 0 0; }
.atw-perday-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: 1px dashed var(--slate-300, #cbd5e1);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--primary-600, #0d9488);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.atw-perday-btn:hover {
  border-color: var(--primary-400, #2dd4bf);
  background: var(--primary-50, rgba(20, 184, 166, 0.05));
}
.atw-perday-btn.is-armed {
  border-style: solid;
  border-color: var(--primary-500, #14b8a6);
  background: var(--primary-50, rgba(20, 184, 166, 0.08));
}
/* Persistent armed confirmation — replaces the transient toast so the click
   clearly registers and the user knows the per-day editor opens next. */
.atw-perday-armed {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  font-size: 0.8rem;
  color: var(--primary-600, #0d9488);
}
.atw-perday-armed[hidden] { display: none; }
body.dark-mode .atw-perday-btn { border-color: var(--slate-600, #475569); }

/* ============================================
   STEP 2 — inline schedule mode (Typical / Per day / Flexible)
   2026-07-27. Per-day hours used to be a button that opened AddTimezoneSimple
   as a modal-over-modal, and Flexible was a competing checkbox. They are now
   modes of one control, so the step shows the day-pill UI the button used to
   lead to. The day pills themselves reuse the canonical .day-selector /
   .day-pill component so both surfaces stay visually identical.
   ============================================ */

.atw-schedule-mode { margin-top: 14px; }

.atw-mode-strip {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--slate-100, #f1f5f9);
  border-radius: 10px;
}
body.dark-mode .atw-mode-strip { background: var(--slate-800, #1e293b); }

.atw-mode-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  background: none;
  border: none;
  border-radius: 7px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary, #64748b);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.atw-mode-btn:hover { color: var(--primary-600, #0d9488); }
.atw-mode-btn.active {
  background: var(--surface-primary, #ffffff);
  color: var(--primary-700, #0f766e);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
body.dark-mode .atw-mode-btn.active {
  background: var(--slate-700, #334155);
  color: var(--primary-300, #5eead4);
}
.atw-mode-btn i { font-size: 0.78rem; }

.atw-perday-panel { margin-top: 12px; }

/* Override / day-off markers on the inline day pills. The base .day-pill look
   comes from the canonical editor's stylesheet; these only add the state dot so
   a user can see at a glance which weekdays were customised. */
#atw-day-selector .day-pill { position: relative; }
#atw-day-selector .day-pill.has-override::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--primary-500, #14b8a6);
}
#atw-day-selector .day-pill.is-day-off::after {
  background: var(--slate-400, #94a3b8);
}

.atw-mode-hint,
#atw-perday-hint {
  margin: 10px 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-secondary, #64748b);
}

/* ============================================
   STEP 3 — direct-mode finish "who sees what where" summary
   ============================================ */

.atw-finish-summary {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-secondary, #64748b);
  margin: 0 0 12px;
  padding: 10px 12px;
  background: var(--slate-50, #f8fafc);
  border: 1px solid var(--slate-100, #f1f5f9);
  border-radius: 8px;
}
.atw-finish-summary strong { color: var(--text-primary, #1e293b); }
body.dark-mode .atw-finish-summary {
  background: var(--slate-900, #0f172a);
  border-color: var(--slate-700, #334155);
  color: var(--slate-300, #cbd5e1);
}
body.dark-mode .atw-finish-summary strong { color: var(--slate-100, #f1f5f9); }
