/* =====================================================================
   QWOOD — Legal Pages · Unified Design System
   Covers: aviso legal, cookies, privacidad, condiciones de venta,
           formulario de desistimiento, formulario de reclamaciones.
   Prefix: --qwl-*   |   BEM classes: .qwl-*
   Upload target: /wp-content/uploads/qwood/qwood-legal-pages.css
   ===================================================================== */


/* =====================================================================
   1 — TOKENS & FULL-WIDTH SHELL
   ===================================================================== */

:root {
  /* --- colours ---
     FIX 2026-07-08: la capa --qwl-* ahora deriva de los tokens SSOT del
     design-system (var(--qwood-*)) para que las páginas legales compartan
     exactamente la misma paleta que home, wizard y blog, en vez de ser un
     island con hex hardcodeados. Cada token lleva de fallback su valor
     anterior → cero regresión visual si design-system.css no estuviera
     cargado. Radios y sombra se conservan locales (forma propia legal). */
  --qwl-green:        var(--qwood-color-primary, #1bcf17);
  --qwl-green-dark:   var(--qwood-color-primary-dark, #1bcf17);
  --qwl-green-soft:   var(--qwood-color-primary-soft, rgba(27,207,23,.06));
  --qwl-green-border: var(--qwood-color-border-strong, rgba(27,207,23,.22));

  --qwl-ink:    var(--qwood-color-text, #0f172a);
  --qwl-sub:    var(--qwood-color-muted, #475569);
  --qwl-muted:  var(--qwood-color-muted-soft, #64748b);

  --qwl-line:    var(--qwood-color-border, rgba(15,23,42,.10));
  --qwl-bg:      var(--qwood-color-bg, #ffffff);
  --qwl-surface: var(--qwood-color-bg, #ffffff);

  /* --- shape (propio de legal, se conserva) --- */
  --qwl-radius:    14px;
  --qwl-radius-sm: 12px;
  --qwl-radius-xs: 8px;

  /* --- depth --- */
  --qwl-shadow: var(--qwood-shadow-soft, 0 12px 30px rgba(15,23,42,.08));

  /* --- type --- */
  --qwl-font: var(--qwood-font, "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif);
}

/* --- full-width breakout shell ---
   En legal pages col-full tiene margin-auto centrado con padding lateral,
   por lo que el breakout 100vw es necesario para que el shell toque
   ambos bordes del viewport. */
.qwl-shell {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  background: #ffffff;
  font-family: var(--qwl-font);
  color: var(--qwl-ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.qwl-shell *,
.qwl-shell *::before,
.qwl-shell *::after {
  box-sizing: border-box;
}

/* --- inner constraint --- */
.qwl-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 40px) clamp(24px, 4vw, 60px);
}


/* =====================================================================
   2 — HERO
   ===================================================================== */

.qwl-hero {
  padding: clamp(18px, 3vw, 32px) 0 clamp(14px, 2vw, 22px);
  max-width: 1280px;
  margin: 0 auto;
}

.qwl-hero__head {
  display: flex;
  gap: 12px;
  align-items: center;
}

.qwl-hero__bar {
  display: none;
}

.qwl-hero__kicker {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--qwl-green);
  margin: 0;
}

.qwl-hero h1 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 950;
  letter-spacing: -.025em;
  margin: 8px 0 0;
  line-height: 1.15;
  color: var(--qwl-ink);
}

.qwl-hero__sub {
  font-size: 13px;
  color: var(--qwl-sub);
  margin: 6px 0 0 18px;
  line-height: 1.55;
}

.qwl-hero__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0 18px;
}

.qwl-pill {
  padding: 6px 10px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.10);
  font-size: 11px;
  font-weight: 800;
  color: var(--qwl-sub);
  line-height: 1.2;
}


/* =====================================================================
   3 — TOC (COLLAPSIBLE)
   ===================================================================== */

.qwl-toc {
  border: 2px solid var(--qwl-line);
  border-radius: 14px;
  background: var(--qwl-bg);
  margin-bottom: 24px;
  overflow: hidden;
}

.qwl-toc__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 18px;
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--qwl-font);
  color: var(--qwl-ink);
}

.qwl-toc__label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qwl-toc__label svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.qwl-toc__label span {
  font-size: 13px;
  font-weight: 950;
}

.qwl-toc__badge {
  padding: 3px 8px;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.10);
  font-size: 10px;
  font-weight: 800;
  color: var(--qwl-sub);
  line-height: 1.3;
}

.qwl-toc__chevron {
  transition: transform .25s ease;
  flex: 0 0 auto;
}

.qwl-toc--open .qwl-toc__chevron {
  transform: rotate(180deg);
}

.qwl-toc__body {
  display: none;
}

.qwl-toc--open .qwl-toc__body {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 0 18px 14px;
}

.qwl-toc__link,
.qwl-shell .qwl-toc__link,
a.qwl-toc__link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--qwl-line);
  font-size: 12px;
  font-weight: 700;
  color: var(--qwl-ink);
  text-decoration: none !important;
  border-bottom: none !important;
  transition: background .18s ease, border-color .18s ease;
}

