/* Consentimiento de cookies, primera capa informativa de formularios y afiliación.
   Solo sitio público. Lógica en js/consent.js y js/privacy-info.js.
   Mismo lenguaje visual que el resto: fondo oscuro, plata #C0C0C0, botón de contorno. */

/* ===== BANNER (primera visita) ===== */
.cr-consent-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 900;
  background: #1A1A1A; color: #D6D6D6;
  border-top: 1px solid rgba(192,192,192,0.35);
  box-shadow: 0 -8px 32px rgba(0,0,0,0.35);
  font-family: 'Jost', sans-serif;
}
.cr-consent-banner__inner {
  max-width: 1200px; margin: 0 auto; padding: 16px 24px;
  display: flex; align-items: center; gap: 24px;
}
.cr-consent-banner__text { flex: 1 1 auto; min-width: 0; }
.cr-consent-banner__title { font-family: 'Marcellus', serif; font-size: 16px; color: #FFFFFF; margin: 0 0 4px; }
.cr-consent-banner__text p { font-size: 13.5px; line-height: 1.55; margin: 0; }
.cr-consent-banner__text a { color: #FFFFFF; text-decoration: underline; text-underline-offset: 2px; }
.cr-consent-banner__short { display: none; }
.cr-consent-banner__actions { flex: 0 0 auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }

/* Los tres botones comparten EXACTAMENTE el mismo estilo: rechazar pesa lo mismo que aceptar. */
.cr-consent-btn {
  appearance: none; background: transparent; color: #C0C0C0;
  border: 1px solid #C0C0C0; border-radius: var(--radius-sm, 6px);
  font-family: 'Jost', sans-serif; font-size: 13.5px; font-weight: 500; letter-spacing: 0.02em; line-height: 1.25;
  min-height: 44px; padding: 8px 16px; cursor: pointer; text-align: center;
  transition: background 0.2s, color 0.2s;
}
.cr-consent-btn:hover { background: #C0C0C0; color: #1A1A1A; }
.cr-consent-btn:focus-visible,
.cr-consent-close:focus-visible,
.cr-switch:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 2px; }

/* El banner no debe tapar el final de la página: se reserva su altura (la fija consent.js). */
body.cr-banner-open { padding-bottom: var(--cr-banner-h, 0px); }
body.cr-banner-open .toast { bottom: calc(var(--cr-banner-h, 0px) + 16px); }

/* ===== PANEL "Configurar cookies" ===== */
html.cr-consent-lock { overflow: hidden; }
.cr-consent-overlay {
  position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.cr-consent-panel {
  position: relative; width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow-y: auto;
  background: #232323; color: #D6D6D6; border: 1px solid rgba(192,192,192,0.3); border-radius: var(--radius, 12px);
  padding: 32px 24px 24px; font-family: 'Jost', sans-serif; outline: none;
}
.cr-consent-panel__title { font-family: 'Marcellus', serif; font-size: 22px; font-weight: 400; color: #FFFFFF; margin: 0 40px 8px 0; }
.cr-consent-panel__intro { font-size: 13.5px; line-height: 1.6; margin: 0 0 16px; }
.cr-consent-close {
  position: absolute; top: 8px; right: 8px; width: 44px; height: 44px;
  background: transparent; border: 0; border-radius: var(--radius-sm, 6px); color: #C0C0C0; font-size: 26px; line-height: 1; cursor: pointer;
}
.cr-consent-close:hover { color: #FFFFFF; }
.cr-consent-cats { list-style: none; margin: 0 0 24px; padding: 0; }
.cr-consent-cat { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 16px 0; border-top: 1px solid rgba(255,255,255,0.1); }
.cr-consent-cat:last-child { border-bottom: 1px solid rgba(255,255,255,0.1); }
.cr-consent-cat__text { min-width: 0; }
.cr-consent-cat__name { display: block; font-size: 15px; font-weight: 500; color: #FFFFFF; text-transform: none; letter-spacing: 0; margin: 0 0 4px; cursor: pointer; }
.cr-consent-cat__desc { font-size: 13px; line-height: 1.55; margin: 0; color: #B8B8B8; }
.cr-consent-cat__ctl { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.cr-consent-cat__always { font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; letter-spacing: 0.04em; text-transform: uppercase; color: #9A9A9A; white-space: nowrap; }
.cr-consent-panel__actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }

/* interruptor */
.cr-switch {
  appearance: none; -webkit-appearance: none; position: relative; flex-shrink: 0;
  width: 44px; height: 24px; margin: 0; border-radius: 12px; cursor: pointer;
  background: #3A3A3A; border: 1px solid #6A6A6A; transition: background 0.2s, border-color 0.2s;
}
.cr-switch::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%;
  background: #9A9A9A; transition: transform 0.2s, background 0.2s;
}
.cr-switch:checked { background: #C0C0C0; border-color: #C0C0C0; }
.cr-switch:checked::after { transform: translateX(20px); background: #1A1A1A; }
.cr-switch:disabled { cursor: not-allowed; opacity: 0.6; }

/* ===== Contenido de terceros bloqueado ===== */
.cr-embed-placeholder {
  background: #232323; color: #D6D6D6; border: 1px dashed rgba(192,192,192,0.45); border-radius: var(--radius-sm, 6px);
  padding: 24px 16px; text-align: center; font-family: 'Jost', sans-serif;
}
.cr-embed-placeholder p { font-size: 13.5px; line-height: 1.55; margin: 0 0 16px; color: #D6D6D6; }

/* ===== Afiliación ===== */
.cr-affiliate { width: 88%; max-width: 1100px; margin: 0 auto; padding: 48px 0; }
.cr-affiliate[hidden] { display: none; }
.affiliate-disclosure {
  font-family: 'Jost', sans-serif; font-size: 13px; line-height: 1.55; color: #4A4A4A;
  border-left: 2px solid #8E8E8E; padding: 4px 0 4px 12px; margin: 0 0 16px;
}
.cr-slot__out img { max-width: 100%; height: auto; }

/* ===== Primera capa informativa bajo los formularios (RGPD art. 13) ===== */
.privacy-info {
  margin: 16px 0 0; padding: 12px; border: 1px solid rgba(160,160,160,0.35); border-radius: var(--radius-sm, 6px);
  font-family: 'Jost', sans-serif; font-size: 12.5px; line-height: 1.5; color: var(--text2, #B8B8B8);
  text-transform: none; letter-spacing: 0; text-align: left;
}
.exc-form-section .privacy-info { color: #4A4A4A; }
.privacy-info__title { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 8px; color: inherit; }
.privacy-info dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; }
.privacy-info dt { font-weight: 600; }
.privacy-info dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.privacy-info a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.privacy-info__more { margin: 8px 0 0; font-size: 12.5px; line-height: 1.5; color: inherit; }

/* botón-enlace dentro de las páginas legales */
.legal-page .legal-link-btn {
  background: none; border: 0; padding: 0; font: inherit; color: #4A4A4A; cursor: pointer;
  text-decoration: underline; text-underline-offset: 2px;
}
.legal-page .legal-link-btn:hover { color: #1A1A1A; }

@media (max-width: 900px) {
  .cr-consent-banner__inner { flex-direction: column; align-items: stretch; gap: 12px; padding: 12px 16px; }
}
@media (max-width: 520px) {
  .cr-consent-banner__inner { gap: 8px; padding: 10px 16px; }
  .cr-consent-banner__title, .cr-consent-banner__long { display: none; }
  .cr-consent-banner__short { display: inline; }
  .cr-consent-banner__text p { font-size: 12.5px; line-height: 1.4; }
  .cr-consent-btn { font-size: 12.5px; padding: 6px 6px; }
  .cr-consent-panel { padding: 32px 16px 16px; }
  .cr-consent-panel__actions { grid-template-columns: 1fr; }
  .privacy-info dl { grid-template-columns: 1fr; gap: 0; }
  .privacy-info dd { margin-bottom: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .cr-consent-btn, .cr-switch, .cr-switch::after { transition: none; }
}

/* slot dentro de un bloque (ficha de propiedad): sin el ancho/márgenes de sección */
.cr-affiliate--inline { width: auto; max-width: none; padding: 16px 0 0; }
/* dos slots seguidos: sin doble separación, y el aviso solo en el primero (lo oculta consent.js) */
.cr-affiliate:not([hidden]) + .cr-affiliate { padding-top: 0; }
.affiliate-disclosure[hidden] { display: none; }
