.agatho-consent-banner,
.agatho-consent-overlay,
.agatho-consent-manage {
  box-sizing: border-box;
  font-family: Inter, Arial, sans-serif;
}

.agatho-consent-banner *,
.agatho-consent-overlay *,
.agatho-consent-manage {
  box-sizing: border-box;
}

.agatho-consent-banner[hidden],
.agatho-consent-overlay[hidden],
.agatho-consent-manage[hidden] {
  display: none !important;
}

.agatho-consent-banner {
  position: fixed;
  right: 20px;
  bottom: 20px;
  left: 20px;
  z-index: 10000;
  display: flex;
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  color: #f5f3ee;
  background: #11151c;
  border: 1px solid rgba(190, 159, 94, 0.48);
  border-radius: 10px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.38);
}

.agatho-consent-banner-copy {
  max-width: 720px;
}

.agatho-consent-title {
  margin: 0 0 10px;
  color: #ffffff;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.25;
}

.agatho-consent-text,
.agatho-consent-policy,
.agatho-consent-status {
  margin: 0;
  color: #c8cbd0;
  font-size: 14px;
  line-height: 1.55;
}

.agatho-consent-policy {
  margin-top: 8px;
}

.agatho-consent-status {
  min-height: 1.55em;
  margin-top: 6px;
  color: #e3c987;
}

.agatho-consent-link {
  color: #e3c987;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.agatho-consent-link:hover {
  color: #f4dda5;
}

.agatho-consent-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.agatho-consent-button,
.agatho-consent-close,
.agatho-consent-manage {
  min-height: 44px;
  padding: 10px 16px;
  color: #f5f3ee;
  background: transparent;
  border: 1px solid #747982;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.2;
  cursor: pointer;
}

.agatho-consent-button:hover,
.agatho-consent-close:hover,
.agatho-consent-manage:hover {
  border-color: #e3c987;
}

.agatho-consent-button-primary {
  color: #11151c;
  background: #d4b56f;
  border-color: #d4b56f;
}

.agatho-consent-button-primary:hover {
  background: #e3c987;
  border-color: #e3c987;
}

/* En la primera capa, "Rechazar" y "Aceptar todas" tienen el mismo tamaño y la misma jerarquía visual. */
.agatho-consent-banner .agatho-consent-button-primary,
.agatho-consent-banner .agatho-consent-button-secondary {
  color: #f5f3ee;
  background: transparent;
  border-color: #747982;
}

.agatho-consent-banner .agatho-consent-button-primary:hover,
.agatho-consent-banner .agatho-consent-button-secondary:hover {
  border-color: #e3c987;
}

.agatho-consent-button:focus-visible,
.agatho-consent-close:focus-visible,
.agatho-consent-manage:focus-visible,
.agatho-consent-link:focus-visible,
.agatho-consent-checkbox:focus-visible {
  outline: 3px solid #f0d899;
  outline-offset: 3px;
}

.agatho-consent-manage {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9998;
  color: #11151c;
  background: #f5f3ee;
  border-color: #a58a52;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.24);
}

.agatho-consent-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: grid;
  padding: 20px;
  place-items: center;
  overflow-y: auto;
  background: rgba(3, 5, 8, 0.76);
}

.agatho-consent-panel {
  width: min(100%, 620px);
  max-height: calc(100vh - 40px);
  padding: 26px;
  overflow-y: auto;
  color: #f5f3ee;
  background: #11151c;
  border: 1px solid rgba(190, 159, 94, 0.48);
  border-radius: 10px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.agatho-consent-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.agatho-consent-close {
  min-height: 38px;
  padding: 8px 12px;
}

.agatho-consent-category {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  margin-top: 16px;
  padding: 16px;
  align-items: flex-start;
  background: #181d26;
  border: 1px solid #343b47;
  border-radius: 8px;
  cursor: pointer;
}

.agatho-consent-category:has(.agatho-consent-checkbox:checked) {
  border-color: #a58a52;
}

.agatho-consent-category:has(.agatho-consent-checkbox:disabled) {
  cursor: default;
}

.agatho-consent-checkbox {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: #d4b56f;
}

.agatho-consent-category-copy {
  display: grid;
  gap: 4px;
}

.agatho-consent-category-title {
  color: #ffffff;
  font-size: 15px;
}

.agatho-consent-category-description {
  color: #b9bdc5;
  font-size: 13px;
  line-height: 1.5;
}

.agatho-consent-panel .agatho-consent-policy {
  margin-top: 18px;
}

.agatho-consent-panel .agatho-consent-actions {
  margin-top: 18px;
}

body.agatho-consent-open {
  overflow: hidden;
}

@media (max-width: 760px) {
  .agatho-consent-banner {
    right: 12px;
    bottom: 12px;
    left: 12px;
    padding: 18px;
    align-items: stretch;
    flex-direction: column;
    gap: 16px;
  }

  .agatho-consent-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .agatho-consent-banner .agatho-consent-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .agatho-consent-banner .agatho-consent-button-configure {
    grid-column: 1 / -1;
    color: #c8cbd0;
    border-color: transparent;
    text-decoration: underline;
    text-underline-offset: 3px;
  }

  .agatho-consent-button {
    width: 100%;
  }

  .agatho-consent-panel {
    padding: 20px;
  }

  .agatho-consent-manage {
    right: 12px;
    bottom: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .agatho-consent-banner,
  .agatho-consent-overlay,
  .agatho-consent-panel,
  .agatho-consent-button,
  .agatho-consent-manage {
    scroll-behavior: auto;
    transition: none;
  }
}
