/* UX Council Phase 1 Stylesheet (2026-11-20)
 * Scoped behind feature-flag body classes:
 *   .ux-a11y    (accessible_shell)
 *   .ux-type    (readable_type)
 *   .ux-theme   (theme_default)
 *   .ux-fb-flow (feedback_in_flow)
 *   html.ux-large-text (Settings -> Large Text)
 */

html.ux-large-text { font-size: 125%; }

/* Skip link (WCAG 2.4.1) */
.ux-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10001;
  padding: 12px 18px;
  background: var(--btn-bg, #592D74);
  color: #ffffff;
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 8px 0;
}
.ux-skip-link:focus {
  left: 8px;
  top: 8px;
  outline: 3px solid #ffffff;
  outline-offset: 2px;
}

/* ═══ ACCESSIBLE SHELL (C19 + F5 Phase 1) ═══ */
body.ux-a11y :focus-visible {
  outline: 3px solid var(--accent, #592D74) !important;
  outline-offset: 2px !important;
}
body.ux-a11y {
  overflow-x: clip;
}
body.ux-a11y .snd-nav-toggle,
body.ux-a11y .snd-nav-links a,
body.ux-a11y .hub-back,
body.ux-a11y .appts-back,
body.ux-a11y .appt-actions a,
body.ux-a11y .appt-actions button,
body.ux-a11y .btn-portal,
body.ux-a11y .btn-neon,
body.ux-a11y .theme-opt,
body.ux-a11y .skin-actions a,
body.ux-a11y .skin-actions button,
body.ux-a11y .skin-mini,
body.ux-a11y .ap-btn,
body.ux-a11y .name-save,
body.ux-a11y .ux-btn,
body.ux-a11y .ux-btn-secondary,
body.ux-a11y .ux-link-btn,
body.ux-a11y .ux-footer a,
body.ux-a11y .ux-radio-label {
  min-height: 44px;
  min-width: 44px;
  box-sizing: border-box;
}
body.ux-a11y .snd-nav-toggle {
  width: 44px;
  height: 44px;
}
body.ux-a11y .appt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
body.ux-a11y .appt-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
}
body.ux-a11y .hub-breadcrumb a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 4px;
}
body.ux-a11y .help-card .help-row {
  display: block !important;
  columns: unset !important;
  line-height: 1.6;
  padding: 10px 0;
  border-bottom: 1px solid var(--card-border);
}
body.ux-a11y .help-card .help-row:last-child {
  border-bottom: none;
}
body.ux-a11y .help-card .help-row a {
  display: inline-block;
  padding: 10px 4px;
  min-height: 44px;
  line-height: 1.4;
  text-decoration: underline;
  color: var(--accent);
}
body.ux-a11y .help-card .help-row i {
  margin-right: 6px;
}
body.ux-a11y h1.hub-heading,
body.ux-a11y h1.appts-title,
body.ux-a11y h1.dash-greeting {
  margin-top: 0;
}

/* Privacy-safe Phase 1 patient chip (F5 Hybrid: first name only, no MRN/YOB) */
.ux-patient-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text);
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
}
.ux-patient-chip .ux-chip-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-solid, #592D74);
  color: #ffffff;
  font-size: 0.8125rem;
  font-weight: 700;
}

/* ═══ FEEDBACK IN FLOW (C8) ═══ */
body.ux-fb-flow #snd-fb-btn,
body.ux-fb-flow .snd-fb-btn {
  display: none !important;
}

/* Shared normal-flow footer */
.ux-footer {
  max-width: 980px;
  margin: 32px auto 0;
  padding: 20px 16px 36px;
  border-top: 1px solid var(--card-border);
  text-align: center;
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 0.9375rem;
  color: var(--text-muted);
}
.ux-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  margin-bottom: 10px;
}
.ux-footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  min-height: 44px;
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  border-radius: 8px;
}
.ux-footer-links a:hover {
  color: var(--accent-hover);
  background: var(--accent-glow);
}
.ux-footer-copy {
  font-size: 0.9375rem;
  color: var(--text-faint);
}

