/* ================= PRE-REGISTRATION POPUP ================= */

#prereg-popup-overlay {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  background: rgba(0, 0, 0, 0.8);
  z-index: 9999;

  display: flex;
  align-items: center;
  justify-content: center;
}

/* Header desktop extra height */
@media screen and (min-width: 1118px) {
  #prereg-popup-overlay {
    top: calc(var(--header-height) + 2rem);
    height: calc(100vh - var(--header-height) - 2rem);
  }
}

/* ================= POPUP CONTAINER ================= */

.prereg-popup-content {
  position: relative;

  width: 90%;
  height: 90%;
  max-width: 720px;
  max-height: 520px;

  background: linear-gradient(145deg, #1f1f1f, #2a2a2a);
  border-radius: calc(1vh + 1vw);
  box-shadow: 0 0 calc(1.5vh + 1vw) rgba(199, 19, 19, 0.6);

  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;

  padding: clamp(1rem, 2vw, 2rem);
  box-sizing: border-box;
  text-align: center;

  animation: popupFadeIn 0.35s ease;
  overflow: hidden;
}

/* ================= TITLES ================= */

.prereg-title {
  font-size: clamp(1.8rem, 4vw + 2vh, 2.8rem);
  font-weight: 900;
  color: #fff;
  margin: 0;
  line-height: 1.1;
}

.prereg-status {
  font-size: clamp(1.4rem, 3vw + 1.5vh, 2.2rem);
  font-weight: 900;
  margin: 0;
  color: #c71313;
}

.prereg-status span {
  color: #fff;
}

/* ================= ACTIONS ================= */

.prereg-actions {
  display: flex;
  flex-direction: column;
  gap: clamp(0.5rem, 1vh, 0.8rem);
  align-items: center;
}

/* PRE-REGISTRATION BUTTON */
.prereg-popup-btn {
  /* padding: clamp(0.5rem, 1vh, 0.9rem)
           clamp(1.2rem, 3vw, 2.2rem); */
  padding: clamp(0.45rem, 0.9vh, 0.65rem)
           clamp(1rem, 2.5vw, 1.8rem);
  font-size: clamp(0.85rem, calc(1vh + 0.5vw), 1.2rem);
  /* font-size: clamp(0.8rem, calc(0.9vh + 0.4vw), 1rem); */
  background-color: #c71313;
  color: #fff;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 999px;
  text-decoration: none;

  transition: transform 0.2s ease, background-color 0.2s ease;
}

.prereg-popup-btn:hover {
  background-color: #e01818;
  transform: translateY(-2px);
}

/* QUIZ LINK (disabled by default) */
.quiz-popup-btn {
  /* padding: clamp(0.45rem, 0.9vh, 0.65rem)
           clamp(1rem, 2.5vw, 1.8rem); */
  padding: clamp(0.5rem, 1vh, 0.9rem)
           clamp(1.2rem, 3vw, 2.2rem);
  /* font-size: clamp(0.8rem, calc(0.9vh + 0.4vw), 1rem); */
  font-size: clamp(0.85rem, calc(1vh + 0.5vw), 1.2rem);
  border-radius: 999px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;

  background-color: #444;
  color: #aaa;
  border: 1px dashed #666;

  text-decoration: none;
  opacity: 0.85;
}

.quiz-popup-btn.disabled {
  pointer-events: none;
  cursor: not-allowed;
}

/* QUIZ ACTIVE STATE (30 JAN) */
.quiz-popup-btn.active {
  background-color: #c71313;
  color: #fff;
  border: none;
  opacity: 1;
}

.quiz-popup-btn.active:hover {
  background-color: #e01818;
  transform: translateY(-2px);
}

/* ================= DESCRIPTION ================= */

.prereg-description {
  max-width: 90%;
  font-size: clamp(0.9rem, 1.5vw + 1vh, 1.1rem);
  line-height: clamp(1.35, 1.5vw + 1vh, 1.6);
  color: #ddd;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* ================= CLOSE BUTTON ================= */

.prereg-popup-close {
  position: absolute;
  top: clamp(0.5rem, 1vh, 1rem);
  right: clamp(0.5rem, 1vh, 1rem);
  background: transparent;
  border: none;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: #fff;
  cursor: pointer;
}

.prereg-popup-close:hover {
  color: #c71313;
}

/* ================= ANIMATION ================= */

@keyframes popupFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ================= MOBILE & TABLET RESPONSIVE ================= */

/* Landscape tablets / small screens */
@media screen and (max-height: 600px) and (orientation: landscape) {
  .prereg-popup-content {
    height: 95%;
    max-height: none;
  }
}

/* Mobile vertical */
@media screen and (max-width: 480px) and (orientation: portrait) {

  .prereg-popup-content {
    justify-content: flex-start;
    gap: 1rem;
    padding: 1rem 0.8rem;
    height: auto;
    max-height: 95%;
  }

  .prereg-title {
    font-size: clamp(1.6rem, 6vw, 2.2rem);
  }

  .prereg-status {
    font-size: clamp(1.2rem, 5vw, 1.8rem);
  }

  .prereg-popup-btn {
    padding: clamp(0.4rem, 1vh, 0.6rem) clamp(1rem, 4vw, 1.6rem);
    font-size: clamp(0.8rem, 2.5vw, 1rem);
  }

  .prereg-description {
    font-size: clamp(0.8rem, 2.5vw, 1rem);
    line-height: 1.4;
  }
}
