/* ============================================================
   COOKIE WALL — QVOZ
   ============================================================ */
:root {
  --cw-z: 2147483647;
  --cw-bg: rgba(0,0,0,.9);
  --cw-card-bg: #fff;
  --cw-fg: #111;
  --cw-primary: #E30513;
  --cw-radius: 16px;
  --cw-shadow: 0 8px 32px rgba(0,0,0,.22), 0 1px 6px rgba(0,0,0,.12);
}

html.cw-lock, body.cw-lock { overflow: hidden !important; height: 100%; }
.cwall[hidden] { display: none !important; }
.cwall {
  position: fixed; inset: 0;
  z-index: var(--cw-z);
  display: grid;
  background: var(--cw-bg);
  padding: 16px;
}
.cw-card {
  width: min(92vw, 420px);
  background: var(--cw-card-bg);
  color: var(--cw-fg);
  border-radius: var(--cw-radius);
  box-shadow: var(--cw-shadow);
  padding: clamp(16px, 3.2vw, 28px);
  line-height: 1.45;
}
.cw-title { margin: 0 0 8px; font: 800 clamp(18px, 3vw, 24px)/1.15 ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial; }
.cw-desc  { margin: 0 0 12px; opacity: .9; }
.cw-small { margin-top: 10px; font-size: .9rem; opacity: .8; }
.cw-details { margin: 8px 0 16px; }
.cw-details > summary { cursor: pointer; }
.cw-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.cw-btn { appearance: none; border: 1px solid #d0d0d0; background: #f7f7f7; color: #111; padding: 10px 14px; border-radius: 999px; cursor: pointer; font-weight: 700; font-size: .9rem; }
.cw-btn:hover { filter: brightness(.96); }
.cw-btn.cw-primary { background: var(--cw-primary); color: #fff; border-color: var(--cw-primary); }
.cw-btn.cw-outline  { background: transparent; }
.cw-btn.cw-ghost    { background: transparent; border-color: transparent; text-decoration: underline; font-size: .85rem; }
.cw-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 14px; }
.cw-item { border: 1px solid #e8e8e8; border-radius: 12px; padding: 12px; }
.cw-item-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cw-item-desc { margin: 8px 0 0; opacity: .9; font-size: .9rem; }
.cw-badge { font-size: .82rem; color: #0f5132; background: #d1e7dd; border: 1px solid #badbcc; border-radius: 999px; padding: 2px 8px; }
.cw-switch { position: relative; display: inline-block; width: 46px; height: 26px; }
.cw-toggle { appearance: none; width: 46px; height: 26px; margin: 0; }
.cw-slider { position: absolute; inset: 0; background: #cfcfcf; border-radius: 999px; transition: background .2s; }
.cw-slider::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .2s; }
.cw-toggle:checked + .cw-slider { background: var(--cw-primary); }
.cw-toggle:checked + .cw-slider::after { transform: translateX(20px); }
.cw-close { position: absolute; top: 8px; right: 10px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; font-size: 28px; line-height: 1; cursor: pointer; }
.cw-manage { display: inline-block; font-size: .9rem; opacity: .7; }
iframe.cw-iframe-blocked { filter: grayscale(1); }

/* === Posicionamiento esquina === */
.cwall--br { place-items: end end;    background: transparent; pointer-events: none; }
.cwall--bl { place-items: end start;  background: transparent; pointer-events: none; }
.cwall--bc { place-items: end center; background: transparent; pointer-events: none; }
.cwall--br .cw-card,
.cwall--bl .cw-card,
.cwall--bc .cw-card { pointer-events: auto !important; margin: 16px; }

/* === Prefs: centrado con fondo === */
.cw-prefs { place-items: center; background: rgba(0,0,0,.6); pointer-events: auto; }
.cw-prefs .cw-card { position: relative; width: min(92vw, 480px); pointer-events: auto; }

/* === Hard wall: bloqueo total === */
body.cw-lock > *:not(.cwall) { pointer-events: none !important; }
body.cw-lock .cwall { pointer-events: auto !important; }

/* === Móvil === */
@media (max-width: 640px) {
  .cwall--br, .cwall--bl { place-items: end center; }
  .cw-card { width: min(96vw, 520px); border-radius: 14px; }
}
