.myds-cmp[hidden],
.myds-cmp [hidden] {
  display: none !important;
}

body.myds-cmp-open {
  overflow: hidden;
}

.myds-cmp {
  box-sizing: border-box;
  position: fixed;
  z-index: 2147483000;
  inset: 0;
  display: grid;
  align-items: end;
  padding: 22px;
  font-family: Inter, sans-serif;
}

.myds-cmp *,
.myds-cmp *::before,
.myds-cmp *::after,
.myds-cmp-manage {
  box-sizing: border-box;
}

.myds-cmp__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 24, 37, .62);
  backdrop-filter: blur(3px);
}

.myds-cmp section.myds-cmp__dialog {
  position: relative;
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(8, 28, 48, .28);
  color: #172433;
}

.myds-cmp__dialog h2 {
  margin: 0 38px 12px 0;
  color: #172433;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.12;
}

.myds-cmp__eyebrow {
  margin: 0 0 7px;
  color: #2f88cf;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.myds-cmp__intro {
  max-width: 670px;
  margin: 0 0 10px;
  color: #526171;
  font-size: 15px;
  line-height: 1.62;
}

.myds-cmp__policy {
  color: #216fae;
  font-size: 14px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.myds-cmp__close {
  position: absolute;
  top: 16px;
  right: 17px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #edf4fa;
  color: #1c5f94;
  cursor: pointer;
  font-size: 25px;
  line-height: 1;
}

.myds-cmp__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

.myds-cmp__button,
.myds-cmp-manage {
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.myds-cmp__button {
  min-height: 46px;
  padding: 11px 19px;
  border: 1px solid #c9d8e5;
}

.myds-cmp__button--primary {
  border-color: #2f88cf;
  background: #2f88cf;
  color: #fff;
}

.myds-cmp__button--secondary {
  border-color: #b7d5eb;
  background: #edf7fd;
  color: #1d669e;
}

.myds-cmp__button--ghost {
  background: #fff;
  color: #425364;
}

.myds-cmp__button:focus-visible,
.myds-cmp__close:focus-visible,
.myds-cmp-manage:focus-visible,
.myds-cmp__category input:focus-visible + .myds-cmp__switch {
  outline: 3px solid rgba(47, 136, 207, .35);
  outline-offset: 3px;
}

.myds-cmp__categories {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.myds-cmp__category {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin: 0;
  padding: 15px 17px;
  border: 1px solid #dce7ef;
  border-radius: 12px;
  background: #f9fbfd;
}

.myds-cmp__category strong {
  display: block;
  margin-bottom: 3px;
  color: #233546;
  font-size: 15px;
}

.myds-cmp__category p {
  margin: 0;
  color: #667687;
  font-size: 13px;
  line-height: 1.45;
}

.myds-cmp__always {
  color: #278058;
  font-size: 12px;
  font-weight: 800;
}

.myds-cmp__category input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.myds-cmp__switch {
  position: relative;
  width: 48px;
  height: 27px;
  border-radius: 999px;
  background: #b8c4ce;
  transition: background .2s ease;
}

.myds-cmp__switch::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .2);
  content: '';
  transition: transform .2s ease;
}

.myds-cmp__category input:checked + .myds-cmp__switch {
  background: #2f88cf;
}

.myds-cmp__category input:checked + .myds-cmp__switch::after {
  transform: translateX(21px);
}

.myds-cmp-manage {
  position: fixed;
  z-index: 9998;
  bottom: 14px;
  left: 14px;
  padding: 9px 14px;
  border: 1px solid #c7d8e5;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 5px 18px rgba(24, 53, 79, .13);
  color: #285f89;
  font-size: 12px;
}

@media (max-width: 700px) {
  .myds-cmp {
    height: 100dvh;
    padding: 10px;
  }

  .myds-cmp section.myds-cmp__dialog {
    max-height: calc(100dvh - 20px);
    overflow-y: auto;
    padding: 23px 18px 18px;
    border-radius: 16px;
  }

  .myds-cmp__actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .myds-cmp__actions--settings {
    flex-direction: column;
  }

  .myds-cmp__button {
    width: 100%;
  }

  .myds-cmp__category {
    gap: 12px;
    padding: 13px;
  }

  .myds-cmp-manage {
    bottom: 8px;
    left: 8px;
  }
}
