/* Cookie consent: the vanilla-cookieconsent 3.1.0 banner and preferences
   dialog in the SOPAIC colours (configured in /assets/js/consent.js), the
   footer Cookie settings button, the compact dashboard footer, the YouTube
   placeholder and the cookie table on the privacy page. */

#cc-main {
  /* Above the preloader, the video overlay, the accessibility panel and the site tour. */
  --cc-z-index: 100001;
  --cc-font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --cc-modal-border-radius: 12px;
  --cc-btn-border-radius: 8px;
  --cc-bg: #0d171d;
  --cc-primary-color: #f2f8fa;
  --cc-secondary-color: #c9d6db;
  --cc-link-color: #9ee7ee;
  /* Accept all, Reject all and Choose cookies share one style, so no choice looks preferred. */
  --cc-btn-primary-bg: #10232b;
  --cc-btn-primary-color: #f2f8fa;
  --cc-btn-primary-border-color: #9ee7ee;
  --cc-btn-primary-hover-bg: #9ee7ee;
  --cc-btn-primary-hover-color: #04252a;
  --cc-btn-primary-hover-border-color: #9ee7ee;
  --cc-btn-secondary-bg: #10232b;
  --cc-btn-secondary-color: #f2f8fa;
  --cc-btn-secondary-border-color: #9ee7ee;
  --cc-btn-secondary-hover-bg: #9ee7ee;
  --cc-btn-secondary-hover-color: #04252a;
  --cc-btn-secondary-hover-border-color: #9ee7ee;
  --cc-separator-border-color: rgba(158, 231, 238, 0.18);
  --cc-toggle-on-bg: #30c8d6;
  --cc-toggle-off-bg: #71838c;
  --cc-toggle-on-knob-bg: #04252a;
  --cc-toggle-off-knob-bg: #0d171d;
  --cc-toggle-enabled-icon-color: #30c8d6;
  --cc-toggle-disabled-icon-color: #c9d6db;
  --cc-toggle-readonly-bg: #5a7884;
  --cc-toggle-readonly-knob-bg: #e6f0f4;
  --cc-toggle-readonly-knob-icon-color: #3c5560;
  --cc-cookie-category-block-bg: #132129;
  --cc-cookie-category-block-border: rgba(158, 231, 238, 0.16);
  --cc-cookie-category-block-hover-bg: #182a33;
  --cc-cookie-category-block-hover-border: rgba(158, 231, 238, 0.32);
  --cc-cookie-category-expanded-block-bg: transparent;
  --cc-cookie-category-expanded-block-hover-bg: #182a33;
  --cc-section-category-border: rgba(158, 231, 238, 0.16);
  --cc-overlay-bg: rgba(0, 0, 0, 0.72);
  --cc-webkit-scrollbar-bg: #182a33;
  --cc-webkit-scrollbar-hover-bg: #47626d;
  --cc-footer-bg: #091015;
  --cc-footer-color: #c9d6db;
  --cc-footer-border-color: rgba(158, 231, 238, 0.12);
  /* rem instead of the library's 16px, so the text follows the accessibility text size. */
  font-size: 1rem;
  color-scheme: dark;
}

#cc-main .cm {
  border: 1px solid rgba(158, 231, 238, 0.28);
  max-width: 26rem;
}

#cc-main .pm {
  border: 1px solid rgba(158, 231, 238, 0.28);
}

#cc-main .cm__btn,
#cc-main .pm__btn {
  min-height: 44px;
  font-size: 0.9em;
}

#cc-main .cm__desc,
#cc-main .pm__section-desc {
  line-height: 1.55;
}

#cc-main .cm__desc a,
#cc-main .pm__section-desc a,
#cc-main .cm__footer a {
  color: #9ee7ee;
  text-decoration: underline;
  text-underline-offset: 2px;
}

#cc-main .cm__footer a {
  display: inline-block;
  padding: 0.35rem 0;
}

#cc-main a:focus-visible,
#cc-main button:focus-visible {
  outline: 3px solid #9ee7ee;
  outline-offset: 2px;
}

#cc-main .section__toggle:focus-visible {
  outline: none;
}

#cc-main .section__toggle:focus-visible ~ .toggle__icon {
  outline: 3px solid #9ee7ee;
  outline-offset: 2px;
}

