/* ═══════════════════════════════════════════════
   BecaShop Newsletter — Modal + Footer Form
   ═══════════════════════════════════════════════ */

/* ——— Variables ——— */
:root {
  --nl-ink: #0f1b2d;
  --nl-ink-soft: #43516a;
  --nl-ink-mute: #8794a8;
  --nl-line: #e2e6ea;
  --nl-line-soft: #f1f3f5;
  --nl-card: #ffffff;
  --nl-blue: #2f6dd6;
  --nl-blue-ink: #1f4ea6;
  --nl-blue-soft: #eaf1fc;
  --nl-green: #7fbf4d;
  --nl-red: #d7332c;
  --nl-radius: 16px;
}

/* ═══════════════════════════════════════════════
   MODAL — Backdrop
   ═══════════════════════════════════════════════ */
.nl-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 27, 45, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s ease, visibility .35s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.nl-backdrop.nl-visible {
  opacity: 1;
  visibility: visible;
}

/* ——— Modal shell ——— */
.nl-modal {
  background: var(--nl-card);
  border-radius: 18px;
  box-shadow: 0 30px 80px -20px rgba(15,27,45,.35), 0 10px 25px -10px rgba(15,27,45,.15);
  overflow: hidden;
  position: relative;
  max-width: 880px;
  width: 100%;
  transform: scale(.92);
  opacity: 0;
  transition: transform .45s cubic-bezier(.2,.8,.2,1.05), opacity .35s ease;
}
.nl-backdrop.nl-visible .nl-modal {
  transform: scale(1);
  opacity: 1;
}

/* ——— Close button ——— */
.nl-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50% !important;
  background: rgba(255,255,255,.85) !important;
  backdrop-filter: blur(4px);
  border: 1px solid var(--nl-line) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--nl-ink) !important;
  z-index: 3;
  transition: background .15s ease, transform .15s ease;
  padding: 0;
  line-height: 1;
}
.nl-close:hover {
  background: #fff !important;
  transform: scale(1.08);
}
.nl-close svg {
  width: 14px;
  height: 14px;
}

/* ═══════════════════════════════════════════════
   MODAL — Split layout
   ═══════════════════════════════════════════════ */
.nl-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 520px;
}

/* Visual side (image) */
.nl-visual {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nl-visual-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 8s ease;
}
.nl-backdrop.nl-visible .nl-visual-img {
  transform: scale(1.06);
}
.nl-visual-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(47,109,214,.7) 0%, rgba(31,78,166,.55) 100%);
  z-index: 1;
}
.nl-visual-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  padding: 40px;
}
.nl-visual-discount {
  font-size: 80px;
  font-weight: 700;
  line-height: .9;
  letter-spacing: -0.03em;
  text-shadow: 0 4px 20px rgba(0,0,0,.2);
}
.nl-visual-discount-label {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-top: 8px;
  opacity: .9;
}

/* Content side */
.nl-content {
  padding: 52px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ——— Badge ——— */
.nl-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--nl-blue-ink);
  background: var(--nl-blue-soft);
  padding: 6px 12px;
  border-radius: 100px;
  align-self: flex-start;
  margin-bottom: 16px;
}
.nl-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--nl-blue);
}

/* ——— Headline ——— */
.nl-headline {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--nl-ink);
  margin: 0 0 12px;
}
.nl-headline em {
  font-style: normal;
  color: var(--nl-blue);
}

/* ——— Subtitle ——— */
.nl-sub {
  color: var(--nl-ink-soft);
  font-size: 14.5px;
  line-height: 1.55;
  margin: 0 0 24px;
}

/* ═══════════════════════════════════════════════
   MODAL — Form elements
   ═══════════════════════════════════════════════ */
.nl-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.nl-modal .nl-input,
.nl-footer-section .nl-input {
  width: 100%;
  padding: 14px 16px !important;
  border-radius: 10px !important;
  border: 1.5px solid var(--nl-line) !important;
  font-family: inherit;
  font-size: 14.5px !important;
  background: #fff !important;
  color: var(--nl-ink) !important;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
  box-shadow: none !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
}
.nl-modal .nl-input:focus {
  border-color: var(--nl-blue) !important;
  box-shadow: 0 0 0 3px rgba(47,109,214,.15) !important;
}
.nl-modal .nl-input::placeholder,
.nl-footer-section .nl-input::placeholder {
  color: var(--nl-ink-mute) !important;
}
.nl-modal .nl-input.nl-input-error {
  border-color: var(--nl-red) !important;
  box-shadow: 0 0 0 3px rgba(215,51,44,.1) !important;
}