.qwl-toc__link:hover {
  background: var(--qwl-green-soft);
  border-color: var(--qwl-green-border);
}

.qwl-toc__num {
  color: var(--qwl-green);
  font-weight: 900;
}


/* =====================================================================
   4 — CONTENT SECTIONS
   ===================================================================== */

.qwl-section {
  scroll-margin-top: 90px;
}

.qwl-section + .qwl-section {
  border-top: 1px solid var(--qwl-line);
  padding-top: 18px;
  margin-top: 22px;
}

.qwl-section h2 {
  font-size: 20px;
  font-weight: 900;
  margin: 0 0 10px;
  letter-spacing: -.01em;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--qwl-ink);
}

.qwl-section h2::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--qwl-green);
  box-shadow: 0 0 0 4px rgba(27,207,23,.16);
  flex: 0 0 auto;
}

.qwl-section h3 {
  font-size: 16px;
  font-weight: 900;
  margin: 14px 0 8px;
  color: var(--qwl-ink);
}

.qwl-section p,
.qwl-section li {
  color: var(--qwl-sub);
  line-height: 1.72;
  font-size: 14.5px;
}

.qwl-section p {
  margin: 10px 0;
}

.qwl-section ul,
.qwl-section ol {
  padding-left: 18px;
  margin: 10px 0;
}

.qwl-section li {
  margin: 6px 0;
}

.qwl-section a,
.qwl-shell .qwl-section a {
  color: var(--qwl-green-dark);
  font-weight: 800;
  text-decoration: none !important;
  border-bottom: none !important;
}

.qwl-section a:hover,
.qwl-shell .qwl-section a:hover {
  color: var(--qwl-green);
}

/* --- note box (green) --- */
.qwl-note {
  border: 1px solid var(--qwl-green-border);
  background: var(--qwl-green-soft);
  border-radius: var(--qwl-radius-sm);
  padding: 12px 14px;
  margin: 12px 0 0;
  color: var(--qwl-sub);
  font-size: 14px;
  line-height: 1.65;
}

/* --- warning box (red) --- */
.qwl-warn {
  border: 1px solid rgba(220,38,38,.22);
  background: rgba(220,38,38,.05);
  border-radius: var(--qwl-radius-sm);
  padding: 12px 14px;
  margin: 12px 0 0;
  color: var(--qwl-sub);
  font-size: 14px;
  line-height: 1.65;
}

/* --- key-value grid --- */
.qwl-kv {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 10px;
  font-size: 13px;
  color: var(--qwl-sub);
}

.qwl-kv b,
.qwl-kv strong {
  color: var(--qwl-ink);
}

/* --- box (surface card) --- */
.qwl-box {
  background: #ffffff;
  border: none;
  border-radius: var(--qwl-radius);
  padding: 14px 16px;
  margin: 12px 0;
  box-shadow: 0 12px 28px rgba(16,32,51,.05);
}

