/* AL-FAYED Checkout UX Hotfix — presentation only. */

body.af-checkout-hotfix .af-checkout {
  padding-block: clamp(34px, 5vw, 58px);
}

body.af-checkout-hotfix .af-checkout-grid {
  display: grid !important;
  grid-template-columns: minmax(280px, .72fr) minmax(0, 1.28fr) !important;
  align-items: start;
  gap: 22px !important;
}

body.af-checkout-hotfix .af-checkout-summary {
  position: sticky;
  top: 98px;
}

body.af-checkout-hotfix .af-checkout-summary .af-course-card__media:empty,
body.af-checkout-hotfix .af-checkout-summary.is-missing-course-media .af-course-card__media {
  display: none !important;
}

body.af-checkout-hotfix .af-checkout-summary.is-missing-course-media {
  min-height: 0;
  padding: 26px;
}

body.af-checkout-hotfix .af-checkout-summary .af-course-card__media:not(:empty) {
  max-height: 280px;
  border-radius: 16px;
  margin-bottom: 18px;
}

body.af-checkout-hotfix .af-checkout-summary .af-course-card__media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

body.af-checkout-hotfix .af-payment-method__title {
  line-height: 1.5;
}

body.af-checkout-hotfix .af-device-consent a {
  color: var(--af-primary, #1d4ed8);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.af-checkout-hotfix .af-retry-warning {
  font-weight: 800;
}

.af-subscription-terms {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto 42px;
  scroll-margin-top: 100px;
}

.af-subscription-terms ul {
  margin: 0;
  padding-inline-start: 1.4rem;
  display: grid;
  gap: 10px;
}

/* Fawry/delayed-payment page. The body class is added only on /payment-pending/. */
body.af-payment-pending-hotfix {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: #f6f8fc;
  color: #172033;
  font-family: "Noto Sans Arabic", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
  line-height: 1.7;
}

body.af-payment-pending-hotfix.af-lang-ar {
  direction: rtl;
}

body.af-payment-pending-hotfix.af-lang-en {
  direction: ltr;
}

body.af-payment-pending-hotfix > header {
  padding: 18px max(24px, calc((100% - 1180px) / 2));
  border-bottom: 1px solid #dce3ee;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 8px 28px rgba(22, 34, 51, .06);
}

body.af-payment-pending-hotfix > header h1,
body.af-payment-pending-hotfix > header p {
  margin: 0;
}

body.af-payment-pending-hotfix > header h1 a {
  color: #172554;
  text-decoration: none;
  font-size: clamp(20px, 2.2vw, 28px);
}

body.af-payment-pending-hotfix > header p {
  color: #526075;
  font-size: 14px;
}

body.af-payment-pending-hotfix .af-payment-pending-main {
  width: min(760px, calc(100% - 32px));
  margin: clamp(34px, 7vw, 72px) auto;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid #dce3ee;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(22, 34, 51, .1);
  text-align: center;
}

body.af-payment-pending-hotfix .af-payment-pending-main > hr,
body.af-payment-pending-hotfix .af-pending-old-icon {
  display: none !important;
}

body.af-payment-pending-hotfix .af-pending-title {
  margin: 0;
  color: #172554;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.25;
}

.af-pending-intro {
  margin: 10px 0 24px;
  color: #526075;
  font-size: 17px;
}

.af-pending-order-card,
.af-pending-reference-card {
  display: grid;
  gap: 12px;
  margin: 18px 0;
  padding: 20px;
  border: 1px solid #dce3ee;
  border-radius: 18px;
  background: #f8fafc;
  text-align: start;
}

.af-pending-order-row,
.af-pending-reference-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.af-pending-order-label,
.af-pending-reference-label {
  color: #526075;
  font-size: 14px;
}

.af-pending-order-value,
.af-pending-reference-value {
  color: #172033;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.af-pending-reference-value {
  direction: ltr;
  unicode-bidi: isolate;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: clamp(24px, 5vw, 34px);
  letter-spacing: .04em;
}

.af-pending-copy,
.af-pending-action {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 13px;
  padding: 0 20px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
}

.af-pending-copy,
.af-pending-action--primary {
  background: #1d4ed8;
  color: #fff !important;
}

.af-pending-action--secondary {
  border-color: #dce3ee;
  background: #fff;
  color: #172033 !important;
}

.af-pending-warning {
  margin: 20px 0;
  padding: 16px 18px;
  border: 1px solid #f0cf8b;
  border-radius: 16px;
  background: #fff8e7;
  color: #714d06;
  font-weight: 800;
  text-align: start;
}

.af-pending-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
}

body.af-payment-pending-hotfix > footer {
  margin-top: auto;
  padding: 22px 24px;
  border-top: 1px solid #dce3ee;
  background: #fff;
  color: #526075;
  text-align: center;
}

body.af-payment-pending-hotfix > footer a {
  color: #1d4ed8;
  font-weight: 800;
}

@media (max-width: 900px) {
  body.af-checkout-hotfix .af-checkout-grid {
    grid-template-columns: 1fr !important;
  }

  body.af-checkout-hotfix .af-checkout-summary {
    position: static;
  }
}

@media (max-width: 620px) {
  body.af-payment-pending-hotfix .af-payment-pending-main {
    width: min(100% - 20px, 760px);
    margin-block: 20px;
    padding: 20px 16px;
    border-radius: 18px;
  }

  .af-pending-order-row,
  .af-pending-reference-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .af-pending-actions,
  .af-pending-action,
  .af-pending-copy {
    width: 100%;
  }
}
