/* ==========================================================================
   Page: checkout (booking, payment, payment done)
   ========================================================================== */

/* Checkout journey: enroll.html (الحجز) → payment.html (الدفع) → payment-success.html (تم الدفع).
   These pages use their own minimal chrome (layout: bare): checkout header, page, small footer. */

.checkout-page {
  --co-line: #E6EEF5;
  --co-input-border: #B8CCDD;
  --co-panel-border: #E1EAF2;
  --co-error: #B42318;
  --co-error-ink: #8F1D14;
  --co-error-bg: #FDF3F3;
  --co-error-border: #E5A3A3;
  --co-error-line: #F1D2D2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--c-pale-2);
  line-height: normal; /* the design sets line-height only where it matters */
}
.checkout-page > main { flex-grow: 1; }

/* Content width of every checkout block: 1120px + side padding */
.checkout-wrap {
  width: 100%;
  max-width: 1120px; /* page content: 1056px + side padding */
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.checkout-wrap--wide { max-width: calc(1120px + 2 * var(--gutter)); } /* header and footer */

/* 1. Header --------------------------------------------------------------- */
.checkout-header { background: var(--c-white); border-bottom: 1px solid var(--c-border); }
.checkout-header__inner {
  height: 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 24px;
}
.checkout-brand { justify-self: start; display: flex; align-items: center; gap: 10px; text-decoration: none; }
.checkout-brand__mark { width: 44px; height: 44px; }
.checkout-brand__name { font-family: var(--font-head); font-size: 18px; font-weight: 900; color: var(--c-navy); white-space: nowrap; }

.checkout-steps { list-style: none; display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; line-height: normal; }
.checkout-step { display: flex; align-items: center; gap: 8px; color: var(--c-text-3); }
.checkout-step + .checkout-step::before {
  content: "";
  width: 36px;
  height: 2px;
  margin-inline-end: 2px;
  border-radius: 2px;
  background: var(--c-border);
}
.checkout-step__dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-mist);
  color: var(--c-text-3);
  font-size: 13px;
  font-weight: 800;
}
.checkout-step--done { color: var(--c-success-ink); }
.checkout-step--done .checkout-step__dot { background: var(--c-success-bg); color: var(--c-success-ink); }
.checkout-step--current { color: var(--c-navy); }
.checkout-step--current .checkout-step__dot { background: var(--c-primary); color: var(--c-white); }
.checkout-step--done + .checkout-step::before,
.checkout-step--done + .checkout-step--current::before { background: var(--c-primary); }

.checkout-header__aside { justify-self: end; display: flex; align-items: center; gap: 18px; font-size: 14px; }
.checkout-secure { display: flex; align-items: center; gap: 6px; color: var(--c-text-2); font-weight: 600; }
.checkout-secure svg { color: var(--c-success); }
.checkout-header__sep { width: 1px; height: 20px; background: var(--c-border); }
.checkout-help { min-height: 44px; display: flex; align-items: center; gap: 6px; color: var(--c-success); font-weight: 700; text-decoration: none; }
.checkout-help:hover { color: var(--c-success-ink); text-decoration: underline; }
.checkout-header__mstep { display: none; }

@media (max-width: 1000px) {
  .checkout-header__inner { grid-template-columns: auto minmax(0, 1fr) auto; }
  .checkout-steps { justify-self: center; }
  .checkout-secure, .checkout-header__sep { display: none; }
}
@media (max-width: 820px) {
  .checkout-header__inner { height: 56px; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
  .checkout-brand { gap: 8px; }
  .checkout-brand__mark { width: 32px; height: 32px; }
  .checkout-brand__name { font-size: 16px; }
  .checkout-steps, .checkout-header__aside { display: none; }
  .checkout-header__mstep { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--c-text-2); white-space: nowrap; }
  .checkout-header__mstep svg { color: var(--c-success); }
}