/* Consent checkbox — high specificity to override site styles */
.nl-consent {
  display: flex !important;
  gap: 10px;
  align-items: flex-start;
  font-size: 12px;
  color: var(--nl-ink-soft);
  line-height: 1.5;
  cursor: pointer;
  margin: 0 !important;
  padding: 0 !important;
}
.nl-consent input[type="checkbox"],
.nl-footer-consent-wrap input[type="checkbox"] {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  border: 1.5px solid var(--nl-line) !important;
  border-radius: 4px !important;
  background: #fff !important;
  flex: 0 0 18px !important;
  margin: 1px 0 0 0 !important;
  padding: 0 !important;
  cursor: pointer;
  position: relative;
  transition: background .15s, border-color .15s;
  outline: none !important;
  box-shadow: none !important;
}
.nl-consent input[type="checkbox"]:checked,
.nl-footer-consent-wrap input[type="checkbox"]:checked {
  background: var(--nl-blue) !important;
  border-color: var(--nl-blue) !important;
}
.nl-consent input[type="checkbox"]:checked::after,
.nl-footer-consent-wrap input[type="checkbox"]:checked::after {
  content: "" !important;
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid #fff !important;
  border-width: 0 2px 2px 0 !important;
  transform: rotate(45deg);
  display: block !important;
}
.nl-consent a {
  color: var(--nl-ink) !important;
  text-decoration: underline !important;
  text-underline-offset: 2px;
}
.nl-consent span {
  flex: 1;
}

/* Submit button */
.nl-btn {
  background: var(--nl-blue) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 10px !important;
  padding: 14px 20px !important;
  font-family: inherit;
  font-weight: 600;
  font-size: 14.5px !important;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  transition: background .15s, transform .1s;
  position: relative;
  overflow: hidden;
  text-transform: none !important;
  letter-spacing: 0 !important;
  line-height: 1.4 !important;
}
.nl-btn:hover {
  background: var(--nl-blue-ink) !important;
  color: #fff !important;
}
.nl-btn:active {
  transform: translateY(1px);
}
.nl-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}
.nl-btn .nl-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: nlSpin .6s linear infinite;
}
.nl-btn.nl-loading .nl-btn-text { visibility: hidden; }
.nl-btn.nl-loading .nl-spinner { display: block; position: absolute; }
@keyframes nlSpin { to { transform: rotate(360deg); } }

/* Footnote */
.nl-footnote {
  margin-top: 14px;
  font-size: 11.5px;
  color: var(--nl-ink-mute);
}

/* Error message */
.nl-error-msg {
  font-size: 12.5px;
  color: var(--nl-red);
  display: none;
  margin-top: -4px;
}
.nl-error-msg.nl-show {
  display: block;
}

/* ═══════════════════════════════════════════════
   MODAL — Success state (confetti)
   ═══════════════════════════════════════════════ */
