/* ============================================================
   we are yoga — aviso y preferencias de cookies
   Marco: LFPDPPP (México), art. 14 del Reglamento — informar y
   ofrecer forma de deshabilitar. NO es un banner bloqueante.
   Paleta de brand/brand-kit.html.
   Nota de contraste: #C8FF3A sobre blanco da 1.18:1 (ilegible).
   Sobre #1A1A1A da 14.77:1. Por eso el lima solo se usa como
   fondo con texto en tinta, nunca como texto sobre claro.
   ============================================================ */

.way-ck,
.way-ck-panel {
  --ck-ink: #1A1A1A;
  --ck-rebel: #C8FF3A;
  --ck-sage: #6B7355;
  --ck-soft: #FAFAF7;
  --ck-bg2: #EBE4D7;
  --ck-line: #1A1A1A22;
  font-family: "Geist", "Hanken Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ---------- Aviso informativo (no bloqueante) ---------- */
.way-ck {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 1150;          /* bajo los modales de Fitco (1200) */
  max-width: 720px;
  margin: 0 auto;
  background: var(--ck-ink);
  color: var(--ck-soft);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .28);
  display: none;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  font-size: 14px;
  line-height: 1.5;
}
.way-ck[data-abierto="1"] { display: flex; }
.way-ck p { margin: 0; flex: 1 1 320px; }
.way-ck a { color: var(--ck-rebel); text-decoration: underline; }
.way-ck-acciones { display: flex; gap: 10px; flex-wrap: wrap; }

.way-ck-btn {
  font: inherit;
  font-weight: 600;
  border-radius: 999px;
  padding: 11px 18px;
  min-height: 44px;        /* área táctil cómoda */
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.way-ck-btn--si {           /* lima de fondo, tinta encima: 14.77:1 */
  background: var(--ck-rebel);
  color: var(--ck-ink);
}
.way-ck-btn--no {
  background: transparent;
  color: var(--ck-soft);
  border-color: var(--ck-soft);
}
.way-ck-btn:focus-visible,
.way-ck a:focus-visible {
  outline: 2px solid var(--ck-rebel);
  outline-offset: 2px;
}

/* ---------- Panel de preferencias ---------- */
.way-ck-fondo {
  position: fixed;
  inset: 0;
  z-index: 1160;
  background: rgba(26, 26, 26, .55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.way-ck-fondo[data-abierto="1"] { display: flex; }

.way-ck-panel {
  background: var(--ck-soft);
  color: var(--ck-ink);
  border-radius: 16px;
  width: 100%;
  max-width: 560px;
  max-height: 86dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 28px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .3);
}
.way-ck-panel h2 {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 30px;
  font-weight: 400;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.way-ck-panel .way-ck-intro {
  font-size: 14px;
  line-height: 1.55;
  color: #4A463F;          /* 7.6:1 sobre --ck-soft */
  margin: 0 0 20px;
}
.way-ck-panel a { color: var(--ck-sage); text-decoration: underline; }

.way-ck-grupo {
  border-top: 1px solid var(--ck-line);
  padding: 16px 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 16px;
  align-items: start;
}
.way-ck-grupo h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}
.way-ck-grupo p {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #4A463F;
}

/* interruptor */
.way-ck-sw {
  position: relative;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
}
.way-ck-sw input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.way-ck-sw span {
  position: absolute;
  inset: 0;
  background: #C9C4BA;
  border-radius: 999px;
  transition: background .2s;
  pointer-events: none;
}
.way-ck-sw span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #FFFFFF;
  transition: transform .2s;
}
.way-ck-sw input:checked + span { background: var(--ck-sage); }
.way-ck-sw input:checked + span::after { transform: translateX(20px); }
.way-ck-sw input:disabled { cursor: not-allowed; }
.way-ck-sw input:disabled + span { background: var(--ck-sage); opacity: .45; }
.way-ck-sw input:focus-visible + span {
  outline: 2px solid var(--ck-ink);
  outline-offset: 2px;
}

.way-ck-pie {
  border-top: 1px solid var(--ck-line);
  padding-top: 18px;
  margin-top: 4px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.way-ck-pie .way-ck-btn--si { background: var(--ck-ink); color: var(--ck-soft); }
.way-ck-pie .way-ck-btn--no { color: var(--ck-ink); border-color: var(--ck-ink); }

/* enlace permanente del pie */
.way-ck-enlace {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
}

@media (max-width: 600px) {
  .way-ck { flex-direction: column; align-items: stretch; }
  /* En columna, el flex-basis de 320px se aplicaría a la ALTURA y estiraba el
     aviso hasta media pantalla. En vertical el párrafo solo debe ocupar su
     texto. */
  .way-ck p { flex: 0 0 auto; }
  .way-ck-acciones .way-ck-btn { flex: 1; }
  .way-ck-panel { padding: 22px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .way-ck-sw span,
  .way-ck-sw span::after { transition: none; }
}
