/* Cutie Gems — booking site styles (mobile first) */

:root {
  --pink: #D4537E;        /* primary */
  --pink-dark: #B8406A;   /* filled buttons / selected day: white text on it is 5.3:1 (WCAG AA) */
  --pink-darker: #9E3459; /* hover on filled buttons */
  --pink-light: #FBEAF0;  /* soft backgrounds */
  --plum: #72243E;        /* headings and strong text */
  --grey: #5F5E5A;        /* body text */
  --grey-light: #E7E3E4;
  --grey-off: #F4F2F2;
  --white: #FFFFFF;
  --danger: #A3243B;
  --ok: #2F6B45;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 2px 10px rgba(114, 36, 62, 0.08);
  --focus: 0 0 0 3px var(--white), 0 0 0 6px var(--plum);
  --tap: 44px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--grey);
  background: var(--pink-light);
  overflow-x: hidden;
}

h1, h2, h3, legend { color: var(--plum); line-height: 1.25; margin: 0 0 8px; }
h1 { font-size: 1.6rem; font-weight: 700; }
h2 { font-size: 1.15rem; font-weight: 600; }
h3 { font-size: 1rem; font-weight: 600; }
p { margin: 0 0 12px; }
a { color: var(--plum); }
img { max-width: 100%; height: auto; }
strong { color: var(--plum); }
small { font-size: 0.82rem; }

:focus { outline: none; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 8px; }
h1:focus, h3:focus, main:focus { box-shadow: none; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  background: var(--plum); color: var(--white); padding: 10px 16px; border-radius: 10px;
}
.skip-link:focus { top: 12px; }

/* ---------- Layout ---------- */
.site-header, .page, .site-footer {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}
.site-header { padding-top: 12px; padding-bottom: 4px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px; min-height: var(--tap);
  color: var(--plum); text-decoration: none; font-weight: 600; font-size: 1.05rem;
}
.page { padding-top: 8px; padding-bottom: 32px; }
.site-footer { padding-bottom: 32px; font-size: 0.85rem; text-align: center; }
.site-footer p { margin-bottom: 6px; overflow-wrap: anywhere; }
.site-footer a { display: inline-block; min-height: var(--tap); line-height: var(--tap); padding: 0 4px; }

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 16px;
  margin: 0 0 16px;
  border: 0;
  min-width: 0;
}
fieldset.card { padding-top: 16px; }
.center { text-align: center; }
.muted { color: var(--grey); opacity: 0.9; }
.hint { font-size: 0.88rem; color: var(--grey); margin: 0 0 8px; }
.lead { font-size: 1rem; margin: 0; }
.screen-head { margin: 4px 0 16px; }
.step-tag { margin: 0 0 4px; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--pink-dark); }
.section-title { margin-top: 8px; }

/* ---------- Home ---------- */
.hero { text-align: center; padding: 8px 0 20px; }
.hero-logo { display: block; margin: 0 auto 8px; }
.hero h1 { font-size: 2rem; margin-bottom: 4px; }
.pill {
  display: inline-block; margin-top: 14px; padding: 8px 16px; border-radius: 999px;
  background: var(--white); color: var(--plum); font-weight: 600; font-size: 0.92rem; box-shadow: var(--shadow);
}

