/* ==========================================================================
   Pestaña del boletín — 19/11/2026. Plantilla: templates/_partials/newsletter-tab.tpl · JS: assets/js/newsletter-tab.js
   Etiqueta fija a la derecha (a media altura) que despliega el panel. Colores del sitio: amarillo #ffd400,
   azul #1d2a55 (botón = «Añadir al carrito» de la ficha, hover #3750a3).
   ========================================================================== */
.mlnl { --mlnl-ink: #1d2a55; --mlnl-ink-2: #3750a3; --mlnl-text: #1a2332; --mlnl-muted: #687184; --mlnl-line: #e3e6eb; }
.mlnl[hidden] { display: none; }
html.mlcp-lock .mlnl { display: none; } /* con el cajón del carrito abierto */

.mlnl__tab {
  position: fixed; top: 50%; right: 0; z-index: 1040;
  display: flex; align-items: center; gap: 8px;
  padding: 14px 14px; border: 0; border-radius: 0 8px 8px 0;
  background: #010f41; color: #fff;
  box-shadow: -4px 4px 14px rgba(15, 20, 35, .58);
  font: inherit; font-size: 12px; font-weight: 600; letter-spacing: .04em; line-height: 1;
  writing-mode: vertical-rl; transform: translateY(-50%) rotate(180deg);
  cursor: pointer; transition: background-color .2s ease, opacity .25s ease, visibility .25s;
  outline: 1px dashed white !important; outline-offset: -4px;
}
button.mlnl__tab > span { color: #FFF !important; }
.mlnl__tab svg { width: 16px; height: 16px; flex: none; transform: rotate(90deg); }
.mlnl__tab:hover { background: #3750a3; }
.mlnl__tab:focus-visible { outline: 2px solid var(--mlnl-ink); outline-offset: 2px; }
.mlnl.is-open .mlnl__tab { visibility: hidden; opacity: 0; }

.mlnl__panel {
  position: fixed; top: 50%; right: 0; z-index: 1045;
  width: min(380px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow-y: auto; box-sizing: border-box;
  padding: 26px 24px 18px; border-radius: 12px 0 0 12px;
  background: #fff; color: var(--mlnl-text);
  box-shadow: -18px 0 40px -18px rgba(15, 20, 35, .45);
  transform: translate(calc(100% + 24px), -50%); visibility: hidden;
  transition: transform .35s cubic-bezier(.22, .7, .2, 1), visibility 0s linear .35s;
}
.mlnl.is-open .mlnl__panel { transform: translate(0, -50%); visibility: visible; transition-delay: 0s; }
.mlnl__close {
  position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0; border: 1px solid var(--mlnl-line); border-radius: 50%;
  background: #fff; color: var(--mlnl-ink); cursor: pointer;
}
.mlnl__close:hover { border-color: var(--mlnl-ink); }
.mlnl__close svg { width: 16px; height: 16px; }

.mlnl__kicker { margin: 0 44px 8px 0; color: var(--mlnl-muted); font-size: 11px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
.mlnl__title { margin: 0 30px 10px 0; color: var(--mlnl-ink); font-size: 22px; font-weight: 300; line-height: 1.2; text-wrap: balance; }
.mlnl__text { margin: 0 0 16px; color: #5b6575; font-size: 14px; line-height: 1.55; }

.mlnl__form { display: flex; flex-direction: column; gap: 10px; margin: 0; }
/* custom.css fuerza estilos de todos los input con !important: aquí se reafirman */
.mlnl .mlnl__email {
  width: 100% !important; height: 44px !important; margin: 0 !important; padding: 0 16px !important;
  border: 1px solid var(--mlnl-line) !important; border-radius: 8px !important; background: #fff !important;
  color: var(--mlnl-text) !important; font: inherit; font-size: 14px !important; box-shadow: none !important;
}
.mlnl .mlnl__email:focus { border-color: var(--mlnl-ink) !important; outline: none; box-shadow: 0 0 0 2px rgba(29, 42, 85, .12) !important; }
.mlnl__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.mlnl__submit {
  height: 46px; border: 0; border-radius: 8px; background: var(--mlnl-ink); color: #fff;
  font: inherit; font-size: 12px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  cursor: pointer; transition: background-color .25s ease;
}
.mlnl__submit:hover { background: var(--mlnl-ink-2); }
.mlnl__submit[disabled] { opacity: .5; cursor: not-allowed; }
.mlnl__submit[disabled]:hover { background: var(--mlnl-ink); }
.mlnl__submit.is-loading { opacity: .6; pointer-events: none; }

/* Consentimiento de psgdpr (#gdpr_consent en PROD, .gdpr_consent en staging): casilla nativa, como en la banda */
.mlnl :is(#gdpr_consent, .gdpr_consent) { margin: 0; }
.mlnl :is(#gdpr_consent, .gdpr_consent) .custom-checkbox { display: block; padding: 0; }
.mlnl :is(#gdpr_consent, .gdpr_consent) label.psgdpr_consent_message {
  display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 0; cursor: pointer;
  color: #5b6575; font-size: 12.5px; line-height: 1.45;
}
.mlnl :is(#gdpr_consent, .gdpr_consent) a { color: var(--mlnl-ink); text-decoration: underline; }
.mlnl :is(#gdpr_consent, .gdpr_consent) input[type="checkbox"] {
  display: inline-block !important; position: static !important; opacity: 1 !important; appearance: auto !important; -webkit-appearance: checkbox !important;
  width: 16px !important; height: 16px !important; margin: 1px 0 0 !important; flex: none; accent-color: var(--mlnl-ink); cursor: pointer;
}
.mlnl :is(#gdpr_consent, .gdpr_consent) input[type="checkbox"] + span { display: none !important; } /* casilla falsa del tema */

.mlnl__form [hidden] { display: none !important; }
.mlnl__msg { margin: 0; padding: 9px 12px; border-radius: 8px; font-size: 13px; line-height: 1.45; }
.mlnl__msg.is-ok { background: #e8f6ee; color: #146c3f; }
.mlnl__msg.is-error { background: #fdecea; color: #a5321f; }

.mlnl__small { margin: 14px 0 0; color: var(--mlnl-muted); font-size: 11.5px; line-height: 1.45; }
.mlnl__never {
  margin: 10px 0 0; padding: 0; border: 0; background: none; color: var(--mlnl-muted);
  font: inherit; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.mlnl__never:hover { color: var(--mlnl-ink); }

@media (max-width: 600px) {
  .mlnl__tab { padding: 12px 6px; font-size: 11px; }
  .mlnl__tab svg { width: 14px; height: 14px; }
  .mlnl__panel { padding: 22px 18px 16px; }
  .mlnl__title { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .mlnl__tab, .mlnl__panel { transition: none; }
}

/* 23/11/2026 (Álvaro): «Newsletter» en píldora (redondeada como el buscador) y titular en negrita, más grande */
.mlnl__kicker span {
  display: inline-block; padding: 6px 14px; border-radius: 999px; background: #eef1f7; color: #1d2a55;
  font-size: 11px; font-weight: 600; letter-spacing: .14em; line-height: 1.2;
}
.mlnl__title { margin-top: 14px; font-size: 24px; font-weight: 700; line-height: 1.18; }
@media (max-width: 575px) { .mlnl__title { font-size: 21px; } }
