.eon-gtm-noscript {
  display: none;
  visibility: hidden;
}

/* Reserva al final del documento sin reemplazar el padding de cada página. */
.eon-consent-space {
  height: var(--eon-consent-reserved-height, 0px);
  flex-shrink: 0;
  pointer-events: none;
}

html:root[data-eon-consent-visible] {
  scroll-padding-bottom: var(--eon-consent-reserved-height);
}

.eon-consent-banner {
  position: fixed;
  left: 24px;
  right: 24px;
  bottom: 24px;
  max-width: 960px;
  margin: 0 auto;
  padding: 18px 22px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  z-index: 1400;
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.35);
}

.eon-consent-banner p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
}

.eon-consent-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.eon-consent-btn {
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: inherit;
  min-height: 44px;
  font-size: 0.9rem;
}

.eon-consent-banner[hidden] {
  display: none;
}

/* Un diálogo necesario conserva prioridad sin interpretar silencio como permiso. */
body:has(.eon-modal[style*="display: block"], .eon-modal[style*="display: flex"]) .eon-consent-banner {
  visibility: hidden;
}

.eon-consent-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px !important;
}

.eon-consent-links a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.eon-cookie-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 16px 0;
  font-size: 0.875rem;
}

.eon-cookie-footer-links a {
  color: inherit;
  text-decoration: underline;
}

.eon-consent-btn:focus-visible,
.eon-consent-banner a:focus-visible,
.eon-cookie-preferences a:focus-visible,
.eon-cookie-category input:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 4px;
}

.eon-cookie-preferences {
  width: min(600px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  box-sizing: border-box;
  padding: 24px;
  border: 1px solid #94a3b8;
  border-radius: 18px;
  color: #0f172a;
  background: #fff;
  font-size: 1rem;
  line-height: 1.5;
}

.eon-cookie-preferences::backdrop {
  background: rgba(15, 23, 42, 0.6);
}

.eon-cookie-preferences h2 {
  margin: 0 0 12px;
  font-size: 1.35rem;
  font-weight: 700;
}

.eon-cookie-category {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 16px 0;
  cursor: pointer;
}

.eon-cookie-category input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 3px;
}

.eon-cookie-category span span {
  display: block;
  font-size: 0.9rem;
}

.eon-cookie-preferences .eon-consent-actions {
  margin-top: 20px;
}

@media (max-width: 640px) {
  .eon-consent-banner {
    left: 16px;
    right: 16px;
    padding: 16px;
    flex-direction: column;
    align-items: flex-start;
  }

  .eon-consent-actions {
    width: 100%;
    justify-content: flex-start;
  }
}
