/**
 * Copyright since 2007 PrestaShop SA and Contributors
 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License version 3.0
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/AFL-3.0
 *
 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright Since 2007 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
 */

/* DES Cupón Bienvenida — banner del pie, popup, avisos del carrito y nota del registro.
   Los colores llegan como variables CSS en el atributo style (pestaña Diseño). */

.dcb-scope {
  --dcb-bg: linear-gradient(135deg, #21274a 0%, #1440ff 100%);
  --dcb-bg-solid: #21274a;
  --dcb-text: #ffffff;
  --dcb-accent: #ffc83d;
  --dcb-btn: #ffc83d;
  --dcb-btn-text: #21274a;
  --dcb-notice: #1440ff;
  --dcb-radius: 16px;
  --dcb-font: inherit;
  font-family: var(--dcb-font);
  box-sizing: border-box;
}
.dcb-scope *, .dcb-scope *::before, .dcb-scope *::after { box-sizing: border-box; }
.dcb-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dcb-ico { flex: none; display: block; }
.dcb-hl { color: var(--dcb-accent); font-weight: 700; white-space: nowrap; }

/* ── Badge, botón y formulario (banner y popup) ───────────────────────── */
.dcb-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px 5px 9px; border-radius: 999px;
  background: rgba(255, 255, 255, .14); color: var(--dcb-text);
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; line-height: 1.2;
}
.dcb-badge .dcb-ico { width: 16px; height: 16px; color: var(--dcb-accent); }

