.cookie-consent,
.cookie-settings {
  --cc-bg: rgba(3, 14, 26, .96);
  --cc-line: rgba(113, 185, 255, .28);
  --cc-text: #f4f7fb;
  --cc-muted: #9aadc0;
  --cc-blue: #68b9ff;
  --cc-cyan: #92e9ff;
  font-family: Inter, Manrope, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.cookie-consent {
  position: fixed;
  inset: auto 20px 20px;
  z-index: 95;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
  padding: 20px;
  border: 1px solid var(--cc-line);
  background:
    linear-gradient(var(--cc-bg), var(--cc-bg)),
    linear-gradient(rgba(117,190,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(117,190,255,.05) 1px, transparent 1px);
  background-size: auto, 24px 24px, 24px 24px;
  box-shadow: 0 24px 70px rgba(0,0,0,.48), 0 0 28px rgba(61,152,255,.08);
  backdrop-filter: blur(18px);
  opacity: 0;
  transform: translateY(28px);
  pointer-events: none;
  transition: opacity .55s ease, transform .55s cubic-bezier(.2,.7,.2,1);
}

.cookie-consent.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.cookie-consent__icon { width: 42px; height: 42px; color: var(--cc-cyan); }
.cookie-consent__icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.25; }
.cookie-consent__copy p { margin: 0; color: var(--cc-muted); font-size: 13px; line-height: 1.55; }
.cookie-consent a, .cookie-settings a { color: var(--cc-cyan); text-decoration: none; }
.cookie-consent__actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.cookie-consent button,
.cookie-settings button {
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid var(--cc-line);
  background: rgba(6, 24, 42, .76);
  color: var(--cc-text);
  cursor: pointer;
}
.cookie-consent button:hover,
.cookie-consent button:focus-visible,
.cookie-settings button:hover,
.cookie-settings button:focus-visible { border-color: var(--cc-cyan); outline: none; background: rgba(27, 79, 124, .42); }
.cookie-consent .is-primary,
.cookie-settings .is-primary { border-color: rgba(146,233,255,.54); background: linear-gradient(135deg, #2469b2, #174f89); }

.cookie-settings {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(1, 7, 14, .76);
  backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
}
.cookie-settings.is-open { opacity: 1; pointer-events: auto; }
.cookie-settings__dialog {
  width: min(620px, 100%);
  max-height: min(760px, calc(100svh - 40px));
  overflow: auto;
  padding: 34px;
  border: 1px solid var(--cc-line);
  background: linear-gradient(145deg, rgba(8,29,50,.98), rgba(2,11,21,.99));
  box-shadow: 0 35px 100px rgba(0,0,0,.62), inset 0 0 60px rgba(45,127,227,.04);
}
.cookie-settings__head { display: flex; justify-content: space-between; gap: 20px; align-items: start; margin-bottom: 26px; }
.cookie-settings__head h2 { margin: 0; color: var(--cc-text); font-family: Georgia, serif; font-size: clamp(28px, 5vw, 42px); font-weight: 400; }
.cookie-settings__close { width: 42px; padding: 0 !important; flex: 0 0 auto; }
.cookie-category { padding: 22px 0; border-top: 1px solid var(--cc-line); }
.cookie-category__row { display: flex; justify-content: space-between; gap: 24px; align-items: center; }
.cookie-category h3 { margin: 0 0 8px; color: var(--cc-text); font-size: 12px; letter-spacing: .13em; }
.cookie-category p { margin: 0; color: var(--cc-muted); font-size: 13px; line-height: 1.6; }
.cookie-category__state { flex: 0 0 auto; color: var(--cc-cyan); font-size: 11px; }
.cookie-toggle { position: relative; width: 48px; height: 26px; flex: 0 0 auto; }
.cookie-toggle input { position: absolute; opacity: 0; }
.cookie-toggle span { position: absolute; inset: 0; border: 1px solid var(--cc-line); background: #071422; cursor: pointer; transition: .25s ease; }
.cookie-toggle span::after { content: ""; position: absolute; top: 4px; left: 4px; width: 16px; height: 16px; background: #71879b; transition: .25s ease; }
.cookie-toggle input:checked + span { border-color: var(--cc-cyan); background: rgba(45,127,227,.34); }
.cookie-toggle input:checked + span::after { transform: translateX(22px); background: var(--cc-cyan); box-shadow: 0 0 14px rgba(146,233,255,.55); }
.cookie-toggle input:focus-visible + span { outline: 2px solid var(--cc-cyan); outline-offset: 3px; }
.cookie-settings__actions { display: flex; flex-wrap: wrap; gap: 9px; padding-top: 24px; border-top: 1px solid var(--cc-line); }
body.cookie-modal-open { overflow: hidden; }

@media (max-width: 760px) {
  .cookie-consent { inset: auto 13px max(13px, env(safe-area-inset-bottom)); grid-template-columns: minmax(0, 1fr); width: auto; max-width: calc(100vw - 26px); box-sizing: border-box; gap: 12px; padding: 17px; }
  .cookie-consent__icon { display: none; }
  .cookie-consent__copy,
  .cookie-consent__actions { min-width: 0; }
  .cookie-consent__copy { overflow-wrap: anywhere; }
  .cookie-consent__actions { justify-content: stretch; }
  .cookie-consent button { min-width: 0; max-width: 100%; flex: 1 1 130px; white-space: normal; }
  .cookie-settings__dialog { padding: 24px 18px; }
  .cookie-settings__actions button { flex: 1 1 180px; }
}

@media (max-width: 430px) {
  .cookie-consent__copy { min-width: 0; overflow-wrap: anywhere; }
  .cookie-consent__actions { display: grid; grid-template-columns: 1fr; }
  .cookie-consent button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-consent, .cookie-settings { transition: none; }
}