/* ═══ READABLE TYPOGRAPHY (C15a — readable_type) ═══ */
body.ux-type {
  font-size: 1rem;
  line-height: 1.5;
  --text: #f1f2f8;
  --text-muted: #c8cae2;
  --text-faint: #b3b6d4;
  --text-label: #d4d6ee;
}
body.ux-type .tile-title,
body.ux-type .setting-label,
body.ux-type .appt-type,
body.ux-type .skin-title,
body.ux-type .help-card h3,
body.ux-type .settings-card h3 {
  font-size: 1.125rem;
  line-height: 1.35;
}
body.ux-type .tile-desc,
body.ux-type .setting-desc,
body.ux-type .appt-meta,
body.ux-type .appt-meta span,
body.ux-type .appts-subtitle,
body.ux-type .dash-sub,
body.ux-type .hub-breadcrumb,
body.ux-type .hub-breadcrumb a,
body.ux-type .skin-sub,
body.ux-type .skin-faint,
body.ux-type .form-text,
body.ux-type .field-hint,
body.ux-type .help-row,
body.ux-type .snd-nav-links a,
body.ux-type .form-group label,
body.ux-type .field-label,
body.ux-type .col-form-label,
body.ux-type .portal-info,
body.ux-type .error,
body.ux-type .error-inline,
body.ux-type .scan-option-desc,
body.ux-type .scan-option-time,
body.ux-type .book-info-box {
  font-size: 0.9375rem !important;
  line-height: 1.5 !important;
}
body.ux-type .form-control,
body.ux-type .field-input,
body.ux-type .name-input,
body.ux-type input[type="text"],
body.ux-type input[type="email"],
body.ux-type input[type="password"],
body.ux-type input[type="tel"],
body.ux-type select,
body.ux-type textarea {
  font-size: 1rem !important;
  min-height: 44px;
}
body.ux-type .btn-portal,
body.ux-type .btn-neon,
body.ux-type .ux-btn {
  font-size: 1.0625rem;
  font-weight: 600;
}
body.ux-type h1,
body.ux-type .hub-heading,
body.ux-type .appts-title,
body.ux-type .skin-h1 {
  font-size: 1.625rem;
  line-height: 1.25;
}
body.ux-type h2 {
  font-size: 1.25rem;
  line-height: 1.3;
}
/* Never dim past-visit cards below readable contrast */
body.ux-type .appt-card.appt-past {
  opacity: 1 !important;
  border-color: var(--card-border);
}

