/**
 * iGaming Compliance — Newsletter modal
 * Sandboxed under .igc-nl-* to avoid colliding with theme styles.
 *
 * Palette matches the site shell:
 *   --igc-bg          #050B1A   (deep navy backdrop)
 *   --igc-bg-elev     #0A1426   (panel)
 *   --igc-bg-elev-2   #0F1E3C   (inner cards)
 *   --igc-text        #E2E8F0
 *   --igc-text-dim    #94A3B8
 *   --igc-accent      #3B82F6   (blue, used for focus rings)
 *   #F5C842           gold accent for editorial CTAs (Tuesday Brief)
 */

.igc-nl-modal {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  visibility: hidden; opacity: 0;
  transition: opacity .22s ease;
}
.igc-nl-modal.is-open { visibility: visible; opacity: 1; }

.igc-nl-modal__backdrop {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(245,200,66,.10), transparent 60%),
    radial-gradient(ellipse 70% 60% at 50% 100%, rgba(59,130,246,.08), transparent 60%),
    rgba(5,11,26,.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}

.igc-nl-modal__panel {
  position: relative;
  background: linear-gradient(180deg, #0A1426 0%, #050B1A 100%);
  color: #E2E8F0;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  width: 100%;
  max-width: 520px;
  padding: 36px 36px 30px;
  box-shadow:
    0 30px 80px rgba(0,0,0,.7),
    0 0 0 1px rgba(245,200,66,.18),
    inset 0 1px 0 rgba(255,255,255,.04);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  transform: translateY(12px) scale(.98);
  opacity: 0;
  transition: transform .28s cubic-bezier(.22,.96,.3,1), opacity .22s ease;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}
.igc-nl-modal.is-open .igc-nl-modal__panel { transform: translateY(0) scale(1); opacity: 1; }

.igc-nl-modal__panel::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, #F5C842 0%, #f0a832 100%);
  border-radius: 18px 0 0 18px;
  box-shadow: 0 0 24px rgba(245,200,66,.45);
}

