#cookie-consent-root {
  --cc-black: #080808;
  --cc-paper: #f5f5f2;
  --cc-white: #fff;
  --cc-yellow: #f3ea5d;
  --cc-border: rgba(8, 8, 8, .2);
  font-family: inherit;
  color: var(--cc-black);
  position: relative;
  z-index: 2147483000;
}

#cookie-consent-root [hidden] { display: none !important; }

.cc-live {
  position: fixed;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.cc-banner {
  position: fixed;
  right: 20px;
  bottom: 20px;
  left: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;
  color: var(--cc-black);
  background: var(--cc-paper);
  border: 1px solid var(--cc-black);
  box-shadow: 0 18px 60px rgba(0, 0, 0, .28);
}

.cc-banner h2,
.cc-modal h2,
.cc-modal h3,
.cc-modal p,
.cc-banner p { margin: 0; }

.cc-banner h2,
.cc-modal h2 {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.05;
}

.cc-banner__copy > p {
  max-width: 760px;
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.5;
}

.cc-banner__details { font-size: 13px !important; }

.cc-banner a,
.cc-modal a {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cc-actions--banner {
  justify-content: flex-end;
  min-width: min(100%, 440px);
}

.cc-button,
.cc-close,
.cc-reopen {
  appearance: none;
  border-radius: 0;
  font: inherit;
  cursor: pointer;
}

.cc-button {
  min-height: 46px;
  padding: 11px 16px;
  border: 2px solid var(--cc-black);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.15;
}

.cc-button--decision {
  min-width: 150px;
  color: var(--cc-white);
  background: var(--cc-black);
}

.cc-button--secondary {
  min-width: 130px;
  color: var(--cc-black);
  background: var(--cc-white);
}

.cc-button:hover,
.cc-button:focus-visible,
.cc-close:hover,
.cc-close:focus-visible,
.cc-reopen:hover,
.cc-reopen:focus-visible {
  outline: 3px solid var(--cc-yellow, #f3ea5d);
  outline-offset: 2px;
}

.cc-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, .66);
}

.cc-modal {
  width: min(760px, 100%);
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  overflow: auto;
  padding: 26px;
  color: var(--cc-black);
  background: var(--cc-paper);
  border: 1px solid var(--cc-black);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .36);
}

.cc-modal:focus { outline: none; }

.cc-modal__header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
}

.cc-modal__header p {
  max-width: 630px;
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.5;
}

.cc-close {
  width: 44px;
  height: 44px;
  color: var(--cc-white);
  background: var(--cc-black);
  border: 2px solid var(--cc-black);
  font-size: 28px;
  line-height: 1;
}

.cc-options {
  display: grid;
  gap: 12px;
  margin: 24px 0 18px;
}

.cc-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 18px;
  background: var(--cc-white);
  border: 1px solid var(--cc-border);
}

.cc-option h3,
.cc-option strong {
  display: block;
  font-size: 16px;
  line-height: 1.25;
}

.cc-option p,
.cc-option small {
  display: block;
  margin-top: 7px;
  color: #4d4d4d;
  font-size: 13px;
  line-height: 1.5;
}

.cc-option--toggle { cursor: pointer; }

.cc-required {
  padding: 7px 9px;
  color: var(--cc-black);
  background: var(--cc-yellow);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.legal-table-wrap {
  max-width: 100%;
  margin: 20px 0;
  overflow-x: auto;
  border: 1px solid rgba(8, 8, 8, .2);
}

.legal-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  background: #fff;
  font-size: 13px;
  line-height: 1.5;
}

.legal-table th,
.legal-table td {
  padding: 13px 14px;
  text-align: left;
  vertical-align: top;
  border: 1px solid rgba(8, 8, 8, .16);
}

.legal-table th {
  color: #fff;
  background: #080808;
  font-weight: 800;
}

.legal-table code {
  overflow-wrap: anywhere;
  font-size: .92em;
}