/* 2. Page layout ------------------------------------------------------------ */
.checkout-main { padding-block: 28px 72px; display: flex; flex-direction: column; gap: 24px; }
.checkout-head { display: flex; flex-direction: column; gap: 8px; }
.checkout-back {
  align-self: flex-start;
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--c-primary);
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: none;
}
.checkout-back:hover { text-decoration: underline; }
.checkout-title { font-size: 32px; font-weight: 800; line-height: 1.35; }
.checkout-lead { font-size: 16px; line-height: 1.7; color: var(--c-text-2); }

.checkout-layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 32px; align-items: start; }
.checkout-layout__aside { position: sticky; top: 24px; }

.checkout-card {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-xl);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.checkout-card--pay { gap: 22px; }

@media (max-width: 900px) {
  .checkout-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .checkout-layout__aside { position: static; order: -1; }
}
@media (max-width: 720px) {
  .checkout-main { padding-block: 16px 40px; gap: 18px; }
  .checkout-title { font-size: 26px; }
  .checkout-lead { font-size: 15px; }
  .checkout-card { padding: 20px 16px; gap: 28px; border-radius: var(--radius-lg); }
  .checkout-card--pay { gap: 20px; }
}

/* Shared links in the checkout */
.checkout-link { color: var(--c-primary); font-weight: 600; text-decoration: none; }
.checkout-link:hover { text-decoration: underline; }
.checkout-link--wa { color: var(--c-success); font-weight: 700; }
.checkout-link--wa:hover { color: var(--c-success-ink); }
.checkout-link--plain { text-decoration: underline; }

/* 3. Footer ----------------------------------------------------------------- */
.checkout-footer { border-top: 1px solid var(--c-border); font-size: 13.5px; color: var(--c-text-3); }
.checkout-footer__inner { padding-block: 18px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.checkout-footer__links { display: flex; flex-wrap: wrap; gap: 18px; }
.checkout-footer__links a { color: var(--c-text-3); text-decoration: none; }
.checkout-footer__links a:hover { color: var(--c-link-hover); text-decoration: underline; }

/* 4. Form parts: step headings, option cards, fields ------------------------- */
.checkout-step-sec { display: flex; flex-direction: column; gap: 16px; }
.checkout-step-sec--contact { gap: 18px; padding-top: 28px; border-top: 1px solid var(--co-line); }
.checkout-step-head { display: flex; align-items: center; gap: 12px; }
.checkout-step-head__num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-navy);
  color: var(--c-white);
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 800;
}
.checkout-step-head__text { display: flex; flex-direction: column; }
.checkout-step-head__title { font-size: 20px; font-weight: 800; line-height: normal; }
.checkout-step-head__sub { font-size: 14px; color: var(--c-text-3); }

.checkout-options { margin: 0; padding: 0; border: 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }

/* Selectable card (cohort, payment method). The radio sits inside the label. */
.checkout-opt {
  min-height: 72px;
  padding: 12px 16px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  background: var(--c-white);
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
}
.checkout-opt--method { min-height: 68px; }
.checkout-opt:hover { border-color: var(--c-primary); }
.checkout-opt:has(input:checked) { border-color: var(--c-primary); box-shadow: inset 0 0 0 1px var(--c-primary); background: var(--c-pale-2); }
.checkout-opt:has(input:focus-visible) { outline: 3px solid var(--c-primary); outline-offset: 2px; }
.checkout-opt input { width: 20px; height: 20px; margin: 0; flex-shrink: 0; accent-color: var(--c-primary); }
.checkout-opt__text { flex-grow: 1; display: flex; flex-direction: column; gap: 2px; }
.checkout-opt__name { font-size: 16px; font-weight: 700; }
.checkout-opt__meta { font-size: 14px; color: var(--c-text-2); }
.checkout-tag {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 700;
}
.checkout-tag--soon { background: var(--c-warning-bg); color: var(--c-warning-ink); }
.checkout-tag--open { background: var(--c-success-bg); color: var(--c-success-ink); }

