/* Three short stages, with room for the sweet details only when wanted. */
#order-dialog { border-radius: 28px; }
#order-dialog .order-layout { grid-template-columns: 31% minmax(0, 1fr); }
#order-dialog .quiz { padding: 30px 36px 34px; }
#order-dialog .quiz h3 { font-size: clamp(32px, 3vw, 42px); line-height: 1.1; }
#order-dialog .quiz h3 em { font-size: 1.2em; }
#order-dialog .quiz-description { font-size: 14px; line-height: 1.65; margin-bottom: 20px; }
#order-dialog .question-hint, #order-dialog .quiz-preview-note { font-size: 11px; line-height: 1.6; }
.order-steps { display: flex; gap: 14px; margin: 0 0 28px; padding: 0; list-style: none; }
.order-steps li { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.order-steps li > span { display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid #d6b3bd; border-radius: 50%; font-size: 11px; }
.order-steps li.current { color: var(--berry); font-weight: 650; }
.order-steps li.current > span { color: white; background: var(--berry); border-color: var(--berry); box-shadow: 0 3px 8px #8a3f551f; }
.order-steps li.visited > span { color: var(--berry); background: #f4e1e6; }
.order-product-picker { display: grid; gap: 9px; }
.order-product { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; align-items: center; gap: 13px; padding: 10px; border: 1px solid #ddc3c7; border-radius: 20px; background: #fffdfa; transition: border-color .2s, background-color .2s, box-shadow .2s; }
.order-product.is-selected { background: #fbefef; border-color: #b76c83; box-shadow: 0 3px 12px #8a3f550a; }
.order-product > img { display: block; width: 74px; height: 84px; object-fit: cover; border-radius: 13px; }
.order-product-copy { min-width: 0; }
.order-product-copy h4 { margin: 0 0 4px; font-family: var(--serif); font-size: 20px; line-height: 1.1; letter-spacing: -.035em; }
.order-product-copy p { font-size: 13px; color: var(--berry); font-weight: 650; line-height: 1.5; }
.order-product-copy p span { font-size: 11px; font-weight: 400; }
.order-product-copy > small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.order-quantity { display: flex; align-items: center; gap: 3px; width: max-content; border: 1px solid #e1bdc8; background: #fffaf6; padding: 3px; border-radius: 999px; }
.order-quantity button { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; color: var(--berry); background: #f3e0e6; transition: background-color .2s, transform .2s; }
.order-quantity button[data-change="1"] { background: var(--berry); color: #fffaf6; }
.order-quantity button:disabled { opacity: .3; cursor: default; }
.order-quantity button .ui-icon { width: 18px; height: 18px; }
.order-quantity output { display: grid; text-align: center; min-width: 32px; padding: 0 2px; line-height: 1.1; }
.order-quantity output strong { font-family: var(--serif); font-size: 23px; font-weight: 550; }
.order-quantity output span { font-size: 9px; margin-top: 2px; }
.order-box-status { font-size: 12px; color: var(--berry); font-weight: 600; padding: 12px 2px 0; line-height: 1.5; }
.order-flavor .question { margin-top: 23px; }
#order-dialog .question-title { font-size: 13px; }
#order-dialog .choices { display: flex; flex-wrap: wrap; gap: 7px; }
#order-dialog .choice { gap: 7px; align-items: center; border-radius: 999px; padding: 9px 13px; min-height: 42px; font-size: 12px; border-color: #c9a4af; }
#order-dialog .choice input { margin: 0; width: 13px; height: 13px; }
#order-dialog .other-input { border-radius: 13px; font-size: 14px; }
#order-dialog .quiz-actions { margin-top: 24px; }
#order-dialog .quiz-actions .button { margin-left: auto; min-height: 48px; font-size: 13px; padding: 12px 22px; }
#order-dialog .quiz-actions .text-link { border-radius: 999px; font-size: 12px; }
#order-dialog #quiz-error { font-size: 13px; line-height: 1.5; }
.order-pickup h4 { font-size: 14px; font-weight: 650; }
.order-pickup .calendar { margin-top: 12px; border-radius: 19px; border-color: #d8bac3; background: #fffdf9; }
.calendar-preview-note { color: var(--berry); font-size: 11px; margin-top: 6px; }
.order-pickup .date-selection { border-radius: 999px; padding: 10px 14px; font-size: 12px; background: #f4e2e6; }
#order-dialog .field { font-size: 12px; }
#order-dialog .field input, #order-dialog .field textarea { border-radius: 13px; font-size: 15px; }
.order-contact { margin-top: 24px; }
.order-extras { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line); }
.order-extras-label { font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.order-extras-label span { display: block; color: var(--muted); font-size: 11px; font-weight: 400; margin-top: 3px; }
.order-details { border: 1px solid #dbc0c8; border-radius: 16px; background: #fffdf9; margin-top: 9px; overflow: clip; }
.order-details > summary { display: flex; gap: 10px; align-items: center; padding: 15px 16px; cursor: pointer; list-style: none; }
.order-details > summary::-webkit-details-marker { display: none; }
.order-details > summary > span:first-child { min-width: 0; flex: 1; }
.order-details summary strong { display: block; font-size: 13px; font-weight: 600; }
.order-details summary small { display: block; font-size: 10px; color: var(--muted); line-height: 1.5; margin-top: 4px; }
.detail-status { align-self: center; padding: 4px 7px; border-radius: 999px; background: #f7e9ed; color: var(--berry); font-size: 9px; }
.order-details summary > .ui-icon { width: 18px; height: 18px; color: var(--berry); flex-shrink: 0; transition: transform .2s; }
.order-details[open] summary > .ui-icon { transform: rotate(45deg); }
.order-details[open] > summary { background: #f9ecef; }
.order-details-body { padding: 0 16px 20px; }
#order-dialog .upload-box { border-radius: 15px; font-size: 13px; }
#order-dialog .upload-box > label { cursor: pointer; }
#order-dialog .upload-box span { font-size: 11px; }
#order-dialog .file-previews img { border-radius: 12px; }
#order-dialog .file-previews button { border-radius: 50%; width: 26px; height: 26px; }
.order-review-card { border: 1px solid #ddc3c7; border-radius: 20px; background: #fffdfa; padding: 17px; margin-top: 13px; }
.review-card-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.review-card-title h4 { font-family: var(--serif); font-size: 22px; letter-spacing: -.025em; font-weight: 550; }
.order-edit { color: var(--berry); border: 1px solid #d6aab8; border-radius: 999px; background: #fffaf6; padding: 7px 11px; font-size: 11px; min-height: 36px; }
.review-bakes { list-style: none; margin: 0; padding: 0; }
.review-bakes li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; font-size: 12px; border-top: 1px solid #ead8d9; }
.review-bakes li > span:last-child { text-align: right; white-space: nowrap; }
.review-bakes strong { display: block; font-size: 12px; font-weight: 600; }
.review-bakes small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.review-flavor { border-top: 1px solid #ead8d9; padding-top: 10px; margin-top: 8px; color: var(--muted); font-size: 12px; }
#order-dialog .order-review-card .review-line { grid-template-columns: 95px 1fr; font-size: 12px; padding: 8px 0; }
#order-dialog .order-review-card .review-line dt { font-size: 11px; }
#order-dialog .order-review-card .review-line:last-child { border-bottom: 0; }
.review-extra-details { margin-top: 12px; border-top: 1px solid #ead8d9; padding-top: 12px; }
.review-extra-details summary { cursor: pointer; color: var(--berry); font-size: 12px; }
#order-dialog .acknowledgement { border-radius: 16px; font-size: 12px; line-height: 1.6; }
#order-dialog .order-summary h2 { font-size: 38px; }
#order-dialog .cart-row strong { font-size: 13px; }
#order-dialog .cart-row small, #order-dialog .quote-note { font-size: 10px; }
#order-dialog .cart-row .order-quantity { margin-top: 10px; }
#order-dialog .cart-row .order-quantity button { width: 44px; height: 44px; }
#order-dialog .cart-row .order-quantity output strong { font-size: 21px; }
#order-dialog .cart-price { font-size: 12px; }
#order-dialog .empty-cart { font-size: 13px; line-height: 1.7; }
#order-dialog .quiz h3:focus { outline: none; }
#order-dialog button:focus-visible, #order-dialog summary:focus-visible, #order-dialog input:focus-visible, #order-dialog textarea:focus-visible { outline: 2px solid var(--berry); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  .order-quantity button:not(:disabled):hover { transform: translateY(-2px); }
  .order-details > summary:hover { background: #fbf0f2; }
  .order-edit:hover { background: #f7e6eb; }
}
.order-quantity button:not(:disabled):active { transform: scale(.91); }
@media (max-width: 1000px) and (min-width: 761px) {
  #order-dialog .quiz { padding: 25px; }
  .order-product { grid-template-columns: 64px minmax(0, 1fr); gap: 10px; }
  .order-product > img { width: 64px; height: 88px; grid-row: 1 / 3; }
  .order-product > .order-quantity { grid-column: 2; }
}
@media (max-width: 760px) {
  #order-dialog { border-radius: 0; }
  #order-dialog .quiz { order: 0; padding: 24px 20px 30px; }
  #order-dialog .order-summary { order: 1; padding: 24px 22px 35px; }
  #order-dialog .order-layout:has(.order-product-picker) .order-summary { display: none; }
  #order-dialog .order-summary h2 { font-size: 28px; }
  #order-dialog .quiz h3 { font-size: 34px; }
  #order-dialog .quiz-description { font-size: 13px; }
  .order-steps { justify-content: space-between; gap: 6px; margin-bottom: 24px; }
  .order-steps li { font-size: 11px; gap: 5px; }
  .order-steps li > span { width: 23px; height: 23px; font-size: 10px; }
  .order-product { grid-template-columns: 64px minmax(0, 1fr); gap: 6px 12px; padding: 10px; }
  .order-product > img { width: 64px; height: 95px; grid-row: 1 / 3; }
  .order-product-copy h4 { font-size: 20px; }
  .order-product-copy p { font-size: 12px; }
  .order-product-copy > small { display: none; }
  .order-product > .order-quantity { grid-column: 2; }
  .order-quantity button { width: 44px; height: 44px; }
  .order-quantity output strong { font-size: 21px; }
  #order-dialog .choice { font-size: 12px; padding: 9px 12px; }
  #order-dialog .field input, #order-dialog .field textarea, #order-dialog .other-input { font-size: 16px; }
  .order-details > summary { padding: 14px 12px; }
  .order-details-body { padding-left: 12px; padding-right: 12px; }
  .detail-status { display: none; }
  .review-card-title h4 { font-size: 21px; }
  .review-bakes li { font-size: 11px; }
  .order-review-card { padding: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  #order-dialog .order-product, #order-dialog .order-quantity button, #order-dialog .order-details summary > .ui-icon { transition: none; }
}

/* Keep the next sweet step in reach while browsing the form. */
#order-dialog .quiz-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  padding: 14px 0 12px;
  border-top: 1px solid #e4ccd2;
  background: var(--ivory);
}
#order-dialog .preview-pill { border-radius: 999px; }
