/* Snowpine Scheduling: shared styles. Colors and fonts come from the owner's theme (CSS variables set per page). */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 var(--font-body);
}
h1, h2, h3, .biz { font-family: var(--font-heading); font-weight: 600; line-height: 1.2; }
a { color: var(--primary); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}
.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; }
.wrap { width: 100%; max-width: 680px; margin: 0 auto; padding: 0 16px; }
.wrap.wide { max-width: 860px; }
.wrap.narrow { max-width: 520px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

.site-head { background: var(--surface); border-bottom: 1px solid var(--border); }
.head-row { display: flex; align-items: center; gap: 12px; min-height: 72px; padding-top: 12px; padding-bottom: 12px; }
.logo { width: 48px; height: 48px; border-radius: 12px; object-fit: contain; flex: none; }
.biz { margin: 0; font-size: 20px; }
.tagline { margin: 2px 0 0; color: var(--muted); font-size: 15px; }
.page-title { font-size: 28px; margin: 28px 0 16px; }
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.title-row form { margin: 0; }
.site-foot { padding: 32px 0 40px; color: var(--muted); font-size: 14px; }
.site-foot p { margin: 0; }
.site-foot a { color: var(--muted); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px; margin: 0 0 16px; }
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card h2 { font-size: 20px; margin: 0 0 12px; }
.card h3 { font-size: 17px; margin: 20px 0 8px; }
.step-label { font-size: 14px; color: var(--muted); margin: 0 0 4px; font-weight: 600; letter-spacing: 0.02em; }

.alert { display: none; border: 1px solid #B42318; background: #FEF3F2; color: #7A271A; border-radius: 12px; padding: 12px 14px; margin: 0 0 16px; }
.alert.show { display: block; }
.note { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.ok-note { border-left: 4px solid var(--primary); }

/* Buttons: 44 px minimum, flat, no glow. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: 600 16px/1.2 var(--font-body); text-decoration: none; cursor: pointer;
}
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn.ghost { background: transparent; }
.btn.danger { color: #B42318; border-color: #F1C0BA; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 1; color: var(--muted); background: var(--bg); border-color: var(--border); cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.linkish { background: none; border: 0; padding: 10px 0; min-height: 44px; color: var(--primary); font: 600 16px var(--font-body); cursor: pointer; text-decoration: underline; }

/* Service choice */
.choices { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.choice {
  width: 100%; text-align: left; display: grid; gap: 2px; padding: 14px 16px; min-height: 64px; border-radius: 14px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; cursor: pointer;
}
.choice .name { font-weight: 600; font-size: 17px; }
.choice .meta { color: var(--muted); font-size: 15px; }
.choice .desc { font-size: 15px; }
.choice[aria-pressed="true"] { border: 2px solid var(--primary); padding: 13px 15px; }
.choice[aria-pressed="true"] .name::after { content: "  \2713  Selected"; color: var(--primary); font-size: 14px; }

/* Time list */
.tz-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; color: var(--muted); font-size: 15px; margin: 0 0 8px; }
.day { border-top: 1px solid var(--border); padding: 14px 0 6px; }
.day:first-of-type { border-top: 0; }
.day h3 { font-size: 16px; margin: 0 0 10px; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.slot {
  width: 100%; min-height: 44px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font: 600 16px var(--font-body); cursor: pointer; padding: 8px 6px;
}
.slot:hover { border-color: var(--primary); }
.slot[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.slot[aria-pressed="true"]::before { content: "\2713  "; }
.none { color: var(--muted); font-size: 15px; margin: 0 0 8px; }
.pager { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; }

/* Forms: 16 px inputs so iOS doesn't zoom. */
.field { margin: 0 0 14px; }
.field label, .field .label { display: block; font-weight: 600; margin: 0 0 6px; }
.field .hint { color: var(--muted); font-size: 14px; margin: -2px 0 6px; }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=date], input[type=time], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--text); font: 16px/1.4 var(--font-body);
}
input[type=checkbox], input[type=radio] { width: 22px; height: 22px; accent-color: var(--primary); margin: 0; flex: none; }
textarea { min-height: 96px; resize: vertical; }
[aria-invalid="true"] { border-color: #B42318 !important; border-width: 2px !important; }
.field-error { color: #B42318; font-size: 15px; margin: 6px 0 0; font-weight: 600; }
.check, .field label.check { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 0; font-weight: 500; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 420px) { .grid2 { grid-template-columns: 1fr; } }

.summary { display: grid; gap: 8px; margin: 0; }
.summary div { display: grid; grid-template-columns: 96px 1fr; gap: 8px; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.pay-list { margin: 6px 0 0; padding-left: 20px; }

/* Settings */
.hours-row { display: grid; grid-template-columns: 130px 1fr; gap: 8px 12px; align-items: start; padding: 10px 0; border-top: 1px solid var(--border); }
.hours-row:first-of-type { border-top: 0; }
.ranges { display: grid; gap: 8px; }
.range { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.range input[type=time] { width: 9.5em; }
.ranges .linkish { justify-self: start; }
.range .to { color: var(--muted); }
@media (max-width: 560px) { .hours-row { grid-template-columns: 1fr; } }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { border-top: 1px solid var(--border); padding: 12px 0; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; }
.list > li:first-child { border-top: 0; }
.list .what { min-width: 0; flex: 1 1 240px; }
.list .what strong { display: block; }
.list > li > .svc-form { flex: 1 1 100%; padding-top: 8px; }
.status-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 14px; font-weight: 600; border: 1px solid var(--border); }
.status-pill.good { background: #ECFDF3; color: #05603A; border-color: #ABEFC6; }
.status-pill.bad { background: #FEF3F2; color: #912018; border-color: #FECDCA; }
.saved { color: var(--muted); font-size: 15px; margin-left: 8px; }
.url-box { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.url-box code { font-size: 15px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; overflow-wrap: anywhere; flex: 1 1 220px; }
fieldset { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
legend { font-weight: 600; margin-bottom: 6px; padding: 0; }

dialog { border: 1px solid var(--border); border-radius: 16px; padding: 20px; max-width: min(440px, calc(100vw - 32px)); background: var(--surface); color: var(--text); }
dialog::backdrop { background: rgba(0, 0, 0, 0.45); }
dialog h2 { margin-top: 0; font-size: 20px; }

@media (prefers-reduced-motion: no-preference) { .slot, .choice, .btn { transition: border-color 120ms, background-color 120ms; } }
