/* Your Flow kit v1, step-day.css (lane B): the day step (the date picker and the
   details form), the two keepsake cards it and the done step draw, and the done
   step itself. Every colour is a token from kit.css and every size follows the
   container, never the page, so the flow sits inside any host. Only transform,
   opacity, clip-path and stroke-dashoffset move, and each duration is a token,
   so motion off and reduced motion collapse all of it. The cards read as paper
   resting on the dark stage: one soft shadow, one inset printed rule. */

/* ---- the hero photo band, when the owner sets one ---- */
.yf-day-hero { margin: 0 0 16px; border-radius: var(--yf-radius); overflow: hidden; }
.yf-day-hero:has(.yf-day-hero-img[hidden]) { display: none; }
.yf-day-hero-img { display: block; width: 100%; height: 150px; object-fit: cover; }

/* ---- the place card on its stage ---- */
.yf-day-stage { display: flex; justify-content: center; padding: 26px 18px 30px; margin-bottom: 1.5rem; }

.yf-card-place, .yf-card-menu { position: relative; width: 100%; background: var(--yf-surface); color: var(--yf-ink); border-radius: var(--yf-radius); }
.yf-card-place { max-width: 300px; padding: 26px 22px 22px; box-shadow: var(--yf-shadow-card); }
.yf-card-menu { max-width: 340px; padding: 30px 24px 26px; box-shadow: var(--yf-shadow-keepsake); }
/* The inset printed rule is an outline, so it follows the card's own corners at any size. */
.yf-card-ornate { outline: 1.5px solid var(--yf-line-strong); outline-offset: -10px; }
.yf-card-body { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 9px; overflow-wrap: anywhere; }
.yf-card-divider { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 200px; margin: 2px 0; }
.yf-card-divider-line { flex: 1; height: 1.5px; background: var(--yf-signature); }
.yf-card-names { margin: 2px 0 3px; font-size: 36px; font-size: clamp(32px, 9cqi, 42px); line-height: 1.15; color: var(--yf-signature-deep); text-wrap: balance; }
.yf-card-date { margin: 0; font-family: var(--yf-font-display); font-weight: var(--yf-weight-display); font-size: 15px; color: var(--yf-ink); }
.yf-card-guests { margin: 0 0 4px; font-size: 12.5px; color: var(--yf-muted); }
/* A placeholder is muted by colour, never by opacity, so it keeps its contrast. */
.yf-card-names.is-placeholder { font-style: normal; color: var(--yf-muted); }
.yf-card-date.is-placeholder, .yf-card-guests.is-placeholder { color: var(--yf-muted); }
/* The stage's own signature colour is for text on the dark linen; the cards are paper. */
.yf-stage .yf-card-names, .yf-stage .yf-card-signoff { color: var(--yf-signature-deep); }
.yf-stage .yf-card-names.is-placeholder { color: var(--yf-muted); }