.dcb-form { margin: 0; width: 100%; }
.dcb-form__row {
  display: flex; gap: 6px; padding: 6px; border-radius: calc(var(--dcb-radius) + 4px);
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22);
}
.dcb-form__input {
  flex: 1 1 auto; min-width: 0; height: 48px; margin: 0; padding: 0 16px;
  border: 0 !important; border-radius: var(--dcb-radius) !important; outline: none;
  background: #ffffff !important; color: #1f2937 !important; font: inherit; font-size: 15px; box-shadow: none !important;
}
.dcb-form__input:focus { box-shadow: 0 0 0 3px rgba(255, 255, 255, .45) !important; }
.dcb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  flex: none; height: 48px; margin: 0; padding: 0 22px; border: 0; cursor: pointer;
  border-radius: var(--dcb-radius); background: var(--dcb-btn); color: var(--dcb-btn-text);
  font: inherit; font-size: 16px; font-weight: 600; white-space: nowrap;
  transition: filter .15s ease;
}
.dcb-btn:hover { filter: brightness(.9); }
.dcb-btn:active { transform: translateY(0); }
.dcb-btn[disabled] { opacity: .7; cursor: progress; transform: none; }
.dcb-form__extra:empty, .dcb-form__msg[hidden] { display: none !important; }
.dcb-form__extra { margin-top: 10px; color: var(--dcb-text); font-size: 13px; }
.dcb-form__extra .cf-turnstile { margin-top: 4px; }
.dcb-form__extra label, .dcb-form__extra a { color: inherit; }
.dcb-form__legal { margin: 10px 2px 0; color: var(--dcb-text); opacity: .72; font-size: 12px; line-height: 1.45; }
.dcb-form__msg {
  margin: 10px 0 0; padding: 10px 14px; border-radius: calc(var(--dcb-radius) - 4px);
  background: rgba(255, 255, 255, .95); color: #14532d; font-size: 14px; font-weight: 600; line-height: 1.45;
}
.dcb-form__msg.is-error { color: #991b1b; }
.dcb-form.is-done .dcb-form__row, .dcb-form.is-done .dcb-form__extra, .dcb-form.is-done .newsletter__field { display: none; }
/* Diseño del tema: el mensaje lo pinta su CSS (newsletter__message). */
.dcb-form--theme .dcb-form__msg { padding: 5px 15px; background: none; color: inherit; font-weight: inherit; }
.dcb-form--theme .dcb-form__msg[hidden] { display: none; }

/* ── Banner del pie ───────────────────────────────────────────────────── */
.dcb-banner {
  position: relative; overflow: hidden; flex: 1 1 100%; width: 100%; max-width: 100%; margin: 0 0 24px; color: var(--dcb-text);
  container-type: inline-size; container-name: dcbbanner;
  background: var(--dcb-bg-solid); background: var(--dcb-bg); border-radius: var(--dcb-radius);
}
.dcb-banner::before, .dcb-banner::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, 0) 70%);
}
.dcb-banner::before { width: 420px; height: 420px; right: -120px; top: -200px; }
.dcb-banner::after { width: 300px; height: 300px; left: -120px; bottom: -180px; }
.dcb-banner__inner {
  position: relative; z-index: 1; display: grid; align-items: center; gap: 28px;
  grid-template-columns: auto minmax(0, 1fr) minmax(280px, 440px); padding: 30px 36px;
}
.dcb-banner__title { margin: 12px 0 6px; color: var(--dcb-text); font-size: 26px; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
.dcb-banner__text { margin: 0; color: var(--dcb-text); opacity: .86; font-size: 15px; line-height: 1.5; }

.dcb-stamp {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 128px; height: 128px; border-radius: 50%; text-align: center;
  background: var(--dcb-accent); color: var(--dcb-btn-text);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, .14), 0 14px 30px rgba(0, 0, 0, .25);
  transform: rotate(-8deg);
}
.dcb-stamp__amount { font-size: 34px; line-height: 1; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }
.dcb-stamp__label { margin-top: 6px; max-width: 96px; font-size: 10px; line-height: 1.2; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

.dcb-banner--center .dcb-banner__inner { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 18px; padding: 36px 28px; }
.dcb-banner--center .dcb-banner__form { width: 100%; max-width: 520px; }
.dcb-banner--center .dcb-stamp { width: 104px; height: 104px; }
.dcb-banner--center .dcb-stamp__amount { font-size: 28px; }

.dcb-banner--compact .dcb-banner__inner { grid-template-columns: auto minmax(0, 1fr) minmax(260px, 420px); padding: 18px 24px; gap: 20px; }
.dcb-banner--compact .dcb-stamp { width: 84px; height: 84px; }
.dcb-banner--compact .dcb-stamp__amount { font-size: 22px; }
.dcb-banner--compact .dcb-stamp__label, .dcb-banner--compact .dcb-banner__text { display: none; }
.dcb-banner--compact .dcb-banner__title { margin: 8px 0 0; font-size: 20px; }

/* Según el ancho del hueco donde lo pone el tema, no el de la pantalla. */
@container dcbbanner (max-width: 980px) {
  .dcb-banner__inner, .dcb-banner--compact .dcb-banner__inner { grid-template-columns: auto minmax(0, 1fr); padding: 26px 24px; }
  .dcb-banner__form { grid-column: 1 / -1; }
}
@container dcbbanner (max-width: 560px) {
  .dcb-banner__inner, .dcb-banner--compact .dcb-banner__inner { grid-template-columns: 1fr; gap: 16px; padding: 24px 18px; text-align: center; justify-items: center; }
  .dcb-banner__form { width: 100%; }
  .dcb-stamp { width: 96px; height: 96px; }
  .dcb-stamp__amount { font-size: 26px; }
  .dcb-stamp__label { display: none; }
  .dcb-banner__title { font-size: 21px; }
  .dcb-banner .dcb-form__row { flex-direction: column; }
  .dcb-banner .dcb-btn { width: 100%; }
}
/* Navegadores sin container queries: por el ancho de la pantalla. */
@supports not (container-type: inline-size) {
  @media (max-width: 991px) {
    .dcb-banner__inner, .dcb-banner--compact .dcb-banner__inner { grid-template-columns: auto minmax(0, 1fr); padding: 26px 24px; }
    .dcb-banner__form { grid-column: 1 / -1; }
  }
  @media (max-width: 575px) {
    .dcb-banner__inner, .dcb-banner--compact .dcb-banner__inner { grid-template-columns: 1fr; text-align: center; justify-items: center; }
    .dcb-stamp__label { display: none; }
    .dcb-banner .dcb-form__row { flex-direction: column; }
    .dcb-banner .dcb-btn { width: 100%; }
  }
}

/* ── Ventajas con check (banner del tema y popup) ─────────────────── */
.dcb-perks { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 2px 0 0; padding: 0; list-style: none; font-size: 14px; line-height: 18px; font-weight: 500; }
.dcb-perks li { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.dcb-pill, .dcb-theme-banner .dcb-hl { display: inline-block; padding: 0 7px; border-radius: 8px; background: var(--dcb-accent); color: #ffffff; font-weight: 700; line-height: 1.25; white-space: nowrap; }

/* ── Banner «como el tema» (diseño B) ─────────────────────────────── */
.dcb-theme-banner .newsletter__text { gap: 10px; }
.dcb-theme-banner .dcb-perks { color: #a6b0bd; }
.dcb-theme-banner .dcb-ico--check { color: #6f95ff; }
.dcb-theme-banner .newsletter__submit { display: inline-flex !important; align-items: center; justify-content: center; gap: 8px; font-weight: 600 !important; transition: filter .15s ease; }
.dcb-theme-banner .newsletter__submit:hover { filter: brightness(.88); }
.dcb-theme-banner .newsletter__submit:focus-visible, .dcb-theme-banner .newsletter__input:focus-visible { outline: 3px solid #8aa6ff; outline-offset: 2px; }
.dcb-theme-banner .newsletter__submit .dcb-ico { flex: none; }
@media (max-width: 575px) { .dcb-theme-banner .dcb-perks { flex-direction: column; gap: 6px; } }

/* ── Popup ────────────────────────────────────────────────────────── */
.dcb-popup { position: fixed; inset: 0; z-index: 10050; display: flex; align-items: center; justify-content: center; padding: 16px; }
.dcb-popup[hidden] { display: none; }
.dcb-popup__overlay { position: absolute; inset: 0; background: rgba(15, 20, 26, .55); animation: dcb-fade .25s ease both; }
.dcb-popup__box {
  position: relative; display: grid; grid-template-columns: 280px minmax(0, 1fr); width: 100%; max-width: 780px; max-height: calc(100vh - 32px); overflow: auto;
  border-radius: 20px; background: #ffffff; color: #0f141a; box-shadow: 0 30px 70px rgba(0, 0, 0, .35); animation: dcb-pop .3s cubic-bezier(.2, .9, .3, 1.15) both;
}
.dcb-popup__badge { width: fit-content; padding: 4px 10px; border-radius: 8px; background: var(--dcb-accent); color: #ffffff; font-size: 13px; line-height: 1; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.dcb-popup__side { display: grid; align-content: center; gap: 10px; padding: 34px 28px; background: var(--dcb-bg-solid); color: var(--dcb-text); }
.dcb-popup__amount { font-size: 84px; line-height: .95; font-weight: 700; letter-spacing: -.03em; white-space: nowrap; }
.dcb-popup__sidetext { margin: 0; color: var(--dcb-text); font-size: 18px; line-height: 24px; font-weight: 600; }
.dcb-popup__rule { display: block; height: 1px; margin: 6px 0; background: rgba(255, 255, 255, .18); }
.dcb-popup__cond { color: var(--dcb-text); opacity: .78; font-size: 13px; line-height: 18px; font-weight: 500; }
.dcb-popup__mobhead { display: none; }
.dcb-popup__main { position: relative; display: grid; align-content: start; gap: 14px; padding: 32px 30px 20px; }
.dcb-popup__close {
  display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 10px; cursor: pointer;
  background: #f0f2f6; color: #17263f; transition: background-color .15s ease;
}
.dcb-popup__close:hover { background: #e3e7ee; }
.dcb-popup__close:focus-visible, .dcb-popup__dismiss:focus-visible, .dcb-btn:focus-visible, .dcb-notice__btn:focus-visible { outline: 3px solid #8aa6ff; outline-offset: 2px; }
.dcb-popup__close--main { position: absolute; top: 14px; right: 14px; }
.dcb-popup__eyebrow { color: var(--dcb-notice); font-size: 14px; line-height: 1; font-weight: 600; }
.dcb-popup__title { margin: -2px 0 0; padding-right: 40px; color: #17263f; font-size: 26px; line-height: 31px; font-weight: 700; text-wrap: balance; }
.dcb-popup__title .dcb-hl { color: inherit; }
.dcb-popup__text { margin: 0; color: #4a5462; font-size: 15px; line-height: 21px; }
.dcb-popup__text .dcb-hl { color: #17263f; }
.dcb-popup .dcb-form__row { gap: 0; padding: 0; border: 1px solid #d5dae1; border-radius: 16px; background: #ffffff; overflow: hidden; }
.dcb-popup .dcb-form__input { height: 50px; border-radius: 0 !important; }
.dcb-popup .dcb-btn { height: 50px; border-radius: 0; box-shadow: none; }
.dcb-popup .dcb-perks { color: #4a5462; }
.dcb-popup .dcb-ico--check, .dcb-popup__proof .dcb-ico { color: var(--dcb-notice); }
.dcb-popup__proof { display: flex; align-items: center; gap: 8px; margin: 0; color: #4a5462; font-size: 13px; line-height: 18px; font-weight: 500; }
.dcb-popup__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding-top: 12px; border-top: 1px solid #edf0f4; }
.dcb-popup__legal { margin: 0; color: #6b7480; font-size: 12px; line-height: 16px; }
.dcb-popup__legal:empty { display: none; }
.dcb-popup__dismiss { padding: 6px 8px; border: 0; background: none; color: #5a6473; font: inherit; font-size: 14px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.dcb-popup .dcb-form__extra { color: #6b7480; }
.dcb-popup .dcb-form__msg { background: #f3f6ff; color: #17263f; }
.dcb-popup .dcb-form__msg.is-error { background: #fef2f2; color: #991b1b; }
/* Esquina: solo la columna del formulario, sin tapar la página */
.dcb-popup--corner { align-items: flex-end; justify-content: flex-end; pointer-events: none; }
.dcb-popup--corner .dcb-popup__overlay { display: none; }
.dcb-popup--corner .dcb-popup__box { grid-template-columns: minmax(0, 1fr); max-width: 400px; pointer-events: auto; }
.dcb-popup--corner .dcb-popup__side { display: none; }
@media (max-width: 767px) {
  .dcb-popup, .dcb-popup--corner { align-items: flex-end; justify-content: center; padding: 0; }
  .dcb-popup__box, .dcb-popup--corner .dcb-popup__box { grid-template-columns: minmax(0, 1fr); max-width: none; max-height: 92vh; border-radius: 20px 20px 0 0; }
  .dcb-popup__side { display: none; }
  .dcb-popup__mobhead { position: relative; display: grid; gap: 8px; padding: 26px 20px 18px; background: var(--dcb-bg-solid); color: var(--dcb-text); }
  .dcb-popup__mobhead::before { content: ""; position: absolute; top: 9px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: rgba(255, 255, 255, .35); }
  .dcb-popup__mobhead .dcb-popup__close { position: absolute; top: 16px; right: 14px; background: rgba(255, 255, 255, .14); color: var(--dcb-text); }
  .dcb-popup__mobhead .dcb-popup__close:hover { background: rgba(255, 255, 255, .24); }
  .dcb-popup__mobtitle { margin: 0; padding-right: 44px; color: var(--dcb-text); font-size: 21px; line-height: 28px; font-weight: 700; text-wrap: balance; }
  .dcb-popup__main { padding: 18px 20px 14px; gap: 12px; }
  .dcb-popup__close--main, .dcb-popup__eyebrow, .dcb-popup__title { display: none; }
  .dcb-popup .dcb-form__row { flex-direction: column; gap: 8px; border: 0; overflow: visible; }
  .dcb-popup .dcb-form__input { border: 1px solid #d5dae1 !important; border-radius: 16px !important; }
  .dcb-popup .dcb-btn { width: 100%; border-radius: 16px; }
  .dcb-popup .dcb-perks { gap: 6px 14px; }
  .dcb-popup__foot { justify-content: center; text-align: center; }
}
@keyframes dcb-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes dcb-pop { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .dcb-popup__overlay, .dcb-popup__box { animation: none; } .dcb-btn, .dcb-popup__close, .dcb-theme-banner .newsletter__submit { transition: none; } }

/* ── Avisos del carrito, el pago y el carrito lateral (azul de la tienda) ── */
.dcb-notice {
  margin: 0 0 16px; padding: 12px 14px; border-radius: 14px; color: #0f141a;
  background: #f3f6ff; background: color-mix(in srgb, var(--dcb-notice) 5%, #ffffff);
  border: 1px solid #d6e0ff; border: 1px solid color-mix(in srgb, var(--dcb-notice) 18%, #ffffff);
}
.dcb-notice__row { display: flex; align-items: center; gap: 12px; }
.dcb-notice__icon { flex: none; display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: var(--dcb-notice); color: #ffffff !important; }
/* Siempre blancos: algunas páginas (carrito de OnePageCheckout con sesión) recolorean los svg. */
.dcb-scope.dcb-notice .dcb-notice__icon svg, .dcb-scope.dcb-notice .dcb-notice__icon svg * { color: #ffffff !important; stroke: #ffffff !important; fill: none !important; }
.dcb-notice__text { flex: 1 1 auto; min-width: 0; margin: 0; color: #17263f; font-size: 15px; line-height: 20px; font-weight: 600; }
.dcb-notice__text .dcb-hl { color: var(--dcb-notice); font-weight: 700; }
.dcb-notice__text small { display: block; margin-top: 2px; color: #6b7480; font-size: 13px; line-height: 17px; font-weight: 400; }
.dcb-notice__form { flex: none; margin: 0; }
.dcb-notice__btn {
  display: inline-block; flex: none; padding: 10px 16px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--dcb-notice); color: #ffffff !important; font: inherit; font-size: 14px; line-height: 18px; font-weight: 600;
  text-decoration: none !important; white-space: nowrap; transition: filter .15s ease;
}
.dcb-notice__btn:hover { filter: brightness(.88); }
.dcb-notice--login .dcb-notice__btn { background: #ffffff; color: var(--dcb-notice) !important; box-shadow: inset 0 0 0 1.5px var(--dcb-notice); }
.dcb-notice--login .dcb-notice__btn:hover { filter: none; background: #eef2ff; }
.dcb-progress { position: relative; height: 6px; margin: 10px 0 0 50px; border-radius: 999px; overflow: hidden; background: #dfe6fb; background: color-mix(in srgb, var(--dcb-notice) 14%, #ffffff); }
.dcb-progress > span { display: block; height: 100%; min-width: 6px; border-radius: inherit; background: var(--dcb-notice); transition: width .4s ease; }
.dcb-notice--applied { background: #ffffff; border-color: var(--dcb-notice); box-shadow: inset 0 0 0 1px var(--dcb-notice); }
.dcb-notice--mini { margin: 0 0 12px; padding: 10px 12px; }
.dcb-notice--mini .dcb-notice__icon { width: 32px; height: 32px; }
.dcb-notice--mini .dcb-notice__text { font-size: 14px; }
.dcb-notice--mini .dcb-progress { margin-left: 44px; }
/* Estrecho (resumen del carrito, carrito lateral, móvil): icono al lado del texto y el botón debajo.
   Según el ancho del propio aviso, no el de la pantalla. */
.dcb-notice { container-type: inline-size; }
@container (max-width: 480px) {
  .dcb-notice__row { display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: start; gap: 8px 12px; }
  .dcb-notice__text { padding-top: 1px; }
  .dcb-notice__form, .dcb-notice__row > .dcb-notice__btn { grid-column: 2; justify-self: start; }
  .dcb-notice--mini .dcb-notice__row { grid-template-columns: 32px minmax(0, 1fr); }
}
@supports not (container-type: inline-size) {
  @media (max-width: 575px) {
    .dcb-notice__row { display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: start; gap: 8px 12px; }
    .dcb-notice__form, .dcb-notice__row > .dcb-notice__btn { grid-column: 2; justify-self: start; }
  }
}
/* Dentro de la tarjeta del resumen del carrito, que no tiene relleno. */
.cart-summary > .dcb-notice { margin: 16px 16px 4px; }
.des-sidecart__footer > .dcb-notice { margin: 0 0 12px; }
@media (prefers-reduced-motion: reduce) { .dcb-progress > span, .dcb-notice__btn { transition: none; } }

/* ── Nota en el registro ──────────────────────────────────────────── */
.dcb-register-note {
  display: flex; align-items: flex-start; gap: 8px; margin: 6px 0 10px; padding: 9px 12px; border-radius: 10px;
  background: #f3f6ff; background: color-mix(in srgb, var(--dcb-notice) 5%, #ffffff);
  color: #4a5462; font-size: 14px; line-height: 19px;
}
.dcb-register-note .dcb-ico { width: 18px; height: 18px; margin-top: 1px; color: var(--dcb-notice); }
.dcb-register-note .dcb-hl { color: #17263f; font-weight: 700; }

/* ── Quitar un cupón en el resumen del carrito ────────────────────────
   El tema pone una papelera (material icon) azul; aquí, un botón «×» discreto. */
.promo-name [data-link-action="remove-voucher"] {
  display: inline-flex; align-items: center; justify-content: center; flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: #f0f2f6; color: #5a6473 !important; text-decoration: none !important; transition: background-color .15s ease, color .15s ease;
}
.promo-name [data-link-action="remove-voucher"] i { display: none; }
.promo-name [data-link-action="remove-voucher"]::before { content: "\00d7"; font-size: 18px; line-height: 1; font-weight: 600; }
.promo-name [data-link-action="remove-voucher"]:hover { background: #fde8ea; color: #d42a3c !important; }
.promo-name [data-link-action="remove-voucher"]:focus-visible { outline: 3px solid #8aa6ff; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .promo-name [data-link-action="remove-voucher"] { transition: none; } }
