/* artCode shop - checkout. Loaded only by the checkout. */

/* ---------- layout of the page ---------- */
[hidden]:where(:not([hidden="until-found"])) { display: none; }   /* as in shop.css: hidden wins over the styles above */
.panel { border-radius: 24px; background-color: #fff; padding: 1.5rem; }
.checkout-wrap { padding-top: 2.5rem; padding-bottom: 2.5rem; }
/* minmax(0, ...): a column never grows past the screen because of a long line that does not wrap (a link for the tag) */
.checkout-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; align-items: flex-start; }
.form-group { display: grid; gap: 1.25rem; }
.form-group--cols { display: grid; gap: 1.25rem; align-items: start; }   /* a field with a hint does not stretch its neighbour */
.field__optional { font-weight: 400; }
.input--area { min-height: 96px; }
select.input { appearance: none; padding-right: 2.25rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23161316' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .75rem center; background-size: 1rem; }
/* what is asked only to who wants an invoice */
.invoice-box { display: grid; gap: 1.25rem; margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.invoice-box[hidden], .invoice-box [hidden] { display: none; }
.choice-row { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; }
/* the note of the payment: the mark of who takes it, then the words */
.pay-note { display: flex; align-items: center; gap: .875rem; }
.pay-note__logo { flex: none; width: auto; height: 28px; }
.notice { border-radius: .75rem; padding-left: 1rem; padding-right: 1rem; padding-top: .75rem; padding-bottom: .75rem; }
.consent { display: flex; align-items: flex-start; gap: .75rem; }
.consent__box { width: 1.25rem; height: 1.25rem; accent-color: #d20085; }
.summary-line { display: flex; gap: 1rem; padding-top: .75rem; padding-bottom: .75rem; border-bottom-width: 1px; border-color: var(--line); }
.summary-line__media { position: relative; flex: none; }
.summary-line__img { width: 4rem; height: 4rem; border-radius: .75rem; object-fit: cover; background-color: #efefef; }
.summary-line__body { min-width: 0; flex: 1 1 0%; }
.summary-line__name { font-weight: 700; line-height: 1.25; }
.summary-row { display: flex; justify-content: space-between; padding-top: 1rem; }
.summary-row--tight { display: flex; justify-content: space-between; padding-top: .5rem; }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 1rem; border-top-width: 1px; border-color: var(--line); }
@media (min-width: 640px) {
  .panel { padding: 2rem; }
  .checkout-wrap { padding-top: 4rem; padding-bottom: 4rem; }
  .form-group--cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field--wide { grid-column: span 2 / span 2; }
}
@media (min-width: 1024px) {
  .checkout-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 3rem; }
}
/* returns page: the rules, as plain reading text */
.rules p { margin-bottom: 1rem; }
/* a plain table inside a legal page: it scrolls sideways on a phone instead of breaking the page */
.table-scroll { overflow-x: auto; margin-bottom: 1rem; }
.plain-table { width: 100%; min-width: 34rem; border-collapse: collapse; font-size: .875rem; }
.plain-table th, .plain-table td { text-align: left; vertical-align: top; padding: .625rem .75rem .625rem 0; border-bottom: 1px solid var(--line); }
.plain-table th { font-weight: 700; }
/* terms of sale: one column of reading text, numbered steps included */
.terms h2 { margin-top: 2rem; }
.terms h2:first-child { margin-top: 0; }
.rules ol { list-style: decimal; padding-left: 1.25rem; margin-bottom: 1rem; display: grid; gap: .5rem; }
.terms ul { margin-bottom: 1rem; }
.rules ul { list-style: disc; padding-left: 1.25rem; margin-bottom: 2rem; display: grid; gap: .5rem; }
.rules ul:last-child, .rules p:last-child { margin-bottom: 0; }
.form-error { color: var(--error); font-size: .875rem; font-weight: 600; }   /* message of the server when the order is refused */

/* ---------- page of an order (/ordini/<uuid>): status and steps in a row, as on hypesafari ---------- */
.order-status { font-size: 1.5rem; line-height: 2rem; font-weight: 800; letter-spacing: -.025em; }
.order-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin-bottom: 2.5rem; }
.order-steps__step { position: relative; display: grid; justify-items: center; align-content: start; gap: .5rem; text-align: center; font-size: .8125rem; font-weight: 700; color: var(--muted); }
/* the line that joins a step to the one before it */
.order-steps__step + .order-steps__step::before { content: ""; position: absolute; top: 17px; right: calc(50% + 22px); width: calc(100% - 44px); height: 2px; background: var(--line); }
.order-steps__step.is-done + .order-steps__step::before { background: var(--ok); }
.order-steps__dot { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-pill); border: 2px solid var(--line); background: var(--paper); font-family: var(--font-mono); font-size: .875rem; }
.order-steps__dot svg { width: 18px; height: 18px; }
.order-steps__when { font-family: var(--font-mono); font-size: .625rem; font-weight: 400; }
.order-steps__step.is-done, .order-steps__step.is-now { color: var(--ink); }
.order-steps__step.is-done .order-steps__dot { border-color: var(--ok); background: var(--ok); color: #fff; }
.order-steps__step.is-now .order-steps__dot { border-color: var(--ac-magenta); background: var(--ac-magenta); color: #fff; }
@media (min-width: 640px) {
  .order-steps { margin-bottom: 3rem; }
  .order-steps__step { font-size: .875rem; }
  .order-steps__when { font-size: .75rem; }
}
