/* =============================================================================
   IGY6 Armory — /webinar Text Alerts banner + opt-in modal
   See inc/webinar-sms-alerts.php and docs/WEBINAR-SMS-ALERTS.md.
   Palette: night #0a0f1a/#111827/#1f2937/#374151, armor red #dc2626/#b91c1c/#ef4444.
   ============================================================================= */

/* ── Banner ─────────────────────────────────────────────────────────────── */
.igy6-sms-cta {
  background: #0a0f1a;
  padding: 1.5rem 0;
  border-bottom: 1px solid #1f2937;
}
.igy6-sms-cta__card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 1.75rem;
  border: 1px solid rgba(220, 38, 38, 0.45);
  border-radius: 0.75rem;
  background:
    radial-gradient(120% 160% at 0% 0%, rgba(220, 38, 38, 0.22) 0%, rgba(220, 38, 38, 0) 55%),
    linear-gradient(135deg, #1f2937 0%, #111827 100%);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  overflow: hidden;
}
.igy6-sms-cta__card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: #dc2626;
}
.igy6-sms-cta__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(220, 38, 38, 0.5);
  color: #ef4444;
  font-size: 1.5rem;
  animation: igy6-sms-pulse 2.6s ease-in-out infinite;
}
@keyframes igy6-sms-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.45); }
  50%      { box-shadow: 0 0 0 10px rgba(220, 38, 38, 0); }
}
.igy6-sms-cta__text { flex: 1 1 auto; min-width: 0; }
.igy6-sms-cta__eyebrow {
  margin: 0 0 0.25rem;
  color: #ef4444;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.25em;
}
.igy6-sms-cta__heading {
  margin: 0;
  font-family: var(--dpa-font-display, 'Barlow Condensed', sans-serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.1;
  color: #ffffff;
}
.igy6-sms-cta__sub {
  margin: 0.375rem 0 0;
  color: #9ca3af;
  font-size: 0.95rem;
  line-height: 1.5;
}
.igy6-sms-cta__action { flex-shrink: 0; }

/* Button: matches .igy6-btn-armor (solid armor red, uppercase, glow on hover) */
.igy6-sms-cta__btn,
.igy6-sms-modal__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3.25rem;
  padding: 0 1.75rem;
  background: #dc2626;
  border: 2px solid #dc2626;
  border-radius: 0.375rem;
  color: #ffffff !important;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.1;
  text-decoration: none !important;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.3s, transform 0.15s;
}
.igy6-sms-cta__btn:hover,
.igy6-sms-cta__btn:focus-visible,
.igy6-sms-modal__btn:hover,
.igy6-sms-modal__btn:focus-visible {
  background: #b91c1c;
  border-color: #b91c1c;
  box-shadow: 0 0 22px 4px rgba(220, 38, 38, 0.45);
  color: #ffffff;
  outline: none;
}
.igy6-sms-cta__btn:active,
.igy6-sms-modal__btn:active { transform: translateY(1px); }
.igy6-sms-modal__btn--outline {
  background: transparent;
  color: #ef4444 !important;
}
.igy6-sms-modal__btn--outline:hover,
.igy6-sms-modal__btn--outline:focus-visible { color: #ffffff !important; }
.igy6-sms-modal__btn[disabled] { opacity: 0.65; cursor: wait; box-shadow: none; }

@media (max-width: 768px) {
  .igy6-sms-cta { padding: 1rem 0; }
  .igy6-sms-cta__card {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem 1.25rem 1.25rem 1.5rem;
  }
  .igy6-sms-cta__icon { width: 3rem; height: 3rem; font-size: 1.25rem; }
  .igy6-sms-cta__action, .igy6-sms-cta__btn { width: 100%; }
  .igy6-sms-cta__btn { white-space: normal; }
}

/* ── Modal ──────────────────────────────────────────────────────────────── */
.igy6-sms-modal[hidden] { display: none !important; }
.igy6-sms-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.igy6-sms-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 7, 18, 0.82);
  backdrop-filter: blur(3px);
  animation: igy6-sms-fade 0.18s ease;
}
.igy6-sms-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 34rem;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  background: #111827;
  border: 1px solid #374151;
  border-top: 4px solid #dc2626;
  border-radius: 0.75rem;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7);
  color: #d1d5db;
  animation: igy6-sms-in 0.2s ease;
}
@keyframes igy6-sms-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes igy6-sms-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
.igy6-sms-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #374151;
  border-radius: 9999px;
  background: #1f2937;
  color: #9ca3af;
  font-size: 1rem;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.igy6-sms-modal__close:hover,
