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

.cookie-banner {
  position: fixed;
  z-index: 980;
  right: 18px;
  bottom: 18px;
  left: 18px;
  color: #1d3446;
}

.cookie-banner__panel {
  position: relative;
  width: min(100%, 1040px);
  margin-inline: auto;
  padding: 24px;
  border: 1px solid rgba(29, 52, 70, .18);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(9, 22, 48, .2);
}

.cookie-banner__content { padding-right: 42px; }
.cookie-banner h2 { margin: 0; font-size: 20px; line-height: 1.25; letter-spacing: 0; }
.cookie-banner p { max-width: 920px; margin: 10px 0 0; color: #566b78; font-size: 13px; line-height: 1.55; }
.cookie-banner a { color: #142957; text-decoration: underline; text-underline-offset: 2px; }

.cookie-banner__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(29, 52, 70, .2);
  border-radius: 50%;
  background: #ffffff;
  color: #1d3446;
  cursor: pointer;
}
.cookie-banner__close::before,
.cookie-banner__close::after {
  content: '';
  position: absolute;
  top: 16px;
  left: 9px;
  width: 14px;
  height: 1.5px;
  background: currentColor;
}
.cookie-banner__close::before { transform: rotate(45deg); }
.cookie-banner__close::after { transform: rotate(-45deg); }

.cookie-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.cookie-button {
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid #142957;
  border-radius: 3px;
  background: #ffffff;
  color: #142957;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease;
}
.cookie-button:hover,
.cookie-button:focus-visible { background: #142957; color: #ffffff; }

.cookie-preferences {
  width: min(calc(100% - 32px), 720px);
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: #ffffff;
  color: #1d3446;
  box-shadow: 0 28px 90px rgba(4, 14, 38, .34);
}
.cookie-preferences::backdrop { background: rgba(4, 14, 38, .7); backdrop-filter: blur(6px); }
.cookie-preferences__shell { padding: clamp(24px, 5vw, 42px); }
.cookie-preferences__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.cookie-preferences h2 { margin: 0; font-size: clamp(28px, 4vw, 38px); line-height: 1.1; letter-spacing: 0; }
.cookie-preferences__lead { margin: 14px 0 0; color: #566b78; font-size: 14px; line-height: 1.6; }
.cookie-preferences__list { display: grid; margin-top: 28px; border-top: 1px solid #dbe3e9; }
.cookie-category { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; padding: 19px 0; border-bottom: 1px solid #dbe3e9; }
.cookie-category strong { display: block; font-size: 15px; }
.cookie-category p { margin: 6px 0 0; color: #627682; font-size: 12px; line-height: 1.5; }
.cookie-switch { position: relative; align-self: center; display: inline-flex; }
.cookie-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.cookie-switch span { position: relative; width: 46px; height: 26px; border: 1px solid #9babb5; border-radius: 20px; background: #e8edf0; transition: background-color 180ms ease, border-color 180ms ease; }
.cookie-switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #ffffff; box-shadow: 0 2px 6px rgba(9, 22, 48, .2); transition: transform 180ms ease; }
.cookie-switch input:checked + span { border-color: #142957; background: #142957; }
.cookie-switch input:checked + span::after { transform: translateX(20px); }
.cookie-switch input:focus-visible + span { outline: 3px solid rgba(20, 41, 87, .2); outline-offset: 2px; }
.cookie-switch input:disabled + span { border-color: #7d8c95; background: #7d8c95; opacity: .65; }
.cookie-preferences .cookie-actions { margin-top: 28px; }

.cookie-settings-standalone .cookie-preferences__list { margin-top: 0; }
.cookie-settings-standalone .cookie-actions { margin-top: 28px; }

@media (max-width: 640px) {
  .cookie-banner { right: 10px; bottom: 10px; left: 10px; }
  .cookie-banner__panel { padding: 20px 16px 16px; }
  .cookie-banner__content { padding-right: 38px; }
  .cookie-actions { grid-template-columns: 1fr; }
  .cookie-preferences__shell { padding: 24px 18px 20px; }
  .cookie-preferences .cookie-actions { grid-template-columns: 1fr; }
}

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