/* --- details / summary accordion --- */
.qwl-section details {
  border: none;
  border-radius: var(--qwl-radius);
  padding: 10px 14px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(16,32,51,.05);
}

.qwl-section details + details {
  margin-top: 10px;
}

.qwl-section summary {
  cursor: pointer;
  font-weight: 900;
  color: var(--qwl-ink);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 14.5px;
}

.qwl-section summary::-webkit-details-marker {
  display: none;
}

.qwl-section summary::after {
  content: "";
  width: 10px;
  height: 10px;
  border-bottom: 2px solid var(--qwl-muted);
  transform: rotate(45deg);
  transition: transform .25s ease;
  margin-left: auto;
  flex: 0 0 auto;
}

.qwl-section details[open] summary::after {
  transform: rotate(-135deg);
}


/* =====================================================================
   5 — FORMS
   ===================================================================== */

.qwl-form__heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
}

.qwl-form__heading::before {
  display: none;
}

.qwl-form__heading span {
  font-size: 14px;
  font-weight: 950;
  color: var(--qwl-ink);
}

.qwl-form__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}

.qwl-form__full {
  grid-column: 1 / -1;
}

.qwl-form__field label {
  display: block;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--qwl-ink);
  margin-bottom: 6px;
}

.qwl-form__field input,
.qwl-form__field select,
.qwl-form__field textarea {
  width: 100%;
  background: var(--qwl-surface);
  border: 1px solid var(--qwl-line);
  border-radius: var(--qwl-radius-sm);
  padding: 11px 14px;
  font-size: 14px;
  font-family: var(--qwl-font);
  color: var(--qwl-ink);
  transition: border-color .18s ease, box-shadow .18s ease;
}

.qwl-form__field input:focus,
.qwl-form__field select:focus,
.qwl-form__field textarea:focus {
  border-color: var(--qwl-green);
  box-shadow: 0 0 0 3px rgba(27,207,23,.18);
  outline: none;
}

.qwl-form__field textarea {
  resize: vertical;
  min-height: 100px;
}

.qwl-form__field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

/* --- checkbox / consent row --- */
.qwl-form__check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 2px solid var(--qwl-line);
  border-radius: var(--qwl-radius);
  padding: 12px 14px;
}

.qwl-form__check input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--qwl-green);
  flex: 0 0 auto;
  margin: 0;
  cursor: pointer;
}

.qwl-form__check label {
  font-size: 13px;
  line-height: 1.55;
  color: var(--qwl-sub);
  cursor: pointer;
}

/* --- submit button --- */
.qwl-btn,
.qwl-shell .qwl-btn,
a.qwl-btn,
.qwl-shell a.qwl-btn {
  display: block;
  width: 100%;
  padding: 12px 24px;
  border: none !important;
  border-bottom: none !important;
  border-radius: var(--qwl-radius-sm);
  background: var(--qwl-green) !important;
  color: #fff !important;
  text-decoration: none !important;
  font-family: var(--qwl-font);
  font-size: 14px;
  font-weight: 950;
  cursor: pointer;
  transition: background .18s ease, transform .15s ease;
  text-align: center;
}

.qwl-btn:hover,
.qwl-shell .qwl-btn:hover,
a.qwl-btn:hover {
  background: var(--qwl-green-dark) !important;
  color: #fff !important;
  transform: translateY(-1px);
  text-decoration: none !important;
}

.qwl-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(27,207,23,.25);
}

/* --- upload zone --- */
.qwl-upload-zone {
  position: relative;
  border: 2px dashed var(--qwl-line);
  border-radius: var(--qwl-radius-sm);
  padding: 24px 16px;
  text-align: center;
  transition: border-color .18s ease, background .18s ease;
  cursor: pointer;
}
.qwl-upload-zone:hover,
.qwl-upload-zone.is-dragover {
  border-color: var(--qwl-green-border);
  background: var(--qwl-green-soft);
}
.qwl-upload-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.qwl-upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--qwl-muted);
  font-size: 13px;
  pointer-events: none;
}
.qwl-upload-label svg {
  color: var(--qwl-green);
}
.qwl-upload-label small {
  font-size: 11px;
  color: var(--qwl-muted);
}