/* ═══ DEEPENED BRAND PLUM LIGHT THEME (C15b / F4 Option A — theme_default) ═══ */
/* Higher specificity (html body.neon.ux-theme[data-theme="light"]) so neon-theme.css loaded later never overrides it. */
html body.neon.ux-theme[data-theme="light"],
html body.ux-theme[data-theme="light"],
.snd-nav[data-theme="light"] {
  --bg: #E4E0EB;
  --bg-surface: #F7F6FA;
  --card-bg: #F7F6FA;
  --card-border: #B6AEC4;
  --card-shadow: 0 2px 6px rgba(20, 18, 34, 0.08);
  --card-inset: none;
  --card-hover-border: #4C2066;
  --text: #141222;
  --text-muted: #36314A;
  --text-faint: #46405E;
  --text-label: #29243A;
  --accent: #4C2066;
  --accent-hover: #38164D;
  --accent-glow: rgba(76, 32, 102, 0.12);
  --accent-solid: #4C2066;
  --btn-bg: #4C2066;
  --btn-hover: #38164D;
  --btn-shadow: 0 1px 3px rgba(20, 18, 34, 0.16);
  --btn-hover-shadow: 0 2px 6px rgba(20, 18, 34, 0.22);
  --input-bg: #FFFFFF;
  --input-border: #635B75;
  --input-focus-border: #4C2066;
  --input-focus-shadow: 0 0 0 3px rgba(76, 32, 102, 0.22);
  --input-focus-bg: #FFFFFF;
  --input-text: #141222;
  --input-placeholder: #504966;
  --divider-line: #B6AEC4;
  --divider-text: #46405E;
  --error: #9B1C1C;
  --error-bg: #FDECEC;
  --error-border: #E5A0A0;
  --success: #0F5C38;
  --success-bg: #E6F6EE;
  --success-border: #8CCBA9;
  --warning: #7A4B00;
  --warning-bg: #FDF3DF;
  --warning-border: #DFBA74;
  --ok-text: #0F5C38;
  --bad-text: #9B1C1C;
  --warn-text: #7A4B00;
  --patient-name: #141222;
}
html body.neon.ux-theme[data-theme="light"] {
  background: #E4E0EB !important;
  color: #141222 !important;
}
html body.neon.ux-theme[data-theme="light"] .glow-bg {
  display: none !important;
}
html body.neon.ux-theme[data-theme="light"] .snd-nav,
.snd-nav[data-theme="light"] {
  background: #F7F6FA !important;
  border-bottom: 1.5px solid #B6AEC4 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
html body.neon.ux-theme[data-theme="light"] .snd-nav-links a {
  color: #29243A;
}
html body.neon.ux-theme[data-theme="light"] .snd-nav-links a:hover {
  color: #141222;
  background: #EAE5F2;
  border-color: #B6AEC4;
}
html body.neon.ux-theme[data-theme="light"] .mobile-grid .dash-tile,
html body.neon.ux-theme[data-theme="light"] .orbit-tile,
html body.neon.ux-theme[data-theme="light"] .center-tile {
  background: #F7F6FA !important;
  border: 1.5px solid #B6AEC4 !important;
  box-shadow: 0 2px 5px rgba(20, 18, 34, 0.06) !important;
}
html body.neon.ux-theme[data-theme="light"] .mobile-grid .dash-tile:hover,
html body.neon.ux-theme[data-theme="light"] .orbit-tile:hover,
html body.neon.ux-theme[data-theme="light"] .center-tile:hover {
  background: #FFFFFF !important;
  border-color: #4C2066 !important;
}
html body.neon.ux-theme[data-theme="light"] .ux-nv-card {
  background: #F7F6FA;
  border: 2px solid #4C2066;
}
html body.neon.ux-theme[data-theme="light"] .ux-btn-secondary,
html body.neon.ux-theme[data-theme="light"] .hub-back,
html body.neon.ux-theme[data-theme="light"] .theme-opt {
  background: #FFFFFF;
  border: 1.5px solid #635B75;
  color: #141222 !important;
}
html body.neon.ux-theme[data-theme="light"] .theme-opt.active {
  background: #4C2066;
  border-color: #4C2066;
  color: #FFFFFF !important;
}
html body.neon.ux-theme[data-theme="light"] .appt-card,
html body.neon.ux-theme[data-theme="light"] .skin-panel,
html body.neon.ux-theme[data-theme="light"] .settings-card,
html body.neon.ux-theme[data-theme="light"] .help-card,
html body.neon.ux-theme[data-theme="light"] .neon-card,
html body.neon.ux-theme[data-theme="light"] .portal-card {
  background: #F7F6FA;
  border: 1.5px solid #B6AEC4;
}
html body.neon.ux-theme[data-theme="light"] .appt-date-badge,
html body.neon.ux-theme[data-theme="light"] .tile-badge {
  background: #4C2066 !important;
  color: #FFFFFF !important;
}
html body.neon.ux-theme[data-theme="light"] .appt-checkin-btn,
html body.neon.ux-theme[data-theme="light"] .appt-prep-btn {
  background: #4C2066 !important;
  color: #FFFFFF !important;
  border-color: #4C2066 !important;
}
html body.neon.ux-theme[data-theme="light"] .appt-reschedule-btn,
html body.neon.ux-theme[data-theme="light"] .appt-cancel-btn {
  border-width: 1.5px;
  font-weight: 600;
}

/* ═══ NEXT-VISIT CARD (C1 — next_visit) ═══ */
.ux-nv-card {
  background: var(--card-bg);
  border: 2px solid var(--accent, #592D74);
  border-radius: 16px;
  padding: 20px;
  margin: 0 auto 20px;
  max-width: 720px;
  box-shadow: var(--card-shadow);
  text-align: left;
  font-family: 'Inter', -apple-system, sans-serif;
}
.ux-nv-card.ux-nv-empty {
  border: 1px solid var(--card-border);
}
.ux-nv-eyebrow {
  font-size: 0.9375rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin-bottom: 6px;
}
.ux-nv-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
}
.ux-nv-when {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.ux-nv-place {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.ux-nv-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--ok-text, var(--success));
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 12px;
}
.ux-nv-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.ux-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  min-height: 48px;
  border-radius: 10px;
  border: none;
  background: var(--btn-bg, #592D74);
  color: #ffffff !important;
  font-family: 'Outfit', sans-serif;
  font-size: 1.0625rem;
  font-weight: 600;
  text-decoration: none !important;
  cursor: pointer;
}
.ux-btn:hover {
  background: var(--btn-hover, #47225E);
}
.ux-btn-full {
  width: 100%;
}
.ux-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid var(--input-border, var(--card-border));
  background: var(--bg-surface, transparent);
  color: var(--text) !important;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none !important;
  cursor: pointer;
}
.ux-btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent) !important;
}
.ux-nv-more {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--card-border);
  font-size: 0.9375rem;
}
.ux-nv-more a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  display: inline-block;
  padding: 8px 0;
}
.ux-nv-pending {
  max-width: 720px;
  margin: 0 auto 20px;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  font-size: 0.9375rem;
  text-align: left;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ux-nv-pending strong { color: var(--text); }

/* ═══ DIRECT NAVIGATION QUICK LINKS (C4) ═══ */
.ux-quick-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}
.ux-quick-bar .ux-btn-full {
  flex: 1 1 100%;
}
.ux-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}
.ux-quick-links a {
  flex: 1 1 140px;
}

