/**
 * Aslam Free Resources — modal styles.
 * Reuses the theme's existing CSS custom properties (gold, ink, radius, fonts)
 * with safe fallbacks, so it inherits the site's design without altering it.
 */

/* ---- Header nav button (outline gold, so it complements the existing solid CTA) ---- */
.main-nav li.frs-menu-cta > a {
  background: transparent;
  color: var(--gold-bright, #E8C766);
  border: 1px solid var(--gold, #C9A227);
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.main-nav li.frs-menu-cta > a:hover {
  background: var(--gold-soft, rgba(201,162,39,.12));
  color: var(--gold-bright, #E8C766);
  transform: translateY(-2px);
}
/* Mobile slide-in menu: keep this button visible and full-width.
   (The theme hides .header-cta-desktop here, which is why we don't use it.) */
@media (max-width: 992px) {
  /* Adding an extra item makes the menu taller than short screens.
     Allow it to scroll so every item stays reachable. */
  .main-nav {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 40px !important;
  }
  .main-nav li.frs-menu-cta {
    display: block !important;
    width: 100%;
    border-bottom: 0 !important;
  }
  .main-nav li.frs-menu-cta > a {
    display: block;
    width: 100%;
    margin-top: 18px;
    padding: 14px 20px;
    text-align: center;
    font-size: 1rem;
  }
}

/* ---- Overlay + modal ---- */
.aslam-frs-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5, 7, 11, .78);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .25s ease;
  overflow-y: auto;
}
.aslam-frs-overlay.is-open { opacity: 1; }
.aslam-frs-overlay[hidden] { display: none; }

.aslam-frs-modal {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: auto;
  background: var(--bg-elevated, #121826);
  border: 1px solid var(--line, rgba(255,255,255,.08));
  border-radius: 18px;
  padding: 40px 34px 32px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
  transform: translateY(14px);
  transition: transform .25s ease;
  font-family: var(--font-body, "Inter", "Segoe UI", Helvetica, Arial, sans-serif);
  color: var(--ink-secondary, #A8B2C2);
}
.aslam-frs-overlay.is-open .aslam-frs-modal { transform: none; }

.aslam-frs-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: 0;
  color: var(--ink-muted, #8A93A4);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  transition: color .2s ease;
}
.aslam-frs-close:hover { color: var(--gold-bright, #E8C766); }

.aslam-frs-eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold, #C9A227);
  margin-bottom: 10px;
}
.aslam-frs-modal h2 {
  font-family: var(--font-display, "Sora", Georgia, serif);
  color: var(--ink-primary, #F5F7FA);
  font-size: 1.6rem;
  line-height: 1.2;
  margin: 0 0 10px;
  font-weight: 700;
}
.aslam-frs-sub { margin: 0 0 24px; font-size: .96rem; line-height: 1.6; }

/* ---- Fields ---- */
.aslam-frs-field { margin-bottom: 16px; }
.aslam-frs-field label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--ink-primary, #F5F7FA);
  margin-bottom: 6px;
}
.aslam-frs-field label span { color: var(--gold, #C9A227); }
.aslam-frs-field input {
  width: 100%;
  padding: 13px 15px;
  border-radius: 10px;
  border: 1px solid var(--line, rgba(255,255,255,.08));
  background: var(--bg-base, #0A0E14);
  color: var(--ink-primary, #F5F7FA);
  font-family: inherit;
  font-size: .98rem;
  transition: border-color .2s ease;
}
.aslam-frs-field input:focus {
  outline: none;
  border-color: var(--gold, #C9A227);
}
.aslam-frs-field.has-error input { border-color: #c0564f; }
.aslam-frs-error {
  display: none;
  font-size: .82rem;
  color: #e08a84;
  margin-top: 5px;
}
.aslam-frs-field.has-error .aslam-frs-error { display: block; }

/* Honeypot: hidden from humans, visible to naive bots. */
.aslam-frs-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---- Submit ---- */
.aslam-frs-submit {
  width: 100%;
  margin-top: 6px;
  padding: 15px 26px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--bg-deep, #05070B);
  background: var(--gold-grad, linear-gradient(135deg, #C9A227 0%, #E8C766 50%, #B8901E 100%));
  box-shadow: 0 8px 30px rgba(201, 162, 39, .25);
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}
.aslam-frs-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 38px rgba(201, 162, 39, .40);
}
.aslam-frs-submit:disabled { opacity: .65; cursor: not-allowed; }

.aslam-frs-note {
  text-align: center;
  font-size: .8rem;
  color: var(--ink-muted, #8A93A4);
  margin: 12px 0 0;
}
.aslam-frs-formerror {
  display: none;
  margin: 12px 0 0;
  font-size: .88rem;
  color: #e08a84;
  text-align: center;
}
.aslam-frs-formerror.is-visible { display: block; }

/* ---- Success ---- */
.aslam-frs-step[data-step="success"] { text-align: center; }
.aslam-frs-tick {
  width: 58px;
  height: 58px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--bg-deep, #05070B);
  background: var(--gold-grad, linear-gradient(135deg, #C9A227, #E8C766));
}
.aslam-frs-downloads {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 22px;
}
.aslam-frs-dl {
  display: block;
  padding: 15px 22px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: .98rem;
  color: var(--bg-deep, #05070B);
  background: var(--gold-grad, linear-gradient(135deg, #C9A227, #E8C766));
  transition: transform .2s ease;
}
.aslam-frs-dl:hover { transform: translateY(-2px); color: var(--bg-deep, #05070B); }

/* ---- Responsive ---- */
@media (max-width: 520px) {
  .aslam-frs-modal { padding: 34px 22px 26px; border-radius: 16px; }
  .aslam-frs-modal h2 { font-size: 1.35rem; }
}

@media (prefers-reduced-motion: reduce) {
  .aslam-frs-overlay,
  .aslam-frs-modal,
  .aslam-frs-submit,
  .aslam-frs-dl { transition: none !important; }
}

/* ---- Footer newsletter form (captures to Free Resource Leads) ---- */
.aslam-news-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.aslam-news-msg {
  margin: 10px 0 0;
  font-size: .82rem;
  line-height: 1.5;
  min-height: 1em;
}
.aslam-news-msg.is-ok  { color: var(--gold-bright, #E8C766); }
.aslam-news-msg.is-err { color: #e08a84; }

/* ---- Lead-magnet landing page forms ---- */
.aslam-lm-err {
  display: none;
  font-size: .82rem;
  color: #e08a84;
  margin: -6px 0 10px;
}
.aslam-lm-msg {
  display: none;
  margin: 12px 0 0;
  font-size: .88rem;
  color: #e08a84;
}
.aslam-lm-success {
  text-align: center;
  padding: 28px 24px;
  border: 1px solid var(--line, rgba(255,255,255,.08));
  border-radius: 16px;
  background: var(--bg-elevated, #121826);
}
.aslam-lm-success[hidden] { display: none; }
.aslam-lm-tick {
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--bg-deep, #05070B);
  background: var(--gold-grad, linear-gradient(135deg, #C9A227, #E8C766));
}
.aslam-lm-success h3 {
  margin: 0 0 8px;
  font-family: var(--font-display, "Sora", Georgia, serif);
  color: var(--ink-primary, #F5F7FA);
  font-size: 1.3rem;
}
.aslam-lm-success p {
  margin: 0;
  color: var(--ink-secondary, #A8B2C2);
  font-size: .95rem;
  line-height: 1.6;
}
