/* Cookie consent controls. Kept independent so every public page can load them. */
.cookie-consent,
.cookie-preferences,
.cookie-settings {
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.cookie-consent[hidden],
.cookie-preferences[hidden],
.cookie-settings[hidden] { display: none !important; }

.cookie-consent {
  position: fixed;
  z-index: 10000;
  right: 24px;
  bottom: 24px;
  left: 24px;
  max-width: 680px;
  margin: 0 auto;
  padding: 22px;
  color: #171717;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(23, 23, 23, 0.14);
  border-radius: 18px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.cookie-consent__title,
.cookie-preferences__title {
  margin: 0 0 8px;
  color: #171717;
  font-size: 20px;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.cookie-consent__text,
.cookie-preferences__intro,
.cookie-category__text {
  margin: 0;
  color: #525252;
  font-size: 14px;
  line-height: 1.55;
}

.cookie-consent a,
.cookie-preferences a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-consent__actions,
.cookie-preferences__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.cookie-button {
  min-height: 42px;
  padding: 10px 16px;
  color: #171717;
  background: #fff;
  border: 1px solid #c9c9c9;
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  cursor: pointer;
}

.cookie-button:hover { background: #f2f2f2; }
.cookie-button:focus-visible,
.cookie-settings:focus-visible,
.cookie-toggle input:focus-visible + span {
  outline: 3px solid rgba(60, 92, 255, 0.35);
  outline-offset: 2px;
}

/* Accept and reject intentionally have identical visual weight. */
.cookie-button--choice {
  color: #fff;
  background: #171717;
  border-color: #171717;
}
.cookie-button--choice:hover { background: #363636; }

.cookie-settings {
  position: fixed;
  z-index: 9998;
  left: 18px;
  bottom: 18px;
  min-height: 38px;
  padding: 8px 13px;
  color: #272727;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(23, 23, 23, 0.18);
  border-radius: 999px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.cookie-settings:hover { background: #f2f2f2; }

.cookie-preferences {
  position: fixed;
  z-index: 10001;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(12, 12, 12, 0.58);
}

.cookie-preferences__panel {
  width: min(100%, 600px);
  max-height: min(720px, calc(100vh - 40px));
  overflow: auto;
  padding: 24px;
  color: #171717;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.cookie-preferences__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.cookie-preferences__close {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  padding: 0;
  color: #272727;
  background: #f2f2f2;
  border: 0;
  border-radius: 999px;
  font-size: 24px;
  line-height: 38px;
  cursor: pointer;
}

.cookie-categories { margin-top: 20px; }
.cookie-category {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 20px;
  padding: 18px 0;
  border-top: 1px solid #e5e5e5;
}
.cookie-category__name {
  margin: 0;
  color: #171717;
  font-size: 15px;
  font-weight: 650;
}
.cookie-category__text { grid-column: 1 / -1; }
.cookie-category__status {
  color: #5f5f5f;
  font-size: 13px;
  font-weight: 600;
}

.cookie-toggle { position: relative; display: inline-flex; }
.cookie-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.cookie-toggle span {
  display: block;
  width: 46px;
  height: 26px;
  background: #b8b8b8;
  border-radius: 999px;
  cursor: pointer;
  transition: background 160ms ease;
}
.cookie-toggle span::after {
  content: "";
  display: block;
  width: 20px;
  height: 20px;
  margin: 3px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 160ms ease;
}
.cookie-toggle input:checked + span { background: #171717; }
.cookie-toggle input:checked + span::after { transform: translateX(20px); }

@media (max-width: 560px) {
  .cookie-consent { right: 12px; bottom: 12px; left: 12px; padding: 18px; }
  .cookie-consent__actions,
  .cookie-preferences__actions { flex-direction: column; }
  .cookie-button { width: 100%; }
  .cookie-settings { left: 12px; bottom: 12px; }
  .cookie-preferences { padding: 12px; }
  .cookie-preferences__panel { max-height: calc(100vh - 24px); padding: 20px; }
}

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