/**
 * @file
 * White Paper page JS-dependent styles only.
 * Layout is handled by css/sections/white-paper-page.css.
 */

/* --- Form validation (toggled by JS) ---
   Base error styles are in base/forms.css (.wp-error).
   .wp-hero__error is a page-specific alias kept for JS compatibility. */
.wp-hero__error {
  display: none;
  color: #EC221F;
  font-size: 12px;
  margin-top: 4px;
}

.wp-hero__error.visible {
  display: none;
}


/* --- Section content prose styling (rendered from CKEditor HTML) --- */
.wp-section-content p {
  margin: 0 0 16px;
}

.wp-section-content ul {
  padding-left: 20px;
  margin: 0 0 16px;
}

.wp-section-content li {
  margin-bottom: 8px;
}

.wp-section-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14px;
}

.wp-section-content th {
  background: var(--color-Background-Accent);
  color: white;
  font-weight: 700;
  text-align: left;
  padding: 12px 24px;
  border-radius: 12px;
}

.wp-section-content thead tr {
  border-radius: 12px;
}

.wp-section-content td {
  padding: 12px 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* Summary body prose */
.wp-summary__body p,
.wp-summary-body p {
  margin: 0 0 16px;
}

/* --- Thank You Popup --- */
.wp-popup {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wp-popup__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.44);
}

.wp-popup__modal {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 64px 48px 48px;
  max-width: 640px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.wp-popup__timer {
  position: absolute;
  top: 20px;
  right: 24px;
  font-weight: 600;
  font-size: 20px;
  color: var(--color-Text-Accent, #5137F1);
}

.wp-popup__close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 18px;
  height: 18px;
  background: url('../img/cross.svg') no-repeat center;
  background-size: 18px;
  border: none;
  cursor: pointer;
  padding: 0;
  opacity: 0.6;
}

.wp-popup__close:hover {
  opacity: 1;
}

.wp-popup__spinner {
  margin: 0 auto 24px;
  width: 48px;
  height: 48px;
}

.wp-popup__spinner-svg {
  animation: wp-spin 1s linear infinite;
  width: 100%;
  height: 100%;
}

@keyframes wp-spin {
  100% { transform: rotate(360deg); }
}

.wp-popup__title {
  font-weight: 700;
  font-size: 32px;
  color: #000;
  margin: 0 0 16px;
  line-height: 1.3;
}

.wp-popup__text {
  font-size: 16px;
  color: #535353;
  margin: 0;
  line-height: 1.5;
}

/* Lock scroll when popup is open */
body.lock-scroll {
  overflow: hidden;
}

/* --- Mobile: horizontal scroll for tables --- */
@media (max-width: 640px) {
  .wp-section-content {
    overflow-x: auto;
  }

  .wp-popup__modal {
    padding: 48px 24px 32px;
    width: 90%;
    max-width: 400px;
    min-height: 70vh;
    min-height: 70dvh;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .wp-popup__title {
    font-size: 24px;
  }
}
