:root {
  --trg-cc-primary: #2f2d98;
  --trg-cc-accent: #ffca05;
}

.trg-cc-banner,
.trg-cc-dialog,
.trg-cc-manage {
  font-family: inherit;
}

.trg-cc-banner {
  position: fixed;
  right: 20px;
  bottom: 20px;
  left: 20px;
  z-index: 2147483000;
  max-width: 1120px;
  margin: auto;
  padding: 22px;
  border: 1px solid rgba(20, 20, 50, .12);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 55px rgba(15, 18, 55, .22);
  color: #242432;
}

.trg-cc-banner[hidden],
.trg-cc-manage[hidden] {
  display: none !important;
}

.trg-cc-banner__title {
  margin: 0 0 8px;
  color: var(--trg-cc-primary);
  font-size: 22px;
  line-height: 1.2;
}

.trg-cc-banner__text {
  max-width: 850px;
  margin: 0;
  color: #555665;
  font-size: 15px;
  line-height: 1.55;
}

.trg-cc-banner__text a,
.trg-cc-dialog a {
  color: var(--trg-cc-primary);
  text-decoration: underline;
}

.trg-cc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.trg-cc-button {
  min-height: 44px;
  padding: 10px 18px;
  border: 2px solid var(--trg-cc-primary);
  border-radius: 999px;
  background: #fff;
  color: var(--trg-cc-primary);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.trg-cc-button:hover,
.trg-cc-button:focus-visible {
  background: #f2f2fa;
}

.trg-cc-button--primary {
  border-color: var(--trg-cc-accent);
  background: var(--trg-cc-accent);
  color: #1e1e35;
}

.trg-cc-button--primary:hover,
.trg-cc-button--primary:focus-visible {
  background: #ffd83e;
}

.trg-cc-button:focus-visible,
.trg-cc-manage:focus-visible,
.trg-cc-switch input:focus-visible + .trg-cc-switch__track {
  outline: 3px solid rgba(47, 45, 152, .35);
  outline-offset: 2px;
}

.trg-cc-dialog {
  width: min(680px, calc(100% - 30px));
  max-height: min(760px, calc(100vh - 30px));
  padding: 0;
  border: 0;
  border-radius: 16px;
  color: #242432;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .3);
}

.trg-cc-dialog::backdrop {
  background: rgba(20, 22, 48, .62);
}

.trg-cc-dialog__inner {
  padding: 26px;
}

.trg-cc-dialog__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.trg-cc-dialog__title {
  margin: 0 0 8px;
  color: var(--trg-cc-primary);
  font-size: 25px;
}

.trg-cc-dialog__close {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 0;
  border-radius: 50%;
  background: #f1f1f6;
  color: #222;
  cursor: pointer;
  font-size: 25px;
  line-height: 1;
}

.trg-cc-category {
  padding: 16px 0;
  border-top: 1px solid #e7e7ee;
}

.trg-cc-category:first-of-type {
  margin-top: 18px;
}

.trg-cc-category__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.trg-cc-category h3 {
  margin: 0;
  color: var(--trg-cc-primary);
  font-size: 17px;
}

.trg-cc-category p {
  margin: 7px 0 0;
  color: #626371;
  font-size: 14px;
  line-height: 1.45;
}

.trg-cc-category details {
  margin-top: 8px;
  color: #656574;
  font-size: 13px;
}

.trg-cc-switch {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
}

.trg-cc-switch__label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.trg-cc-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
}

.trg-cc-switch__track {
  position: relative;
  display: block;
  width: 48px;
  height: 26px;
  border-radius: 999px;
  background: #bbbcc7;
  cursor: pointer;
}

.trg-cc-switch__track::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  content: '';
  transition: transform .18s ease;
}

.trg-cc-switch input:checked + .trg-cc-switch__track {
  background: var(--trg-cc-primary);
}

.trg-cc-switch input:checked + .trg-cc-switch__track::after {
  transform: translateX(22px);
}

.trg-cc-switch input:disabled + .trg-cc-switch__track {
  cursor: not-allowed;
  opacity: .7;
}

.trg-cc-manage {
  position: fixed;
  bottom: 14px;
  left: 14px;
  z-index: 2147482990;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid rgba(47, 45, 152, .3);
  border-radius: 999px;
  background: #fff;
  color: var(--trg-cc-primary);
  box-shadow: 0 5px 18px rgba(0, 0, 0, .14);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.trg-cc-blocked-frame {
  min-height: 120px;
  border: 1px dashed #b9bac6;
  background: #f6f6f9;
}

@media (max-width: 640px) {
  .trg-cc-banner {
    right: 10px;
    bottom: 10px;
    left: 10px;
    padding: 18px;
  }

  .trg-cc-actions,
  .trg-cc-button {
    width: 100%;
  }

  .trg-cc-dialog__inner {
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .trg-cc-switch__track::after {
    transition: none;
  }
}
