/*
 * Styles for the Lumin Wealth handover booking page.
 *
 * Client-facing, mobile-first, self-contained (no external CSS). Restrained
 * wealth-management aesthetic: deep navy primary, clean neutrals, generous
 * whitespace. Design tokens are declared once on :root and reused, so the brand
 * can be refined in one place later.
 */

:root {
  --navy: #0f2748;
  --navy-600: #17365f;
  --navy-700: #0b1d38;
  --ink: #1a2433;
  --muted: #566173;
  --line: #dfe4ec;
  --line-strong: #c6cedb;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --page: #eef1f6;
  --positive: #1f7a52;
  --positive-bg: #eaf5ef;
  --danger: #9a2c2c;
  --focus: #2f6df0;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 39, 72, 0.06), 0 12px 32px rgba(15, 39, 72, 0.08);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--page);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(24px + env(safe-area-inset-top, 0px)) 16px calc(24px + env(safe-area-inset-bottom, 0px));
  gap: 20px;
}

/* Brand wordmark */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 520px;
  padding: 4px 2px;
}

.brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 15px;
}

.brand__name {
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.01em;
  color: var(--navy);
}

/* Card */
.card {
  width: 100%;
  max-width: 520px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

@media (min-width: 480px) {
  .card {
    padding: 32px;
  }
}

.view {
  min-height: 220px; /* reserve height so state swaps do not shift layout */
}

/* Typography */
.title {
  margin: 0 0 6px;
  font-size: 21px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.01em;
}

.lede {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 15px;
}

/* Generic state block (loading, dead-link, no-slots) */
.state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: 28px 8px;
}

.state__icon {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.state__icon svg {
  width: 26px;
  height: 26px;
}

.state__icon--positive {
  background: var(--positive-bg);
  color: var(--positive);
}

.state__icon--neutral {
  background: var(--surface-2);
  color: var(--navy);
}

.state__title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--navy);
}

.state__text {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  max-width: 34ch;
}

/* Spinner */
.spinner {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--navy);
  animation: spin 0.8s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation-duration: 2s;
  }
}

/* Day groups + time options */
.days {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.day__heading {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.slot {
  appearance: none;
  font: inherit;
  cursor: pointer;
  padding: 13px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  transition:
    border-color 0.12s ease,
    background 0.12s ease,
    box-shadow 0.12s ease;
}

.slot:hover {
  border-color: var(--navy);
  background: var(--surface-2);
}

.slot[aria-pressed='true'] {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

/* Buttons */
.btn {
  appearance: none;
  font: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 15px;
  transition:
    background 0.12s ease,
    border-color 0.12s ease,
    color 0.12s ease;
}

.btn--primary {
  background: var(--navy);
  color: #fff;
}

.btn--primary:hover {
  background: var(--navy-600);
}

.btn--ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--line-strong);
}

.btn--ghost:hover {
  background: var(--surface-2);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}

/* Confirm summary */
.summary {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
  margin-bottom: 4px;
}

.summary__label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.summary__value {
  font-size: 19px;
  font-weight: 600;
  color: var(--navy);
}

.summary__meta {
  font-size: 13px;
  color: var(--muted);
}

/* Inline notice (e.g. slot taken) */
.notice {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: #fbeeee;
  border: 1px solid #efd4d4;
  color: var(--danger);
  font-size: 14px;
}

/* Focus visibility for keyboard users */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}

.foot {
  width: 100%;
  max-width: 520px;
  text-align: center;
}

.foot p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
}
