/* YOUKOM privacy prefs UI – editorial black/white, DSGVO/TTDSG */
/* Filename yk-prefs: avoid ad-blocker hits on *cookie-consent* */
/* NOTE: Do NOT use transform on .cc-banner — html/body overflow-x:hidden clips
   transformed fixed elements and left an orphan overlay (Schweizer Vorhang). */

/* System font fallbacks until external fonts are consented */
html:not(.cc-external-fonts) body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html:not(.cc-external-fonts) .font-headline-lg,
html:not(.cc-external-fonts) .font-headline-md,
html:not(.cc-external-fonts) .font-headline-lg-mobile,
html:not(.cc-external-fonts) .font-display-lg,
html:not(.cc-external-fonts) .cc-title {
  font-family: Georgia, "Times New Roman", Times, serif !important;
}

html:not(.cc-external-fonts) .font-button,
html:not(.cc-external-fonts) .font-body-md,
html:not(.cc-external-fonts) .font-body-lg,
html:not(.cc-external-fonts) .font-label-caps {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

/* Inline SVG icons – work without Google Fonts */
.yk-icon {
  display: inline-block;
  flex-shrink: 0;
  vertical-align: middle;
  color: currentColor;
}

.yk-icon-sm { width: 1.125rem; height: 1.125rem; }
.yk-icon-md { width: 1.25rem; height: 1.25rem; }
.yk-icon-lg { width: 1.5rem; height: 1.5rem; }

.btn-icon {
  width: 1rem;
  height: 1rem;
  transition: transform 0.25s ease;
}

.btn-primary:hover .btn-icon,
.btn-primary:focus-visible .btn-icon {
  transform: translateX(3px);
}

/* Overlay: blocks page only; never above the banner.
   display toggle (no opacity fade) — avoids fail-open race during transition. */
.cc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 99998;
  display: none;
  pointer-events: none;
}

.cc-overlay.cc-visible {
  display: block;
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}

/* Dark bottom sheet — no transform (overflow-x on body would clip). */
.cc-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  background: #1a1c1c;
  border-top: 2px solid #ffffff;
  box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.45);
  color: #f3f3f4;
  display: none;
  pointer-events: none;
}

.cc-banner.cc-visible {
  display: block;
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}

.cc-banner-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 768px) {
  .cc-banner-inner {
    flex-direction: row;
    align-items: center;
    padding: 22px 64px;
    gap: 28px;
  }
}

.cc-banner-text {
  flex: 1;
  min-width: 0;
}

.cc-title {
  font-family: Georgia, "Libre Caslon Text", "Times New Roman", serif;
  font-size: 1.125rem;
  color: #ffffff;
  margin: 0 0 6px;
}

.cc-desc {
  font-family: system-ui, "Hanken Grotesk", sans-serif;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: rgba(243, 243, 244, 0.72);
  margin: 0;
}

.cc-banner .cc-desc a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cc-banner .cc-desc a:hover,
.cc-banner .cc-desc a:focus-visible {
  color: #ffffff;
  opacity: 0.85;
}

.cc-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
}

.cc-btn {
  font-family: system-ui, "Hanken Grotesk", sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 11px 16px;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
  min-height: 44px;
}

.cc-btn:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.cc-btn-primary {
  background: #ffffff;
  color: #1a1c1c;
  border: 1px solid #ffffff;
}

.cc-btn-primary:hover {
  background: #e8e8e8;
  border-color: #e8e8e8;
}

.cc-banner .cc-btn-secondary {
  background: transparent;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.cc-banner .cc-btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.08);
}

.cc-banner .cc-btn-ghost {
  background: transparent;
  color: rgba(243, 243, 244, 0.7);
  border: 1px solid transparent;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cc-banner .cc-btn-ghost:hover {
  color: #ffffff;
}

/* Settings modal stays light for readability — no transform (overflow-safe) */
.cc-settings .cc-btn:focus-visible {
  outline: 2px solid #000000;
  outline-offset: 2px;
}

.cc-settings .cc-btn-primary {
  background: #000000;
  color: #ffffff;
  border: 1px solid #000000;
}

.cc-settings .cc-btn-primary:hover {
  background: #1a1c1c;
}

.cc-settings .cc-btn-secondary {
  background: transparent;
  color: #1a1c1c;
  border: 1px solid rgba(0, 0, 0, 0.25);
}

.cc-settings .cc-btn-secondary:hover {
  border-color: rgba(0, 0, 0, 0.55);
  background: rgba(0, 0, 0, 0.04);
}

.cc-settings .cc-btn-ghost {
  background: transparent;
  color: #646464;
  border: 1px solid transparent;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cc-settings .cc-btn-ghost:hover {
  color: #1a1c1c;
}

.cc-settings .cc-title {
  color: #1a1c1c;
}

.cc-settings .cc-desc {
  color: #646464;
}

.cc-settings .cc-desc a {
  color: #1a1c1c;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cc-settings {
  position: fixed;
  top: 5vh;
  left: 24px;
  right: 24px;
  margin-left: auto;
  margin-right: auto;
  width: calc(100% - 48px);
  max-width: 560px;
  max-height: calc(100vh - 10vh);
  overflow-y: auto;
  z-index: 99999;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 0.5rem;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
  display: none;
  pointer-events: none;
  /* no transform — overflow-x:hidden on body clips transformed fixed nodes */
}

.cc-settings.cc-visible {
  display: block;
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}

.cc-settings-inner {
  padding: 32px;
}

.cc-settings-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.cc-close {
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: #646464;
  cursor: pointer;
  padding: 0 4px;
  min-width: 44px;
  min-height: 44px;
}

.cc-close:hover,
.cc-close:focus-visible {
  color: #1a1c1c;
}

.cc-close:focus-visible {
  outline: 2px solid #000000;
  outline-offset: 2px;
}

.cc-category {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.cc-category-info {
  flex: 1;
}

.cc-category-name {
  font-family: system-ui, "Hanken Grotesk", sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #1a1c1c;
  margin: 0 0 4px;
}

.cc-category-desc {
  font-family: system-ui, "Hanken Grotesk", sans-serif;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #646464;
  margin: 0;
}

.cc-settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.cc-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.cc-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cc-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #e2e2e2;
  border-radius: 9999px;
  transition: background 0.3s ease;
}

.cc-toggle-slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #ffffff;
  border-radius: 50%;
  transition: left 0.3s ease;
}

.cc-toggle input:checked + .cc-toggle-slider {
  background: #000000;
}

.cc-toggle input:checked + .cc-toggle-slider::before {
  left: 23px;
}

.cc-toggle input:focus-visible + .cc-toggle-slider {
  outline: 2px solid #000000;
  outline-offset: 2px;
}

.cc-toggle-disabled .cc-toggle-slider {
  opacity: 0.45;
  cursor: not-allowed;
}

.cc-toggle-disabled input:checked + .cc-toggle-slider {
  background: #000000;
}

.cc-toggle-disabled input:checked + .cc-toggle-slider::before {
  left: 23px;
}

/* Scroll lock only for mobile nav — consent uses overlay pointer-events (no gutter shift) */
body.mobile-nav-open {
  overflow: hidden;
}
