:root {
  --bsd-consent-accent: var(--primary, #2563eb);
  --bsd-consent-surface: #ffffff;
  --bsd-consent-text: #111827;
  --bsd-consent-muted: #4b5563;
  --bsd-consent-border: #d1d5db;
  --bsd-consent-focus: #f59e0b;
}

.bsd-consent-notice,
.bsd-consent-panel {
  box-sizing: border-box;
  font-family: inherit;
}

.bsd-consent-notice {
  position: fixed;
  z-index: 2147483000;
  top: 50%;
  left: 50%;
  width: min(27rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
  padding: 1.25rem;
  border: 3px solid var(--bsd-consent-accent);
  border-radius: 1rem;
  background: var(--bsd-consent-surface);
  color: var(--bsd-consent-text);
  box-shadow: 0 24px 80px rgb(15 23 42 / .4);
  transform: translate(-50%, -50%);
  animation: bsd-consent-notice-arrive 220ms cubic-bezier(.2, .85, .3, 1.15) both;
}

@keyframes bsd-consent-notice-arrive {
  from { opacity: 0; transform: translate(-50%, -50%) scale(.86); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.bsd-consent-notice[hidden],
.bsd-consent-dialog[hidden] { display: none !important; }
.bsd-consent-notice__title { display: block; font-size: 1.15rem; line-height: 1.35; }
.bsd-consent-notice p { margin: .55rem 0 1rem; color: var(--bsd-consent-muted); font-size: .925rem; line-height: 1.55; }

.bsd-consent-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.bsd-consent-actions--notice { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bsd-consent-actions--notice .bsd-consent-button { font-size: .875rem; }
.bsd-consent-button {
  min-height: 2.75rem;
  padding: .55rem .65rem;
  border: 1px solid var(--bsd-consent-border);
  border-radius: .65rem;
  background: #f8fafc;
  color: var(--bsd-consent-text);
  cursor: pointer;
  font: inherit;
  font-size: .78rem;
  font-weight: 750;
  line-height: 1.2;
}
.bsd-consent-button:hover { border-color: var(--bsd-consent-accent); }
.bsd-consent-button--accept {
  border: 2px solid var(--bsd-consent-accent);
  background: var(--bsd-consent-accent);
  color: #ffffff;
}
.bsd-consent-button--accept:hover { filter: brightness(1.12); }
.bsd-consent-button--details {
  border: 2px solid #64748b;
  background: #64748b;
  color: #ffffff;
}
.bsd-consent-button--details:hover { border-color: #475569; background: #475569; }
.bsd-consent-button:focus-visible,
.bsd-consent-close:focus-visible,
.bsd-consent-settings-link:focus-visible,
.bsd-consent-toggle:focus-visible { outline: 3px solid var(--bsd-consent-focus); outline-offset: 2px; }

.bsd-consent-dialog {
  position: fixed;
  z-index: 2147483001;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgb(2 6 23 / .72);
}
.bsd-consent-panel {
  width: min(38rem, 100%);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  padding: 1.25rem;
  border: 3px solid var(--bsd-consent-accent);
  border-radius: 1rem;
  background: var(--bsd-consent-surface);
  color: var(--bsd-consent-text);
  box-shadow: 0 24px 70px rgb(0 0 0 / .38);
}
.bsd-consent-panel__heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.bsd-consent-panel h2 { margin: 0; font-size: 1.5rem; line-height: 1.2; }
.bsd-consent-panel__intro { margin: .65rem 0 1.1rem; color: var(--bsd-consent-muted); line-height: 1.55; }
.bsd-consent-close { min-height: 2.75rem; padding: .5rem .75rem; border: 0; background: transparent; color: var(--bsd-consent-text); cursor: pointer; font: inherit; font-weight: 700; }
.bsd-consent-category { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 0; border-top: 1px solid #e5e7eb; }
.bsd-consent-category__copy { display: grid; gap: .25rem; }
.bsd-consent-category__copy span { color: var(--bsd-consent-muted); font-size: .875rem; line-height: 1.45; }
.bsd-consent-always-on { flex: 0 0 auto; padding: .35rem .55rem; border-radius: 999px; background: #e5e7eb; color: #374151; font-size: .75rem; font-weight: 750; }
.bsd-consent-toggle { flex: 0 0 auto; width: 1.45rem; height: 1.45rem; accent-color: var(--bsd-consent-accent); cursor: pointer; }
.bsd-consent-actions--panel { margin-top: 1rem; }

.bsd-consent-settings-link {
  display: inline-flex;
  min-height: 0;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  text-decoration: none;
}

@media (max-width: 479px) {
  .bsd-consent-notice { width: calc(100vw - 1rem); max-height: min(28rem, calc(100vh - 1rem)); padding: 1rem; }
  .bsd-consent-actions { grid-template-columns: 1fr; }
  .bsd-consent-actions--panel { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .bsd-consent-notice,
  .bsd-consent-dialog,
  .bsd-consent-panel,
  .bsd-consent-button { scroll-behavior: auto; transition: none !important; animation: none !important; }
}

/* ---- BSD's own site only (agency_consent.css, 29 Sep 2026, Grant's layout) ----
   Notice: "Accept all" full width on its own row; "Choose" and "Reject all" side by side underneath. */
.bsd-consent-actions--notice { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bsd-consent-actions--notice .bsd-consent-button--accept { grid-column: 1 / -1; }
@media (max-width: 480px) {
  .bsd-consent-actions--notice { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
