/* Aviso de primera parte. Papel y tinta, aislado del tema de cada web. */
#consent-root {
  color-scheme: light;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  color: #1c1915;
}

.consent-banner,
.consent-panel {
  position: fixed;
  z-index: 2147483000;
  left: 0;
  right: 0;
  bottom: 0;
  box-sizing: border-box;
  margin: 0;
  padding: 0.9rem 1rem 1rem;
  background: #f4f0e8;
  color: #1c1915;
  box-shadow: 0 -8px 24px rgba(28, 25, 21, 0.18);
}

.consent-banner[hidden],
.consent-panel[hidden],
.consent-reopen[hidden] {
  display: none !important;
}

.consent-panel:not([hidden]) {
  display: flex;
  flex-direction: column;
  max-height: min(32rem, calc(100vh - 1rem));
  max-height: min(32rem, calc(100dvh - 1rem));
}

.consent-banner h2,
.consent-panel h2,
.consent-option-label {
  margin: 0;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: 0;
}

.consent-banner p,
.consent-option-desc,
.consent-embed p {
  margin: 0.4rem 0 0;
}

.consent-policy {
  color: #1c1915;
}

.consent-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.consent-panel .consent-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  flex: none;
}

#consent-root button {
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  min-height: 2.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: 2px;
  border: 1px solid transparent;
}

#consent-root button:focus-visible,
#consent-root a:focus-visible,
#consent-root input:focus-visible {
  outline: 3px solid #0b3a82;
  outline-offset: 2px;
}

/* Aceptar y rechazar comparten el mismo botón relleno. Configurar ocupa la misma celda y se distingue por el borde. */
#consent-root .consent-accept,
#consent-root .consent-reject {
  background: #1c1915;
  color: #f6f3ee;
}

#consent-root .consent-configure,
#consent-root .consent-back,
#consent-root .consent-save {
  background: #f4f0e8;
  color: #1c1915;
  border-color: #1c1915;
}

.consent-purposes {
  overflow: auto;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.consent-essential,
.consent-option {
  display: block;
  margin: 0 0 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #ddd6c8;
}

.consent-option input {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0 0.5rem 0 0;
  accent-color: #1c1915;
  vertical-align: -0.15rem;
}

.consent-reopen {
  position: fixed;
  z-index: 2147483000;
  left: 0.75rem;
  bottom: 0.75rem;
  background: #1c1915;
  color: #f6f3ee;
  border: 1px solid #1c1915;
}

.consent-embed {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  box-sizing: border-box;
  min-height: 8rem;
  margin: 0 0 0.5rem;
  padding: 1rem;
  background: #f4f0e8;
  color: #1c1915;
  border: 1px solid #1c1915;
}

.consent-embed button {
  background: #1c1915;
  color: #f6f3ee;
}

iframe[data-consent]:not([src]) {
  display: none;
}

@media (max-width: 36rem) {
  /* En estrecho los tres controles van uno bajo otro, con la misma anchura, y el rechazo queda en la primera pantalla. */
  .consent-actions,
  .consent-panel .consent-actions {
    grid-template-columns: 1fr;
  }
}