/* ---- the menu card ---- */
.yf-card-rule-wrap { display: block; width: 100%; margin-bottom: 14px; }
.yf-card-menu .yf-card-names { font-size: 34px; font-size: clamp(32px, 8cqi, 38px); }
.yf-card-menu .yf-card-guests { margin: 2px 0 0; }
.yf-card-section { width: 100%; margin-top: 18px; padding-top: 16px; border-top: 1.5px solid var(--yf-line); }
.yf-card-label { margin: 0 0 6px; font-family: var(--yf-font-display); font-weight: 600; font-size: 12.5px; color: var(--yf-muted); }
.yf-card-main { margin: 0; font-weight: 700; font-size: 15px; color: var(--yf-ink); }
.yf-card-sides { margin: 2px 0 0; font-size: 13px; color: var(--yf-ink-soft); }
.yf-card-empty { margin: 0; font-size: 13px; font-style: italic; color: var(--yf-muted); }
.yf-card-address { margin: 2px 0 0; font-size: 12.5px; color: var(--yf-muted); }
.yf-card-amount { margin: 0; font-weight: 700; font-size: 17px; color: var(--yf-ink); font-variant-numeric: tabular-nums; }
.yf-card-detail { margin: 2px 0 0; font-size: 12.5px; color: var(--yf-muted); }
.yf-card-fineprint { margin: 8px 0 0; font-size: 11.5px; line-height: 1.5; color: var(--yf-muted); }
.yf-card-signoff { width: 100%; margin: 20px 0 0; padding-top: 16px; border-top: 1.5px solid var(--yf-line); font-size: 34px; font-size: clamp(32px, 9cqi, 36px); text-wrap: balance; }
/* The card rises and opens top to bottom while its rule draws. Hidden only while these classes are on. */
.yf-card-menu.yf-card-enter { opacity: 0; transform: translateY(var(--yf-motion-distance)); clip-path: inset(0 0 100% 0); }
.yf-card-menu.yf-card-enter-active {
  opacity: 1; transform: translateY(0); clip-path: inset(0 0 0 0);
  transition: opacity var(--yf-dur-3) var(--yf-ease), transform var(--yf-dur-3) var(--yf-ease), clip-path var(--yf-dur-3) var(--yf-ease);
}
.yf-card-enter .yf-card-rule { stroke-dasharray: 240; stroke-dashoffset: 240; }
.yf-card-enter-active .yf-card-rule { stroke-dashoffset: 0; transition: stroke-dashoffset var(--yf-dur-3) var(--yf-ease); }

/* ---- beat 1a: the date picker and the guest chips ---- */
.yf-day-fromprice { margin-top: -12px; font-size: 13.5px; }
.yf-day-field { margin-bottom: 22px; }
.yf-day-datepicker { margin-bottom: 2px; }
.yf-day-flexlink { margin-top: 4px; }
.yf-day-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 12px; }
.yf-day-grid__weekday { text-align: center; font-size: 11px; font-weight: 700; color: var(--yf-muted); padding-bottom: 6px; }
.yf-day-grid__blank { display: block; }
.yf-day-grid__cell {
  min-height: 44px; padding: 0; border-radius: var(--yf-radius-control); border: 1.5px solid transparent; background: transparent;
  color: var(--yf-ink); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer;
  transition: transform var(--yf-dur-1) var(--yf-ease);
}
.yf-day-grid__cell:hover:not(:disabled) { border-color: var(--yf-line-strong); }
.yf-day-grid__cell:active:not(:disabled) { transform: scale(0.98); }
.yf-day-grid__cell:disabled { color: var(--yf-muted); opacity: 0.35; cursor: default; }
.yf-day-grid__cell.is-selected, .yf-day-grid__cell[aria-pressed="true"] { background: var(--yf-action); color: var(--yf-action-ink); border-color: var(--yf-action); }
@container yf (max-width: 380px) {
  .yf-day-grid { gap: 2px; }
}
/* Seven 44px days need 308px, and the body's 20px gutters leave 280 at 320px wide: the grid takes 14px of each
   gutter, so a day is 44px wide at 320px and the page still has no sideways scroll. */
@container yf (max-width: 359px) {
  .yf-day-grid { gap: 0; margin-inline: -14px; }
}
@container yf (min-width: 560px) {
  .yf-card-place { max-width: 340px; }
  .yf-card-menu { max-width: 380px; }
  .yf-day-grid__cell { min-height: 46px; }
}

/* ---- the beats slide: the old one leaves upward, the new one arrives from below ---- */
.yf-day-beat-enter { opacity: 0; transform: translateY(var(--yf-motion-distance)); }
.yf-day-beat-enter-active { opacity: 1; transform: translateY(0); transition: opacity var(--yf-dur-3) var(--yf-ease), transform var(--yf-dur-3) var(--yf-ease); }
.yf-day-beat-exit { opacity: 1; transform: translateY(0); }
.yf-day-beat-exit-active {
  opacity: 0; transform: translateY(calc(var(--yf-motion-distance) * -1));
  transition: opacity var(--yf-dur-2) var(--yf-ease), transform var(--yf-dur-2) var(--yf-ease);
}

