.cookie-consent {
  --cookie-ink: #151515;
  --cookie-green: #08c84b;
  position: fixed;
  z-index: 2147483000;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  width: min(440px, calc(100vw - 40px));
  max-height: min(760px, calc(100dvh - 40px));
  padding: 22px;
  overflow: auto;
  overscroll-behavior: contain;
  color: var(--cookie-ink);
  background: rgba(255, 255, 255, 0.98);
  border: 2px solid var(--cookie-ink);
  border-radius: 26px;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.2);
  font-family: 'Golos Text', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px) scale(0.985);
  transform-origin: right bottom;
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.cookie-consent--visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.cookie-consent__copy { min-width: 0; }

.cookie-consent h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 3vw, 32px);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.cookie-consent__copy > p {
  margin: 0;
  color: #4a4a4a;
  font-size: 14px;
  line-height: 1.42;
}

.cookie-consent a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.cookie-consent__settings {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 13px;
  padding: 0;
  color: var(--cookie-ink);
  background: none;
  border: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.cookie-consent__settings-icon {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  line-height: 0;
}

.cookie-consent__settings-icon svg,
.cookie-consent__arrow {
  display: block;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cookie-consent__categories {
  margin-top: 13px;
  border-top: 1px solid #dedede;
}

.cookie-consent__category {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid #dedede;
}

.cookie-consent__category strong { font-size: 14px; }
.cookie-consent__category p { margin: 3px 0 0; color: #686868; font-size: 12px; line-height: 1.3; }

.cookie-consent__status {
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
  text-transform: uppercase;
}

.cookie-consent__status--always { color: #087d34; background: #d8f8e3; }
.cookie-consent__status--optional { color: #1859a9; background: #e3efff; }

.cookie-consent__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 16px;
}

.cookie-consent__button {
  min-height: 46px;
  padding: 9px 12px;
  border: 2px solid var(--cookie-ink);
  border-radius: 999px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, color 140ms ease;
}

.cookie-consent__button:hover { transform: translateY(-2px); }
.cookie-consent__button:focus-visible,
.cookie-consent__settings:focus-visible,
.cookie-settings-link:focus-visible { outline: 3px solid #1e7bff; outline-offset: 3px; }
.cookie-consent__button--primary { display: flex; align-items: center; justify-content: center; gap: 9px; color: #fff; background: var(--cookie-ink); }
.cookie-consent__button--secondary { color: var(--cookie-ink); background: #fff; }

.cookie-settings-link {
  display: block;
  width: max-content;
  margin: 18px auto 4px;
  padding: 6px;
  color: inherit;
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.cookie-settings-link--floating {
  position: fixed;
  z-index: 2147482000;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  margin: 0;
  padding: 8px 12px;
  color: var(--cookie-ink);
  background: #fff;
  border: 1px solid var(--cookie-ink);
  border-radius: 999px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
}

@media (min-width: 761px) and (max-width: 1100px) {
  .cookie-consent {
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    width: min(460px, calc(100vw - 32px));
  }
}

@media (max-width: 760px) {
  .cookie-consent {
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: min(78dvh, 620px);
    padding: 17px max(16px, env(safe-area-inset-right)) calc(14px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    border-width: 2px 0 0;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.2);
    transform: translateY(24px);
    transform-origin: center bottom;
  }
  .cookie-consent--visible { transform: translateY(0); }
  .cookie-consent h2 { font-size: 27px; }
  .cookie-consent__copy > p { font-size: 13.5px; }
  .cookie-consent__actions { grid-template-columns: 1fr 1.15fr; gap: 7px; margin-top: 14px; }
  .cookie-consent__button { min-height: 44px; padding: 8px 9px; font-size: 11px; }
  .cookie-consent__settings { margin-top: 11px; }
}

@media (max-width: 380px) {
  .cookie-consent { padding-top: 15px; }
  .cookie-consent h2 { font-size: 24px; }
  .cookie-consent__copy > p { font-size: 12.5px; }
  .cookie-consent__button { padding-inline: 6px; font-size: 10px; }
  .cookie-consent__category { gap: 10px; }
  .cookie-consent__status { padding-inline: 8px; }
}

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