/* The cookie banner and settings (js/consent.js), on the website's pages and in the app alike: drawn with their
   own values rather than either one's, so they look the same on both. Accept all and Reject all are the same
   button, side by side: refusing is as easy, and as visible, as accepting. */

.vgc-banner, .vgc-overlay {
  --vgc-navy: #0A1B56; --vgc-ink: #0A1B56; --vgc-body: #3B4C7E; --vgc-muted: #62698E; --vgc-line: #E6EBF4;
  --vgc-sky: #77C7FA; --vgc-lime: #E5FE99; --vgc-blue: #246FAE;
  font-family: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--vgc-ink); text-align: left; letter-spacing: normal; -webkit-font-smoothing: antialiased;
}
.vgc-banner *, .vgc-overlay * { box-sizing: border-box; }

/* ---------- The banner: a card at the foot of the window, over the page but never blocking it */
.vgc-banner {
  position: fixed; z-index: 2147483000; left: 50%; bottom: max(16px, env(safe-area-inset-bottom));
  width: min(780px, calc(100% - 32px)); transform: translateX(-50%);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px 24px;
  padding: 20px 22px 20px 24px; border-radius: 18px; background: #fff; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(10, 27, 86, .08), 0 18px 50px rgba(4, 17, 62, .28);
  animation: vgc-rise .24s ease-out;
}
.vgc-banner::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--vgc-sky), var(--vgc-lime));
}
.vgc-title { margin: 0 0 4px; color: var(--vgc-ink); font-size: 16px; font-weight: 600; line-height: 1.3; }
.vgc-banner__top, .vgc-dialog__top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 14px; }
.vgc-lang {
  margin: 0; padding: 2px 0; border: 0; background: none; color: var(--vgc-blue); font: inherit; font-size: 13px; font-weight: 600;
  text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}
.vgc-lang:hover { color: var(--vgc-navy); }
.vgc-lang:focus-visible { outline: 2px solid var(--vgc-blue); outline-offset: 3px; border-radius: 2px; }
.vgc-text { margin: 0; color: var(--vgc-body); font-size: 13.5px; line-height: 1.5; }
.vgc-link { color: var(--vgc-blue); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.vgc-link:hover { color: var(--vgc-navy); }

.vgc-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.vgc-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 42px; margin: 0; padding: 0 18px;
  border: 1px solid transparent; border-radius: 999px; font: inherit; font-size: 14px; font-weight: 600; line-height: 1.1;
  white-space: nowrap; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s;
}
.vgc-btn--choice { background: var(--vgc-navy); border-color: var(--vgc-navy); color: #fff; }
.vgc-btn--choice:hover { background: #1A3A9A; border-color: #1A3A9A; }
.vgc-btn--quiet { background: transparent; color: var(--vgc-navy); text-decoration: underline; text-underline-offset: 3px; padding: 0 10px; }
.vgc-btn--quiet:hover { color: var(--vgc-blue); }
.vgc-btn:focus-visible, .vgc-link:focus-visible, .vgc-close:focus-visible, .vgc-switch__input:focus-visible {
  outline: 2px solid var(--vgc-blue); outline-offset: 3px;
}

@keyframes vgc-rise { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .vgc-banner { animation: none; } }

/* Narrower windows: the text above, the two choices side by side below it, the details under them. */
@media (max-width: 720px) {
  .vgc-banner { grid-template-columns: minmax(0, 1fr); padding: 18px 18px 14px; gap: 14px; }
  .vgc-banner .vgc-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .vgc-banner .vgc-btn--quiet { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .vgc-banner {
    left: 0; bottom: 0; width: 100%; transform: none; border-radius: 18px 18px 0 0;
    padding-bottom: max(14px, env(safe-area-inset-bottom)); animation-name: vgc-rise-phone;
  }
  .vgc-text { font-size: 13px; }
}
@keyframes vgc-rise-phone { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- The settings: a dialog over the dimmed page */
html.vgc-open { overflow: hidden; }
.vgc-overlay {
  position: fixed; inset: 0; z-index: 2147483001; display: grid; place-items: center; padding: 16px;
  background: rgba(4, 17, 62, .55);
}
.vgc-dialog {
  position: relative; width: min(580px, 100%); max-height: calc(100vh - 32px); overflow: auto;
  padding: 28px 28px 22px; border-radius: 20px; background: #fff; box-shadow: 0 24px 70px rgba(4, 17, 62, .35);
}
.vgc-dialog__top { padding-right: 40px; }
.vgc-dialog .vgc-title { font-size: 20px; }
.vgc-intro { margin: 6px 0 14px; color: var(--vgc-body); font-size: 14px; line-height: 1.5; }
.vgc-gpc {
  margin: 0 0 14px; padding: 10px 12px; border: 1px solid #D9EFA6; border-radius: 10px; background: #F6FCE4;
  color: #3F5A0A; font-size: 13px; line-height: 1.45;
}
.vgc-close {
  position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--vgc-muted); font: inherit; font-size: 24px; line-height: 1; cursor: pointer;
}
.vgc-close:hover { background: #F1F5FB; color: var(--vgc-ink); }
.vgc-cat { padding: 14px 0; border-top: 1px solid var(--vgc-line); }
.vgc-cat__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.vgc-cat h3 { margin: 0; color: var(--vgc-ink); font-size: 15px; font-weight: 600; line-height: 1.3; }
.vgc-cat h3 label { cursor: pointer; }
.vgc-cat p { margin: 6px 0 0; color: var(--vgc-body); font-size: 13.5px; line-height: 1.5; }
.vgc-always { color: #3F5A0A; font-size: 13px; font-weight: 600; white-space: nowrap; }
.vgc-more { margin: 4px 0 18px; font-size: 13.5px; }
.vgc-dialog .vgc-actions { justify-content: flex-start; padding-top: 14px; border-top: 1px solid var(--vgc-line); }
@media (max-width: 480px) {
  .vgc-dialog { padding: 24px 18px 18px; }
  .vgc-dialog .vgc-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .vgc-dialog .vgc-btn--quiet { grid-column: 1 / -1; }
}

/* The switch: a checkbox drawn as one, with its state in words beside it. */
.vgc-switch { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.vgc-switch__input {
  -webkit-appearance: none; appearance: none; position: relative; width: 44px; height: 24px; margin: 0;
  border-radius: 999px; background: #C7D3EA; cursor: pointer; transition: background-color .15s;
}
.vgc-switch__input::before {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(4, 17, 62, .25); transition: transform .15s;
}
.vgc-switch__input:checked { background: var(--vgc-navy); }
.vgc-switch__input:checked::before { transform: translateX(20px); }
.vgc-switch__state { min-width: 58px; color: var(--vgc-muted); font-size: 13px; font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .vgc-switch__input, .vgc-switch__input::before { transition: none; } }

/* Printed pages leave both out. */
@media print { .vgc-banner, .vgc-overlay { display: none !important; } }
