.cfx2-cookie-preferences__close,
.cfx2-cookie-preferences__secondary,
.cfx2-cookie-preferences__dialog #cookies-manage-save {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: #FFFFFF;
  color: #002957;
  cursor: pointer;
  font: inherit;
}

#cookies-bar.cookies-bar .buttons [data-cafex-cookie-bar-manage] {
  order: 1;
  padding: .625rem 1rem;
  border: 1px solid rgba(255, 255, 255, .36);
  border-radius: 999px;
  background: transparent;
  color: #FFFFFF;
}

#cookies-bar.cookies-bar .buttons [data-cafex-cookie-bar-manage]:hover {
  border-color: rgba(255, 255, 255, .62);
  background: rgba(255, 255, 255, .08);
  color: #FFFFFF;
}

.cfx2-cookie-preferences__dialog {
  box-sizing: border-box;
  width: min(43rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 0;
  border-radius: 1.5rem;
  background: #F3F0E8;
  color: #002957;
  color-scheme: light;
  overflow: auto;
}

.cfx2-cookie-preferences__dialog::backdrop {
  background: rgba(0, 20, 45, .68);
}

.cfx2-cookie-preferences__close {
  position: absolute;
  top: .75rem;
  right: .75rem;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 1.25rem;
  line-height: 1;
}

.cfx2-cookie-preferences__dialog #cookies-manage {
  color: #002957;
}

.cfx2-cookie-preferences__dialog #cookies-manage .title {
  margin: 0 3rem .75rem 0;
  color: #002957;
  font-size: clamp(1.6rem, 4vw, 2.15rem);
  line-height: 1.1;
}

.cfx2-cookie-preferences__dialog #cookies-manage > .content {
  max-width: 58ch;
  margin-bottom: 1.5rem;
  color: rgba(0, 41, 87, .78);
  line-height: 1.55;
}

.cfx2-cookie-preferences__dialog #cookies-manage > .content p {
  margin: 0;
}

.cfx2-cookie-preferences__dialog .list-cookies {
  margin: 0;
}

.cfx2-cookie-category {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .4rem 1.25rem;
  align-items: center;
  padding: 1.1rem 1.2rem;
  border-top: 1px solid rgba(0, 41, 87, .16);
  background: rgba(255, 255, 255, .54);
}

.cfx2-cookie-category:first-child {
  border-top: 0;
  border-radius: 1rem 1rem 0 0;
}

.cfx2-cookie-category:last-of-type {
  border-radius: 0 0 1rem 1rem;
}

.cfx2-cookie-preferences__dialog .cfx2-cookie-category label {
  display: contents;
  margin: 0;
  color: #002957;
  font-weight: 700;
}

.cfx2-cookie-preferences__dialog .cfx2-cookie-category label strong {
  grid-column: 1;
  grid-row: 1;
}

.cfx2-cookie-preferences__dialog .cfx2-cookie-category input[type="checkbox"] {
  grid-column: 2;
  grid-row: 1 / span 2;
  position: relative;
  width: 3rem;
  height: 1.65rem;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  border: 2px solid rgba(0, 41, 87, .35);
  border-radius: 999px;
  background: rgba(0, 41, 87, .15);
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease;
}

.cfx2-cookie-preferences__dialog .cfx2-cookie-category input[type="checkbox"]::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 1px 3px rgba(0, 41, 87, .25);
  transition: transform .18s ease;
}

.cfx2-cookie-preferences__dialog .cfx2-cookie-category input[type="checkbox"]:checked {
  border-color: #4659E8;
  background: #4659E8;
}

.cfx2-cookie-preferences__dialog .cfx2-cookie-category input[type="checkbox"]:checked::before {
  transform: translateX(1.35rem);
}

.cfx2-cookie-preferences__dialog .cfx2-cookie-category input[type="checkbox"]:focus-visible,
.cfx2-cookie-preferences__dialog button:focus-visible,
#cookies-bar.cookies-bar .buttons [data-cafex-cookie-bar-manage]:focus-visible {
  outline: 3px solid #FF5A00;
  outline-offset: 3px;
}

.cfx2-cookie-preferences__dialog .cfx2-cookie-category input[type="checkbox"]:disabled {
  border-color: #002957;
  background: #002957;
  cursor: not-allowed;
  opacity: 1;
}

.cfx2-cookie-preferences__dialog .cfx2-cookie-category .description {
  grid-column: 1;
  grid-row: 2;
  margin: 0;
  color: rgba(0, 41, 87, .72);
  line-height: 1.45;
}

.cfx2-cookie-preferences__dialog .cfx2-cookie-category .description p {
  margin: 0;
}

.cfx2-cookie-category__state {
  grid-column: 1;
  grid-row: 3;
  color: #4659E8;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .02em;
}

.cfx2-cookie-preferences__dialog #cookies-manage-save {
  margin-top: 1.5rem;
  padding: .8rem 1.25rem;
  border-color: #FF5A00;
  background: #FF5A00;
  color: #FFFFFF;
  font-weight: 700;
}

.cfx2-cookie-preferences__secondary {
  margin: 1.5rem 0 0 .6rem;
  padding: .8rem 1.25rem;
  border-color: rgba(0, 41, 87, .3);
  background: transparent;
  font-weight: 700;
}

.cfx2-cookie-preferences-open #cookies-bar {
  visibility: hidden;
}

@media (max-width: 560px) {
  .cfx2-cookie-preferences__dialog {
    width: calc(100% - 1rem);
    max-height: calc(100dvh - 1rem);
    padding: 1.35rem 1rem;
    border-radius: 1.25rem;
  }

  .cfx2-cookie-category {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .55rem .75rem;
    padding: 1rem;
  }

  .cfx2-cookie-preferences__dialog #cookies-manage-save,
  .cfx2-cookie-preferences__secondary {
    width: 100%;
    margin: .75rem 0 0;
  }
}