/* ---- beat 1b: the details form ---- */
.yf-details-fields { min-width: 0; margin: 0; padding: 0; border: 0; }
.yf-details-fineprint { margin: 0 0 8px; font-size: 12.5px; color: var(--yf-muted); }
/* The status line keeps its height, so it fades in without moving anything below it. */
.yf-details-status { min-height: 1.4em; margin: 8px 0 0; font-size: 13px; font-weight: 600; color: var(--yf-ok); opacity: 0; transition: opacity var(--yf-dur-2) var(--yf-ease); scroll-margin-bottom: calc(140px + env(safe-area-inset-bottom)); }
.yf-details-status.is-shown { opacity: 1; }
.yf-details-status.is-error { color: var(--yf-danger); }
/* The date message is the one thing a couple must not miss: it scrolls into view clear of the sticky bar. */
.yf-details-steer { margin-top: 16px; padding: 14px 16px; border-radius: var(--yf-radius-control); background: var(--yf-ground-2); scroll-margin-bottom: 140px; }
.yf-details-steer p { margin: 0 0 4px; font-size: 13.5px; color: var(--yf-ink-soft); }
.yf-details-steer p:last-child { margin-bottom: 0; }
.yf-details-steer .yf-details-steer-label { font-weight: 700; color: var(--yf-ink); }
/* A failed send's lines are brought into view the same way, clear of the bar (and of the phone's home indicator). */
.yf-details-fallback { margin-top: 12px; scroll-margin-bottom: calc(140px + env(safe-area-inset-bottom)); }

/* ---- the business's own questions ---- */
.yf-q-item { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.yf-q-item .yf-field { margin-bottom: 8px; }

/* ---- the text-updates consent block ---- */
.yf-consent { margin-bottom: 16px; }
.yf-consent__row { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; }
.yf-consent__row:has(input:not(:disabled)) { cursor: pointer; }
.yf-consent__row input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--yf-line-strong); }
.yf-consent__row span { font-size: 12.5px; line-height: 1.5; color: var(--yf-muted); }
.yf-consent__policy, .yf-consent__note { margin: 6px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--yf-muted); }
.yf-consent__policy .yf-link { font-size: inherit; }

/* ---- the done step ---- */
.yf-done-stage { display: flex; justify-content: center; padding: 22px 16px 28px; margin-bottom: 20px; }
.yf-done-body { margin: 0 0 8px; font-size: 15px; line-height: 1.5; color: var(--yf-ink-soft); max-width: 52ch; text-wrap: pretty; }
.yf-done-heading { margin: 24px 0 0; font-family: var(--yf-font-display); font-weight: var(--yf-weight-display); font-size: 18px; color: var(--yf-ink); }
.yf .yf-done-next { margin: 12px 0 0; padding-left: 1.5em; list-style: decimal; }
.yf .yf-done-next li { padding-left: 4px; margin-bottom: 8px; font-size: 14px; line-height: 1.5; color: var(--yf-ink-soft); }
.yf .yf-done-next li::marker { font-weight: 700; color: var(--yf-ink); }
.yf-done-reserved { margin: 14px 0 0; font-size: 14px; font-weight: 700; color: var(--yf-ink); }
.yf-done-exit { margin: 12px 0 0; }
.yf-done-exit .yf-link { display: inline-flex; align-items: center; min-height: 44px; }

/* ---- the sticky action bar must never cover the control that has focus ---- */
.yf-day-grid__cell, .yf-day-beat .yf-chip, .yf-details-fields :is(input, textarea, button), .yf-consent__row { scroll-margin-bottom: 140px; }

/* ---- forced colours: keep the day buttons' edges, and say which day is chosen ---- */
@media (forced-colors: active) {
  .yf-day-grid__cell { border: 1.5px solid ButtonText; }
  .yf-day-grid__cell:disabled { border-color: GrayText; }
  .yf-day-grid__cell.is-selected, .yf-day-grid__cell[aria-pressed="true"] { border-color: Highlight; }
  .yf-card-place, .yf-card-menu { border: 1.5px solid CanvasText; }
}