.service-list { list-style: none; margin: 0; padding: 0; }
.service-list li + li { border-top: 1px solid var(--grey-light); }
.service {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  width: 100%; min-height: 56px; padding: 10px 4px; margin: 0;
  background: none; border: 0; border-radius: 10px; cursor: pointer; text-align: left;
  font: inherit; color: var(--plum);
}
.service:hover { background: var(--pink-light); }
.service-name { font-weight: 500; overflow-wrap: anywhere; }
.service-name small, .service-meta small { display: block; color: var(--grey); font-weight: 400; }
.service-meta { text-align: right; flex-shrink: 0; }
.service-meta strong { font-size: 1.05rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 12px 20px;
  border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 600; font-size: 1rem; text-decoration: none; text-align: center;
  cursor: pointer; transition: background-color 0.15s ease, transform 0.1s ease;
}
.btn:active { transform: scale(0.98); }
.btn-block { width: 100%; }
.btn-primary { background: var(--pink-dark); color: var(--white); }
.btn-primary:hover { background: var(--pink-darker); }
.btn-secondary { background: var(--white); color: var(--plum); border-color: var(--pink); }
.btn-secondary:hover { background: var(--pink-light); }
.btn-danger { background: var(--white); color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: #FCEDEF; }
.btn[disabled], .btn[aria-disabled='true'] {
  background: var(--grey-off); color: #8A8884; border-color: var(--grey-light); cursor: not-allowed; transform: none;
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0 16px; }
.actions > * { flex: 1 1 160px; }
.actions.stack { flex-direction: column; }
.actions.stack > * { flex: none; }
.sticky-actions { position: sticky; bottom: 12px; }
.back-link {
  display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 8px 0 0;
  color: var(--plum); text-decoration: none; font-weight: 500;
}
.back-arrow { font-size: 1.3rem; line-height: 1; margin-right: 6px; }
.text-link { display: inline-block; padding: 10px 4px; min-height: var(--tap); font-weight: 500; }

/* ---------- Notices ---------- */
.notice {
  padding: 12px 16px; border-radius: var(--radius-sm); margin: 0 0 16px;
  background: var(--white); border-left: 4px solid var(--pink); color: var(--plum);
}
.notice-error { border-left-color: var(--danger); color: var(--danger); background: #FFF6F7; }
.notice-success { border-left-color: var(--ok); color: var(--ok); background: #F3FAF5; }
.form-error:not(:empty) {
  color: var(--danger); background: #FFF6F7; border-radius: var(--radius-sm); padding: 10px 14px; margin: 0 0 12px;
}
.field-error { color: var(--danger); font-size: 0.88rem; margin: 4px 0 0; }
.field-error:empty { display: none; }

/* ---------- Loading ---------- */
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 48px 0; color: var(--plum); }
.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid var(--pink-light); border-top-color: var(--pink);
  animation: spin 0.8s linear infinite; display: inline-block;
}
.spinner-lg { width: 40px; height: 40px; border-width: 4px; margin-bottom: 12px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Options ---------- */
.stepper { display: flex; align-items: center; gap: 12px; }
.stepper-btn {
  width: 48px; height: 48px; flex-shrink: 0; border-radius: 50%;
  border: 2px solid var(--pink); background: var(--white); color: var(--plum);
  font: inherit; font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.stepper-btn:disabled { border-color: var(--grey-light); color: #B4B1AD; cursor: not-allowed; }
.stepper-count { flex: 1; text-align: center; font-weight: 600; color: var(--plum); }
.price-line { font-size: 1.1rem; font-weight: 600; color: var(--plum); margin-bottom: 4px; }
.total-card { padding-top: 14px; padding-bottom: 14px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip label, .chip-toggle {
  display: inline-flex; align-items: center; min-height: var(--tap); padding: 8px 16px;
  border-radius: 999px; border: 2px solid var(--grey-light); background: var(--white);
  color: var(--plum); font: inherit; font-size: 0.95rem; cursor: pointer;
}
.chip-input:checked + label, .chip-toggle[aria-pressed='true'] {
  border-color: var(--pink); background: var(--pink-light); font-weight: 600;
}
.chip-input:focus-visible + label { box-shadow: var(--focus); }
.chips-fieldset legend { float: left; width: 100%; margin-bottom: 10px; font-weight: 600; font-size: 1.15rem; }
.chips-fieldset .chips { clear: both; }

/* ---------- Day picker ---------- */
.week-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.week-title { margin: 0; text-align: center; flex: 1; }
.week-arrow {
  width: var(--tap); height: var(--tap); flex-shrink: 0; border-radius: 50%;
  border: 2px solid var(--pink); background: var(--white); color: var(--plum);
  font: inherit; font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.week-arrow:disabled { border-color: var(--grey-light); color: #C6C3BF; cursor: not-allowed; }
.week {
  list-style: none; margin: 0 0 12px; padding: 0;
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px;
}
.week[aria-busy='true'] { opacity: 0.5; }
.day {
  position: relative; width: 100%; min-height: 68px; padding: 6px 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border-radius: var(--radius-sm); border: 2px solid transparent;
  background: var(--grey-off); color: #A09D99; font: inherit; cursor: not-allowed;
}
.day.is-offered { background: var(--pink-light); color: var(--plum); border-color: var(--pink); cursor: pointer; }
.day.is-offered:hover { background: #F7D6E2; }
.day.is-selected { background: var(--pink-dark); border-color: var(--pink-dark); color: var(--white); }
.day-name { font-size: 0.75rem; font-weight: 500; }
.day-num { font-size: 1.15rem; font-weight: 700; }
.day-tag { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.03em; }
.day-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.week-msg { color: var(--plum); font-weight: 500; margin: 0 0 4px; }

/* ---------- Time picker ---------- */
.slots {
  list-style: none; margin: 8px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 10px;
}
.slot {
  width: 100%; min-height: 52px; padding: 8px 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); border: 2px solid var(--pink);
  background: var(--white); color: var(--plum); font: inherit; font-weight: 600; cursor: pointer;
}
.slot:hover { background: var(--pink-light); }
.slot small { font-weight: 400; color: var(--grey); }
.slot.is-flexible { border-style: dashed; }
.slot:disabled { border-color: var(--grey-light); background: var(--grey-off); color: #8A8884; cursor: not-allowed; }
.reveal {
  width: 100%; min-height: var(--tap); padding: 8px 0; background: none; border: 0;
  color: var(--plum); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; text-align: left;
}
.reveal::after { content: ' ▾'; text-decoration: none; display: inline-block; margin-left: 4px; }
.reveal[aria-expanded='true']::after { transform: rotate(180deg); }
.flex-body { padding-top: 8px; }

/* ---------- Forms ---------- */
.form h2 { margin-bottom: 16px; }
.field { margin: 0 0 16px; border: 0; padding: 0; min-width: 0; }
.field > label, .field > legend { display: block; font-weight: 500; color: var(--plum); margin-bottom: 6px; font-size: 1rem; }
input[type='text'], input[type='email'], input[type='tel'], textarea {
  width: 100%; min-height: 48px; padding: 10px 14px;
  border: 2px solid var(--grey-light); border-radius: var(--radius-sm);
  font: inherit; font-size: 16px; color: var(--plum); background: var(--white);
}
textarea { min-height: 96px; resize: vertical; }
input:focus-visible, textarea:focus-visible { border-color: var(--plum); border-radius: var(--radius-sm); }
[aria-invalid='true'] { border-color: var(--danger) !important; }
.check { display: flex; gap: 12px; align-items: flex-start; margin: 4px 0 4px; }
.check input {
  width: 26px; height: 26px; flex-shrink: 0; margin: 2px 0 0; accent-color: var(--pink); cursor: pointer;
}
.check label { color: var(--plum); font-weight: 500; cursor: pointer; padding: 2px 0 8px; }
.terms-line { margin: 0 0 8px; }
.terms-line a { font-weight: 500; padding: 8px 0; }
.policy { font-size: 0.92rem; background: var(--pink-light); border-radius: var(--radius-sm); padding: 12px 14px; }
.privacy { margin-top: 8px; }
.form .btn { margin-top: 12px; margin-bottom: 8px; }

.radio-list { display: grid; gap: 6px; margin: 4px 0 12px; }
.radio { display: flex; align-items: center; gap: 12px; min-height: var(--tap); }
.radio input { width: 22px; height: 22px; margin: 0; flex-shrink: 0; accent-color: var(--pink); cursor: pointer; }
.radio label { color: var(--plum); cursor: pointer; padding: 8px 0; flex: 1; }
.legend-title { float: left; width: 100%; font-weight: 600; font-size: 1.15rem; margin-bottom: 8px; }
.legend-title + * { clear: both; }

/* ---------- Summary ---------- */
.summary { margin: 0; }
.summary-row { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-top: 1px solid var(--grey-light); }
.summary-row:first-child { border-top: 0; }
.summary dt { color: var(--grey); }
.summary dd { margin: 0; text-align: right; color: var(--plum); font-weight: 500; overflow-wrap: anywhere; }
.summary-row.is-total dd, .summary-row.is-total dt { font-weight: 700; color: var(--plum); }
.summary-row.is-strong dd { font-weight: 700; color: var(--pink-dark); }

.policy-state { padding: 12px 16px; border-radius: var(--radius-sm); font-weight: 600; margin: 0 0 16px; }
.policy-state.is-ok { background: #F3FAF5; color: var(--ok); }
.policy-state.is-warn { background: var(--white); color: var(--danger); }

.celebrate h1 { font-size: 1.9rem; }

/* ---------- Dialog ---------- */
.dialog {
  width: calc(100% - 32px); max-width: 420px; border: 0; border-radius: var(--radius);
  padding: 24px 20px; color: var(--grey); box-shadow: 0 10px 40px rgba(114, 36, 62, 0.25);
}
.dialog::backdrop { background: rgba(114, 36, 62, 0.35); }
.dialog .actions { margin-bottom: 0; }

/* ---------- Bigger screens ---------- */
@media (min-width: 520px) {
  .page { padding-top: 16px; }
  .card { padding: 24px; }
}

/* ---------- Very narrow phones (320px) ---------- */
@media (max-width: 359px) {
  h1 { font-size: 1.4rem; }
  .card { padding: 16px 12px; }
  .site-header, .page, .site-footer { padding-left: 12px; padding-right: 12px; }
  .week { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-meta strong { font-size: 1rem; }
}

/* ---------- Less motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition: none !important; scroll-behavior: auto !important; }
  .spinner { animation: none; border-top-color: var(--pink); border-right-color: var(--pink); }
}

/* ---------- Windows high contrast ---------- */
@media (forced-colors: active) {
  .day.is-offered, .slot, .btn { border: 2px solid ButtonText; }
  .day:disabled { opacity: 0.5; }
}

/* Booking terms & privacy policy */
.legal h2 { font-size: 1.05rem; margin: 20px 0 8px; }
.legal h2:first-child { margin-top: 0; }
.legal p, .legal li { line-height: 1.6; overflow-wrap: anywhere; }
.legal ul { padding-left: 1.2em; margin: 0 0 12px; }
.legal li { margin-bottom: 4px; }
.footer-links a { font-weight: 500; }
