/* ==========================================================================
   GBM Studies — Prototype 01 — cookie consent banner + preferences dialog
   Works on light and dark pages: the banner carries its own surface.
   ========================================================================== */
.gc-bar { position: fixed; left: 50%; bottom: 18px; z-index: 120; width: min(1080px, calc(100% - 24px)); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 1rem 1.3rem; padding: 1.05rem 1.1rem 1.05rem 1.2rem; border-radius: 22px; color: var(--ivory-50); background: linear-gradient(135deg, rgba(14,51,36,.97), rgba(4,20,13,.97)); box-shadow: 0 30px 80px -30px rgba(0,0,0,.7), inset 0 0 0 1px rgba(230,211,166,.2); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transform: translate3d(-50%, 130%, 0); opacity: 0; transition: transform .6s var(--ease-out), opacity .4s; font-family: var(--font-sans); }
.gc-bar.is-on { transform: translate3d(-50%, 0, 0); opacity: 1; }
.gc-bar__icon { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: var(--emerald-950); background: var(--grad-gold); font-size: 1.05rem; }
.gc-bar__text b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 1.3rem; line-height: 1.1; }
.gc-bar__text p { margin-top: .3rem; font-size: .84rem; line-height: 1.5; color: rgba(246,238,219,.72); }
.gc-bar__text a { color: var(--gold-300); text-decoration: underline; text-underline-offset: 3px; }
.gc-bar__acts { display: flex; align-items: center; gap: .45rem; }

.gc-btn { display: inline-flex; align-items: center; justify-content: center; height: 42px; padding: 0 1.05rem; border-radius: 999px; font: inherit; font-size: .86rem; font-weight: 600; white-space: nowrap; color: var(--ivory-50); background: rgba(246,238,219,.08); box-shadow: inset 0 0 0 1px rgba(230,211,166,.3); cursor: pointer; transition: background-color .25s, box-shadow .25s, color .25s; }
.gc-btn:hover { background: rgba(246,238,219,.16); box-shadow: inset 0 0 0 1px rgba(230,211,166,.55); }
.gc-btn--gold { color: var(--emerald-950); background: var(--grad-gold); background-size: 160% 100%; box-shadow: none; }
.gc-btn--gold:hover { color: var(--emerald-950); background: var(--grad-gold); background-position: 100% 0; box-shadow: 0 10px 24px -12px rgba(197,161,90,.8); }
.gc-btn--text { background: none; box-shadow: none; text-decoration: underline; text-underline-offset: 4px; padding: 0 .6rem; }
.gc-btn--text:hover { background: none; box-shadow: none; color: var(--gold-300); }
.gc-bar :focus-visible, .gc-dialog :focus-visible { outline: 2px solid var(--gold-400); outline-offset: 3px; }

/* ---------- Preferences dialog ---------- */
.gc-dialog { width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; border: 0; border-radius: 24px; color: var(--ink-900); background: var(--ivory-50); box-shadow: 0 50px 120px -40px rgba(0,0,0,.65); font-family: var(--font-sans); overflow: auto; }
.gc-dialog::backdrop { background: rgba(3,17,11,.6); backdrop-filter: blur(3px); }
.gc-dialog[open] { animation: gcIn .45s var(--ease-out); }
@keyframes gcIn { from { opacity: 0; transform: translate3d(0, 14px, 0) scale(.98); } to { opacity: 1; transform: none; } }
.gc-dialog__head { position: relative; padding: 1.6rem 1.6rem 1.2rem; color: var(--ivory-50); background: radial-gradient(120% 140% at 0% 0%, #164a34, #061c14 70%); }
.gc-k { font-family: var(--font-mono); font-size: .64rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-300); }
.gc-dialog__head h2 { margin-top: .5rem; font-family: var(--font-display); font-weight: 400; font-size: 2rem; line-height: 1.05; }
.gc-dialog__head h2 em { font-style: italic; color: var(--gold-300); }
.gc-dialog__head p:not(.gc-k) { margin-top: .4rem; font-size: .86rem; color: rgba(246,238,219,.7); }
.gc-x { position: absolute; top: 1rem; right: 1rem; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--ivory-50); background: rgba(246,238,219,.08); cursor: pointer; }
.gc-x:hover { background: rgba(246,238,219,.18); }
.gc-groups { padding: .4rem 1.6rem; }
.gc-groups li { display: flex; justify-content: space-between; align-items: center; gap: 1.2rem; padding: 1rem 0; border-bottom: 1px solid var(--line-light); }
.gc-groups li:last-child { border-bottom: 0; }
.gc-groups b { font-size: .95rem; font-weight: 600; }
.gc-groups p { margin-top: .2rem; font-size: .82rem; line-height: 1.45; color: var(--ink-500); }
.gc-switch { position: relative; flex: none; width: 48px; height: 28px; border-radius: 999px; background: rgba(12,21,17,.18); cursor: pointer; transition: background-color .3s; }
.gc-switch span { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .35s var(--ease-out); }
.gc-switch[aria-checked="true"] { background: var(--emerald-600); }
.gc-switch[aria-checked="true"] span { transform: translateX(20px); }
.gc-switch[disabled] { cursor: not-allowed; opacity: .6; }
.gc-dialog .gc-btn { color: var(--ink-900); background: #fff; box-shadow: inset 0 0 0 1px var(--line-light); }
.gc-dialog .gc-btn:hover { box-shadow: inset 0 0 0 1px var(--ink-300); }
.gc-dialog .gc-btn--gold { color: var(--emerald-950); background: var(--grad-gold); box-shadow: none; }
.gc-dialog__foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; padding: 1rem 1.6rem 1.4rem; border-top: 1px solid var(--line-light); }

@media (max-width: 860px) {
  .gc-bar { grid-template-columns: auto minmax(0, 1fr); bottom: 12px; padding: 1rem; }
  .gc-bar__acts { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; }
  .gc-bar__acts .gc-btn--text { grid-column: 1 / -1; order: 3; height: 34px; }
  .gc-bar__acts .gc-btn { white-space: normal; text-align: center; line-height: 1.15; }
}
@media (max-width: 520px) {
  .gc-bar__icon { width: 38px; height: 38px; font-size: .9rem; }
  .gc-bar__text b { font-size: 1.15rem; }
  .gc-bar__text p { font-size: .8rem; }
  .gc-dialog__foot { display: grid; grid-template-columns: 1fr 1fr; }
  .gc-dialog__foot .gc-btn--gold { grid-column: 1 / -1; order: -1; }
}
@media (prefers-reduced-motion: reduce) {
  .gc-bar { transition: none; }
  .gc-dialog[open] { animation: none; }
  .gc-switch, .gc-switch span { transition: none; }
}
@media print { .gc-bar, .gc-dialog { display: none !important; } }

/* Footer "Cookie settings" button: reads like the legal links beside it */
.footer__cookies { padding: 0; font: inherit; color: inherit; opacity: .7; background: none; cursor: pointer; transition: opacity .3s; }
.footer__cookies:hover { opacity: 1; }
