/* Public booking pages. Tokens follow docs/mockups/2026-11-09-booking-and-admin.html.
   Fonts: Schibsted Grotesk and Manrope are named first with system fallbacks. The CSP
   (style-src 'self') blocks Google Fonts, so the system fonts are what render unless the
   fonts are self-hosted later. */
:root {
  --bg: #f7fafd;
  --alt: #eef4fa;
  --card: #fff;
  --ink: #0e1726;
  --text: #39455a;
  --muted: #69788f;
  --line: #dbe5f0;
  --pri: #1e7af0;
  --cyan: #19c2e6;
  --red: #d6493f;
  --red-soft: #fbeceb;
  --amber: #c98a14;
  --amber-soft: #fbf3e1;
  --green: #1f9d6b;
  --green-soft: #e4f5ee;
  --pri-soft: #e6f0fe;
  --on-pri: #fff;
  --grad: linear-gradient(100deg, #1e7af0, #19c2e6);
  --disp: "Schibsted Grotesk", system-ui, sans-serif;
  --body: "Manrope", system-ui, sans-serif;
  --mono: "Spline Sans Mono", ui-monospace, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1220;
    --alt: #0f1729;
    --card: #141e33;
    --ink: #eef3fb;
    --text: #c3cee0;
    --muted: #8d9bb3;
    --line: #24324d;
    --pri: #3f93ff;
    --pri-soft: #17294a;
    --red: #ef6c62;
    --red-soft: #3a1d1f;
    --amber: #e0a93a;
    --amber-soft: #352a14;
    --green: #3fc48f;
    --green-soft: #12322a;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0b1220;
  --alt: #0f1729;
  --card: #141e33;
  --ink: #eef3fb;
  --text: #c3cee0;
  --muted: #8d9bb3;
  --line: #24324d;
  --pri: #3f93ff;
  --pri-soft: #17294a;
  --red: #ef6c62;
  --red-soft: #3a1d1f;
  --amber: #e0a93a;
  --amber-soft: #352a14;
  --green: #3fc48f;
  --green-soft: #12322a;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.5;
}

.shell {
  min-height: 100vh;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.card {
  width: 100%;
  max-width: 640px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

h1,
h2 {
  font-family: var(--disp);
  color: var(--ink);
  margin: 0;
  line-height: 1.2;
}

h1 {
  font-size: 1.75rem;
}

h2 {
  font-size: 1.125rem;
}

p {
  margin: 0;
}

a {
  color: var(--pri);
}

code {
  font-family: var(--mono);
  background: var(--alt);
  border-radius: 6px;
  padding: 2px 8px;
  overflow-wrap: anywhere;
}

.muted {
  color: var(--muted);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

label.field:has(> input[type="checkbox"]),
label.field:has(> input[type="radio"]) {
  flex-direction: row;
  align-items: center;
  gap: 0;
  min-height: 44px;
}

label.field:has(> input[type="checkbox"]) > span,
label.field:has(> input[type="radio"]) > span {
  min-width: 0;
}

label {
  color: var(--ink);
  font-weight: 600;
}

input,
textarea {
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 16px;
  min-height: 44px;
  width: 100%;
}

input[type="checkbox"],
input[type="radio"] {
  width: 20px;
  height: 20px;
  min-height: 0;
  padding: 0;
  margin: 0 8px 0 0;
  flex: none;
  vertical-align: middle;
  accent-color: var(--pri);
}

input[type="hidden"] {
  display: none;
}

input[aria-invalid="true"] {
  border-color: var(--red);
}

.error {
  color: var(--red);
  background: var(--red-soft);
  border-radius: 8px;
  padding: 12px 16px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--pri);
  outline-offset: 2px;
}

.btn {
  display: inline-block;
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  color: var(--on-pri);
  background: var(--grad);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 12px 16px;
  min-height: 44px;
}

.btn.ghost {
  color: var(--pri);
  background: transparent;
  border-color: var(--line);
}
.btn.google {
  display: flex;
  width: 100%;
  max-width: 360px;
  min-height: 48px;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  font-weight: 600;
}
.btn.google::before {
  content: "";
  width: 18px;
  height: 18px;
  flex: none;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='%23EA4335' d='M24 9.5c3.5 0 6.6 1.2 9.1 3.6l6.8-6.8C35.9 2.4 30.4 0 24 0 14.6 0 6.5 5.4 2.6 13.2l7.9 6.1C12.4 13.6 17.7 9.5 24 9.5z'/%3E%3Cpath fill='%234285F4' d='M46.5 24.5c0-1.6-.1-3.1-.4-4.5H24v9h12.7c-.6 3-2.3 5.5-4.8 7.2l7.5 5.8c4.4-4.1 7.1-10.1 7.1-17.5z'/%3E%3Cpath fill='%23FBBC05' d='M10.5 28.7a14.500 14.500 0 0 1 0-9.4l-7.9-6.1a24 24 0 0 0 0 21.6l7.9-6.1z'/%3E%3Cpath fill='%2334A853' d='M24 48c6.5 0 11.9-2.1 15.9-5.8l-7.5-5.8c-2.100 1.400-4.800 2.300-8.400 2.300-6.300 0-11.600-4.100-13.500-9.800l-7.900 6.100C6.500 42.600 14.600 48 24 48z'/%3E%3C/svg%3E")
    center / contain no-repeat;
}
.btn.google:hover {
  border-color: var(--pri);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.zone {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: end;
}

.hold {
  background: var(--amber-soft);
  color: var(--ink);
  border-radius: 8px;
  padding: 12px 16px;
}

.summary {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 12px 16px;
  margin: 0;
}

.summary dt {
  color: var(--muted);
}

.summary dd {
  margin: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}

progress {
  width: 100%;
  height: 8px;
}

/* Pickers */
.picker {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.picker-head {
  display: grid;
  grid-template-columns: 64px 1fr 64px;
  gap: 12px;
  align-items: center;
  text-align: center;
}

.nav {
  display: inline-block;
  min-height: 44px;
  line-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: center;
  text-decoration: none;
}

.grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px 4px;
}

.strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.dow {
  text-align: center;
  color: var(--muted);
  font-size: 0.8125rem;
}

.day {
  display: block;
  min-height: 44px;
  line-height: 44px;
  text-align: center;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
  background: var(--pri-soft);
}

.day.off {
  background: transparent;
  color: var(--muted);
}

.day.dim {
  opacity: 0.5;
}

.day.sel {
  background: var(--pri);
  color: var(--on-pri);
}

.slots {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

.slot {
  font: inherit;
  font-weight: 600;
  width: 100%;
  min-height: 44px;
  padding: 12px 16px;
  color: var(--pri);
  background: var(--card);
  border: 1px solid var(--pri);
  border-radius: 8px;
  cursor: pointer;
}

.slot:hover {
  background: var(--pri-soft);
}

.times {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Under auto the month grid shows on wide screens and the week strip on narrow ones. */
[data-view="auto"] [data-picker="week"] {
  display: none;
}

@media (max-width: 720px) {
  [data-view="auto"] [data-picker="month"] {
    display: none;
  }

  [data-view="auto"] [data-picker="week"] {
    display: flex;
  }
}

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

  .zone {
    grid-template-columns: max-content 1fr max-content;
  }

  .zone label {
    align-self: center;
  }
}

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

/* Admin: phone first with a fixed bottom tab bar; from 720px the tabs sit under the header. */
.admin {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 0 96px;
}
.btn.small {
  min-height: 44px;
  padding: 9px 14px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.segments {
  display: inline-flex;
  padding: 3px;
  background: var(--alt);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.segments a {
  padding: 8px 16px;
  min-height: 40px;
  border-radius: 7px;
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.segments a[aria-current="page"] {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.16);
}
select {
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  min-height: 44px;
  max-width: 100%;
}
.stack {
  display: grid;
  gap: 12px;
}
.inline {
  display: inline;
  margin: 0;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
}
.icon .label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.icon:hover .label,
.icon:focus-visible .label {
  position: static;
  width: auto;
  height: auto;
  clip-path: none;
}
.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.row-main {
  display: grid;
  gap: 2px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.row-time,
.row-title {
  color: var(--ink);
  font-weight: 700;
}
.row-sub {
  color: var(--muted);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}
.chip {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}
.chip.warn {
  background: var(--amber-soft);
  color: var(--amber);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.empty {
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
  padding: 40px 16px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 12px;
}
.notice {
  background: var(--pri-soft);
  border-radius: 12px;
  padding: 12px 14px;
}
.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 16px;
  margin: 0;
}
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.btn.danger {
  background: var(--red-soft);
  color: var(--red);
  border-color: var(--red);
}
@media (min-width: 720px) {
  .admin {
    padding-bottom: 32px;
  }
}

/* Funnel table: stacked cards on phones, CSS only. */
.funnel-table {
  width: 100%;
  border-collapse: collapse;
}
.funnel-table th,
.funnel-table td {
  text-align: left;
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid var(--line, #8884);
}
@media (max-width: 600px) {
  .funnel-table thead {
    position: absolute;
    left: -9999px;
  }
  .funnel-table,
  .funnel-table tbody,
  .funnel-table tr,
  .funnel-table th,
  .funnel-table td {
    display: block;
  }
  .funnel-table tr {
    border: 1px solid var(--line, #8884);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    padding: 0.25rem 0;
  }
  .funnel-table td {
    display: flex;
    justify-content: space-between;
    border-bottom: 0;
  }
  .funnel-table td::before {
    content: attr(data-label);
    font-weight: 600;
  }
}

.cal-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.cal-table th,
.cal-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  vertical-align: middle;
}
.cal-table tbody tr:last-child th,
.cal-table tbody tr:last-child td {
  border-bottom: 0;
}
.cal-table thead th {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.25;
}
.cal-table th:first-child {
  text-align: left;
}
.cal-table .cal-name {
  color: var(--ink);
  font-weight: 600;
  overflow-wrap: anywhere;
}
.cal-table .cal-name .chip {
  margin-left: 8px;
}
.cal-table td input {
  margin: 0;
}
@media (max-width: 640px) {
  .cal-table {
    border: 0;
    background: none;
    border-radius: 0;
  }
  .cal-table thead {
    position: absolute;
    left: -9999px;
  }
  .cal-table,
  .cal-table tbody,
  .cal-table tr,
  .cal-table th,
  .cal-table td {
    display: block;
  }
  .cal-table tr {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 10px;
    padding: 6px 0;
  }
  .cal-table th,
  .cal-table td {
    border-bottom: 0;
    padding: 6px 14px;
  }
  .cal-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 36px;
    text-align: left;
  }
  .cal-table td::before {
    content: attr(data-label);
    color: var(--ink);
  }
}

/* Public page admin */
.pp-photo {
  width: 96px;
  height: 96px;
  border-radius: 48px;
  object-fit: cover;
}
.row-main {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Public pages */
.who {
  display: flex;
  align-items: center;
  gap: 12px;
}
.who-text {
  min-width: 0;
  overflow-wrap: anywhere;
}
.host {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.host-name {
  min-width: 0;
  overflow-wrap: anywhere;
}
.avatar {
  width: 44px;
  height: 44px;
  border-radius: 22px;
  object-fit: cover;
  flex-shrink: 0;
}
.dot {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #6b7cff, #8a5cf6);
}
.welcome {
  overflow-wrap: anywhere;
  min-width: 0;
}
.plist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
.prow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line, #ddd);
  border-radius: 10px;
  padding: 12px;
}
.prow-main {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
