.checkout[hidden],
.checkout-state[hidden],
.checkout__notice[hidden],
.support-box[hidden] {
  display: none !important;
}

.checkout {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
}

.checkout__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(11, 18, 32, .78);
  backdrop-filter: blur(8px);
  cursor: default;
}

.checkout__panel {
  position: relative;
  width: min(760px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: var(--paper3);
  border: 2px solid var(--ink);
  border-radius: 3px;
  box-shadow: 12px 12px 0 rgba(0, 0, 0, .5);
  padding: 28px;
}

.checkout__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  margin-bottom: 22px;
  border-bottom: 1px dashed rgba(21, 21, 22, .28);
}

.checkout__header h2 {
  margin-top: 8px;
  font-size: clamp(28px, 5vw, 42px);
}

.checkout__close {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 2px solid var(--ink);
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.checkout__notice {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(196, 51, 27, .45);
  background: rgba(196, 51, 27, .08);
  color: var(--red);
  font-size: 14px;
}

.checkout__lead {
  color: var(--muted);
  margin-bottom: 22px;
}

.field {
  display: block;
  margin-bottom: 8px;
  font-family: 'Roboto Mono', monospace;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.input {
  width: 100%;
  height: 54px;
  padding: 0 15px;
  border: 2px solid var(--ink);
  border-radius: 2px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  outline: none;
}

.input:focus {
  box-shadow: 0 0 0 4px rgba(36, 86, 199, .18);
  border-color: var(--blue);
}

.order-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin: 20px 0;
  padding: 16px 0;
  border-top: 1px dashed var(--line);
  border-bottom: 1px dashed var(--line);
}

.order-total strong {
  color: var(--orange);
  font-family: 'Oswald', sans-serif;
  font-size: 32px;
}

.checkout__submit {
  width: 100%;
}

.checkout__submit:disabled {
  cursor: wait;
  opacity: .7;
}

.checkout__fineprint {
  margin-top: 18px;
  color: var(--muted);
  font-size: 12.5px;
}

.payment-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 11px;
  background: rgba(36, 86, 199, .09);
  color: var(--navy2);
  font-family: 'Roboto Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 0 rgba(226, 82, 28, .5);
  animation: checkout-pulse 1.6s infinite;
}

@keyframes checkout-pulse {
  70% { box-shadow: 0 0 0 8px rgba(226, 82, 28, 0); }
  100% { box-shadow: 0 0 0 0 rgba(226, 82, 28, 0); }
}

.countdown {
  margin: 12px 0 20px;
  color: var(--muted);
  font-size: 14px;
}

.countdown strong {
  color: var(--ink);
  font-family: 'Roboto Mono', monospace;
}

.payment-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
}

.qr-card {
  min-height: 260px;
  display: grid;
  place-items: center;
  padding: 10px;
  background: #fff;
  border: 2px solid var(--ink);
}

.qr-card img {
  display: block;
  width: 100%;
  height: auto;
}

.bank-details {
  border-top: 1px solid var(--line);
}

.bank-details > div {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.bank-details dt {
  margin-bottom: 3px;
  color: var(--muted);
  font-family: 'Roboto Mono', monospace;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.bank-details dd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 700;
}

.bank-details dd span {
  overflow-wrap: anywhere;
}

.bank-details button {
  flex: 0 0 auto;
  border: 0;
  border-bottom: 1px solid var(--navy2);
  background: transparent;
  color: var(--navy2);
  font-family: inherit;
  font-size: 11px;
  cursor: pointer;
}

.bank-details .memo {
  margin-top: 4px;
  padding: 13px 12px;
  border: 2px solid var(--orange);
  background: rgba(226, 82, 28, .07);
}

.bank-details .memo dd span {
  color: var(--orange);
  font-family: 'Roboto Mono', monospace;
  font-size: 24px;
  letter-spacing: .12em;
}

.memo-warning {
  margin-top: 18px;
  padding: 12px 14px;
  background: var(--navy);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

.help-link {
  margin-top: 14px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.support-box {
  margin-top: 12px;
  padding: 12px 14px;
  background: rgba(19, 44, 92, .06);
  font-size: 13px;
}

.checkout-result {
  max-width: 540px;
  margin: 0 auto;
  padding: 28px 0;
  text-align: center;
}

.checkout-result h2 {
  margin: 12px 0;
  font-size: clamp(30px, 5vw, 44px);
}

.checkout-result > p:not(.checkout__fineprint) {
  color: var(--muted);
}

.result-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  box-shadow: 5px 5px 0 var(--ink);
  font-family: 'Oswald', sans-serif;
  font-size: 42px;
}

.result-icon--expired {
  background: var(--orange);
}

.download-button {
  width: 100%;
  margin-top: 24px;
}

.download-button[aria-disabled="true"] {
  pointer-events: none;
  opacity: .55;
}

body.checkout-open {
  overflow: hidden;
}

.privacy-link {
  margin-top: 8px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: rgba(242, 233, 216, .7);
  font: inherit;
  font-size: 11.5px;
  cursor: pointer;
}

.cookie-consent {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 120;
  width: min(520px, calc(100vw - 40px));
  padding: 18px;
  border: 2px solid var(--ink);
  border-radius: 3px;
  background: var(--paper3);
  color: var(--ink);
  box-shadow: 7px 7px 0 rgba(21, 21, 22, .35);
}

.cookie-consent[hidden] {
  display: none;
}

.cookie-consent strong {
  display: block;
  font-family: 'Oswald', sans-serif;
  font-size: 18px;
  text-transform: uppercase;
}

.cookie-consent p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.cookie-consent__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.cookie-consent__actions button {
  min-height: 40px;
  padding: 8px 13px;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  font-family: 'Oswald', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  cursor: pointer;
}

.cookie-consent__decline {
  background: transparent;
  color: var(--ink);
}

.cookie-consent__accept {
  background: var(--navy);
  color: #fff;
}

@media (max-width: 680px) {
  .checkout {
    padding: 0;
    place-items: end center;
  }

  .checkout__panel {
    width: 100%;
    max-height: 94dvh;
    padding: 22px 18px calc(22px + env(safe-area-inset-bottom));
    border-radius: 8px 8px 0 0;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, .35);
  }

  .payment-grid {
    grid-template-columns: 1fr;
  }

  .qr-card {
    width: min(280px, 100%);
    min-height: 0;
    margin: 0 auto;
  }

  .cookie-consent {
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    width: calc(100vw - 24px);
    padding: 16px;
  }

  .cookie-consent__actions {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
  }
}
