/* Consent banner and cookie settings. Loaded only while analytics is on. */

.footer-consent { display: inline-flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.privacy-more { margin-top: 8px; }

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

.consent-banner {
  position: fixed;
  z-index: 45;
  left: 12px;
  right: 12px;
  bottom: 12px;
  max-height: min(70vh, 420px);
  overflow: auto;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-3);
}
.consent-banner__inner { display: grid; gap: 10px; padding: 14px 16px 16px; }
.consent-banner h2 { font-size: 1.02rem; letter-spacing: -.02em; }
.consent-banner p, .consent-panel p { color: var(--ink-2); font-size: .92rem; line-height: 1.45; margin: 0; }
.consent-links { display: flex; flex-wrap: wrap; gap: 4px 0; align-items: center; font-size: .9rem; }
.consent-links a { color: var(--accent); }

.consent-actions, .consent-panel-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.consent-btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  background: var(--surface);
  color: var(--ink);
  font: 600 .95rem/1 var(--font);
  cursor: pointer;
}
.consent-btn:hover { background: var(--bg-2); }
.consent-btn:focus-visible,
.consent-textbtn:focus-visible,
.consent-links a:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.consent-textbtn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--accent);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

html.consent-open { scroll-padding-bottom: calc(min(70vh, 420px) + 24px); }
html.consent-open body { padding-bottom: calc(min(70vh, 420px) + 16px); }
html.consent-open #sample button[type="submit"] { scroll-margin-bottom: calc(min(70vh, 420px) + 28px); }

.consent-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(12, 15, 22, .45);
}
.consent-panel {
  position: fixed;
  z-index: 80;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  width: min(640px, calc(100vw - 24px));
  max-height: min(86vh, 720px);
  overflow: auto;
  background: var(--surface);
  color: var(--ink);
  border-radius: 18px;
  padding: 22px 22px 18px;
  box-shadow: var(--shadow-3);
  display: grid;
  gap: 14px;
}
.consent-panel h2 { font-size: 1.25rem; letter-spacing: -.02em; }
.consent-panel h3 { font-size: 1rem; }
.consent-block { display: grid; gap: 6px; }
.consent-measure { gap: 12px; }
.consent-switch { position: relative; align-self: start; }
.consent-switch input {
  position: absolute;
  width: 52px;
  height: 30px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

@media (max-width: 640px) {
  .consent-banner { left: 8px; right: 8px; bottom: 8px; }
  .consent-panel { padding: 18px 16px 16px; }
}