/* ═══ DIRECT BOOKING SLOTS & REVIEW (C2 — booking_direct) ═══ */
.ux-bs-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  margin: 10px 0 16px;
  font-size: 0.9375rem;
  color: var(--text-muted);
}
.ux-bs-day {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
}
.ux-bs-day h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--text);
}
.ux-bs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (min-width: 760px) {
  .ux-bs-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.ux-bs-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 2px solid var(--input-border, var(--card-border));
  background: var(--bg-surface, var(--card-bg));
  color: var(--text) !important;
  text-decoration: none !important;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.0625rem;
  text-align: center;
}
.ux-bs-slot:hover,
.ux-bs-slot:focus-visible {
  border-color: var(--accent, #592D74);
  background: var(--accent-glow);
}
.ux-bs-slot small {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.ux-bs-review-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 20px;
}
.ux-bs-review-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--card-border);
  font-size: 1rem;
}
.ux-bs-review-list li strong {
  display: inline-block;
  min-width: 110px;
  color: var(--text-muted);
}

/* ═══ RISK PAGE & RADIO CONTROLS (C7) ═══ */
.ux-fieldset {
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 16px;
  margin: 16px 0;
}
.ux-fieldset legend {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.0625rem;
  padding: 0 8px;
  color: var(--text);
}
.ux-radio-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin: 8px 0;
  border: 1px solid var(--input-border, var(--card-border));
  border-radius: 10px;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg-surface, transparent);
}
.ux-radio-label input[type="radio"] {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  accent-color: var(--accent, #592D74);
}
.ux-alert {
  padding: 14px 16px;
  border-radius: 12px;
  margin: 12px 0 16px;
  font-size: 1rem;
  font-weight: 500;
}
.ux-alert-ok {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--ok-text, var(--success));
}
.ux-alert-err {
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  color: var(--bad-text, var(--error));
}
.ux-alert-info {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  color: var(--warn-text, var(--warning));
}
