/* Cookie-consent banner (REQ-0778) and cookie-details dialog. Colours come from
   the shared theme tokens (tokens.css: dark, html.light, html.bzz) and type from
   brand-typography.css, so it matches the rest of the site in every mode. */
.consent-banner,
.consent-prefs,
.consent-prefs-control {
  font-family: var(--type-body-font-family);
  font-size: var(--type-body-font-size);
  line-height: var(--type-body-line-height);
  color: var(--text, #d7dde5);
}
.consent-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2147483000;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  background: var(--bg-panel, #11151a);
  border-top: 1px solid var(--border, #27313d);
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.3);
}
.consent-banner-text {
  margin: 0;
  flex: 1 1 24rem;
}
.consent-banner-link {
  color: var(--primary-hover, #d99a1a);
  text-decoration: underline;
}
.consent-banner-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.consent-banner-btn {
  font: inherit;
  padding: 0.45rem 0.9rem;
  border-radius: 6px;
  border: 1px solid var(--border-strong, #3a4655);
  background: transparent;
  color: var(--text-head, #f3f6fa);
  cursor: pointer;
}
.consent-banner-btn:hover {
  background: var(--bg-hover, #1b222b);
}
.consent-banner-primary {
  background: var(--primary, #ba7f04);
  border-color: var(--primary, #ba7f04);
  color: var(--on-accent, #1a1200);
}
.consent-banner-primary:hover {
  background: var(--primary-hover, #d99a1a);
}
.consent-banner-btn:focus-visible,
.consent-banner-link:focus-visible,
.consent-prefs-control:focus-visible {
  outline: 3px solid var(--primary-hover, #d99a1a);
  outline-offset: 2px;
}

/* Persistent Cookie Preferences control (REQ-0781). */
.consent-prefs-control {
  position: fixed;
  left: 0.75rem;
  bottom: 0.75rem;
  z-index: 2147482000;
  font-size: var(--type-label-font-size);
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--border-strong, #3a4655);
  background: var(--bg-panel, #11151a);
  cursor: pointer;
}
.consent-prefs-control:hover {
  background: var(--bg-hover, #1b222b);
}

/* Cookie details dialog: centred, scrolls inside itself. */
.consent-prefs-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147482999;
  background: rgba(0, 0, 0, 0.6);
}
.consent-prefs {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2147483001;
  box-sizing: border-box;
  width: min(42rem, calc(100vw - 1.5rem));
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  padding: 1.25rem;
  background: var(--bg-panel-raised, #161b22);
  border: 1px solid var(--border, #27313d);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}
.consent-prefs-title {
  margin: 0 0 0.5rem;
  font-family: var(--type-h4-font-family);
  font-size: var(--type-h4-font-size);
  font-weight: var(--type-h4-font-weight);
  color: var(--text-head, #f3f6fa);
}
.consent-prefs-option {
  display: block;
  margin: 0.25rem 0;
}
.consent-prefs-error {
  min-height: 1.2em;
  margin: 0.5rem 0;
  color: var(--danger, #ef6b73);
}
.consent-cookie-catalog {
  margin: 0.75rem 0 1rem;
}
.consent-cookie-group {
  margin: 0 0 1rem;
}
.consent-cookie-group-title {
  margin: 0 0 0.4rem;
  font-family: var(--type-h6-font-family);
  font-size: var(--type-h6-font-size);
  font-weight: var(--type-h6-font-weight);
  color: var(--primary-hover, #d99a1a);
}
.consent-cookie-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.consent-cookie-item {
  padding: 0.6rem 0.75rem;
  margin: 0 0 0.5rem;
  background: var(--bg-input, #0d1117);
  border: 1px solid var(--border-dim, #1b222b);
  border-radius: 6px;
}
.consent-cookie-name {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 0.75rem;
  margin: 0 0 0.25rem;
}
.consent-cookie-name code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--text-head, #f3f6fa);
}
.consent-cookie-kind {
  color: var(--text-muted, #8f9baa);
  font-size: var(--type-label-font-size);
}
.consent-cookie-text {
  margin: 0.15rem 0;
}
.consent-cookie-change {
  color: var(--text-muted, #8f9baa);
}
.consent-prefs-actions {
  position: sticky;
  bottom: -1.25rem;
  margin: 0 -1.25rem -1.25rem;
  padding: 0.75rem 1.25rem;
  background: var(--bg-panel-raised, #161b22);
  border-top: 1px solid var(--border, #27313d);
}
