.protected-course-modal {
  --course-access-navy: #132847;
  --course-access-blue: #245b8f;
  --course-access-blue-deep: #173c67;
  --course-access-blue-soft: #e9f1f8;
  --course-access-gold: #c9903a;
  --course-access-gold-light: #ebcf94;
  --course-access-cream: #fffaf0;
  --course-access-paper: #f8f6f0;
  --course-access-ink: #1d2a3e;
  --course-access-muted: #626b78;
}

.protected-course-modal .modal-dialog {
  max-width: 1000px;
}

.protected-course-modal .modal-content {
  position: relative;
  max-height: calc(100vh - 32px);
  border: 1px solid rgba(201, 144, 58, 0.7);
  border-radius: 24px;
  background: var(--course-access-paper);
  color: var(--course-access-ink);
  box-shadow: 0 28px 80px rgba(13, 30, 54, 0.35);
  overflow-x: hidden;
  overflow-y: auto;
}

.protected-course-modal__close {
  position: absolute;
  z-index: 5;
  top: 20px;
  right: 20px;
  display: grid;
  width: 43px;
  height: 43px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(235, 207, 148, 0.68);
  border-radius: 50%;
  background: rgba(18, 39, 70, 0.45);
  color: #fff;
  font: 300 29px/1 Arial, sans-serif;
  backdrop-filter: blur(5px);
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.protected-course-modal__close:hover,
.protected-course-modal__close:focus-visible {
  border-color: var(--course-access-gold-light);
  background: var(--course-access-gold-light);
  color: var(--course-access-navy);
  outline: 2px solid rgba(255, 255, 255, 0.82);
  outline-offset: 2px;
}

.protected-course-modal__intro {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  min-height: 205px;
  gap: 26px;
  align-items: center;
  padding: 36px 90px 34px 42px;
  background:
    linear-gradient(105deg, rgba(15, 40, 77, 0.96) 0%, rgba(31, 76, 119, 0.9) 58%, rgba(66, 103, 142, 0.78) 100%),
    url("../images/bg-login.jpg") center 43%/cover no-repeat;
  color: #fff;
  overflow: hidden;
}

.protected-course-modal__intro::before {
  content: "";
  position: absolute;
  top: -110px;
  right: -40px;
  width: 330px;
  height: 330px;
  border: 1px solid rgba(235, 207, 148, 0.25);
  border-radius: 50%;
  box-shadow: 0 0 0 38px rgba(235, 207, 148, 0.035);
}

.protected-course-modal__intro::after {
  content: "";
  position: absolute;
  right: 15%;
  bottom: -1px;
  width: 46%;
  border-bottom: 2px solid rgba(235, 207, 148, 0.46);
}

.protected-course-modal__intro-icon,
.protected-course-modal__intro-copy {
  position: relative;
  z-index: 1;
}

.protected-course-modal__intro-icon {
  display: grid;
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  place-items: center;
  border: 1px solid rgba(235, 207, 148, 0.68);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.protected-course-modal__intro-icon svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: var(--course-access-gold-light);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.protected-course-modal__eyebrow,
.protected-course-modal__choice-eyebrow {
  display: block;
  font-family: Manrope, sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.protected-course-modal__eyebrow {
  margin-bottom: 8px;
  color: var(--course-access-gold-light);
}

.protected-course-modal__intro h2 {
  margin: 0;
  color: #fffdf8;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 38px;
  font-weight: 400;
  line-height: 1.08;
  text-shadow: 0 2px 12px rgba(8, 20, 42, 0.24);
}

.protected-course-modal__intro p {
  max-width: 720px;
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.87);
  font-family: Manrope, sans-serif;
  font-size: 13px;
  line-height: 1.55;
}

.protected-course-modal__body {
  flex: 0 0 auto;
  padding: 28px 30px 18px;
  background:
    radial-gradient(circle at 88% 5%, rgba(201, 144, 58, 0.12), transparent 27%),
    linear-gradient(145deg, #f4f8fc 0%, #fffaf1 100%);
}

.protected-course-modal__choices {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.protected-course-modal__choice {
  position: relative;
  min-width: 0;
  min-height: 360px;
  padding: 26px 28px 24px;
  border-radius: 20px;
  overflow: hidden;
}

.protected-course-modal__choice--login {
  border: 1px solid #d7e2ed;
  background: rgba(255, 255, 255, 0.91);
  box-shadow: 0 14px 36px rgba(34, 73, 113, 0.08);
}

.protected-course-modal__choice--membership {
  border: 1px solid rgba(201, 144, 58, 0.65);
  background: linear-gradient(145deg, #fffaf0 0%, #edf4fb 100%);
  box-shadow: 0 16px 42px rgba(98, 74, 35, 0.1);
}

.protected-course-modal__choice--membership::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 48%;
  background:
    linear-gradient(90deg, #edf4fb 0%, rgba(237, 244, 251, 0.34) 44%, rgba(237, 244, 251, 0.08) 100%),
    url("../images/bg-login.jpg") 56% center/cover no-repeat;
  opacity: 0.16;
}

.protected-course-modal__choice--membership::after {
  content: "";
  position: absolute;
  top: 18px;
  right: 18px;
  width: 125px;
  height: 125px;
  border: 1px solid rgba(201, 144, 58, 0.18);
  border-radius: 50% 50% 10px 10px;
}

.protected-course-modal__step,
.protected-course-modal__choice-content {
  position: relative;
  z-index: 1;
}

.protected-course-modal__step {
  display: grid;
  width: 40px;
  height: 40px;
  margin-bottom: 20px;
  place-items: center;
  border: 1px solid #d9e3ed;
  border-radius: 50%;
  background: var(--course-access-blue-soft);
  color: var(--course-access-blue-deep);
  font-family: Manrope, sans-serif;
  font-size: 11px;
  font-weight: 800;
}

.protected-course-modal__step--featured {
  border-color: var(--course-access-navy);
  background: var(--course-access-navy);
  color: var(--course-access-gold-light);
}

.protected-course-modal__choice-eyebrow {
  margin: -8px 0 7px;
  color: var(--course-access-blue);
}

.protected-course-modal__choice h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 8px;
  color: var(--course-access-navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 29px;
  font-weight: 400;
  line-height: 1.12;
}

.protected-course-modal__choice-lead {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--course-access-muted);
  font-family: Manrope, sans-serif;
  font-size: 12.5px;
  line-height: 1.55;
}

.protected-course-modal__login-form {
  position: relative;
  z-index: 1;
  margin-top: 18px;
}

.protected-course-modal__login-form label {
  display: block;
  margin-bottom: 7px;
  color: var(--course-access-navy);
  font-family: Manrope, sans-serif;
  font-size: 11px;
  font-weight: 800;
}

.protected-course-modal__login-form input {
  display: block;
  width: 100%;
  height: 48px;
  margin: 0 0 10px;
  padding: 0 14px;
  border: 1px solid #bdcddd;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--course-access-navy);
  font-family: Manrope, sans-serif;
  font-size: 13px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.protected-course-modal__login-form input:focus {
  border-color: var(--course-access-gold);
  box-shadow: 0 0 0 3px rgba(201, 144, 58, 0.16);
}

.protected-course-modal__login-form button,
.protected-course-modal__plans-button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  min-height: 50px;
  padding: 9px 11px 9px 16px;
  border-radius: 11px;
  font-family: Manrope, sans-serif;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.protected-course-modal__login-form button {
  border: 1px solid var(--course-access-blue);
  background: linear-gradient(135deg, #2d689f 0%, var(--course-access-blue-deep) 100%);
  color: #fff;
  box-shadow: 0 9px 20px rgba(35, 87, 139, 0.18);
}

.protected-course-modal__login-form button span,
.protected-course-modal__plans-button span {
  display: grid;
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  place-items: center;
  border-radius: 50%;
}

.protected-course-modal__login-form button span {
  background: rgba(255, 255, 255, 0.12);
}

.protected-course-modal__login-form button:hover,
.protected-course-modal__login-form button:focus-visible {
  border-color: #11345c;
  background: linear-gradient(135deg, #245a8d 0%, #11345c 100%);
  color: #fff;
  outline: none;
  transform: translateY(-1px);
}

.protected-course-modal__login-form[aria-busy="true"] button {
  cursor: wait;
  opacity: 0.74;
  transform: none;
}

.protected-course-modal__form-error {
  margin: 9px 0 0;
  color: #7b3f2f;
  font-family: Manrope, sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.45;
}

.protected-course-modal__login-help {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px 16px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid #dce5ed;
}

.protected-course-modal__login-help p {
  margin: 0;
  color: var(--course-access-muted);
  font-family: Manrope, sans-serif;
  font-size: 10.5px;
  line-height: 1.45;
}

.protected-course-modal__login-help a {
  color: #8d5c13;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.protected-course-modal__login-help a:hover,
.protected-course-modal__login-help a:focus-visible {
  color: var(--course-access-blue-deep);
}

.protected-course-modal__lookup {
  position: relative;
  z-index: 1;
  margin-top: 17px;
  padding: 17px;
  border: 1px solid #cad9e6;
  border-radius: 14px;
  background: linear-gradient(145deg, #f2f7fb 0%, #fffaf0 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.protected-course-modal__lookup-icon {
  display: grid;
  width: 34px;
  height: 34px;
  margin-bottom: 11px;
  place-items: center;
  border: 1px solid rgba(201, 144, 58, 0.55);
  border-radius: 50%;
  background: #fff8e8;
  color: #8d5c13;
  font: 800 16px/1 Manrope, sans-serif;
}

.protected-course-modal__lookup h4 {
  margin: 0 0 6px;
  color: var(--course-access-navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.15;
}

.protected-course-modal__lookup > p {
  margin: 0;
  color: var(--course-access-muted);
  font-family: Manrope, sans-serif;
  font-size: 10.5px;
  line-height: 1.45;
}

.protected-course-modal__lookup-email {
  display: block;
  overflow: hidden;
  margin: 11px 0;
  padding: 8px 10px;
  border: 1px solid #c7d5e2;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--course-access-navy);
  font: 800 10.5px/1.4 Manrope, sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.protected-course-modal__lookup-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.protected-course-modal__lookup-actions a,
.protected-course-modal__lookup-actions button {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 8px;
  font: 800 10px/1.35 Manrope, sans-serif;
  text-align: center;
  text-decoration: none;
}

.protected-course-modal__lookup-actions a {
  border: 1px solid var(--course-access-blue);
  background: var(--course-access-blue);
  color: #fff;
}

.protected-course-modal__lookup-actions button {
  border: 1px solid #9eb5cb;
  background: rgba(255, 255, 255, 0.82);
  color: var(--course-access-blue-deep);
}

.protected-course-modal__lookup-actions a:hover,
.protected-course-modal__lookup-actions a:focus-visible,
.protected-course-modal__lookup-actions button:hover,
.protected-course-modal__lookup-actions button:focus-visible {
  border-color: var(--course-access-gold);
  box-shadow: 0 0 0 3px rgba(201, 144, 58, 0.13);
  outline: none;
}

.protected-course-modal__lookup .protected-course-modal__lookup-support {
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid #d9e3eb;
}

.protected-course-modal__lookup-support a {
  color: #8d5c13;
  font-weight: 800;
}

.protected-course-modal__benefits {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 9px;
  margin: 19px 0 22px;
  padding: 0;
  color: #394c64;
  font-family: Manrope, sans-serif;
  font-size: 11.5px;
  list-style: none;
}

.protected-course-modal__benefits li {
  position: relative;
  padding-left: 25px;
}

.protected-course-modal__benefits li::before {
  content: "✓";
  position: absolute;
  top: -1px;
  left: 0;
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border: 1px solid rgba(201, 144, 58, 0.7);
  border-radius: 50%;
  color: #8d5c13;
  font-size: 9px;
  font-weight: 900;
}

.protected-course-modal__plans-button {
  position: relative;
  z-index: 1;
  margin-top: auto;
  border: 1px solid var(--course-access-navy);
  background: linear-gradient(135deg, var(--course-access-navy) 0%, #234d7d 100%);
  color: #fff;
  box-shadow: 0 10px 24px rgba(19, 40, 71, 0.16);
}

.protected-course-modal__plans-button span {
  background: var(--course-access-gold-light);
  color: var(--course-access-navy);
}

.protected-course-modal__plans-button:hover,
.protected-course-modal__plans-button:focus-visible {
  border-color: var(--course-access-blue);
  background: linear-gradient(135deg, #1d4775 0%, var(--course-access-blue) 100%);
  color: #fff;
  outline: none;
  transform: translateY(-1px);
}

.protected-course-modal__choice--membership,
.protected-course-modal__choice-content {
  display: flex;
  flex-direction: column;
}

.protected-course-modal__choice-content {
  flex: 1;
}

.protected-course-modal__account-status {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 20px;
  padding: 16px;
  border: 1px solid #c9d8e6;
  border-radius: 12px;
  background: var(--course-access-blue-soft);
  color: #42536a;
  font-family: Manrope, sans-serif;
  font-size: 11.5px;
  line-height: 1.5;
}

.protected-course-modal__account-status > span {
  display: grid;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  place-items: center;
  border-radius: 50%;
  background: var(--course-access-blue);
  color: #fff;
}

.protected-course-modal__account-status p,
.protected-course-modal__account-status strong {
  display: block;
  margin: 0;
}

.protected-course-modal__account-status strong {
  color: var(--course-access-navy);
}

.protected-course-modal__return-note {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 15px 0 0;
  color: #6a7078;
  font-family: Manrope, sans-serif;
  font-size: 10px;
  line-height: 1.45;
  text-align: center;
}

.protected-course-modal__return-note span {
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  place-items: center;
  border-radius: 50%;
  background: #f2e3c5;
  color: #755020;
  font-size: 10px;
  font-weight: 900;
}

.protected-course-modal.is-fallback {
  display: block;
  background: rgba(14, 29, 51, 0.58);
}

@media (max-width: 991.98px) {
  .protected-course-modal .modal-dialog {
    max-width: 780px;
  }

  .protected-course-modal__intro {
    min-height: 190px;
    gap: 20px;
    padding: 30px 78px 29px 30px;
  }

  .protected-course-modal__intro-icon {
    width: 62px;
    height: 62px;
    flex-basis: 62px;
    border-radius: 18px;
  }

  .protected-course-modal__intro h2 {
    font-size: 33px;
  }

  .protected-course-modal__body {
    padding: 22px 22px 16px;
  }

  .protected-course-modal__choice {
    min-height: 370px;
    padding: 23px 22px 21px;
  }

  .protected-course-modal__choice h3 {
    font-size: 26px;
  }

  .protected-course-modal__login-help {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  .protected-course-modal {
    padding: 0 !important;
  }

  .protected-course-modal .modal-dialog {
    width: auto;
    max-width: none;
    min-height: calc(100% - 12px);
    margin: 6px;
  }

  .protected-course-modal .modal-content {
    height: calc(100vh - 12px);
    height: calc(100dvh - 12px);
    max-height: calc(100vh - 12px);
    max-height: calc(100dvh - 12px);
    border-radius: 16px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .protected-course-modal__close {
    position: fixed;
    top: max(12px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
    width: 44px;
    height: 44px;
    background: rgba(13, 35, 65, 0.82);
    font-size: 27px;
  }

  .protected-course-modal__intro {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    min-height: 0;
    gap: 13px;
    align-items: start;
    padding: calc(20px + env(safe-area-inset-top)) 62px 20px 18px;
    background-position: 58% center;
  }

  .protected-course-modal__intro-icon {
    width: 46px;
    height: 46px;
    margin: 1px 0 0;
    border-radius: 14px;
  }

  .protected-course-modal__intro-icon svg {
    width: 25px;
    height: 25px;
  }

  .protected-course-modal__eyebrow {
    margin-bottom: 6px;
    font-size: 10px;
  }

  .protected-course-modal__intro h2 {
    font-size: 25px;
    line-height: 1.08;
  }

  .protected-course-modal__intro p {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.45;
  }

  .protected-course-modal__body {
    padding: 14px 12px calc(22px + env(safe-area-inset-bottom));
  }

  .protected-course-modal__choices {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .protected-course-modal__choice {
    min-height: 0;
    padding: 18px 17px 19px;
    border-radius: 16px;
  }

  .protected-course-modal__step {
    width: 34px;
    height: 34px;
    margin-bottom: 12px;
    font-size: 11px;
  }

  .protected-course-modal__choice h3 {
    margin-bottom: 7px;
    font-size: 26px;
    line-height: 1.1;
  }

  .protected-course-modal__choice-lead {
    font-size: 14px;
    line-height: 1.48;
  }

  .protected-course-modal__login-form {
    margin-top: 16px;
  }

  .protected-course-modal__login-form label {
    margin-bottom: 7px;
    font-size: 13px;
  }

  .protected-course-modal__login-form input {
    height: 52px;
    padding: 0 14px;
    font-size: 16px;
  }

  .protected-course-modal__login-form button,
  .protected-course-modal__plans-button {
    min-height: 52px;
    font-size: 14px;
  }

  .protected-course-modal__login-help {
    gap: 8px;
    margin-top: 14px;
    padding-top: 13px;
  }

  .protected-course-modal__login-help p {
    font-size: 12.5px;
    line-height: 1.5;
  }

  .protected-course-modal__choice--membership::before {
    width: 58%;
  }

  .protected-course-modal__benefits {
    gap: 10px;
    margin: 17px 0 19px;
    font-size: 13.5px;
    line-height: 1.42;
  }

  .protected-course-modal__benefits li {
    padding-left: 27px;
  }

  .protected-course-modal__benefits li::before {
    top: 0;
    width: 19px;
    height: 19px;
    font-size: 10px;
  }

  .protected-course-modal__lookup {
    margin-top: 15px;
    padding: 16px;
  }

  .protected-course-modal__lookup h4 {
    font-size: 23px;
  }

  .protected-course-modal__lookup > p,
  .protected-course-modal__lookup-email,
  .protected-course-modal__lookup-support {
    font-size: 13px;
    line-height: 1.5;
  }

  .protected-course-modal__lookup-email {
    padding: 10px 11px;
  }

  .protected-course-modal__lookup-actions {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .protected-course-modal__lookup-actions a,
  .protected-course-modal__lookup-actions button {
    min-height: 48px;
    font-size: 13px;
  }

  .protected-course-modal__return-note {
    align-items: flex-start;
    margin-top: 14px;
    padding: 0 4px;
    font-size: 12.5px;
    line-height: 1.45;
    text-align: left;
  }

  .protected-course-modal__return-note span {
    width: 23px;
    height: 23px;
    flex-basis: 23px;
    font-size: 11px;
  }
}

@media (max-width: 390px) {
  .protected-course-modal__intro {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 11px;
    padding-right: 57px;
    padding-left: 15px;
  }

  .protected-course-modal__intro-icon {
    width: 42px;
    height: 42px;
  }

  .protected-course-modal__intro h2 {
    font-size: 23px;
  }

  .protected-course-modal__body {
    padding-right: 9px;
    padding-left: 9px;
  }

  .protected-course-modal__choice {
    padding-right: 15px;
    padding-left: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .protected-course-modal *,
  .protected-course-modal *::before,
  .protected-course-modal *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
