/*
 * ROW Traders Academy — end-of-lesson popup (components/frontend/AcademyLessonExtras.tsx).
 * Values copied from live traders-academy.deriv.com (academy-v2 Webflow CSS,
 * `.lesson-popup_*`, design-system-enterprise-copy buttons). Linked by the
 * component only, so no other page downloads it.
 */
.academy-lesson-popup-spot {
  width: 100%;
  height: 1px;
  margin-top: -1px;
  pointer-events: none;
}

.academy-lesson-popup {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.1s ease;
  font-family: var(--font-family-base, Inter, Arial, sans-serif);
}
.academy-lesson-popup.is-open {
  opacity: 1;
}

.academy-lesson-popup__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-color: #000000e0;
}

.academy-lesson-popup__popup {
  position: relative;
  z-index: 2;
  box-sizing: border-box;
  display: flex;
  flex-flow: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  max-width: 30rem;
  padding: 3rem 2rem 2rem;
  border-radius: 2rem;
  background-color: #fff;
  color: #181c25;
  text-align: center;
}

.academy-lesson-popup__logo {
  display: block;
  width: 7.875rem;
  height: auto;
  margin-bottom: 4.5rem;
}

.academy-lesson-popup__heading {
  margin: 0 0 1rem;
  color: #181c25;
  font-family: inherit;
  font-size: 2rem;
  line-height: 2.5rem;
  letter-spacing: -0.015rem;
  font-weight: 800;
}

.academy-lesson-popup__text {
  margin: 0 0 3rem;
  color: #181c25b8;
  font-size: 1rem;
  line-height: 1.5rem;
}

.academy-lesson-popup__buttons {
  display: flex;
  flex-flow: column;
  gap: 0.5rem;
  width: 100%;
}

.academy-lesson-popup__button {
  box-sizing: border-box;
  display: inline-flex;
  justify-content: center;
  width: 100%;
  padding: 1rem 1.5rem;
  border-radius: 6rem;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.15s cubic-bezier(0.65, 0, 0.35, 1), color 0.15s cubic-bezier(0.65, 0, 0.35, 1);
}
.academy-lesson-popup__button.is-coral {
  background-color: #ff444f;
  color: #fff;
}
.academy-lesson-popup__button.is-coral:hover {
  background-color: #e12e3a;
}
.academy-lesson-popup__button.is-outline {
  padding: 0.875rem 1.375rem;
  border: 0.125rem solid #181c25;
  background-color: transparent;
  color: #181c25;
}
.academy-lesson-popup__button.is-outline:hover {
  background-color: #181c2514;
}
.academy-lesson-popup__button:focus-visible,
.academy-lesson-popup__close:focus-visible {
  outline: 2px solid #181c25;
  outline-offset: 2px;
}

.academy-lesson-popup__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #181c25;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.academy-lesson-popup__close:hover {
  transform: scale(0.9);
}
/* Live keeps the close button on the right in Arabic too (`right: 1rem`, no mirror). */

@media screen and (max-width: 767px) {
  .academy-lesson-popup {
    flex-flow: column;
    justify-content: flex-end;
    align-items: stretch;
  }
  .academy-lesson-popup__popup {
    max-width: none;
    padding: 2rem 1.5rem 1.5rem;
    border-radius: 1rem 1rem 0 0;
  }
  .academy-lesson-popup__close {
    top: 0.5rem;
    right: 0.5rem;
  }
  .academy-lesson-popup__logo {
    width: 5.25rem;
    margin-bottom: 2.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .academy-lesson-popup,
  .academy-lesson-popup__close {
    transition: none;
  }
}