/* --- feedback messages --- */
.qwl-feedback--ok {
  border: 1px solid var(--qwl-green-border);
  background: var(--qwl-green-soft);
  border-radius: var(--qwl-radius-sm);
  padding: 12px 14px;
  margin-top: 12px;
  color: var(--qwl-green-dark);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
}

.qwl-feedback--error {
  border: 1px solid rgba(220,38,38,.22);
  background: rgba(220,38,38,.05);
  border-radius: var(--qwl-radius-sm);
  padding: 12px 14px;
  margin-top: 12px;
  color: #b91c1c;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
}


/* =====================================================================
   6 — COOKIES TABLE
   ===================================================================== */

.qwl-table-wrap {
  width: 100%;
  overflow: auto;
  border-radius: var(--qwl-radius-sm);
  border: 1px solid var(--qwl-line);
  background: var(--qwl-bg);
  -webkit-overflow-scrolling: touch;
  margin: 12px 0;
}

.qwl-table {
  width: 100%;
  min-width: 680px;
  border-collapse: separate;
  border-spacing: 0;
}

.qwl-table th,
.qwl-table td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid var(--qwl-line);
  font-size: 13px;
  vertical-align: top;
  background: var(--qwl-bg);
}

.qwl-table th {
  font-weight: 950;
  color: var(--qwl-ink);
}

.qwl-table td {
  color: var(--qwl-sub);
}

.qwl-table tr:last-child td {
  border-bottom: none;
}


/* =====================================================================
   7 — FOOTER LEGAL CROSS-NAV
   ===================================================================== */

.qwl-footer {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 2px solid var(--qwl-line);
}

.qwl-footer__kicker {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 900;
  color: var(--qwl-muted);
  letter-spacing: .10em;
  margin: 0 0 10px;
}

.qwl-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.qwl-footer__link,
.qwl-shell .qwl-footer__link,
a.qwl-footer__link {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--qwl-line);
  font-size: 12px;
  font-weight: 700;
  color: var(--qwl-ink);
  text-decoration: none !important;
  border-bottom: none !important;
  transition: background .18s ease, border-color .18s ease, transform .15s ease;
}

.qwl-footer__link:hover {
  background: var(--qwl-green-soft);
  border-color: var(--qwl-green-border);
  transform: translateY(-1px);
}

.qwl-footer__link.is-active {
  background: var(--qwl-ink);
  color: #fff;
  font-weight: 900;
  border-color: var(--qwl-ink);
}

.qwl-footer__company {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--qwl-line);
  font-size: 11px;
  color: var(--qwl-muted);
  line-height: 1.55;
}


/* =====================================================================
   8 — RESPONSIVE
   ===================================================================== */

@media (max-width: 768px) {
  /* TOC → single column */
  .qwl-toc--open .qwl-toc__body {
    grid-template-columns: 1fr;
  }

  /* Forms → single column */
  .qwl-form__grid {
    grid-template-columns: 1fr;
  }

  /* KV → stack */
  .qwl-kv {
    grid-template-columns: 1fr;
  }

  /* Pills → vertical */
  .qwl-hero__pills {
    flex-direction: column;
    margin-left: 0;
  }

  /* Hero heading size */
  .qwl-hero h1 {
    font-size: 22px;
  }
}

@media (max-width: 520px) {
  /* Table narrower minimum */
  .qwl-table {
    min-width: 600px;
  }
}


/* =====================================================================
   9 — PRINT
   ===================================================================== */

@media print {
  .qwl-shell {
    width: 100%;
    left: auto;
    right: auto;
    margin-left: 0;
    margin-right: 0;
    background: #fff;
  }

  .qwl-hero {
    border-bottom-color: rgba(15,23,42,.18);
  }

  .qwl-toc,
  .qwl-footer,
  .qwl-btn {
    display: none !important;
  }

  .qwl-section a {
    color: #000;
    border-bottom: none;
    text-decoration: underline;
  }
}
