/* Newsletter Popup — Ofigo.es */
.nl-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s;
}
.nl-overlay.nl-overlay--visible {
  opacity: 1;
  visibility: visible;
}
.nl-popup {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  max-width: 480px;
  width: 92%;
  overflow: hidden;
  transform: translateY(30px) scale(.95);
  transition: transform .35s ease;
  position: relative;
}
.nl-overlay--visible .nl-popup {
  transform: translateY(0) scale(1);
}
.nl-popup__close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,.85);
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  line-height: 1;
  z-index: 2;
  transition: background .2s ease, color .2s ease;
}
.nl-popup__close:hover { background: rgba(255,255,255,.15); color: #fff; }
.nl-popup__close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.nl-popup__header {
  background: linear-gradient(135deg, var(--primary, #2563eb) 0%, #1d4ed8 100%);
  color: #fff;
  padding: 28px 28px 24px;
  text-align: center;
}
.nl-popup__icon {
  font-size: 36px;
  margin-bottom: 8px;
}
.nl-popup__title {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 6px;
  line-height: 1.2;
}
.nl-popup__subtitle {
  font-size: .9rem;
  margin: 0;
  line-height: 1.4;
}
.nl-popup__body {
  padding: 24px 28px 28px;
}
.nl-popup__benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nl-popup__benefits li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .88rem;
  color: #374151;
}
.nl-popup__benefits li svg {
  flex-shrink: 0;
  color: #16a34a;
}
.nl-popup__form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.nl-popup__input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  font-size: .95rem;
  font-family: inherit;
  transition: border-color .2s;
  box-sizing: border-box;
}
.nl-popup__input:focus {
  outline: none;
  border-color: var(--primary, #2563eb);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.nl-popup__submit {
  width: 100%;
  padding: 12px;
  background: var(--primary, #2563eb);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .2s;
}
.nl-popup__submit:hover { background: #1d4ed8; }
.nl-popup__submit:focus-visible { outline: 2px solid #fff; outline-offset: -2px; box-shadow: 0 0 0 4px var(--primary, #2563eb); }
.nl-popup__submit:disabled {
  opacity: .6;
  cursor: not-allowed;
}
.nl-popup__privacy {
  font-size: .75rem;
  color: var(--muted, #6b7280);
  text-align: center;
  margin: 10px 0 0;
  line-height: 1.4;
}
.nl-popup__msg {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: .88rem;
  text-align: center;
  margin-bottom: 10px;
  display: none;
}
.nl-popup__msg--success {
  display: block;
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}
.nl-popup__msg--error {
  display: block;
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
/* Honeypot */
.nl-popup__hp { position: absolute; left: -9999px; }

/* Success state */
.nl-popup__success {
  text-align: center;
  padding: 20px 0 10px;
}
.nl-popup__success-icon {
  width: 56px;
  height: 56px;
  background: #dcfce7;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.nl-popup__success-icon svg { color: #16a34a; }
.nl-popup__success h3 {
  font-size: 1.15rem;
  margin: 0 0 6px;
  color: #111;
}
.nl-popup__success p {
  color: #6b7280;
  font-size: .9rem;
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  .nl-overlay { transition: none; }
  .nl-popup { transition: none; transform: none; }
  .nl-overlay--visible .nl-popup { transform: none; }
  .nl-popup__close { transition: none; }
  .nl-popup__input { transition: none; }
  .nl-popup__submit { transition: none; }
}

@media (forced-colors: active) {
  .nl-popup__submit { border: 2px solid ButtonText; }
  .nl-popup__success-icon { forced-color-adjust: none; }
  .nl-popup__input:focus { outline: 2px solid Highlight; }
}

@media print {
  .nl-overlay { display: none !important; }
}

@media (max-width: 480px) {
  .nl-popup__header { padding: 22px 20px 18px; }
  .nl-popup__title { font-size: 1.15rem; }
  .nl-popup__body { padding: 18px 20px 22px; }
}