/* No open cohort for the chosen course */
.checkout-empty {
  padding: 20px;
  border: 1.5px dashed var(--c-border-strong);
  border-radius: var(--radius-md);
  background: var(--c-pale-2);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.checkout-empty__text { display: flex; flex-direction: column; gap: 4px; }
.checkout-empty__title { font-size: 16px; font-weight: 700; }
.checkout-empty__lead { font-size: 14.5px; line-height: 1.7; color: var(--c-text-2); }
.checkout-empty__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.checkout-empty .btn { height: 46px; padding: 0 18px; font-size: 15px; }
.checkout-empty .checkout-btn-wa { color: var(--c-success); border-color: var(--c-success); }
.checkout-empty .checkout-btn-wa:hover { background: var(--c-success-bg); color: var(--c-success); }

/* Fields */
.checkout-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.checkout-field--wide { grid-column: 1 / -1; }
.checkout-field__label { font-size: 15px; font-weight: 700; }
.checkout-field__hint { font-size: 13.5px; color: var(--c-text-3); }
.checkout-field__error { font-size: 13.5px; font-weight: 600; line-height: 1.6; color: var(--co-error); }
.checkout-field__note { font-size: 13.5px; font-weight: 600; line-height: 1.6; color: var(--c-text-2); }
.checkout-input {
  width: 100%;
  height: 52px;
  padding: 0 14px;
  border: 1.5px solid var(--co-input-border);
  border-radius: var(--radius);
  background: var(--c-white);
  font-size: 16px;
  color: var(--c-ink);
  scroll-margin-top: 24px;
}
.checkout-input::placeholder { color: #8DA2B6; }
.checkout-input--ltr { direction: ltr; text-align: right; }
.checkout-input:focus,
.checkout-phone:focus-within { border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(22, 112, 173, 0.16); outline: none; }
.checkout-input[aria-invalid="true"] { border-color: var(--co-error); }

/* Phone: country code + number in one box (always left-to-right) */
.checkout-phone {
  height: 52px;
  display: flex;
  direction: ltr;
  border: 1.5px solid var(--co-input-border);
  border-radius: var(--radius);
  background: var(--c-white);
  overflow: hidden;
}
.checkout-phone__cc {
  width: 84px;
  padding: 0 10px;
  border: 0;
  border-right: 1px solid var(--c-border);
  background: var(--c-pale-2);
  font-size: 16px;
}
.checkout-phone .checkout-input { height: auto; flex-grow: 1; min-width: 0; border: 0; border-radius: 0; direction: ltr; text-align: left; }
.checkout-phone .checkout-input:focus { box-shadow: none; }

/* Submit block */
.checkout-submit { display: flex; flex-direction: column; gap: 12px; }
.checkout-submit--pay { padding-top: 4px; }
.checkout-cta {
  height: 56px;
  display: flex;
  width: 100%;
  border-radius: var(--radius-md);
  font-size: 18px;
  font-weight: 800;
  gap: 10px;
}
.checkout-safe { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 13.5px; color: var(--c-text-2); }
.checkout-safe svg { color: var(--c-success); }
.checkout-terms { font-size: 13px; line-height: 1.7; color: var(--c-text-3); text-align: center; }
.checkout-gateway { font-size: 13.5px; color: var(--c-text-2); text-align: center; }

/* Mobile bar with the total and the main action (booking page, under 900px) */
.checkout-mbar { display: none; }
@media (max-width: 900px) {
  .checkout-page--mbar { padding-bottom: 80px; }
  .checkout-submit .checkout-cta--desktop { display: none; }
  .checkout-mbar {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px var(--gutter);
    background: var(--c-white);
    border-top: 1px solid var(--c-border);
    box-shadow: 0 -8px 24px rgba(10, 63, 101, 0.08);
  }
  .checkout-mbar__total { display: flex; flex-direction: column; line-height: 1.3; }
  .checkout-mbar__label { font-size: 12.5px; color: var(--c-text-3); }
  .checkout-mbar__value { font-family: var(--font-head); font-size: 20px; font-weight: 900; color: var(--c-navy); }
  .checkout-mbar .btn { height: 50px; padding: 0 20px; border-radius: var(--radius-md); font-size: 16px; font-weight: 800; }
}

/* 5. Booking summary (aside) --------------------------------------------------- */
.checkout-sum {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(10, 63, 101, 0.06);
}
.checkout-sum__toggle { display: none; }
.checkout-sum__part { padding: 22px 24px; display: flex; flex-direction: column; gap: 16px; }
.checkout-sum__part + .checkout-sum__part { border-top: 1px solid var(--co-line); }
.checkout-sum__part--price { padding: 18px 24px 20px; gap: 14px; }
.checkout-sum__part--contact { padding: 16px 24px 18px; gap: 10px; }
.checkout-sum__part--trust { padding: 18px 24px 22px; gap: 14px; background: #FBFDFF; font-size: 14px; }

.checkout-sum__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.checkout-sum__title { font-family: var(--font-head); font-size: 18px; font-weight: 800; }
.checkout-sum__change {
  min-height: 36px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--c-primary);
  font-size: 14px;
  font-weight: 700;
}
.checkout-sum__change:hover { text-decoration: underline; }
.checkout-sum__change[aria-expanded="true"] .checkout-sum__change-closed,
.checkout-sum__change[aria-expanded="false"] .checkout-sum__change-open { display: none; }

/* Course picker opened by «تغيير الدورة» */
.checkout-picker {
  padding: 8px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  background: var(--c-pale-2);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.checkout-picker__opt {
  min-height: 48px;
  padding: 8px 12px;
  border: 1px solid var(--co-panel-border);
  border-radius: var(--radius);
  background: var(--c-white);
  color: var(--c-ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: right;
}
.checkout-picker__opt:hover { border-color: var(--c-primary); }
.checkout-picker__opt[aria-pressed="true"] { border: 1.5px solid var(--c-primary); background: var(--c-pale); }
.checkout-picker__text { display: flex; flex-direction: column; gap: 2px; }
.checkout-picker__name { font-size: 14.5px; font-weight: 700; }
.checkout-picker__next { font-size: 12.5px; color: var(--c-text-3); }
.checkout-picker__price { font-size: 14px; font-weight: 700; white-space: nowrap; }

.checkout-sum__course { display: flex; align-items: flex-start; gap: 14px; }
.checkout-sum__logo {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  background: var(--c-navy);
  display: flex;
  align-items: center;
  justify-content: center;
}
.checkout-sum__logo img { width: 32px; height: 32px; }
.checkout-sum__info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.checkout-sum__name { font-family: var(--font-head); font-size: 16.5px; font-weight: 800; line-height: 1.45; }
.checkout-sum__kind { font-size: 13.5px; color: var(--c-text-2); }
.checkout-sum__teacher { font-size: 13.5px; color: var(--c-text-3); }

.checkout-sum__cohort {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--c-pale-2);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.checkout-sum__cohort svg { margin-top: 2px; color: var(--c-primary); }
.checkout-sum__cohort-text { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; color: var(--c-text-2); }
.checkout-sum__cohort-text strong { font-size: 14.5px; color: var(--c-ink); }

.checkout-sum__region { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.checkout-sum__region-label { font-size: 13.5px; font-weight: 600; color: var(--c-text-2); }
.checkout-seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; padding: 3px; border-radius: 9px; background: var(--c-mist); }
.checkout-seg button {
  height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--c-text-2);
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
}
.checkout-seg button[aria-pressed="true"] { background: var(--c-white); color: var(--c-navy); box-shadow: 0 1px 2px rgba(10, 63, 101, 0.14); }

.checkout-price { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 12px; align-items: baseline; font-size: 15px; }
.checkout-price dt { color: var(--c-text-2); }
.checkout-price__was { color: var(--c-text-3); }
.checkout-price__off { color: var(--c-success-ink); font-weight: 700; }
.checkout-price .checkout-price__total-label,
.checkout-price .checkout-price__total { padding-top: 12px; border-top: 1px dashed var(--c-border); }
.checkout-price .checkout-price__total-label { color: var(--c-ink); font-size: 16px; font-weight: 800; }
.checkout-price__total { font-family: var(--font-head); font-size: 26px; font-weight: 900; line-height: 1.2; color: var(--c-navy); }

.checkout-sum__contact-head { display: flex; align-items: center; justify-content: space-between; }
.checkout-sum__contact-title { font-size: 14.5px; font-weight: 700; }
.checkout-sum__contact-head .checkout-link { font-size: 14px; font-weight: 700; }
.checkout-sum__who { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; font-size: 14px; }
.checkout-sum__who dt { color: var(--c-text-3); }
.checkout-sum__ltr { direction: ltr; text-align: right; }

.checkout-trust { display: flex; align-items: flex-start; gap: 10px; }
.checkout-trust svg { margin-top: 1px; }
.checkout-trust--refund svg { color: var(--c-success); }
.checkout-trust--group svg { color: var(--c-primary); }
.checkout-trust__text { display: flex; flex-direction: column; gap: 2px; color: var(--c-text-2); }
.checkout-trust__text strong { font-size: 14.5px; color: var(--c-ink); }
.checkout-methods { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 12px; border-top: 1px solid var(--co-line); }
.checkout-methods__label { margin-inline-end: 2px; font-size: 13px; color: var(--c-text-3); }
.checkout-methods__chip {
  padding: 3px 8px;
  border: 1px solid var(--c-border);
  border-radius: 6px;
  background: var(--c-white);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--c-text-2);
}

/* Under 900px the summary sits above the form and collapses behind a bar. */
@media (max-width: 900px) {
  .checkout-sum__toggle {
    width: 100%;
    min-height: 56px;
    padding: 0 20px;
    border: 0;
    background: var(--c-white);
    color: var(--c-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }
  .checkout-sum__toggle-label { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 700; }
  .checkout-sum__toggle-label svg { transition: transform .2s ease; }
  .checkout-sum__toggle[aria-expanded="true"] .checkout-sum__toggle-label svg { transform: rotate(180deg); }
  .checkout-sum__toggle[aria-expanded="true"] .checkout-sum__toggle-closed,
  .checkout-sum__toggle[aria-expanded="false"] .checkout-sum__toggle-open { display: none; }
  .checkout-sum__toggle-total { font-family: var(--font-head); font-size: 18px; font-weight: 900; color: var(--c-navy); }
  .checkout-sum:not(.is-open) .checkout-sum__body { display: none; }
  .checkout-sum.is-open .checkout-sum__body { border-top: 1px solid var(--co-line); }
  .checkout-sum__head .checkout-sum__title { display: none; }
  .checkout-sum__head { justify-content: flex-end; }
  .checkout-sum__part { padding: 18px 20px; }
}

/* 6. Payment page ------------------------------------------------------------ */
.checkout-pay-form { display: flex; flex-direction: column; gap: 22px; }
@media (max-width: 720px) { .checkout-pay-form { gap: 20px; } }
.checkout-pay-head { display: flex; flex-direction: column; gap: 4px; }
.checkout-pay-head__title { font-size: 20px; font-weight: 800; line-height: normal; }
.checkout-pay-head__region { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 14px; color: var(--c-text-3); }
.checkout-flip {
  min-height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--c-primary);
  font-size: 14px;
  font-weight: 700;
}
.checkout-flip:hover { text-decoration: underline; }

.checkout-panel {
  padding: 20px;
  border: 1px solid var(--co-panel-border);
  border-radius: 14px;
  background: var(--c-pale-2);
}
.checkout-panel--card { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.checkout-panel--wallet, .checkout-panel--aman { display: flex; flex-direction: column; gap: 6px; }
.checkout-aman__title { font-size: 15.5px; font-weight: 700; }
.checkout-aman__text { font-size: 14.5px; line-height: 1.7; color: var(--c-text-2); }

@media (max-width: 520px) {
  .checkout-panel { padding: 16px; }
  .checkout-panel--card { gap: 14px; }
}

/* Alerts: bank/wallet reply (4ب) and «review before paying» summary (4د) */
.checkout-alert {
  border: 1.5px solid var(--co-error-border);
  border-radius: 14px;
  background: var(--co-error-bg);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
/* Alerts take focus on load (tabindex="-1") so screen readers start there; no focus ring, as in the design. */
.checkout-alert:focus, .checkout-alert:focus-visible { outline: none; }
.checkout-alert--summary { padding: 18px 22px; flex-direction: row; align-items: flex-start; gap: 12px; }
.checkout-alert__head { display: flex; align-items: flex-start; gap: 12px; }
.checkout-alert__icon { margin-top: 2px; color: var(--co-error); }
.checkout-alert__text { display: flex; flex-direction: column; gap: 4px; }
.checkout-alert--summary .checkout-alert__text { gap: 6px; }
.checkout-alert__title { font-size: 19px; font-weight: 800; line-height: normal; color: var(--co-error-ink); }
.checkout-alert--summary .checkout-alert__title { font-size: 18px; }
.checkout-alert__reason { font-size: 15.5px; line-height: 1.7; }
.checkout-alert__note { font-size: 14.5px; line-height: 1.7; color: var(--c-text-2); }
.checkout-alert__body { padding-inline-start: 36px; display: flex; flex-direction: column; gap: 8px; }
.checkout-alert__label { font-size: 15px; font-weight: 700; }
.checkout-alert__steps { padding-inline-start: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 14.5px; line-height: 1.7; }
.checkout-alert__actions { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 10px; }
.checkout-alert__actions .btn { min-height: 44px; height: auto; padding: 0 16px; font-size: 14.5px; background: var(--c-white); }
.checkout-alert__actions .btn:hover { background: var(--c-pale); }
.checkout-alert__foot {
  padding-top: 12px;
  padding-inline-start: 36px;
  border-top: 1px solid var(--co-error-line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
  font-size: 13.5px;
  color: var(--c-text-2);
}
.checkout-alert__ref { direction: ltr; unicode-bidi: isolate; font-weight: 700; color: var(--c-ink); }
.checkout-alert__foot .checkout-link--wa { min-height: 32px; display: flex; align-items: center; }
.checkout-alert__list { padding-inline-start: 18px; display: flex; flex-direction: column; gap: 2px; font-size: 15px; line-height: 1.7; }
.checkout-alert__list a { color: var(--co-error-ink); font-weight: 700; }
.checkout-alert__small { font-size: 14px; color: var(--c-text-2); }

@media (max-width: 520px) {
  .checkout-alert { padding: 16px; }
  .checkout-alert__body, .checkout-alert__foot { padding-inline-start: 0; }
}

/* Waiting for the bank's reply (4هـ): replaces the form, no pay button */
.checkout-pending { padding: 20px 8px 8px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.checkout-pending__icon {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--c-pale);
  color: var(--c-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.checkout-pending__title { font-size: 28px; font-weight: 900; line-height: normal; }
.checkout-pending__lead { max-width: 520px; font-size: 16.5px; line-height: 1.8; color: var(--c-text-2); }
.checkout-pending__warn {
  width: 100%;
  max-width: 520px;
  padding: 14px 16px;
  border: 1px solid #F0D58C;
  border-radius: var(--radius-md);
  background: #FFF8E6;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.7;
  color: var(--c-gold-ink);
}
.checkout-pending__help { font-size: 14px; color: var(--c-text-3); }
.checkout-pending .checkout-facts { max-width: 520px; margin-top: 4px; }

/* Two-column facts box (pending + success) */
.checkout-facts {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--co-line);
  border-radius: 14px;
  overflow: hidden;
  text-align: right;
}
.checkout-facts__item { padding: 14px 18px; }
.checkout-facts__item:nth-child(odd) { border-left: 1px solid var(--co-line); }
.checkout-facts--4 .checkout-facts__item:nth-child(-n+2) { border-bottom: 1px solid var(--co-line); }
.checkout-facts dt { font-size: 13px; font-weight: 700; color: var(--c-text-3); }
.checkout-facts dd { margin-top: 2px; font-size: 16px; font-weight: 700; }
.checkout-facts .checkout-facts__amount { font-family: var(--font-head); font-size: 20px; font-weight: 900; }
.checkout-facts__ltr { direction: ltr; text-align: right; }

@media (max-width: 420px) {
  .checkout-facts { grid-template-columns: minmax(0, 1fr); }
  .checkout-facts__item:nth-child(odd) { border-left: 0; }
  .checkout-facts__item + .checkout-facts__item { border-top: 1px solid var(--co-line); }
  .checkout-facts--4 .checkout-facts__item:nth-child(-n+2) { border-bottom: 0; }
}

/* 7. Success page --------------------------------------------------------------- */
.checkout-success { max-width: calc(760px + 2 * var(--gutter)); padding-block: 56px 80px; }
.checkout-success__card {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: 22px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
  box-shadow: 0 16px 40px rgba(10, 63, 101, 0.08);
}
.checkout-success__icon {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--c-success-bg);
  color: var(--c-success);
  display: flex;
  align-items: center;
  justify-content: center;
}
.checkout-success__title { font-size: 34px; font-weight: 900; line-height: normal; }
.checkout-success__lead { font-size: 17.5px; line-height: 1.8; color: var(--c-text-2); }
.checkout-success__lead strong { color: var(--c-ink); }
.checkout-success .checkout-facts { margin-top: 6px; }
.checkout-next { width: 100%; margin-top: 4px; display: flex; flex-direction: column; gap: 10px; text-align: right; }
.checkout-next__title { font-size: 16px; font-weight: 800; }
.checkout-next__list { padding-inline-start: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 15.5px; line-height: 1.7; color: var(--c-text-2); }
.checkout-success__actions { margin-top: 8px; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.checkout-success__actions .btn { height: 52px; padding: 0 24px; border-radius: var(--radius-md); font-size: 16px; }
.checkout-success__actions .btn--primary { font-weight: 800; }
.checkout-success__help { font-size: 13.5px; color: var(--c-text-3); }

@media (max-width: 720px) {
  .checkout-success { padding-block: 24px 48px; }
  .checkout-success__card { padding: 28px 18px; gap: 16px; }
  .checkout-success__title { font-size: 27px; }
  .checkout-success__lead { font-size: 16px; }
  .checkout-success__actions { width: 100%; }
  .checkout-success__actions .btn { width: 100%; }
}


/* ==========================================================================
   Page: checkout — backend wiring (not in the design export)
   Server messages, the Paymob card iframe, the coupon field.
   ========================================================================== */
.checkout-form-error {
  padding: 12px 14px;
  border: 1px solid var(--co-error-border);
  border-radius: var(--radius);
  background: var(--co-error-bg);
  color: var(--co-error-ink);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.7;
}
.checkout-form-done {
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--c-success-bg);
  color: var(--c-success-ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.7;
}
.checkout-notice {
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--c-warning-bg);
  color: var(--c-warning-ink);
  font-size: 14.5px;
  line-height: 1.7;
}
#enroll-form[aria-busy="true"] .checkout-cta,
.checkout-pay-form[aria-busy="true"] .checkout-cta { opacity: 0.7; cursor: progress; }

/* The chosen cohort's lines (filled by checkout.js) sit as rows of the cohort text, like the design. */
[data-cohort-detail] { display: contents; }

.checkout-paymob { overflow: hidden; border-radius: var(--radius); background: var(--c-white); }
.checkout-paymob iframe { display: block; width: 100%; min-height: 560px; border: 0; }

.checkout-coupon {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 14px;
}
.checkout-coupon__input { height: 44px; font-size: 15px; }
.checkout-coupon__btn { height: 44px; padding-inline: 18px; }
.checkout-coupon__remove {
  grid-column: 1 / -1;
  justify-self: start;
  padding: 0;
  border: 0;
  background: none;
  color: var(--co-error);
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}
.checkout-coupon__msg { grid-column: 1 / -1; font-size: 13.5px; font-weight: 600; color: var(--c-success-ink); }
.checkout-coupon__msg.is-error { color: var(--co-error); }
