:root {
  --cc-primary: #174f78;
  --cc-primary-dark: #103a59;
  --cc-text: #202832;
  --cc-muted: #5f6974;
  --cc-border: #d9dee3;
  --cc-surface: #fff;
  --cc-backdrop: rgba(8, 18, 28, .58);
}

.cc-lock { overflow: hidden; }
.cc-hidden { display: none !important; }

.cc-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 18px;
  background: var(--cc-backdrop);
}

.cc-panel {
  width: min(720px, 100%);
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  padding: 26px;
  color: var(--cc-text);
  background: var(--cc-surface);
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, .28);
}

.cc-panel h2 { margin: 0 0 12px; font-size: clamp(1.35rem, 3vw, 1.75rem); }
.cc-panel p { margin: 0 0 18px; color: var(--cc-muted); line-height: 1.55; }
.cc-policy-links { margin-bottom: 18px; font-size: .93rem; }
.cc-policy-links a { color: var(--cc-primary); }

.cc-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cc-button {
  min-height: 44px;
  padding: 10px 18px;
  border: 2px solid var(--cc-primary);
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}
.cc-button-primary { color: #fff; background: var(--cc-primary); }
.cc-button-primary:hover { background: var(--cc-primary-dark); border-color: var(--cc-primary-dark); }
.cc-button-secondary { color: var(--cc-primary); background: #fff; }
.cc-button-secondary:hover { background: #edf5fa; }
.cc-button:focus-visible, .cc-switch input:focus-visible + span { outline: 3px solid rgba(23, 79, 120, .35); outline-offset: 2px; }

.cc-category {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 18px;
  padding: 17px 0;
  border-top: 1px solid var(--cc-border);
}
.cc-category strong { font-size: 1.03rem; }
.cc-category p { grid-column: 1 / -1; margin: 0; font-size: .94rem; }
.cc-always-on { align-self: center; color: var(--cc-muted); font-size: .86rem; font-weight: 700; }
.cc-switch { position: relative; display: inline-flex; align-items: center; }
.cc-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.cc-switch span { width: 48px; height: 26px; background: #aeb7bf; border-radius: 99px; transition: .2s; }
.cc-switch span::after { content: ""; display: block; width: 20px; height: 20px; margin: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.cc-switch input:checked + span { background: var(--cc-primary); }
.cc-switch input:checked + span::after { transform: translateX(22px); }

.cookie-preferences-link {
  padding: 0;
  color: #fff;
  background: transparent;
  border: 0;
  text-decoration: underline;
  cursor: pointer;
}

@media (max-width: 575.98px) {
  .cc-backdrop { padding: 0; }
  .cc-panel { max-height: 92vh; padding: 22px 18px; border-radius: 16px 16px 0 0; }
  .cc-actions { flex-direction: column; }
  .cc-button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .cc-switch span, .cc-switch span::after { transition: none; }
}