.nl-success {
  padding: 56px 48px 44px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

/* Confetti particles */
.nl-confetti {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}
.nl-confetti span {
  position: absolute;
  width: 8px;
  height: 12px;
  opacity: .85;
  border-radius: 1px;
  animation: nlFall 2.6s linear forwards;
}
@keyframes nlFall {
  from { transform: translateY(-20px) rotate(0); opacity: 1; }
  to { transform: translateY(520px) rotate(680deg); opacity: 0; }
}

/* Checkmark */
.nl-check-ring {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--nl-blue-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  position: relative;
  z-index: 2;
  animation: nlRingPop .5s cubic-bezier(.2,.8,.2,1.2) both;
}
@keyframes nlRingPop {
  from { transform: scale(.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.nl-check-ring svg {
  width: 32px;
  height: 32px;
  color: var(--nl-blue);
}
.nl-check-path {
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
  animation: nlDrawCheck .5s .25s ease forwards;
}
@keyframes nlDrawCheck { to { stroke-dashoffset: 0; } }

.nl-success .nl-headline {
  position: relative;
  z-index: 2;
}
.nl-success .nl-sub {
  position: relative;
  z-index: 2;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  max-width: 38ch;
}
.nl-success .nl-btn {
  position: relative;
  z-index: 2;
  width: auto;
  max-width: 300px;
  background: var(--nl-ink) !important;
}
.nl-success .nl-btn:hover {
  background: #1a2840 !important;
}

/* ═══════════════════════════════════════════════
   FOOTER — Newsletter section
   ═══════════════════════════════════════════════ */
.nl-footer-section {
  background: linear-gradient(135deg, #0f1b2d 0%, #1a2e4a 100%);
  color: #fff;
  padding: 48px 0;
  margin-top: 0;
}
.nl-footer-inner {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}
.nl-footer-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.nl-footer-title em {
  color: var(--nl-blue);
  font-style: normal;
}
.nl-footer-sub {
  font-size: 14px;
  color: rgba(255,255,255,.6);
  margin: 0 0 24px;
  line-height: 1.5;
}
.nl-footer-form {
  display: flex;
  gap: 10px;
  max-width: 480px;
  margin: 0 auto 16px;
}
.nl-footer-section .nl-input {
  flex: 1;
  border: 1.5px solid rgba(255,255,255,.18) !important;
  background: rgba(255,255,255,.08) !important;
  color: #fff !important;
  border-radius: 10px !important;
}
.nl-footer-section .nl-input:focus {
  border-color: var(--nl-blue) !important;
  background: rgba(255,255,255,.12) !important;
  box-shadow: 0 0 0 3px rgba(47,109,214,.2) !important;
}
.nl-footer-section .nl-input::placeholder {
  color: rgba(255,255,255,.35) !important;
}
.nl-footer-form .nl-btn {
  width: auto;
  flex-shrink: 0;
  padding: 14px 24px !important;
}
/* Footer consent with checkbox */
.nl-footer-consent-wrap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 480px;
  margin: 0 auto 6px;
  text-align: left;
}
.nl-footer-consent-wrap input[type="checkbox"] {
  border-color: rgba(255,255,255,.25) !important;
  background: rgba(255,255,255,.08) !important;
  margin-top: 2px !important;
}
.nl-footer-consent-wrap input[type="checkbox"]:checked {
  background: var(--nl-blue) !important;
  border-color: var(--nl-blue) !important;
}
.nl-footer-consent-text {
  font-size: 11.5px;
  color: rgba(255,255,255,.45);
  line-height: 1.5;
}
.nl-footer-consent-text a {
  color: rgba(255,255,255,.65) !important;
  text-decoration: underline !important;
  text-underline-offset: 2px;
}
.nl-footer-success {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  padding: 16px 0;
}
.nl-footer-success.nl-show {
  display: flex;
}
.nl-footer-success svg {
  width: 22px;
  height: 22px;
  color: var(--nl-blue);
}
.nl-footer-success span {
  color: #fff;
}
.nl-footer-success-sub {
  font-size: 13px;
  color: rgba(255,255,255,.5);
  font-weight: 400;
  margin-top: 4px;
}
.nl-footer-error {
  display: none;
  font-size: 13px;
  color: #ff6b6b;
  margin-top: 8px;
}
.nl-footer-error.nl-show {
  display: block;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════
   FIX — Magnific Popup modals on mobile
   ═══════════════════════════════════════════════ */
@media (max-width: 767px) {
  /* Full-width modal on mobile */
  .mfp-container {
    padding: 0 !important;
  }
  .modal-popup-main.p-50px {
    padding: 24px 20px 28px !important;
    max-width: 100% !important;
    width: 100% !important;
    max-height: 100vh;
    max-height: 100dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 0 !important;
    box-sizing: border-box;
  }
  /* Remove inner col-11 restriction so text uses full width */
  .modal-popup-main .row > [class*="col-11"] {
    width: 100% !important;
    flex: 0 0 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  /* Title */
  .modal-popup-main .fs-24 {
    font-size: 20px !important;
    margin-top: 28px !important;
  }
  /* Text readability */
  .modal-popup-main p,
  .modal-popup-main li {
    font-size: 14px !important;
    line-height: 1.65 !important;
  }
  /* Close button — fixed top-right corner */
  .modal-popup-main button.mfp-close,
  .modal-popup-main button.mfp-close:active {
    position: fixed !important;
    right: 12px !important;
    top: 12px !important;
    width: 38px !important;
    height: 38px !important;
    background: #fff !important;
    border-radius: 50% !important;
    box-shadow: 0 2px 12px rgba(0,0,0,.15) !important;
    z-index: 10;
    display: flex !important;
    align-items: center;
    justify-content: center;
  }
  .modal-popup-main button.mfp-close:before {
    font-size: 16px !important;
    color: #333 !important;
  }
  /* Close button at bottom */
  .modal-popup-main .popup-modal-dismiss {
    margin-bottom: 20px !important;
  }
}

@media (max-width: 720px) {
  .nl-backdrop {
    align-items: flex-start;
    padding: 12px;
  }
  .nl-modal {
    margin: auto 0;
    max-height: none;
    border-radius: 14px;
  }
  .nl-split {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .nl-visual {
    min-height: 160px;
    max-height: 180px;
  }
  .nl-visual-content {
    padding: 24px;
  }
  .nl-visual-discount {
    font-size: 48px;
  }
  .nl-visual-discount-label {
    font-size: 13px;
  }
  .nl-content {
    padding: 28px 24px 32px;
  }
  .nl-headline {
    font-size: 24px;
  }
  .nl-sub {
    font-size: 13.5px;
    margin-bottom: 18px;
  }
  .nl-badge {
    margin-bottom: 12px;
  }
  .nl-success {
    padding: 36px 24px 32px;
  }
  .nl-footer-form {
    flex-direction: column;
  }
  .nl-footer-form .nl-btn {
    width: 100%;
  }
}