.legal-cookie-button {
  min-height: 44px;
  padding: 10px 15px;
  color: #fff;
  background: #080808;
  border: 2px solid #080808;
  border-radius: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.legal-cookie-button:hover,
.legal-cookie-button:focus-visible {
  outline: 3px solid #f3ea5d;
  outline-offset: 2px;
}

.legal-cookie-button--inline {
  min-height: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cc-switch {
  display: grid;
  justify-items: center;
  gap: 5px;
  min-width: 78px;
}

.cc-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.cc-switch > span {
  position: relative;
  display: block;
  width: 52px;
  height: 28px;
  background: #777;
  border: 2px solid var(--cc-black);
  transition: background .18s ease;
}

.cc-switch > span::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: var(--cc-white);
  transition: transform .18s ease;
}

.cc-switch input:checked + span { background: var(--cc-black); }
.cc-switch input:checked + span::after { transform: translateX(24px); background: var(--cc-yellow); }
.cc-switch input:focus-visible + span { outline: 3px solid var(--cc-yellow); outline-offset: 3px; }

.cc-switch em {
  color: #4d4d4d;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.cc-modal__links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
  font-size: 13px;
}

.cc-actions--modal { justify-content: space-between; }
.cc-modal-open { overflow: hidden; }

.cc-reopen {
  position: static;
  min-width: 0;
  min-height: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  box-shadow: none;
  font: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-transform: none;
}

.cc-reopen[hidden] { display: none !important; }

.cc-preferences-access {
  margin-top: 24px;
  color: inherit;
  font-size: 13px;
}

.footer-legal .cc-reopen { display: block; }

@media (max-width: 880px) {
  .cc-banner { grid-template-columns: 1fr; align-items: stretch; }
  .cc-actions--banner { justify-content: stretch; min-width: 0; }
  .cc-actions--banner .cc-button { flex: 1 1 180px; }
}

@media (max-width: 620px) {
  .cc-banner { right: 10px; bottom: 10px; left: 10px; padding: 18px; }
  .cc-overlay { padding: 10px; }
  .cc-modal { max-height: calc(100vh - 20px); max-height: calc(100dvh - 20px); padding: 18px; }
  .cc-option { grid-template-columns: 1fr; gap: 14px; }
  .cc-switch { grid-template-columns: auto auto; justify-content: start; align-items: center; }
  .cc-actions--modal .cc-button { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .cc-switch > span,
  .cc-switch > span::after { transition: none; }
}

/* Aviso compacto en una esquina (no una barra a todo el ancho): ocupa menos pantalla y deja ver la web.
   Los tres botones conservan el mismo tamaño, el mismo estilo y la misma prominencia. */
@media (min-width: 621px) {
  .cc-banner {
    right: auto;
    bottom: 20px;
    left: 20px;
    grid-template-columns: 1fr;
    gap: 14px;
    align-items: stretch;
    width: min(440px, calc(100vw - 40px));
    max-width: none;
    margin: 0;
    padding: 18px 20px;
  }
  .cc-banner h2 {
    font-size: 18px;
    line-height: 1.2;
  }
  .cc-banner__copy > p {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.45;
  }
  .cc-banner__details { font-size: 12px !important; }
  .cc-actions--banner {
    justify-content: stretch;
    min-width: 0;
    gap: 8px;
  }
  .cc-actions--banner .cc-button {
    flex: 1 1 0;
    min-width: 0;
    min-height: 42px;
    padding: 9px 8px;
    font-size: 12.5px;
  }
}

/* Móvil: aviso más bajo. Rechazar y Aceptar van lado a lado con el mismo tamaño y estilo;
   Configurar ocupa la fila inferior. */
@media (max-width: 620px) {
  .cc-banner {
    gap: 10px;
    padding: 14px;
  }
  .cc-banner h2 {
    font-size: 17px;
    line-height: 1.2;
  }
  .cc-banner__copy > p {
    margin-top: 6px;
    font-size: 12.5px;
    line-height: 1.4;
  }
  .cc-banner__details { font-size: 11.5px !important; }
  .cc-actions--banner {
    gap: 8px;
    min-width: 0;
  }
  .cc-actions--banner .cc-button {
    min-height: 42px;
    padding: 8px;
    font-size: 12.5px;
  }
  .cc-actions--banner .cc-button--decision {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
  }
  .cc-actions--banner [data-cc-reject] { order: 1; }
  .cc-actions--banner [data-cc-accept] { order: 2; }
  .cc-actions--banner [data-cc-configure] { order: 3; flex: 1 1 100%; }
}
