/* =============================================================
   Gap-the-Code · RGPD
   CSS del banner de cookies + modal + páginas legales
   ============================================================= */

/* ===== BANNER inferior ===== */
.gtc-consent {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 9500;
  background: #fff;
  color: var(--c-ink, #2B1A35);
  border: 1px solid var(--c-line, #E3D4EA);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(68, 40, 84, 0.18);
  padding: 14px 18px;
  font-size: 14px;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 250ms ease, transform 250ms ease;
  max-width: 100%;
  margin-inline: auto;
}
.gtc-consent--visible {
  opacity: 1;
  transform: translateY(0);
}
@media (min-width: 720px) {
  .gtc-consent {
    max-width: 960px;
  }
}
.gtc-consent__inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}
@media (min-width: 720px) {
  .gtc-consent__inner {
    flex-direction: row;
    align-items: center;
    gap: 18px;
  }
}
.gtc-consent__copy {
  flex: 1;
  min-width: 0;
}
.gtc-consent__emoji {
  font-size: 18px;
  margin-right: 2px;
}
.gtc-consent__copy strong { color: var(--c-ink, #2B1A35); }
.gtc-consent__copy a {
  color: var(--c-plum, #782167);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.gtc-consent__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex-shrink: 0;
}
.gtc-consent__btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 999px;
  transition: transform 150ms ease, background 150ms ease, box-shadow 150ms ease;
  line-height: 1;
  white-space: nowrap;
}
.gtc-consent__btn--ghost {
  background: transparent;
  color: var(--c-ink, #2B1A35);
  border: 1px solid var(--c-line, #E3D4EA);
}
.gtc-consent__btn--ghost:hover {
  background: var(--c-wash, #F9F3FD);
  border-color: var(--c-plum, #782167);
  color: var(--c-plum, #782167);
}
.gtc-consent__btn--primary {
  background: var(--grad-brand, linear-gradient(135deg, #442854, #782167, #BA2C69));
  color: #fff;
  box-shadow: 0 4px 10px rgba(186, 44, 105, 0.28);
}
.gtc-consent__btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(186, 44, 105, 0.35);
}
.gtc-consent__btn:focus-visible {
  outline: 2px solid var(--c-plum, #782167);
  outline-offset: 2px;
}

/* ===== MODAL (Personalizar) ===== */
body.gtc-consent-modal-open {
  overflow: hidden;
}
.gtc-consent-modal {
  position: fixed;
  inset: 0;
  z-index: 9600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 220ms ease;
}
.gtc-consent-modal--visible { opacity: 1; }
.gtc-consent-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(43, 26, 53, 0.55);
  backdrop-filter: blur(3px);
  cursor: pointer;
}
.gtc-consent-modal__panel {
  position: relative;
  background: #fff;
  color: var(--c-ink, #2B1A35);
  border-radius: 18px;
  padding: 28px 26px 22px;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 28px 60px rgba(68, 40, 84, 0.28);
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(10px);
  transition: transform 220ms ease;
}
.gtc-consent-modal--visible .gtc-consent-modal__panel {
  transform: translateY(0);
}
.gtc-consent-modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: transparent;
  border: 0;
  font-size: 28px;
  line-height: 1;
  color: var(--c-text-soft, #6B5974);
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 6px;
}
.gtc-consent-modal__close:hover {
  background: var(--c-wash, #F9F3FD);
  color: var(--c-plum, #782167);
}
.gtc-consent-modal__title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  padding-right: 40px;
}
.gtc-consent-modal__lede {
  margin: 0 0 20px;
  color: var(--c-text-soft, #6B5974);
  font-size: 14px;
  line-height: 1.55;
}
.gtc-consent-modal__footer {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--c-text-soft, #6B5974);
  text-align: center;
}
.gtc-consent-modal__footer a {
  color: var(--c-plum, #782167);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.gtc-consent-modal__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 8px;
}

/* ===== Toggle (categoría de cookies) ===== */
.gtc-consent-toggle {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--c-wash, #F9F3FD);
  border: 1px solid var(--c-line, #E3D4EA);
  border-radius: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color 150ms;
}
.gtc-consent-toggle:hover:not(.gtc-consent-toggle--locked) {
  border-color: var(--c-plum, #782167);
}
.gtc-consent-toggle__main {
  flex: 1;
  min-width: 0;
}
.gtc-consent-toggle__main strong {
  display: block;
  font-size: 15px;
  color: var(--c-ink, #2B1A35);
  margin-bottom: 2px;
}
.gtc-consent-toggle__main span {
  display: block;
  font-size: 13px;
  color: var(--c-text-soft, #6B5974);
  line-height: 1.45;
}
.gtc-consent-toggle__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.gtc-consent-toggle__switch {
  width: 40px;
  height: 22px;
  background: #d5c7dc;
  border-radius: 999px;
  position: relative;
  flex-shrink: 0;
  transition: background 180ms ease;
}
.gtc-consent-toggle__switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: left 180ms ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
.gtc-consent-toggle__input:checked + .gtc-consent-toggle__switch {
  background: var(--c-plum, #782167);
}
.gtc-consent-toggle__input:checked + .gtc-consent-toggle__switch::after {
  left: 21px;
}
.gtc-consent-toggle__input:focus-visible + .gtc-consent-toggle__switch {
  outline: 2px solid var(--c-plum, #782167);
  outline-offset: 2px;
}
.gtc-consent-toggle--locked {
  opacity: 0.8;
  cursor: default;
}
.gtc-consent-toggle__lock {
  font-size: 12px;
  font-weight: 700;
  color: var(--c-plum, #782167);
  padding: 4px 10px;
  background: #fff;
  border: 1px solid var(--c-line, #E3D4EA);
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

/* ===== Páginas legales ===== */
.legal-page { padding-bottom: var(--sp-16, 80px); }
.legal-content {
  margin-top: var(--sp-8, 40px);
  max-width: 720px;
}
.legal-content h2 {
  margin-top: var(--sp-10, 48px);
  margin-bottom: var(--sp-4, 20px);
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  color: var(--c-ink, #2B1A35);
}
.legal-content h3 {
  margin-top: var(--sp-6, 28px);
  margin-bottom: var(--sp-3, 14px);
  font-size: 1.15rem;
  color: var(--c-plum, #782167);
}
.legal-content p,
.legal-content ul,
.legal-content ol {
  line-height: 1.7;
  color: var(--c-text, #2B1A35);
}
.legal-content ul, .legal-content ol {
  padding-left: 22px;
  margin-bottom: var(--sp-4, 20px);
}
.legal-content li {
  margin-bottom: 8px;
}
.legal-content li strong { color: var(--c-ink, #2B1A35); }
.legal-content a {
  color: var(--c-plum, #782167);
  text-underline-offset: 3px;
}
.legal-content code {
  font-family: var(--font-mono, monospace);
  background: var(--c-wash, #F9F3FD);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

/* Tabla cookies */
.cookies-table-wrap {
  overflow-x: auto;
  margin: var(--sp-4, 20px) 0;
  border: 1px solid var(--c-line, #E3D4EA);
  border-radius: 10px;
}
.cookies-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 560px;
}
.cookies-table th {
  background: var(--c-wash, #F9F3FD);
  text-align: left;
  padding: 10px 14px;
  font-weight: 700;
  color: var(--c-ink, #2B1A35);
  border-bottom: 1px solid var(--c-line, #E3D4EA);
}
.cookies-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--c-line, #E3D4EA);
  vertical-align: top;
}
.cookies-table tr:last-child td {
  border-bottom: 0;
}
.cookies-table code {
  font-size: 0.85em;
}

/* Footer: link "Preferencias de cookies" */
.footer a.footer__consent-link {
  cursor: pointer;
}
