.cookie-consent-banner[hidden] {
  display: none;
}

.cookie-consent-banner {
  position: fixed;
  z-index: 10000;
  right: 24px;
  bottom: 24px;
  left: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  width: min(1080px, calc(100% - 48px));
  margin-inline: auto;
  padding: 18px 20px;
  color: #0b2e59;
  background: rgba(255, 255, 255, .98);
  border: 1px solid #d8e1e8;
  border-top: 3px solid #bd7b3d;
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(8, 35, 68, .18);
  font-family: inherit;
}

.cookie-consent-copy strong {
  display: block;
  margin-bottom: 5px;
  color: #082b57;
  font-size: 17px;
  line-height: 1.25;
}

.cookie-consent-copy p,
.cookie-preferences-panel p {
  margin: 0;
}

.cookie-consent-copy p {
  max-width: 670px;
  color: #526a7b;
  font-size: 14px;
  line-height: 1.55;
}

.cookie-consent-actions {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  gap: 8px;
}

.cookie-button {
  min-height: 44px;
  padding: 10px 15px;
  border: 1px solid transparent;
  border-radius: 11px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.cookie-button:hover {
  transform: translateY(-1px);
}

.cookie-button:focus-visible,
.cookie-dialog-close:focus-visible,
.cookie-switch input:focus-visible + span,
[data-cookie-preferences]:focus-visible {
  outline: 3px solid rgba(189, 123, 61, .35);
  outline-offset: 2px;
}

.cookie-button--primary {
  color: #fff;
  background: #0b315d;
  border-color: #0b315d;
}

.cookie-button--primary:hover {
  background: #08284d;
}

.cookie-button--secondary {
  color: #0b315d;
  background: #fff;
  border-color: #9dafc0;
}

.cookie-button--secondary:hover {
  background: #f5f8fa;
  border-color: #0b315d;
}

.cookie-button--settings {
  color: #8e542a;
  background: #fffaf5;
  border-color: #e3c19e;
}

.cookie-button--settings:hover {
  background: #fff3e7;
  border-color: #bd7b3d;
}

.cookie-preferences-dialog {
  width: min(620px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: auto;
  color: #0b2e59;
  background: #fff;
  border: 0;
  border-radius: 20px;
  box-shadow: 0 28px 80px rgba(4, 25, 50, .3);
  font-family: inherit;
}

.cookie-preferences-dialog::backdrop {
  background: rgba(5, 25, 49, .55);
  backdrop-filter: blur(3px);
}

.cookie-preferences-panel {
  padding: 26px;
}

.cookie-preferences-heading {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
}

.cookie-preferences-heading span {
  display: block;
  margin-bottom: 4px;
  color: #a35f2c;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.cookie-preferences-heading h2 {
  margin: 0;
  color: #082b57;
  font-size: 26px;
  line-height: 1.2;
}

.cookie-dialog-close {
  display: grid;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  color: #526a82;
  background: #f3f7f9;
  border: 1px solid #dce5ea;
  border-radius: 50%;
  font: inherit;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.cookie-preferences-intro {
  margin-top: 12px !important;
  color: #526a7b;
  font-size: 16px;
  line-height: 1.55;
}

.cookie-preference-list {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.cookie-preference-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  background: #f8fafb;
  border: 1px solid #dde6eb;
  border-radius: 14px;
}

.cookie-preference-item strong {
  display: block;
  margin-bottom: 4px;
  color: #0a315d;
  font-size: 15px;
}

.cookie-preference-item p {
  color: #526a7b;
  font-size: 14px;
  line-height: 1.5;
}

.cookie-preference-item code {
  color: inherit;
  font-family: inherit;
  font-size: inherit;
}

.cookie-always-active {
  padding: 7px 10px;
  color: #176640;
  background: #e8f5ee;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.cookie-switch {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  cursor: pointer;
}

.cookie-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.cookie-switch span {
  position: relative;
  display: block;
  width: 48px;
  height: 28px;
  background: #b8c4ce;
  border-radius: 999px;
  transition: background-color .2s ease;
}

.cookie-switch span::after {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(10, 36, 64, .22);
  content: '';
  transition: transform .2s ease;
}

.cookie-switch input:checked + span {
  background: #0c6b49;
}

.cookie-switch input:checked + span::after {
  transform: translateX(20px);
}

.cookie-preferences-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

.cookie-preferences-actions .cookie-button {
  min-width: 190px;
}

[data-cookie-preferences] {
  cursor: pointer;
}

@media (max-width: 860px) {
  .cookie-consent-banner {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .cookie-consent-actions {
    grid-template-columns: repeat(3, 1fr);
  }

  .cookie-button {
    white-space: normal;
  }
}

@media (max-width: 600px) {
  .cookie-consent-banner {
    right: 10px;
    bottom: 10px;
    left: 10px;
    gap: 12px;
    width: auto;
    padding: 14px;
    border-radius: 15px;
  }

  .cookie-consent-copy strong {
    font-size: 16px;
  }

  .cookie-consent-copy p { font-size: 14px; line-height: 1.5; }

  .cookie-consent-actions { grid-template-columns: 1fr; }

  .cookie-consent-actions .cookie-button--settings { grid-column: auto; }

  .cookie-button {
    min-height: 46px;
    padding: 9px 10px;
    font-size: 14px;
  }

  .cookie-preferences-dialog {
    width: calc(100% - 20px);
    max-height: calc(100dvh - 20px);
    border-radius: 16px;
  }

  .cookie-preferences-panel {
    padding: 20px 16px;
  }

  .cookie-preferences-heading h2 {
    font-size: 22px;
  }

  .cookie-preference-item {
    gap: 12px;
    padding: 14px 12px;
  }

  .cookie-preference-item p { font-size: 14px; }

  .cookie-always-active {
    max-width: 74px;
    white-space: normal;
    text-align: center;
  }

  .cookie-preferences-actions .cookie-button {
    width: 100%;
  }
}

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