.cookie-consent-banner,
.cookie-consent-modal,
.cookie-consent-settings {
  font-family: Inter, Arial, sans-serif;
}

.cookie-consent-banner[hidden],
.cookie-consent-modal[hidden],
.cookie-consent-settings[hidden] {
  display: none;
}

.cookie-consent-banner {
  position: fixed;
  z-index: 10000;
  right: 20px;
  bottom: 20px;
  left: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 22px 24px;
  color: #172033;
  background: #fff;
  border: 1px solid #e3e8f0;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgb(16 24 40 / 18%);
}

.cookie-consent-banner__copy {
  max-width: 610px;
}

.cookie-consent-banner h2,
.cookie-consent-modal h2,
.cookie-consent-category h3,
.cookie-consent-banner p,
.cookie-consent-modal p {
  margin-top: 0;
}

.cookie-consent-banner h2,
.cookie-consent-modal h2 {
  margin-bottom: 8px;
  font-size: 20px;
  line-height: 1.3;
}

.cookie-consent-banner p,
.cookie-consent-modal__intro {
  margin-bottom: 0;
  color: #526071;
  font-size: 14px;
  line-height: 1.55;
}

.cookie-consent-banner__actions,
.cookie-consent-modal__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.cookie-consent-button {
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.cookie-consent-button:focus-visible,
.cookie-consent-settings:focus-visible,
.cookie-consent-modal__close:focus-visible,
.cookie-consent-switch__input:focus-visible + .cookie-consent-switch__track {
  outline: 3px solid #80b7ff;
  outline-offset: 3px;
}

.cookie-consent-button--primary {
  color: #fff;
  background: #153373;
}

.cookie-consent-button--primary:hover {
  background: #10285a;
}

.cookie-consent-button--secondary {
  color: #153373;
  background: #fff;
  border-color: #c9d2e0;
}

.cookie-consent-button--secondary:hover {
  background: #f3f6fb;
}

.cookie-consent-button--text {
  color: #153373;
  background: transparent;
}

.cookie-consent-button--text:hover {
  background: #f3f6fb;
}

.cookie-consent-settings {
  position: fixed;
  z-index: 9999;
  right: 18px;
  bottom: 18px;
  min-height: 42px;
  padding: 10px 16px;
  color: #fff;
  background: #153373;
  border: 0;
  border-radius: 999px;
  box-shadow: 0 4px 16px rgb(16 24 40 / 22%);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.cookie-consent-modal {
  position: fixed;
  z-index: 10001;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgb(14 23 41 / 58%);
}

.cookie-consent-modal__dialog {
  width: min(100%, 720px);
  max-height: min(90vh, 820px);
  overflow-y: auto;
  padding: 26px;
  color: #172033;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgb(0 0 0 / 28%);
}

.cookie-consent-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.cookie-consent-modal__eyebrow {
  margin-bottom: 6px;
  color: #153373;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.cookie-consent-modal__close {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  color: #526071;
  background: #f3f6fb;
  border: 0;
  border-radius: 50%;
  font: inherit;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.cookie-consent-modal__intro {
  margin-bottom: 20px;
}

.cookie-consent-categories {
  border-top: 1px solid #e7ebf1;
}

.cookie-consent-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 2px;
  border-bottom: 1px solid #e7ebf1;
}

.cookie-consent-category__content {
  min-width: 0;
}

.cookie-consent-category h3 {
  margin-bottom: 5px;
  font-size: 15px;
  line-height: 1.4;
}

.cookie-consent-category p {
  margin-bottom: 5px;
  color: #526071;
  font-size: 13px;
  line-height: 1.5;
}

.cookie-consent-category p:last-child {
  margin-bottom: 0;
}

.cookie-consent-category__details strong {
  color: #344054;
}

.cookie-consent-switch {
  position: relative;
  display: inline-flex;
  width: 48px;
  height: 28px;
  flex: 0 0 auto;
  cursor: pointer;
}

.cookie-consent-switch__input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.cookie-consent-switch__track {
  position: absolute;
  inset: 0;
  background: #cbd2dc;
  border-radius: 999px;
  transition: background-color 150ms ease;
}

.cookie-consent-switch__track::after {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  content: "";
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgb(16 24 40 / 25%);
  transition: transform 150ms ease;
}

.cookie-consent-switch__input:checked + .cookie-consent-switch__track {
  background: #153373;
}

.cookie-consent-switch__input:checked + .cookie-consent-switch__track::after {
  transform: translateX(20px);
}

.cookie-consent-switch__input:disabled + .cookie-consent-switch__track {
  background: #7890bd;
  cursor: not-allowed;
}

.cookie-consent-switch--locked {
  cursor: not-allowed;
}

.cookie-consent-modal__actions {
  justify-content: flex-start;
  margin-top: 20px;
}

@media (max-width: 680px) {
  .cookie-consent-banner {
    right: 10px;
    bottom: 10px;
    left: 10px;
    align-items: stretch;
    flex-direction: column;
    gap: 16px;
    padding: 18px;
  }

  .cookie-consent-banner__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cookie-consent-banner__actions .cookie-consent-button--text {
    grid-column: 1 / -1;
  }

  .cookie-consent-modal {
    align-items: end;
    padding: 0;
  }

  .cookie-consent-modal__dialog {
    width: 100%;
    max-height: 92vh;
    padding: 20px 16px max(20px, env(safe-area-inset-bottom));
    border-radius: 16px 16px 0 0;
  }

  .cookie-consent-category {
    gap: 12px;
  }

  .cookie-consent-modal__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .cookie-consent-modal__actions .cookie-consent-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-consent-button,
  .cookie-consent-switch__track,
  .cookie-consent-switch__track::after {
    transition: none;
  }
}
