/* ============================================================================
   SITTER-SIDE STYLES
   Shared across the sitter dashboard, availability, and bookings pages.
   All class names are scoped to the sitter UI (.dash-*, .weekday-*) so this
   can safely load on every page without colliding with parent-side styles.
   Everything consumes tokens from design_tokens.css.
   ============================================================================ */

.dash-card {
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-top: var(--space-4);
  box-shadow: var(--shadow-sm);
}

.dash-card-title {
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink-primary);
  margin: 0 0 var(--space-2);
}

.dash-card-hint {
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.5;
  margin: 0 0 var(--space-4);
}

.dash-message-box {
  font-size: 14px !important;
  line-height: 1.5 !important;
  resize: none !important;
  background: var(--surface-muted) !important;
}

.dash-actions-row {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.dash-actions-row .btn { flex: 1; }

.dash-footnote {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: var(--space-3);
  margin-bottom: 0;
  line-height: 1.5;
}
.dash-mono {
  font-family: var(--font-mono);
  word-break: break-all;
  color: var(--ink-primary);
}

/* Personal-link block: label on its own line above a full-width mono
   input with a trailing copy-icon button. The input is readonly so it
   scrolls horizontally instead of overflowing the card. */
.dash-link-block {
  margin-top: var(--space-4);
}
.dash-link-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 6px;
}
.dash-link-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.dash-link-input {
  flex: 1;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 8px 10px;
  color: var(--ink-primary);
  background: var(--surface-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}
.dash-link-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  padding: 0 10px;
  background: var(--brand-primary);
  color: var(--brand-primary-ink);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--motion-fast) var(--ease);
  /* When the Stimulus controller flashes "Copied!" text it replaces
     the icon — keep the button legible either way. */
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.dash-link-copy-btn:hover { background: var(--brand-primary-hover); }
.dash-link-copy-btn i { width: 16px; height: 16px; }

.dash-subhead {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-subtle);
  margin: var(--space-5) 0 var(--space-2);
}

.dash-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dash-list-row {
  padding: var(--space-3) 0;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.dash-list-row:first-child { border-top: none; }

.dash-list-main { flex: 1; min-width: 0; }

.dash-list-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-primary);
}

.dash-list-meta {
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: 2px;
}

/* Phone numbers rendered as sms: hyperlinks next to a parent's name —
   terracotta so they clearly read as tappable without competing with
   the bold ink-primary name beside them. Normal weight to visually
   demote them below the name. */
.dash-sms-link {
  display: inline-block;
  margin-left: 6px;
  color: var(--brand-primary);
  font-weight: 400;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 13px;
}
.dash-sms-link:hover { text-decoration: underline; }

.dash-empty {
  color: var(--ink-muted);
  font-size: 14px;
  margin: 0;
}

.dash-signout { margin-top: var(--space-4); }

/* Scoped button variants for the dashboard */
.dash-card .btn-warm {
  background: var(--accent-warm);
  color: #FFFFFF;
  border: none;
}
.dash-card .btn-warm:hover {
  background: var(--accent-warm-hover);
}

.dash-card .btn-secondary {
  background: var(--surface-muted);
  color: var(--ink-primary);
  border: 1px solid var(--border-subtle);
  text-decoration: none;
  text-align: center;
}
.dash-card .btn-secondary:hover {
  background: var(--border-subtle);
}

/* Status pill used next to a booking row's date — "Completed",
   "Cancelled", etc. Tone-tagged by a second class: -sage for good
   outcomes, -muted for cancellations/neutrals. */
.booking-status-pill {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}
.booking-status-sage {
  background: var(--state-success-soft);
  color: var(--state-success);
}
.booking-status-muted {
  background: var(--surface-muted);
  color: var(--ink-muted);
}

/* Recurring availability */
.dash-badge-recurring {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  background: var(--surface-brand-soft);
  color: var(--brand-primary);
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}

.dash-link-destructive {
  margin-top: 6px;
  background: none;
  border: none;
  color: var(--state-danger);
  font-size: 12px;
  font-weight: 500;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.dash-link-destructive:hover { opacity: 0.8; }

/* Weekday picker chips (Sun/Mon/Tue/…) — grid of 7 equal columns so
   Saturday doesn't wrap to row 2 and stretch to fill it the way flex
   flex: 1 did. minmax(0, 1fr) lets columns shrink below their
   intrinsic content on very narrow phones. */
.weekday-picker {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin-top: 6px;
}
.weekday-chip {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px 4px;
  background: var(--surface-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-muted);
  cursor: pointer;
  user-select: none;
  transition: background var(--motion-fast) var(--ease),
              color var(--motion-fast) var(--ease),
              border-color var(--motion-fast) var(--ease);
}
.weekday-chip > span {
  display: block;
  width: 100%;
  text-align: center;
}
.weekday-chip input {
  position: absolute;
  top: 0; left: 0;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}
.weekday-chip:has(input:checked) {
  background: var(--brand-primary);
  color: var(--brand-primary-ink);
  border-color: var(--brand-primary);
}
