:root {
  --amo-consent-navy: #06396f;
  --amo-consent-blue: #0669c9;
  --amo-consent-blue-dark: #0567c9;
  --amo-consent-ink: #072f5f;
  --amo-consent-muted: #55708b;
  --amo-consent-line: #cfe3f5;
  --amo-consent-soft: #eef8ff;
}

.amo-consent,
.amo-consent * {
  box-sizing: border-box;
}

.amo-consent[hidden],
.amo-consent [hidden] {
  display: none !important;
}

.amo-consent__banner {
  position: fixed;
  z-index: 999990;
  right: 20px;
  bottom: 20px;
  left: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 24px;
  color: var(--amo-consent-ink);
  background: #fff;
  border: 1px solid rgba(8, 120, 232, 0.18);
  border-radius: 22px;
  box-shadow: 0 20px 55px rgba(5, 48, 93, 0.2);
  font-family: Nunito, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.amo-consent__eyebrow {
  margin: 0 0 4px;
  color: var(--amo-consent-blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.amo-consent__banner h2,
.amo-consent__dialog h2,
.amo-consent__category h3,
.amo-consent__category p {
  margin: 0;
}

.amo-consent__banner h2,
.amo-consent__dialog h2 {
  color: var(--amo-consent-ink);
  font-size: clamp(21px, 2vw, 27px);
  line-height: 1.15;
  font-weight: 900;
}

.amo-consent__banner p:not(.amo-consent__eyebrow),
.amo-consent__dialog > p {
  margin: 8px 0 0;
  color: var(--amo-consent-muted);
  font-size: 14px;
  line-height: 1.55;
}

.amo-consent a {
  color: var(--amo-consent-blue-dark);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.amo-consent__actions,
.amo-consent__dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
}

.amo-consent__actions {
  justify-content: flex-end;
  max-width: 420px;
}

.amo-consent__button,
.amo-consent__close,
.amo-consent__footer-control button {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
}

.amo-consent__button {
  min-height: 44px;
  padding: 11px 17px;
  border: 1px solid transparent;
  border-radius: 13px;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
}

.amo-consent__button--primary {
  color: #fff;
  background: var(--amo-consent-blue);
  box-shadow: 0 9px 20px rgba(8, 120, 232, 0.21);
}

.amo-consent__button--primary:hover {
  background: var(--amo-consent-blue-dark);
}

.amo-consent__button--secondary {
  color: var(--amo-consent-ink);
  background: var(--amo-consent-soft);
  border-color: var(--amo-consent-line);
}

.amo-consent__button--link {
  min-height: 36px;
  padding-inline: 9px;
  color: var(--amo-consent-blue-dark);
  background: transparent;
}

.amo-consent button:focus-visible,
.amo-consent a:focus-visible,
.amo-consent input:focus-visible + span {
  outline: 3px solid #f8b84e;
  outline-offset: 3px;
}

.amo-consent__backdrop {
  position: fixed;
  z-index: 999991;
  inset: 0;
  background: rgba(3, 28, 56, 0.58);
  backdrop-filter: blur(3px);
}

.amo-consent__dialog {
  position: fixed;
  z-index: 999992;
  top: 50%;
  left: 50%;
  width: min(620px, calc(100% - 32px));
  max-height: min(760px, calc(100vh - 32px));
  overflow-y: auto;
  padding: 26px;
  color: var(--amo-consent-ink);
  background: #fff;
  border: 1px solid rgba(8, 120, 232, 0.18);
  border-radius: 24px;
  box-shadow: 0 28px 80px rgba(3, 34, 66, 0.32);
  font-family: Nunito, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  transform: translate(-50%, -50%);
}

.amo-consent__dialog-head {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  justify-content: space-between;
}

.amo-consent__close {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--amo-consent-ink);
  background: var(--amo-consent-soft);
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
}

.amo-consent__categories {
  display: grid;
  gap: 10px;
  margin: 22px 0;
}

.amo-consent__category {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 15px 17px;
  background: #f8fbfe;
  border: 1px solid var(--amo-consent-line);
  border-radius: 16px;
}

.amo-consent__category strong,
.amo-consent__category h3 {
  display: block;
  color: var(--amo-consent-ink);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.3;
}

.amo-consent__category small,
.amo-consent__category p {
  display: block;
  margin-top: 4px;
  color: var(--amo-consent-muted);
  font-size: 13px;
  line-height: 1.4;
}

.amo-consent__always {
  flex: 0 0 auto;
  color: #16724d;
  font-size: 12px;
  font-weight: 900;
}

.amo-consent__switch {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 48px;
  height: 28px;
}

.amo-consent__switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.amo-consent__switch span {
  position: absolute;
  inset: 0;
  background: #a9bac9;
  border-radius: 999px;
  transition: background-color 160ms ease;
}

.amo-consent__switch span::after {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  content: "";
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(5, 48, 93, 0.25);
  transition: transform 160ms ease;
}

.amo-consent__switch input:checked + span {
  background: var(--amo-consent-blue);
}

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

.amo-consent__dialog-actions {
  justify-content: flex-start;
}

.amo-consent__footer-control {
  display: flex;
  justify-content: center;
  padding: 10px 16px 16px;
  font-family: Nunito, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.amo-consent__footer-control button {
  padding: 5px 8px;
  color: inherit;
  background: transparent;
  font-size: 13px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

html.amo-consent-dialog-open {
  overflow: hidden;
}

@media (max-width: 760px) {
  .amo-consent__banner {
    right: 12px;
    bottom: 12px;
    left: 12px;
    grid-template-columns: 1fr;
    gap: 16px;
    width: auto;
    padding: 19px;
    border-radius: 19px;
  }

  .amo-consent__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    max-width: none;
  }

  .amo-consent__button--link {
    grid-column: 1 / -1;
  }

  .amo-consent__dialog {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: calc(100vh - 18px);
    padding: 21px 18px max(20px, env(safe-area-inset-bottom));
    border-radius: 24px 24px 0 0;
    transform: none;
  }

  .amo-consent__dialog-actions {
    display: grid;
  }
}

@media (max-width: 430px) {
  .amo-consent__banner h2,
  .amo-consent__dialog h2 {
    font-size: 21px;
  }

  .amo-consent__banner p:not(.amo-consent__eyebrow),
  .amo-consent__dialog > p {
    font-size: 13px;
  }

  .amo-consent__actions {
    grid-template-columns: 1fr;
  }

  .amo-consent__button--link {
    grid-column: auto;
  }

  .amo-consent__category {
    gap: 12px;
    padding: 14px;
  }

  .amo-consent__always {
    max-width: 82px;
    text-align: right;
  }
}

@media (prefers-reduced-motion: reduce) {
  .amo-consent *,
  .amo-consent *::before,
  .amo-consent *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
