/* consent.css — cookie consent banner + preferences modal
   Matches The Agentic Economy design tokens. */

:root {
  --aecc-ink: #0E1622;
  --aecc-ink-2: #38465A;
  --aecc-muted: #71808F;
  --aecc-line: #D4E0E5;
  --aecc-blue: #1257E6;
  --aecc-green: #0FB39C;
  --aecc-white: #FFFFFF;
}

/* ---------- Banner ---------- */
#ae-consent-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 9999;
  background: var(--aecc-white);
  border: 1px solid var(--aecc-line);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(14, 22, 34, .16);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--aecc-ink-2);
  animation: ae-cc-rise .28s ease;
}
@keyframes ae-cc-rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ae-cc-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 20px;
  max-width: 1080px;
  margin: 0 auto;
}
.ae-cc-text {
  font-size: 13.5px;
  line-height: 1.5;
}
.ae-cc-text strong { color: var(--aecc-ink); font-weight: 600; }
.ae-cc-text a {
  color: var(--aecc-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.ae-cc-actions {
  display: flex;
  gap: 10px;
  flex: none;
}
.ae-cc-btn {
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 22px;
  padding: 9px 18px;
  cursor: pointer;
  border: 1px solid var(--aecc-line);
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.ae-cc-btn:hover { transform: translateY(-1px); }
.ae-cc-btn:focus-visible { outline: 2px solid var(--aecc-blue); outline-offset: 2px; }
.ae-cc-reject {
  background: var(--aecc-white);
  color: var(--aecc-ink-2);
}
.ae-cc-reject:hover { background: #F6FAFB; }
.ae-cc-accept {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(92deg, var(--aecc-blue) 0%, var(--aecc-green) 100%);
  box-shadow: 0 2px 8px rgba(18, 87, 230, .22);
}

/* ---------- Preferences modal ---------- */
#ae-consent-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.ae-cc-overlay {
  position: absolute;
  inset: 0;
  background: rgba(14, 22, 34, .42);
  backdrop-filter: blur(2px);
}
.ae-cc-dialog {
  position: relative;
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: var(--aecc-white);
  border: 1px solid var(--aecc-line);
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(14, 22, 34, .28);
  padding: 26px 26px 22px;
  animation: ae-cc-rise .24s ease;
}
.ae-cc-x {
  position: absolute;
  top: 14px;
  right: 16px;
  border: none;
  background: none;
  font-size: 26px;
  line-height: 1;
  color: var(--aecc-muted);
  cursor: pointer;
  padding: 4px;
}
.ae-cc-x:hover { color: var(--aecc-ink); }
.ae-cc-h {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: 20px;
  letter-spacing: -.015em;
  color: var(--aecc-ink);
  margin: 0 0 6px;
}
.ae-cc-p {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--aecc-ink-2);
  margin: 0 0 18px;
}
.ae-cc-p a { color: var(--aecc-blue); text-decoration: underline; text-underline-offset: 2px; }
.ae-cc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  border-top: 1px solid var(--aecc-line);
}
.ae-cc-rowname { font-size: 14.5px; font-weight: 600; color: var(--aecc-ink); }
.ae-cc-rowdesc { font-size: 12.5px; color: var(--aecc-muted); margin-top: 3px; }
.ae-cc-always { font-size: 12.5px; font-weight: 600; color: var(--aecc-green); flex: none; }

/* Toggle switch */
.ae-cc-switch { position: relative; display: inline-block; width: 44px; height: 26px; flex: none; }
.ae-cc-switch input { opacity: 0; width: 0; height: 0; }
.ae-cc-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #C3D0D9;
  border-radius: 26px;
  transition: background .18s ease;
}
.ae-cc-slider::before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .18s ease;
  box-shadow: 0 1px 3px rgba(14, 22, 34, .25);
}
.ae-cc-switch input:checked + .ae-cc-slider {
  background: linear-gradient(92deg, var(--aecc-blue) 0%, var(--aecc-green) 100%);
}
.ae-cc-switch input:checked + .ae-cc-slider::before { transform: translateX(18px); }
.ae-cc-switch input:focus-visible + .ae-cc-slider { outline: 2px solid var(--aecc-blue); outline-offset: 2px; }
.ae-cc-modal-actions { margin-top: 22px; display: flex; justify-content: flex-end; }
.ae-cc-save {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(92deg, var(--aecc-blue) 0%, var(--aecc-green) 100%);
  box-shadow: 0 2px 8px rgba(18, 87, 230, .22);
}

/* ---------- Footer links (added by JS) ---------- */
.ae-cc-footer-links {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  /* Always sit on their own full-width row so they don't disrupt a
     flex footer's brand/copyright line (prevents text wrapping). */
  flex-basis: 100%;
  width: 100%;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--aecc-line);
  font-size: 13px;
}
.ae-cc-footer-links a {
  color: var(--aecc-muted);
  text-decoration: none;
}
.ae-cc-footer-links a:hover { color: var(--aecc-blue); text-decoration: underline; text-underline-offset: 2px; }
.ae-cc-footer-links span { color: var(--aecc-line); }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .ae-cc-inner { flex-direction: column; align-items: stretch; gap: 14px; }
  .ae-cc-actions { justify-content: stretch; }
  .ae-cc-btn { flex: 1; }
}
