/* Aviso de cookies de Todo de Peces. [Claude 2026-10-22] Frente 1, medición (trabajo/2026-10-22-medicion-y-base/).
   Lo encola includes/consentimiento.php.
   Copia adaptada del aviso de Pequeña Venecia (que sigue el de academiadelahoz.com): tarjeta abajo y centrada,
   «Rechazar» y «Aceptar» son el mismo botón (mismo lugar, formato y nivel, guía de cookies de la AEPD), «Configurar»
   como enlace y título solo en escritorio. Usa los tokens del tema con un valor de reserva, para que el aviso se vea
   bien aunque algún día cambie el tema. Vara: en móvil no tapa más del 25 % de la pantalla. */
#tdp-consent[hidden],
#tdp-consent [hidden] { display: none !important; }
.tdp-consent__card {
  background: #fff;
  border: 1px solid var(--line, #e3e6ef);
  border-radius: var(--r, 18px);
  bottom: 18px;
  box-shadow: 0 18px 50px rgba(21, 36, 74, .28);
  box-sizing: border-box;
  color: var(--ink, #1d3160);
  font-family: var(--font-body, system-ui, sans-serif);
  left: 18px;
  margin: 0 auto;
  max-width: 1000px;
  padding: 22px 26px;
  position: fixed;
  right: 18px;
  z-index: 99999;
}
.tdp-consent__card:focus { outline: none; }
.tdp-consent__aviso {
  align-items: center;
  display: flex;
  gap: 28px;
}
.tdp-consent__texto { flex: 1; min-width: 0; }
.tdp-consent__card h2 {
  color: var(--ocean, #1d3160);
  font-family: var(--font-display, system-ui, sans-serif);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 6px;
}
.tdp-consent__texto p {
  color: var(--ink-soft, #43547d);
  font-size: 14.5px;
  line-height: 1.55;
  margin: 0;
}
.tdp-consent__card a {
  color: var(--coral-texto, #a54d23);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.tdp-consent__actions {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
}
/* Los dos botones de decisión son el mismo botón: ni color ni tamaño empujan hacia uno. */
.tdp-consent__card .tdp-consent__btn {
  background: var(--ocean, #1d3160);
  border: 2px solid var(--ocean, #1d3160);
  border-radius: 100px;
  box-shadow: none;
  color: #fff;
  cursor: pointer;
  font: 700 14.5px/1 var(--font-body, system-ui, sans-serif);
  letter-spacing: 0;
  margin: 0;
  min-height: 44px;
  min-width: 128px;
  padding: 12px 24px;
  text-transform: none;
}
.tdp-consent__card .tdp-consent__btn--borde {
  background: transparent;
  color: var(--ocean, #1d3160);
}
.tdp-consent__card .tdp-consent__configure {
  background: transparent;
  border: 0;
  box-shadow: none;
  color: var(--ink-soft, #43547d);
  cursor: pointer;
  font: 700 14px/1 var(--font-body, system-ui, sans-serif);
  margin: 0;
  padding: 13px 6px;
  text-decoration: underline;
  text-transform: none;
  text-underline-offset: 2px;
  white-space: nowrap;
}
.tdp-consent__close {
  background: transparent;
  border: 0;
  color: var(--ink-soft, #43547d);
  cursor: pointer;
  font-size: 25px;
  line-height: 1;
  padding: 5px;
  position: absolute;
  right: 12px;
  top: 10px;
}
/* Colores propios fijos con foco y al pasar por encima (Astra pinta los botones con los suyos). */
.tdp-consent__card .tdp-consent__btn:hover,
.tdp-consent__card .tdp-consent__btn:focus {
  background: var(--ocean-deep, #15244a);
  border-color: var(--ocean-deep, #15244a);
  color: #fff;
}
.tdp-consent__card .tdp-consent__btn--borde:hover,
.tdp-consent__card .tdp-consent__btn--borde:focus {
  background: rgba(29, 49, 96, .06);
  border-color: var(--ocean, #1d3160);
  color: var(--ocean, #1d3160);
}
.tdp-consent__card .tdp-consent__configure:hover,
.tdp-consent__card .tdp-consent__configure:focus,
.tdp-consent__card .tdp-consent__close:hover,
.tdp-consent__card .tdp-consent__close:focus {
  background: transparent;
  color: var(--ocean, #1d3160);
}
.tdp-consent__card button:focus-visible,
.tdp-consent__card a:focus-visible,
.tdp-consent__row input:focus-visible {
  outline: 3px solid var(--sky-2, #a7c9e8);
  outline-offset: 2px;
}

/* Panel «Configurar»: un interruptor por categoría (hoy solo Analítica: la web no hace publicidad). */
.tdp-consent--panel .tdp-consent__card { max-width: 620px; }
.tdp-consent__pt {
  color: var(--ocean, #1d3160);
  font-family: var(--font-display, system-ui, sans-serif);
  font-size: 19px;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 34px 8px 0;
}
.tdp-consent__row {
  align-items: center;
  border-top: 1px solid var(--line, #e3e6ef);
  display: flex;
  font-size: 14px;
  gap: 16px;
  justify-content: space-between;
  line-height: 1.4;
  padding: 11px 0;
}
.tdp-consent__row strong,
.tdp-consent__row small { display: block; }
.tdp-consent__row strong { color: var(--ocean, #1d3160); }
.tdp-consent__row small {
  color: var(--muted, #565f7d);
  font-size: 12.5px;
  margin-top: 2px;
}
label.tdp-consent__row { cursor: pointer; }
.tdp-consent__row input {
  appearance: none;
  background: #c3c9d8;
  border: 0;
  border-radius: 26px;
  cursor: pointer;
  flex: 0 0 46px;
  height: 26px;
  margin: 0;
  position: relative;
  transition: background .15s ease;
  width: 46px;
}
.tdp-consent__row input::after {
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  content: '';
  height: 20px;
  left: 3px;
  position: absolute;
  top: 3px;
  transition: left .15s ease;
  width: 20px;
}
.tdp-consent__row input:checked { background: var(--sea-oscuro, #358261); }
.tdp-consent__row input:checked::after { left: 23px; }
.tdp-consent__always {
  color: var(--sea-oscuro, #358261);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.tdp-consent__actions--panel {
  border-top: 1px solid var(--line, #e3e6ef);
  justify-content: flex-end;
  padding-top: 14px;
}

@media (max-width: 760px) {
  .tdp-consent__card {
    border-radius: 16px;
    bottom: 8px;
    left: 8px;
    padding: 14px 14px 12px;
    right: 8px;
  }
  .tdp-consent__aviso { display: block; }
  /* En móvil, sin título: el texto ya lo dice y el aviso tapa menos. */
  .tdp-consent__aviso h2 { display: none; }
  .tdp-consent__texto p {
    font-size: 13.5px;
    line-height: 1.45;
  }
  .tdp-consent__actions {
    gap: 8px;
    margin-top: 10px;
  }
  .tdp-consent__card .tdp-consent__btn {
    flex: 1 1 0;
    min-height: 44px;
    min-width: 0;
    padding: 12px 10px;
  }
  /* «Configurar» en la fila de los botones: una línea menos. */
  .tdp-consent__card .tdp-consent__configure {
    flex: 0 0 auto;
    padding: 12px 2px;
  }
  .tdp-consent__actions--panel { padding-top: 10px; }
  .tdp-consent__pt { font-size: 17px; }
  .tdp-consent__row { padding: 9px 0; font-size: 13.5px; }
  .tdp-consent__close { right: 6px; top: 4px; }
}
@media (prefers-reduced-motion: no-preference) {
  .tdp-consent__card { animation: tdpConsentIn .25s ease-out; }
  @keyframes tdpConsentIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
  }
}