.igc-nl-modal__close {
  position: absolute; top: 12px; right: 12px;
  width: 34px; height: 34px;
  border: none; background: transparent;
  font-size: 24px; line-height: 1; color: #94A3B8;
  cursor: pointer; border-radius: 8px;
  transition: background .15s ease, color .15s ease;
}
.igc-nl-modal__close:hover { background: rgba(255,255,255,.06); color: #E2E8F0; }

.igc-nl-modal__eyebrow {
  display: inline-block;
  background: rgba(245,200,66,.12);
  color: #F5C842;
  border: 1px solid rgba(245,200,66,.28);
  font-size: 11px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  padding: 4px 11px; border-radius: 999px;
  margin-bottom: 16px;
}

.igc-nl-modal__title {
  margin: 0 0 12px;
  font-size: 28px; line-height: 1.2; letter-spacing: -0.01em;
  font-weight: 800; color: #FFFFFF;
}
.igc-nl-modal__title em {
  font-style: normal;
  background: linear-gradient(120deg, #F5C842 0%, #FDE68A 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.igc-nl-modal__lede {
  margin: 0 0 18px;
  font-size: 15px; line-height: 1.6; color: #94A3B8;
}

.igc-nl-modal__benefits {
  margin: 0 0 22px; padding: 12px 16px; list-style: none;
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 10px;
}
.igc-nl-modal__benefits li {
  font-size: 13.5px; line-height: 1.55; color: #CBD5E1;
  padding: 6px 0; display: flex; gap: 10px; align-items: flex-start;
}
.igc-nl-modal__benefits li + li { border-top: 1px dashed rgba(255,255,255,.08); }
.igc-nl-modal__benefits span {
  color: #F5C842; font-weight: 800; font-size: 14px; flex: none;
}

.igc-nl-modal__form { display: block; }
.igc-nl-modal__row { display: flex; gap: 8px; margin-bottom: 10px; }
@media (max-width: 460px) {
  .igc-nl-modal__row { flex-direction: column; }
}

.igc-nl-modal__input {
  flex: 1 1 auto; min-width: 0;
  padding: 13px 14px;
  font-family: inherit; font-size: 15px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 10px;
  background: rgba(255,255,255,.03);
  color: #E2E8F0;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  -webkit-appearance: none;
}
.igc-nl-modal__input--name { flex: 0 1 40%; }
.igc-nl-modal__input:focus {
  outline: none;
  border-color: #F5C842;
  background: rgba(255,255,255,.05);
  box-shadow: 0 0 0 3px rgba(245,200,66,.18);
}
.igc-nl-modal__input::placeholder { color: rgba(148,163,184,.6); }

.igc-nl-modal__hp {
  position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none;
}

.igc-nl-modal__consent {
  display: flex; gap: 10px; align-items: flex-start;
  margin: 12px 0 18px;
  font-size: 12px; line-height: 1.55; color: #94A3B8;
  cursor: pointer;
}
.igc-nl-modal__consent input {
  margin-top: 2px; flex: none;
  width: 16px; height: 16px;
  accent-color: #F5C842;
}
.igc-nl-modal__consent a { color: #E2E8F0; text-decoration: underline; text-decoration-color: rgba(245,200,66,.5); }
.igc-nl-modal__consent a:hover { text-decoration-color: #F5C842; }
.igc-nl-modal__consent strong { color: #E2E8F0; }

.igc-nl-modal__submit {
  position: relative;
  width: 100%;
  padding: 14px 18px;
  font-family: inherit; font-size: 15px; font-weight: 700;
  color: #050B1A; background: #F5C842;
  border: none; border-radius: 10px;
  cursor: pointer; letter-spacing: .01em;
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease;
  box-shadow: 0 8px 24px rgba(245,200,66,.32);
}
.igc-nl-modal__submit:hover { transform: translateY(-1px); background: #FDE68A; box-shadow: 0 12px 30px rgba(245,200,66,.42); }
.igc-nl-modal__submit:disabled { cursor: wait; opacity: .8; }
.igc-nl-modal__submit.is-loading .igc-nl-modal__submit-label { opacity: .35; }
.igc-nl-modal__submit-spin {
  position: absolute; left: 50%; top: 50%;
  width: 18px; height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid rgba(5,11,26,.25);
  border-top-color: #050B1A;
  border-radius: 50%;
  opacity: 0;
  animation: igc-nl-spin .8s linear infinite;
}
.igc-nl-modal__submit.is-loading .igc-nl-modal__submit-spin { opacity: 1; }
@keyframes igc-nl-spin { to { transform: rotate(360deg); } }

.igc-nl-modal__legal {
  margin: 12px 0 0;
  font-size: 11px; line-height: 1.5; color: rgba(148,163,184,.7);
  text-align: center;
}

.igc-nl-modal__error {
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(239,68,68,.10);
  color: #FCA5A5;
  border: 1px solid rgba(239,68,68,.30);
  border-radius: 8px;
  font-size: 13px;
}

.igc-nl-modal__success { text-align: center; padding: 14px 0 6px; }
.igc-nl-modal__success-dot {
  width: 56px; height: 56px; margin: 0 auto 14px;
  border-radius: 999px; background: #F5C842;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 26px; color: #050B1A; font-weight: 900;
  box-shadow: 0 0 0 6px rgba(245,200,66,.18), 0 8px 24px rgba(245,200,66,.32);
}
.igc-nl-modal__success h3 {
  margin: 0 0 8px; font-size: 22px; line-height: 1.25;
  color: #FFFFFF; font-weight: 800;
}
.igc-nl-modal__success p { margin: 0; font-size: 14px; color: #94A3B8; }

/* Make sure `hidden` actually hides — some theme rules use display flex/block. */
.igc-nl-modal__form[hidden],
.igc-nl-modal__success[hidden],
.igc-nl-modal__error[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .igc-nl-modal, .igc-nl-modal__panel, .igc-nl-modal__submit, .igc-nl-modal__submit-spin {
    transition: none !important; animation: none !important;
  }
}
