/* Consent / privacy layer */

.ag-consent-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10040;
  background: rgba(10, 10, 10, 0.28);
  pointer-events: none;
}

.ag-consent-backdrop[hidden],
.ag-consent[hidden] {
  display: none !important;
}

.ag-consent {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 10050;
  max-width: 560px;
  margin: 0 auto;
  background: #f5f5f0;
  border: 1px solid rgba(10, 10, 10, 0.12);
  border-radius: 18px;
  box-shadow: 0 12px 40px rgba(10, 10, 10, 0.14);
  padding: 18px 18px 14px;
  font-family: "DM Sans", system-ui, sans-serif;
  color: #0a0a0a;
}

body.ag-consent-open {
  /* space so fixed banner doesn't cover CTAs / content */
  padding-bottom: var(--ag-consent-pad, 280px) !important;
  box-sizing: border-box;
}

.ag-consent-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}

.ag-consent-text {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(10, 10, 10, 0.62);
  margin: 0 0 12px;
}

.ag-consent-text a {
  color: #5b3bc4;
  text-decoration: underline;
}

.ag-consent-cats {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.ag-consent-cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid rgba(10, 10, 10, 0.08);
  border-radius: 12px;
}

.ag-consent-cat strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 1px;
}

.ag-consent-cat span {
  font-size: 11px;
  line-height: 1.4;
  color: rgba(10, 10, 10, 0.52);
}

.ag-consent-toggle {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(10, 10, 10, 0.42);
}

.ag-consent-toggle.is-on {
  color: #724ce9;
}

.ag-consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ag-consent-actions button {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  border-radius: 999px;
  min-height: 44px;
  padding: 0 18px;
  transition: background 140ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 140ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ag-consent-actions button:active {
  transform: scale(0.98);
}

.ag-consent-accept {
  background: #724ce9;
  color: #fff;
}

.ag-consent-accept:hover {
  background: #5b3bc4;
}

.ag-consent-essential {
  background: #fff;
  color: #0a0a0a;
  border: 1px solid rgba(10, 10, 10, 0.14) !important;
}

.ag-consent-essential:hover {
  border-color: rgba(10, 10, 10, 0.3) !important;
}

.ag-consent-settings-link {
  background: transparent;
  color: rgba(10, 10, 10, 0.55);
  font-size: 13px !important;
  font-weight: 500 !important;
  min-height: auto !important;
  padding: 8px 4px !important;
  text-decoration: underline;
}

a[data-ag-consent-open] {
  font-size: 15px;
  color: rgba(10, 10, 10, 0.68);
  cursor: pointer;
  text-decoration: none;
}

a[data-ag-consent-open]:hover {
  color: #5b3bc4;
}

@media (max-width: 640px) {
  .ag-consent {
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 14px 14px 12px;
    border-radius: 16px;
    max-width: none;
  }

  .ag-consent-cat span {
    display: none; /* compact: titles only on phone */
  }

  .ag-consent-actions {
    flex-direction: column;
  }

  .ag-consent-actions button {
    width: 100%;
  }

  body.ag-consent-open {
    padding-bottom: var(--ag-consent-pad, 320px) !important;
  }
}
