/* Teal calendar stationery: calm surfaces, generous type, and clear selected states. */
:root {
  --accent: #0f766e;
  --accent-soft: #def1eb;
  --bg: #f3f7f5;
  --surface: #ffffff;
  --surface-2: #e9f1ed;
  --ink: #183b38;
  --ink-2: #58716b;
  --radius: 20px;
  --font-display: 'Avenir Next', 'Trebuchet MS', sans-serif;
  --max: 1100px;
  color-scheme: light;
}

/* Header and editorial introduction. */
.app-header {
  flex-wrap: wrap;
}

.view-switch {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--surface-2);
  border-radius: 30px;
}

.view-switch .btn {
  padding-inline: 14px;
  border: 0;
  background: transparent;
}

.view-switch [aria-pressed="true"] {
  background: var(--accent);
  color: white;
}

.device-note {
  font-size: .78rem;
  color: var(--ink-2);
  max-width: 80ch;
  margin-block: 4px 20px;
}

.hero {
  padding: clamp(24px, 5vw, 56px) 0;
  border-top: 1px solid var(--line);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.7rem);
  letter-spacing: -.05em;
  max-width: 22ch;
}

.hero p:not(.eyebrow) {
  color: var(--ink-2);
  max-width: 55ch;
}

.hero.compact {
  padding-block: 24px;
}

.eyebrow {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .13em;
  color: var(--accent);
  margin-block: 8px 16px;
}

.sample {
  background: var(--accent-soft);
}

/* Owner workspace and agenda. */
.workspace {
  margin-bottom: 24px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stats .card {
  margin: 0;
  border-top: 4px solid var(--accent);
}

.stats strong {
  display: block;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.stats span {
  color: var(--ink-2);
  font-size: .85rem;
}

.day-heading {
  margin-block: 22px 10px;
  font-size: .9rem;
}

.time {
  font-size: 1.35rem;
  min-width: 75px;
}

.booking-detail {
  flex: 1;
  min-width: 150px;
  overflow-wrap: anywhere;
}

.actions {
  margin-top: 12px;
}

form > .btn {
  margin-top: 16px;
}

footer {
  margin-top: 36px;
}

/* Client service cards and calendar selection. */
.service {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 !important;
  border: 2px solid transparent;
  text-align: left;
  font: inherit;
  cursor: pointer;
  min-height: 175px;
}

.service[aria-pressed="true"] {
  border-color: var(--accent);
  background: #effaf5;
}

.service-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.service-top b {
  color: var(--accent);
}

.service-duration {
  margin-top: auto;
  font-size: .8rem;
  color: var(--ink-2);
}

.booking-panel {
  margin-block: 24px;
}

.day-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-block: 4px 16px;
  margin-bottom: 12px;
}

.day {
  flex: 0 0 82px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.day span {
  font-size: .7rem;
}

.day strong {
  font-size: 1.5rem;
}

.day:disabled {
  opacity: .35;
  cursor: default;
}

.day[aria-pressed="true"],
.slot[aria-pressed="true"] {
  background: var(--accent);
  color: white;
}

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

.slot {
  border-radius: 12px;
  min-height: 52px;
}

.lookup {
  flex: 1;
  min-width: 150px;
}

.confirmation {
  margin-block: 20px;
  border-top: 4px solid var(--accent);
}

.seal {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  border-radius: 50%;
  font-size: 1.8rem;
}

.code {
  font-family: var(--font-mono);
  letter-spacing: .2em;
  font-size: 1.8rem;
  color: var(--accent);
}

/* Keep navigation readable on narrow phones without shrinking tap targets. */
@media (max-width: 480px) {
  .view-switch {
    width: 100%;
  }

  .view-switch .btn {
    flex: 1;
    font-size: .85rem;
  }

  .app-main {
    padding-inline: 14px;
  }
}

/* Working surfaces stay compact, with a wider agenda on tablets. */
.setup-wrap {
  max-width: 760px;
  margin: 36px auto;
}

.setup-grid {
  align-items: stretch;
  margin-top: 24px;
}

.setup-grid > .card {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.setup-grid .btn {
  margin-top: auto;
}

.owner-heading {
  margin-block: 16px 20px;
}

.owner-layout {
  display: grid;
  gap: 28px;
}

.owner-layout > *,
.client-workspace > * {
  min-width: 0;
}

.owner-layout aside > .card {
  margin-top: 0;
}

form.card,
#booking-details {
  max-width: 640px;
}

/* One clear booking decision per screen. */
.client-workspace {
  display: grid;
  gap: 28px;
  align-items: start;
}

.booking-flow {
  padding-bottom: 24px;
}

.booking-flow > h1 {
  font-size: clamp(1.85rem, 3.5vw, 2.5rem);
  letter-spacing: -.04em;
  margin-block: 20px 28px;
}

.step-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.icon-button svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.booking-flow .grid {
  grid-template-columns: 1fr;
}

.service {
  min-height: 148px;
  border: 1px solid var(--line);
  box-shadow: none;
}

.day {
  flex-basis: 70px;
  border-radius: 22px;
}

.day:disabled {
  background: var(--surface-2);
}

.slots {
  grid-template-columns: 1fr;
}

.slot {
  justify-content: flex-start;
  padding-inline: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.slot[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.booking-summary {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px max(16px, calc((100vw - 1036px) / 2));
  padding-bottom: calc(16px + var(--safe-bottom));
  padding-left: max(16px, var(--safe-left), calc((100vw - 1036px) / 2));
  padding-right: max(16px, var(--safe-right), calc((100vw - 1036px) / 2));
  background: var(--surface);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 24px rgb(24 59 56 / 4%);
}

.booking-summary > div {
  min-width: 0;
}

.booking-summary strong,
.booking-summary span {
  display: block;
}

.booking-summary span {
  font-size: .8rem;
  color: var(--ink-2);
}

.summary-next {
  flex-shrink: 0;
  border-radius: 30px;
  background: var(--ink);
  color: white;
  border-color: var(--ink);
  padding-inline: 22px;
}

.summary-next:disabled {
  opacity: .4;
  cursor: default;
}

@media (min-width: 760px) {
  .owner-layout {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  }

  .client-workspace {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  }

  .client-workspace > .card {
    position: sticky;
    top: 105px;
    margin: 0;
  }

  .slots {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
