/* ==========================================================================
   Checkout modal — $199 Self-Study (Pin Payments hosted fields)
   Same fixed-overlay pattern and look as the Amex popups (see amex-popup.css).
   ========================================================================== */

.checkout-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.checkout-modal.is-open { display: flex; }

.checkout-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(4, 9, 20, 0.78);
  backdrop-filter: blur(3px);
}

.checkout-modal__card {
  position: relative;
  width: 92%;
  max-width: 440px;
  max-height: 92vh;
  overflow-y: auto;
  background: linear-gradient(165deg, #14284a 0%, #0a1830 55%, #060f1e 100%);
  border: 1px solid rgba(217, 195, 138, 0.25);
  border-radius: 20px;
  padding: 32px 30px 26px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  color: #fff;
  animation: checkoutIn 0.25s ease-out;
}
@keyframes checkoutIn {
  0%   { opacity: 0; transform: translateY(12px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.checkout-modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.checkout-modal__close:hover { color: #fff; }

.checkout-modal__eyebrow {
  margin: 0 0 4px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(217, 195, 138, 0.85);
}
.checkout-modal__title {
  margin: 0 0 6px;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 600;
  font-size: 26px;
  line-height: 1.2;
  background-image: linear-gradient(160deg, #c9a84c 10%, #e4be5b 50%, #c9a84c 90%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.checkout-modal__price {
  margin: 0 0 20px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.72);
}
.checkout-modal__price b { color: #fff; font-size: 16px; }

.checkout-modal__includes {
  margin: -12px 0 20px;
  font-size: 13.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.72);
}
.checkout-modal__includes:empty { display: none; }

.checkout-field { margin-bottom: 14px; }
.checkout-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.72);
}
.checkout-field input[type="email"],
.checkout-field input[type="text"],
.checkout-hosted {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  font-size: 15px;
  box-sizing: border-box;
}
.checkout-field input:focus { outline: 2px solid rgba(228, 190, 91, 0.7); outline-offset: 0; }
/* Pin hosted-field containers: the iframe fills the box, so give it the same look as the inputs. */
.checkout-hosted { padding: 0 8px; }
.checkout-hosted iframe { height: 42px !important; }
.checkout-row { display: flex; gap: 12px; }
.checkout-row .checkout-field { flex: 1; min-width: 0; }

.checkout-error {
  min-height: 0;
  margin: 0 0 12px;
  font-size: 13px;
  color: #ff9d9d;
}
.checkout-error:empty { display: none; }
.checkout-field .checkout-error { margin: 5px 0 0; font-size: 12px; }

.checkout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 15px 20px;
  border: none;
  border-radius: 14px;
  background-image: linear-gradient(200.59deg, rgb(208, 195, 161) 9.28%, rgb(201, 168, 76) 49.7%, rgb(171, 143, 56) 90.12%);
  color: #1a1204;
  font-family: inherit;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
}
.checkout-btn { text-decoration: none; box-sizing: border-box; }
.checkout-btn:hover { filter: brightness(1.06); }
.checkout-btn[disabled] { opacity: 0.6; cursor: wait; filter: none; }

.checkout-modal__fine a { color: rgba(228, 190, 91, 0.9); }
.checkout-modal__fine {
  margin: 14px 0 0;
  font-size: 11.5px;
  line-height: 1.5;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
}

/* ---------- Success state ---------- */
.checkout-success { display: none; text-align: center; }
.checkout-modal.is-done .checkout-form { display: none; }
.checkout-modal.is-done .checkout-success { display: block; }
.checkout-success p { margin: 0 0 14px; font-size: 14.5px; line-height: 1.6; color: rgba(255, 255, 255, 0.78); }
.checkout-creds {
  margin: 16px 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(217, 195, 138, 0.25);
  text-align: left;
  font-size: 14px;
}
.checkout-creds div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; word-break: break-all; }
.checkout-creds span { color: rgba(255, 255, 255, 0.55); }
.checkout-creds b { font-family: Consolas, monospace; font-size: 15px; }

.checkout-done-second { display: block; margin-top: 12px; text-align: center; font-size: 14px; color: #e4be5b; text-decoration: underline; }

/* Stripe hand-off note under the button */
.checkout-modal__note { margin: 12px 0 0; font-size: 13px; line-height: 1.5; text-align: center; color: rgba(255, 255, 255, 0.72); }
