body.has-checkout-modal { overflow: hidden; }

.book-checkout-cta {
  position: relative;
  padding: 92px 0;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 85% 5%, rgb(252 177 27 / 24%), transparent 28%),
    linear-gradient(125deg, #17132f, #3d315f 60%, #5a255c);
}

.book-checkout-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(330px, .85fr);
  gap: 65px;
  align-items: center;
}

.book-checkout-copy h2 { max-width: 690px; margin-bottom: 17px; color: #fff; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.65rem, 5vw, 4.8rem); }
.book-checkout-copy > p:not(.book-eyebrow) { max-width: 650px; color: rgb(255 255 255 / 78%); font-size: 18px; }
.checkout-actions { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 30px; }
.checkout-primary { min-width: 155px; justify-content: center; }
.checkout-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 22px;
  color: #fff;
  background: transparent;
  border: 1px solid rgb(255 255 255 / 38%);
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
}
.checkout-secondary:hover,
.checkout-secondary:focus { color: #17132f; background: #fff; }

.book-checkout-preview {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 18px 14px;
  padding: 30px;
  background: rgb(255 255 255 / 9%);
  border: 1px solid rgb(255 255 255 / 13%);
  border-radius: 23px;
  box-shadow: 0 24px 55px rgb(0 0 0 / 18%);
}
.checkout-preview-number { display: grid; width: 46px; height: 46px; color: #17132f; background: #fcb11b; border-radius: 50%; font-weight: 900; place-items: center; }
.book-checkout-preview strong { display: block; color: #fff; }
.book-checkout-preview small { color: rgb(255 255 255 / 63%); }

.checkout-modal[hidden] { display: none; }
.checkout-modal { position: fixed; inset: 0; z-index: 10000; display: grid; padding: 22px; place-items: center; }
.checkout-backdrop { position: absolute; inset: 0; background: rgb(4 8 24 / 76%); backdrop-filter: blur(7px); }
.checkout-dialog {
  position: relative;
  z-index: 1;
  width: min(900px, 100%);
  max-height: calc(100vh - 44px);
  overflow: auto;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 35px 90px rgb(0 0 0 / 35%);
}
.checkout-close { position: absolute; top: 18px; right: 18px; z-index: 3; display: grid; width: 42px; height: 42px; color: #3d315f; background: #f3f1f7; border: 0; border-radius: 50%; cursor: pointer; place-items: center; }
.checkout-dialog-head { display: flex; justify-content: space-between; align-items: end; gap: 30px; padding: 33px 38px 25px; border-bottom: 1px solid #e6e9ef; }
.checkout-dialog-head h2 { margin: 0; color: #3d315f; font-size: 31px; }
.checkout-dialog-head .public-kicker { margin-bottom: 4px; }
.checkout-progress { display: flex; gap: 7px; padding-right: 48px; }
.checkout-progress span { display: grid; width: 31px; height: 31px; color: #7a8495; background: #eef1f5; border-radius: 50%; font-size: 13px; font-weight: 800; place-items: center; }
.checkout-progress span.is-active { color: #17132f; background: #fcb11b; }

.checkout-step { padding: 32px 38px 38px; }
.checkout-step[hidden] { display: none; }
.checkout-step-title { display: flex; gap: 14px; margin-bottom: 26px; align-items: flex-start; }
.checkout-step-title > span { display: grid; flex: 0 0 41px; width: 41px; height: 41px; color: #17132f; background: #fcb11b; border-radius: 50%; font-weight: 900; place-items: center; }
.checkout-step-title h3 { margin: 0 0 4px; color: #3d315f; font-size: 25px; }
.checkout-step-title p { margin: 0; color: #687286; }
.checkout-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.checkout-full { grid-column: 1 / -1; }
.checkout-field label { display: block; margin-bottom: 7px; color: #26324b; font-weight: 800; }
.checkout-field label span { font-weight: 400; }
.checkout-field input,
.checkout-field select,
.checkout-field textarea {
  width: 100%;
  min-height: 49px;
  padding: 11px 13px;
  color: #17213a;
  background: #fff;
  border: 1px solid #ced5e1;
  border-radius: 9px;
  font: inherit;
}
.checkout-field input:focus,
.checkout-field select:focus,
.checkout-field textarea:focus { border-color: #3d315f; box-shadow: 0 0 0 3px rgb(61 49 95 / 12%); outline: 0; }
.checkout-field small { display: block; margin-top: 5px; color: #687286; }
.checkout-error { min-height: 23px; margin: 15px 0 0; color: #b42318; font-weight: 700; }
.checkout-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 25px; }
.checkout-back { display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; color: #3d315f; background: #f2f0f6; border: 0; border-radius: 999px; font-weight: 800; cursor: pointer; }

.checkout-format-options,
.checkout-payment-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 21px; }
.checkout-choice,
.payment-choice { position: relative; display: block; cursor: pointer; }
.checkout-choice input,
.payment-choice input { position: absolute; opacity: 0; pointer-events: none; }
.checkout-choice > span,
.payment-choice > span { display: flex; min-height: 115px; padding: 21px; flex-direction: column; align-items: flex-start; background: #f7f8fb; border: 2px solid transparent; border-radius: 16px; transition: .2s ease; }
.checkout-choice i,
.payment-choice i { margin-bottom: 12px; color: #5a255c; font-size: 25px; }
.checkout-choice strong,
.payment-choice strong { color: #3d315f; font-size: 18px; }
.checkout-choice small,
.payment-choice small { color: #687286; }
.checkout-choice input:checked + span,
.payment-choice input:checked + span { background: #fffaf0; border-color: #fcb11b; box-shadow: 0 11px 30px rgb(61 49 95 / 10%); }
.payment-choice.is-disabled { cursor: not-allowed; opacity: .48; }
.checkout-delivery-note { padding: 15px 17px; color: #3d315f; background: #f3f0f8; border-radius: 12px; }

.checkout-review { display: grid; gap: 1px; overflow: hidden; background: #e3e7ee; border: 1px solid #e3e7ee; border-radius: 15px; }
.checkout-review-row { display: grid; grid-template-columns: 180px 1fr; gap: 14px; padding: 14px 17px; background: #fff; }
.checkout-review-row span { color: #687286; }
.checkout-review-row strong { color: #27324b; text-align: right; }

.payment-details { min-height: 105px; margin: 4px 0 22px; padding: 20px; background: #f7f5fa; border: 1px solid #e1dce8; border-radius: 14px; }
.payment-details h4 { margin: 0 0 11px; color: #3d315f; }
.payment-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; }
.payment-detail-grid span { color: #687286; font-size: 13px; }
.payment-detail-grid strong { display: block; color: #17213a; }
.payment-config-note { color: #8a1720; font-weight: 700; }
.checkout-proof-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.checkout-consent { display: flex; gap: 10px; margin-top: 18px; align-items: flex-start; color: #39445b; }
.checkout-consent input { margin-top: 5px; }
.checkout-future-payments { margin: 15px 0 0; color: #687286; font-size: 14px; }

.checkout-thank-you { padding: 55px 38px; text-align: center; }
.thank-you-icon { display: grid; width: 78px; height: 78px; margin: 0 auto 20px; color: #fff; background: #21845a; border-radius: 50%; font-size: 32px; place-items: center; }
.checkout-thank-you h3 { color: #3d315f; font-size: 31px; }
.checkout-thank-you > p { max-width: 610px; margin-right: auto; margin-left: auto; }
.purchase-reference { display: inline-block; margin: 12px 0 25px; padding: 13px 18px; color: #3d315f; background: #fff4d8; border-radius: 10px; font-size: 21px; letter-spacing: .03em; }
.thank-you-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 11px; }
.thank-you-actions .checkout-secondary { color: #3d315f; border-color: #cfc8db; }
.email-delivery-note { color: #687286; font-size: 14px; }

.tracking-dialog { width: min(760px, 100%); }
.tracking-dialog form { padding: 30px 38px; }
.tracking-result { margin: 0 38px 38px; padding: 23px; background: #f7f8fb; border-radius: 15px; }
.tracking-result h3 { color: #3d315f; }
.tracking-status { display: inline-block; margin-bottom: 12px; padding: 8px 13px; color: #173b2c; background: #dff5e9; border-radius: 999px; font-weight: 800; }
.tracking-timeline { margin: 22px 0 0; padding: 0; list-style: none; }
.tracking-timeline li { position: relative; margin-left: 10px; padding: 0 0 18px 23px; border-left: 2px solid #d7dce5; }
.tracking-timeline li::before { position: absolute; top: 2px; left: -7px; width: 12px; height: 12px; content: ""; background: #fcb11b; border-radius: 50%; }
.tracking-timeline strong { display: block; color: #3d315f; }
.tracking-timeline small { color: #687286; }

@media (max-width: 991px) {
  .book-checkout-shell { grid-template-columns: 1fr; gap: 35px; }
}

@media (max-width: 650px) {
  .book-checkout-cta { padding: 68px 0; }
  .checkout-modal { padding: 0; align-items: end; }
  .checkout-dialog { max-height: 94vh; border-radius: 22px 22px 0 0; }
  .checkout-dialog-head { display: block; padding: 27px 23px 20px; }
  .checkout-progress { margin-top: 16px; padding-right: 0; }
  .checkout-step { padding: 25px 23px 30px; }
  .checkout-grid,
  .checkout-format-options,
  .checkout-payment-options,
  .checkout-proof-row,
  .payment-detail-grid { grid-template-columns: 1fr; }
  .checkout-review-row { grid-template-columns: 1fr; gap: 2px; }
  .checkout-review-row strong { text-align: left; }
  .checkout-nav { align-items: stretch; flex-direction: column-reverse; }
  .checkout-nav > * { justify-content: center; }
  .tracking-dialog form { padding: 25px 23px; }
  .tracking-result { margin: 0 23px 28px; }
}

