/* Most Welcome — component styles from the design system (bundle.css), as static markup.
   Every value is a token from mw-tokens.css, so each component re-themes under [data-theme]. */

/* ---------- Button: primary (cta fill, once per view), secondary, quiet (text link) ---------- */
.mw-btn { font-family: var(--font-text); font-weight: 500; font-size: 0.92rem; line-height: 1.2; letter-spacing: 0; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 44px; padding: var(--space-3) var(--space-5); border-radius: var(--radius-pill); border: 1px solid transparent; cursor: pointer; white-space: nowrap; text-decoration: none; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.mw-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.mw-btn-primary { background: var(--cta); color: var(--on-cta); }
.mw-btn-primary:hover { background: var(--brand-text); color: var(--surface-raised); }
.mw-btn-secondary { background: var(--surface-raised); color: var(--ink); border-color: var(--line-strong); }
.mw-btn-secondary:hover { border-color: var(--ink); }
.mw-btn-quiet { background: transparent; color: var(--brand-text); padding-left: var(--space-3); padding-right: var(--space-3); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.mw-btn-sm { min-height: 32px; padding: var(--space-1) var(--space-4); font-size: 0.8rem; }
.mw-btn[disabled] { opacity: var(--opacity-disabled); cursor: not-allowed; }

/* ---------- StatusBadge: dot + word, never colour alone ---------- */
.mw-badge { display: inline-flex; align-items: center; gap: var(--space-2); font-family: var(--font-text); font-weight: 500; font-size: 0.72rem; line-height: 1; letter-spacing: 0.06em; text-transform: uppercase; padding: 6px 10px; border-radius: var(--radius-pill); background: var(--surface-sunken); color: var(--ink-muted); white-space: nowrap; }
.mw-badge::before { content: ""; width: 6px; height: 6px; border-radius: var(--radius-pill); background: currentColor; }
.mw-badge-open { background: var(--success-soft); color: var(--success); }
.mw-badge-full { background: var(--warning-soft); color: var(--warning); }
.mw-badge-cancelled { background: var(--danger-soft); color: var(--danger); }
.mw-badge-completed { background: var(--brand-soft); color: var(--brand-text); }
.mw-badge-closed { background: var(--surface-sunken); color: var(--ink-muted); }
.mw-badge-closed::before { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }

/* ---------- ClassCard ---------- */
.mw-class { display: grid; grid-template-columns: 76px 1fr auto; gap: var(--space-4) var(--space-5); align-items: center; background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-4) var(--space-5); min-width: 0; max-width: 640px; box-sizing: border-box; }
.mw-class-time { font-family: var(--font-text); font-weight: 500; font-size: 1.2rem; line-height: 1.1; letter-spacing: -0.01em; color: var(--ink); font-variant-numeric: tabular-nums; }
.mw-class-time small { display: block; font-family: var(--font-text); font-size: 0.72rem; font-weight: 400; letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink-muted); margin-top: var(--space-1); }
.mw-class-title { font-family: var(--font-headings); font-weight: 300; font-size: 1.08rem; line-height: 1.3; color: var(--ink); margin: 0 0 var(--space-1); display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); font-variation-settings: "SOFT" 100, "WONK" 0; }
.mw-class-meta { font-size: 0.92rem; line-height: 1.45; font-weight: 400; color: var(--ink-muted); margin: 0; }
.mw-class-cap { display: flex; align-items: center; gap: var(--space-3); margin-top: var(--space-2); font-size: 0.8rem; font-weight: 400; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.mw-meter { flex: 0 0 120px; height: 4px; background: var(--line); border-radius: var(--radius-pill); overflow: hidden; }
.mw-meter > i { display: block; height: 100%; background: var(--brand); border-radius: var(--radius-pill); }
.mw-class-side { display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-2); }
.mw-class-price { font-size: 0.8rem; font-weight: 400; color: var(--ink-muted); }