.igy6-sms-modal__close:focus-visible { color: #ffffff; border-color: #dc2626; outline: none; }

.igy6-sms-modal__head { padding: 1.75rem 1.75rem 0; text-align: center; }
.igy6-sms-modal__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 0.75rem;
  border-radius: 9999px;
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(220, 38, 38, 0.5);
  color: #ef4444;
  font-size: 1.25rem;
}
.igy6-sms-modal__eyebrow {
  margin: 0 0 0.25rem;
  color: #ef4444;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.25em;
}
.igy6-sms-modal__title {
  margin: 0;
  font-family: var(--dpa-font-display, 'Barlow Condensed', sans-serif);
  font-size: clamp(1.5rem, 4vw, 1.875rem);
  font-weight: 700;
  line-height: 1.15;
  color: #ffffff;
}
.igy6-sms-modal__body { padding: 1.25rem 1.75rem 1.75rem; }
.igy6-sms-modal__lead {
  margin: 0 0 1.25rem;
  color: #9ca3af;
  font-size: 0.95rem;
  line-height: 1.6;
  text-align: center;
}
.igy6-sms-modal__auth-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.igy6-sms-modal__auth-actions .igy6-sms-modal__btn { padding: 0 1rem; }
.igy6-sms-modal__fine {
  margin: 1rem 0 0;
  color: #6b7280;
  font-size: 0.8rem;
  line-height: 1.5;
  text-align: center;
}
@media (max-width: 480px) {
  .igy6-sms-modal__auth-actions { grid-template-columns: 1fr; }
  .igy6-sms-modal__head { padding: 1.5rem 1.25rem 0; }
  .igy6-sms-modal__body { padding: 1rem 1.25rem 1.5rem; }
}

/* ── Form ───────────────────────────────────────────────────────────────── */
.igy6-sms-form__status {
  display: flex;
  gap: 0.625rem;
  align-items: flex-start;
  margin: 0 0 1.25rem;
  padding: 0.875rem 1rem;
  border: 1px solid rgba(34, 197, 94, 0.4);
  border-radius: 0.5rem;
  background: rgba(34, 197, 94, 0.1);
  color: #bbf7d0;
  font-size: 0.875rem;
  line-height: 1.5;
}
.igy6-sms-form__status i { color: #4ade80; margin-top: 0.2rem; }
.igy6-sms-form__status strong { color: #ffffff; }
.igy6-sms-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.875rem 0.75rem;
}
.igy6-sms-form__field--wide { grid-column: 1 / -1; }
.igy6-sms-form__field label {
  display: block;
  margin-bottom: 0.375rem;
  color: #9ca3af;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.igy6-sms-form__optional { text-transform: none; letter-spacing: 0; font-weight: 400; color: #6b7280; }
.igy6-sms-form__field input {
  width: 100%;
  box-sizing: border-box;
  background: #0a0f1a;
  border: 1px solid #374151;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: #ffffff;
  outline: none;
  transition: border-color 0.2s;
}
.igy6-sms-form__field input:focus { border-color: #dc2626; }
.igy6-sms-form__field input::placeholder { color: #4b5563; }
.igy6-sms-form__field input[aria-invalid="true"] { border-color: #f87171; }
.igy6-sms-form__hint { margin: 0.5rem 0 1rem; color: #6b7280; font-size: 0.75rem; }
.igy6-sms-form__consent {
  padding: 0.875rem 1rem;
  border: 1px solid #1f2937;
  border-radius: 0.5rem;
  background: #0a0f1a;
}
.igy6-sms-form__message {
  margin-top: 1rem;
  padding: 0.875rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.5;
}
.igy6-sms-form__message--error {
  border: 1px solid rgba(248, 113, 113, 0.5);
  background: rgba(220, 38, 38, 0.12);
  color: #fecaca;
}
.igy6-sms-form__message--success {
  border: 1px solid rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.1);
  color: #bbf7d0;
}
.igy6-sms-form__submit { width: 100%; margin-top: 1.25rem; }
@media (max-width: 480px) {
  .igy6-sms-form__grid { grid-template-columns: 1fr; }
}

body.igy6-sms-modal-open { overflow: hidden; }

/* ── Opt back in step (number previously texted STOP) ───────────────────── */
.igy6-sms-form__resub {
  margin: 0 0 1rem;
  padding: 0.875rem 1rem;
  border: 1px solid var(--dpa-gold, #c9a227);
  border-radius: 6px;
  background: rgba(201, 162, 39, 0.08);
}
.igy6-sms-form__resub[hidden] { display: none; }
.igy6-sms-form__resub-text { margin: 0 0 0.75rem; }
.igy6-sms-form__resub-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.igy6-sms-form__resub-actions .igy6-sms-modal__btn { flex: 1 1 auto; }
.igy6-sms-consent { font-size: 0.8rem; line-height: 1.45; }
.igy6-sms-consent a { color: inherit; text-decoration: underline; }
