/* The cookie banner. Every look comes from --gsy-consent-* (Theme → Site
   parts → Styles → Cookie banner), falling back to the theme's tokens. */
.gsy-consent {
  --c-bg: var(--gsy-consent-background, var(--gsy-color-text, #111));
  --c-fg: var(--gsy-consent-text, var(--gsy-color-background, #fff));
  --c-btn: var(--gsy-consent-button-background, var(--gsy-color-primary, #2b59c3));
  --c-btn-fg: var(--gsy-consent-button-text, #fff);
  --c-radius: var(--gsy-consent-radius, 0);
  --c-btn-radius: var(--gsy-consent-button-radius, 0);
  position: fixed; z-index: 2147483000; box-sizing: border-box;
  display: flex; flex-direction: column; gap: 1em;
  font-size: var(--gsy-consent-font-size, 15px); line-height: 1.5;
  background: var(--c-bg); color: var(--c-fg);
  border-radius: var(--c-radius); box-shadow: var(--gsy-consent-shadow, none);
  padding: 1.5em; overflow: auto; max-height: calc(100vh - 2em);
}
.gsy-consent *, .gsy-consent *::before, .gsy-consent *::after { box-sizing: border-box; }
.gsy-consent[hidden] { display: none; }
.gsy-consent-message { margin: 0; }
.gsy-consent-message a, .gsy-consent-choose { color: var(--gsy-consent-link, currentColor); }
.gsy-consent-message a { text-decoration: underline; opacity: .85; padding: 0 .15em; }
.gsy-consent-message a:hover { opacity: 1; }
.gsy-consent h2 { font-size: 1.1em; margin: 0; color: inherit; }
.gsy-consent-actions { display: flex; flex-wrap: wrap; gap: .5em; align-items: center; }
.gsy-consent button { font: inherit; cursor: pointer; }
.gsy-consent-actions button {
  flex: 1 1 auto; white-space: nowrap; font-size: .9em; font-weight: 700; padding: .45em 1em;
  border: 2px solid var(--c-btn); border-radius: var(--c-btn-radius); background: var(--c-btn); color: var(--c-btn-fg);
}
.gsy-consent-actions .gsy-consent-deny {
  background: var(--gsy-consent-decline-background, transparent); color: var(--gsy-consent-decline-text, currentColor);
  border-color: var(--gsy-consent-decline-border, currentColor);
}
.gsy-consent-actions .gsy-consent-choose { flex: 0 1 auto; background: none; color: var(--gsy-consent-link, currentColor); border-color: transparent; text-decoration: underline; font-weight: 600; padding-inline: .25em; }
.gsy-consent button:focus-visible, .gsy-consent a:focus-visible, .gsy-consent input:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* Where it sits. */
.gsy-consent-box { width: calc(100% - 2em); max-width: var(--gsy-consent-width, 360px); }
.gsy-consent-bottom-right { right: 1em; bottom: 1em; }
.gsy-consent-bottom-left { left: 1em; bottom: 1em; }
.gsy-consent-top-right { right: 1em; top: 1em; }
.gsy-consent-top-left { left: 1em; top: 1em; }
.gsy-consent-bar { left: 0; right: 0; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 1em 1.6em; }
.gsy-consent-bar .gsy-consent-message { flex: 1 1 24em; }
.gsy-consent-bar .gsy-consent-cats, .gsy-consent-bar h2 { flex-basis: 100%; }
.gsy-consent-bottom { bottom: 0; border-radius: var(--c-radius) var(--c-radius) 0 0; }
.gsy-consent-top, .gsy-consent-push { top: 0; border-radius: 0 0 var(--c-radius) var(--c-radius); }
.gsy-consent-push { position: relative; }
.gsy-consent-centre, .gsy-consent-centre-clear { left: 50%; top: 50%; transform: translate(-50%, -50%); width: calc(100% - 2em); max-width: calc(var(--gsy-consent-width, 360px) + 120px); }
.gsy-consent-backdrop { position: fixed; inset: 0; z-index: 2147482999; background: var(--gsy-consent-backdrop, rgb(0 0 0 / .5)); }

/* Layouts. */
.gsy-consent-wire .gsy-consent-actions .gsy-consent-allow { background: transparent; color: var(--c-btn); }
.gsy-consent-edgeless.gsy-consent-box, .gsy-consent-edgeless.gsy-consent-centre, .gsy-consent-edgeless.gsy-consent-centre-clear { padding-bottom: 0; }
.gsy-consent-edgeless.gsy-consent-box .gsy-consent-actions, .gsy-consent-edgeless.gsy-consent-centre .gsy-consent-actions, .gsy-consent-edgeless.gsy-consent-centre-clear .gsy-consent-actions { margin: 0 -1.5em; gap: 0; }
.gsy-consent-edgeless.gsy-consent-box .gsy-consent-actions button, .gsy-consent-edgeless .gsy-consent-actions button { border-radius: 0; padding-block: .8em; }

/* Choices. */
.gsy-consent-cats { display: grid; gap: 0; }
.gsy-consent-cat { display: grid; grid-template-columns: 1fr auto; gap: .1em 1em; align-items: center; padding: .55em 0; border-top: 1px solid var(--gsy-consent-divider, color-mix(in srgb, currentColor 22%, transparent)); cursor: pointer; }
.gsy-consent-cat span { font-weight: 600; }
.gsy-consent-cat small { grid-column: 1; opacity: .8; font-size: .85em; line-height: 1.35; }
.gsy-consent-cat input { grid-row: 1 / 3; grid-column: 2; width: 1.25em; height: 1.25em; margin: 0; accent-color: var(--gsy-consent-switch, var(--c-btn)); }

/* The tab that reopens the choices. */
.gsy-consent-revoke {
  position: fixed; bottom: 0; left: 2em; z-index: 2147482998; font: inherit; font-size: 13px; cursor: pointer;
  padding: .4em .9em; border: 0; border-radius: .5em .5em 0 0;
  background: var(--gsy-consent-background, var(--gsy-color-text, #111)); color: var(--gsy-consent-text, var(--gsy-color-background, #fff));
}
.gsy-consent-revoke[data-side="right"] { left: auto; right: 2em; }
.gsy-consent-revoke[hidden] { display: none; }

/* The theme's sample shows the banner in place rather than fixed. */
.gsy-consent-sample { position: absolute; right: 1em; bottom: 2.6em; width: calc(100% - 2em); max-width: var(--gsy-consent-width, 360px); }
.gsy-consent-revoke.gsy-consent-sample { bottom: 0; right: auto; left: 2em; width: auto; }

@media (max-width: 480px) {
  .gsy-consent-box { left: .5em; right: .5em; bottom: .5em; width: auto; max-width: none; }
  .gsy-consent-top-left, .gsy-consent-top-right { top: .5em; bottom: auto; }
  .gsy-consent-actions button { flex-basis: 100%; }
}
@media (prefers-reduced-motion: no-preference) {
  .gsy-consent:not(.gsy-consent-sample) { animation: gsy-consent-in .25s ease-out; }
  .gsy-consent-centre, .gsy-consent-centre-clear { animation: none; }
}
@keyframes gsy-consent-in { from { opacity: 0; transform: translateY(8px); } }

/* The cookie list widget, on the policy page. */
.gsy-consent-list-group { margin-block: 1.5em; }
.gsy-consent-list-group h3 { margin-bottom: .3em; }
.gsy-consent-list-scroll { overflow-x: auto; }
.gsy-consent-list table { width: 100%; border-collapse: collapse; font-size: .95em; }
.gsy-consent-list th, .gsy-consent-list td { text-align: left; padding: .5em .7em; border-bottom: 1px solid color-mix(in srgb, currentColor 18%, transparent); vertical-align: top; }
.gsy-consent-list th { font-size: .85em; text-transform: uppercase; letter-spacing: .04em; opacity: .75; }