/* ---------- ConciergeThread: Guest ↔ Concierge texting ---------- */
.mw-thread { display: flex; flex-direction: column; gap: var(--space-3); max-width: 420px; padding: var(--space-5); background: var(--surface); }
.mw-msg { max-width: 82%; display: flex; flex-direction: column; gap: var(--space-1); }
.mw-msg-guest { align-self: flex-start; }
.mw-msg-concierge, .mw-msg-host { align-self: flex-end; align-items: flex-end; }
.mw-bubble { font-size: 0.98rem; line-height: 1.5; font-weight: 400; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: var(--surface-raised); border: 1px solid var(--line); color: var(--ink); }
.mw-msg-guest .mw-bubble { border-bottom-left-radius: var(--radius-sm); }
.mw-msg-concierge .mw-bubble { background: var(--brand-soft); border-color: transparent; border-bottom-right-radius: var(--radius-sm); }
.mw-msg-host .mw-bubble { background: var(--surface-sunken); border-bottom-right-radius: var(--radius-sm); }
.mw-msg-by { font-size: 0.72rem; line-height: 1.3; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.mw-msg-concierge .mw-msg-by { color: var(--brand-text); }
.mw-action { align-self: center; display: inline-flex; align-items: center; gap: var(--space-2); font-size: 0.8rem; font-weight: 500; color: var(--success); background: var(--success-soft); padding: 6px 12px; border-radius: var(--radius-pill); }

/* ---------- ActivityFeed: every action and dollar, live ---------- */
.mw-feed { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); max-width: 520px; overflow: hidden; }
.mw-feed-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.mw-live { display: inline-flex; align-items: center; gap: var(--space-2); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink); }
.mw-live::before { content: ""; width: 8px; height: 8px; border-radius: var(--radius-pill); background: var(--jolt); box-shadow: 0 0 0 3px var(--surface-raised), 0 0 0 4px var(--jolt); animation: mw-live 2.4s ease-in-out infinite; }
@keyframes mw-live { 50% { opacity: .45; } }
.mw-feed-total { font-family: var(--font-text); font-weight: 500; font-size: 1.02rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.mw-feed-total span { font-family: var(--font-text); font-weight: 400; font-size: 0.8rem; color: var(--ink-muted); margin-right: var(--space-2); }
.mw-feed ol { list-style: none; margin: 0; padding: 0; }
.mw-feed li { display: grid; grid-template-columns: 56px 1fr auto; gap: var(--space-4); align-items: baseline; padding: var(--space-3) var(--space-5); border-bottom: 1px solid var(--line); font-size: 0.92rem; line-height: 1.45; font-weight: 400; }
.mw-feed li:last-child { border-bottom: 0; }
.mw-feed-time { font-size: 0.8rem; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.mw-feed-text { color: var(--ink); }
.mw-feed-text b { font-weight: 500; }
.mw-feed-amt { font-family: var(--font-text); font-weight: 500; color: var(--success); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mw-feed li[data-state="approval"] { background: var(--warning-soft); }
.mw-feed li[data-state="approval"] .mw-feed-time { color: var(--warning); font-weight: 500; }
.mw-feed-approve { display: flex; gap: var(--space-2); margin-top: var(--space-2); }

/* ---------- RecoveredStat: the money shot ---------- */
.mw-stat { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-xl); padding: var(--space-5); max-width: 360px; box-sizing: border-box; }
.mw-eyebrow { font-family: var(--font-text); font-weight: 500; font-size: 0.72rem; line-height: 1.3; letter-spacing: 0.22em; text-transform: uppercase; color: var(--brand-text); margin: 0; }
.mw-stat-fig { font-family: var(--font-headings); font-weight: 300; font-size: 3rem; line-height: 1; letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; margin: var(--space-3) 0 var(--space-2); display: inline-block; padding-bottom: var(--space-1); border-bottom: 4px solid var(--jolt); font-variation-settings: "SOFT" 100, "WONK" 0; }
.mw-stat-line { font-family: var(--font-headings); font-weight: 300; font-size: 1.25rem; line-height: 1.28; letter-spacing: -0.01em; color: var(--ink); margin: var(--space-2) 0 var(--space-4); font-variation-settings: "SOFT" 100, "WONK" 0; }
.mw-stat-break { display: flex; gap: var(--space-5); margin: 0; padding: var(--space-4) 0 0; border-top: 1px solid var(--line); }
.mw-stat-break div { display: flex; flex-direction: column; }
.mw-stat-break dt { font-size: 0.72rem; font-weight: 400; letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink-muted); order: 2; }
.mw-stat-break dd { margin: 0; font-family: var(--font-text); font-weight: 500; font-size: 1.2rem; color: var(--ink); font-variant-numeric: tabular-nums; order: 1; }

/* ---------- PolicyBox: house rules in plain English ---------- */
.mw-policy { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-5); max-width: 520px; box-sizing: border-box; }
.mw-policy-label { display: block; font-size: 0.8rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); margin: 0 0 var(--space-2); }
.mw-policy-hint { font-size: 0.92rem; line-height: 1.45; font-weight: 400; color: var(--ink-muted); margin: 0 0 var(--space-4); }
.mw-policy textarea { display: block; width: 100%; box-sizing: border-box; min-height: 96px; resize: vertical; font-family: var(--font-text); font-size: 0.98rem; line-height: 1.6; font-weight: 400; color: var(--ink); background: var(--surface-sunken); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: var(--space-3) var(--space-4); }
.mw-policy textarea::placeholder { color: var(--ink-muted); }
.mw-policy textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.mw-rules { list-style: none; margin: var(--space-4) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.mw-rules li { display: flex; align-items: baseline; gap: var(--space-3); font-size: 0.98rem; line-height: 1.5; font-weight: 400; color: var(--ink); }
.mw-rules li::before { content: ""; flex: 0 0 auto; width: 12px; height: 2px; background: var(--rule); border-radius: var(--radius-pill); transform: translateY(-4px); }
.mw-policy-foot { display: flex; justify-content: flex-end; gap: var(--space-2); margin-top: var(--space-4); }

/* ---------- AutonomyDial: Off · Ask first · Auto ---------- */
.mw-dial { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); max-width: 560px; }
.mw-dial-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-3) var(--space-5); border-bottom: 1px solid var(--line); }
.mw-dial-row:last-child { border-bottom: 0; }
.mw-dial-name { font-size: 0.92rem; line-height: 1.45; font-weight: 400; color: var(--ink); }
.mw-seg { display: inline-flex; padding: 3px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: var(--surface); }
.mw-seg button { font-family: var(--font-text); font-size: 0.8rem; font-weight: 500; line-height: 1; padding: 8px 14px; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--ink-muted); cursor: pointer; }
.mw-seg button[aria-pressed="true"] { background: var(--cta); color: var(--on-cta); }
.mw-seg button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---------- Table: uppercase heads over a gold rule, zebra rows ---------- */
.mw-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); max-width: 720px; }
.mw-table { border-collapse: collapse; width: 100%; font-size: 0.92rem; line-height: 1.45; font-weight: 400; background: var(--surface); color: var(--ink); }
.mw-table caption { caption-side: bottom; text-align: left; font-size: 0.72rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink-muted); padding: var(--space-3) var(--space-4); }
.mw-table th { font-weight: 500; text-align: left; font-size: 0.7rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-muted); background: var(--surface-raised); padding: 0.7rem 0.85rem; border-bottom: 2px solid var(--rule); white-space: nowrap; }
.mw-table td { padding: 0.62rem 0.85rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.mw-table tbody tr:nth-child(even) { background: var(--surface-raised); }
.mw-table tbody tr:last-child td { border-bottom: 0; }
.mw-table tr[data-highlight] td { background: var(--brand-soft); }
.mw-table tr[data-highlight] td:first-child { font-weight: 500; color: var(--brand-text); }

@media (prefers-reduced-motion: reduce) {
  .mw-btn { transition: none; }
  .mw-live::before { animation: none; }
}