#cc-main .section__toggle:disabled:not(:checked) ~ .toggle__icon {
  opacity: 0.6;
}

/* "Always on" stays visible at every width (the library hides its own badge on phones). */
#cc-main .sop-cc-always {
  display: inline-block;
  margin-left: 0.6em;
  padding: 0.15em 0.6em;
  border-radius: 999px;
  background: #1d3540;
  color: #e6f6f8;
  font-size: 0.78em;
  font-weight: 600;
  line-height: 1.4;
  vertical-align: middle;
}

/* Why the marketing switch is off: Global Privacy Control or the under-18 rule. */
#cc-main .sop-cc-note {
  display: block;
  margin: 0.55em 0 0;
  color: #ffd98a;
  font-size: 0.88em;
  line-height: 1.45;
}

/* The accessibility button and its panel stay above the banner, so they are
   never hidden behind it (on phones the panel opens from the top of the page). */
html.show--consent:not(.show--preferences) #a11y-widget {
  z-index: 100002;
}

@media (prefers-reduced-motion: reduce) {
  #cc-main { --cc-modal-transition-duration: 0s; }
  #cc-main * { transition: none !important; }
}

html.a11y-reduced-motion #cc-main { --cc-modal-transition-duration: 0s; }

/* ── Footer Cookie settings button ─────────────────────────── */
.footer-legal .footer-cookie-btn {
  display: flex;
  align-items: center;
  gap: 0.52rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #cbd5e1;
  font: inherit;
  font-size: 0.92rem;
  line-height: 1.45;
  cursor: pointer;
}

.footer-legal .footer-cookie-btn:hover,
.footer-legal .footer-cookie-btn:focus-visible {
  color: #fff;
}

.footer-legal .footer-cookie-btn:focus-visible {
  outline: 2px solid #9ee7ee;
  outline-offset: 3px;
  border-radius: 4px;
}

/* Dashboards keep only the legal row of the footer, so Terms, Privacy and
   Cookie settings stay on every page. */
.site-footer.site-footer--compact {
  padding: 0.9rem 0 1rem;
}

.site-footer--compact .footer-campus-panel,
.site-footer--compact .footer-directory,
.site-footer--compact .footer-briefing,
.site-footer--compact .social-links {
  display: none;
}

.site-footer.site-footer--compact .footer-bottom {
  padding-top: 0;
  border-top: 0;
}

/* ── YouTube placeholder in the lesson video player ────────── */
.part-video-frame.is-consent {
  aspect-ratio: auto !important;
  min-height: 15rem;
  display: flex;
}

.yt-consent {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding: clamp(1rem, 4vw, 2rem);
  background: linear-gradient(160deg, #0d171d, #10232b);
  color: #f2f8fa;
  text-align: center;
}

.yt-consent strong {
  font-size: 1.05rem;
}

.yt-consent p {
  max-width: 36rem;
  margin: 0;
  color: #c9d6db;
  font-size: 0.93rem;
  line-height: 1.55;
}

.yt-consent .yt-consent-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.yt-consent .yt-consent-actions .btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.yt-consent .yt-consent-note {
  font-size: 0.82rem;
}

/* ── Cookie table on the privacy page ──────────────────────── */
.cookie-table-wrap {
  margin: 0.75rem 0 1.25rem;
  overflow-x: auto;
  border: 1px solid rgba(158, 231, 238, 0.18);
  border-radius: 10px;
}

.cookie-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 0.9rem;
  line-height: 1.5;
}

.cookie-table caption {
  caption-side: top;
  padding: 0.7rem 0.9rem;
  color: #f0f2f8;
  font-weight: 700;
  text-align: left;
}

.cookie-table th,
.cookie-table td {
  padding: 0.6rem 0.9rem;
  border-top: 1px solid rgba(158, 231, 238, 0.14);
  color: #dbe5ea;
  text-align: left;
  vertical-align: top;
}

.cookie-table thead th {
  background: #132129;
  color: #f2f8fa;
  font-weight: 700;
}

.cookie-table td:first-child {
  width: 30%;
}

.cookie-table code {
  color: #9ee7ee;
  font-size: 0.86em;
  overflow-wrap: break-word;
}

.legal-doc article h3.cookie-group {
  color: #f0f2f8;
}

.legal-doc .cookie-settings-btn {
  margin: 0.25rem 0 1rem;
}
