:root.tvc-preferences-open {
  overflow: hidden;
}

#topvendaConsentRoot,
#topvendaConsentRoot * {
  box-sizing: border-box;
}

#topvendaConsentRoot {
  --tvc-ink: #17132f;
  --tvc-muted: #68627c;
  --tvc-border: #e9e5f3;
  --tvc-soft: #f7f5fc;
  --tvc-primary: #7c3aed;
  --tvc-primary-dark: #6525d5;
  --tvc-primary-soft: #f1eafe;
  --tvc-white: #ffffff;
  color: var(--tvc-ink);
  font-family: "Plus Jakarta Sans", "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#topvendaConsentRoot [hidden] {
  display: none !important;
}

.tvc-banner {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 1400;
  width: min(390px, calc(100vw - 28px));
  padding: 18px;
  border: 1px solid rgba(124, 58, 237, 0.16);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 18px 50px rgba(31, 20, 63, 0.15), 0 2px 12px rgba(31, 20, 63, 0.06);
  backdrop-filter: blur(18px);
  animation: tvc-enter 0.32s ease-out both;
}

.tvc-banner__topline {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.tvc-icon {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #8b5cf6, #6d28d9);
  color: var(--tvc-white);
  box-shadow: 0 7px 18px rgba(124, 58, 237, 0.24);
}

.tvc-icon svg,
.tvc-manage-button__icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
}

.tvc-banner h2,
.tvc-modal h2 {
  margin: 0;
  color: var(--tvc-ink);
  font-family: inherit;
  letter-spacing: -0.025em;
}

.tvc-banner h2 {
  padding-top: 1px;
  font-size: 15.5px;
  font-weight: 750;
  line-height: 1.3;
}

.tvc-banner p {
  margin: 5px 0 0;
  color: var(--tvc-muted);
  font-size: 12.25px;
  font-weight: 500;
  line-height: 1.55;
}

.tvc-banner__actions {
  display: grid;
  grid-template-columns: 1fr 1.12fr;
  gap: 8px;
  margin-top: 15px;
}

.tvc-button,
.tvc-text-button,
.tvc-policy-link,
.tvc-close,
.tvc-manage-button {
  appearance: none;
  border: 0;
  font-family: inherit;
  cursor: pointer;
}

.tvc-button {
  min-height: 39px;
  padding: 9px 12px;
  border-radius: 11px;
  font-size: 11.5px;
  font-weight: 750;
  line-height: 1.25;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.tvc-button:hover {
  transform: translateY(-1px);
}

.tvc-button:active {
  transform: translateY(0);
}

.tvc-button--primary {
  background: linear-gradient(135deg, var(--tvc-primary), #9333ea);
  color: var(--tvc-white);
}

.tvc-button--primary:hover {
  background: linear-gradient(135deg, var(--tvc-primary-dark), #7e22ce);
}

.tvc-button--secondary {
  border: 1px solid var(--tvc-border);
  background: var(--tvc-white);
  color: #4d4760;
}

.tvc-button--secondary:hover {
  border-color: #d6cdef;
  background: var(--tvc-soft);
}

.tvc-text-button {
  display: block;
  margin: 11px auto 0;
  padding: 2px 6px;
  background: transparent;
  color: #706a80;
  font-size: 11px;
  font-weight: 650;
  text-decoration: underline;
  text-decoration-color: #d6d0df;
  text-underline-offset: 3px;
}

.tvc-text-button:hover,
.tvc-policy-link:hover {
  color: var(--tvc-primary);
}

.tvc-manage-button {
  position: fixed;
  left: max(12px, env(safe-area-inset-left));
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 1350;
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 11px 7px 8px;
  border: 1px solid rgba(124, 58, 237, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #5e5573;
  box-shadow: 0 7px 22px rgba(31, 20, 63, 0.1);
  backdrop-filter: blur(14px);
  font-size: 10.5px;
  font-weight: 700;
  transition: color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.tvc-manage-button:hover {
  border-color: rgba(124, 58, 237, 0.38);
  color: var(--tvc-primary);
  transform: translateY(-1px);
}

.tvc-manage-button__icon {
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  border-radius: 7px;
  background: var(--tvc-primary-soft);
  color: var(--tvc-primary);
}

.tvc-manage-button__icon svg {
  width: 14px;
  height: 14px;
}

.tvc-manage-button[data-marketing="enabled"] .tvc-manage-button__icon {
  background: var(--tvc-primary);
  color: var(--tvc-white);
}

.tvc-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(19, 14, 38, 0.36);
  backdrop-filter: blur(8px);
  animation: tvc-fade 0.2s ease-out both;
}

.tvc-modal {
  width: min(540px, 100%);
  max-height: min(720px, calc(100vh - 40px));
  overflow: auto;
  padding: 22px;
  border: 1px solid rgba(124, 58, 237, 0.13);
  border-radius: 23px;
  background: var(--tvc-white);
  box-shadow: 0 28px 80px rgba(24, 15, 51, 0.23);
  animation: tvc-enter-modal 0.24s ease-out both;
}

.tvc-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.tvc-eyebrow {
  display: block;
  margin-bottom: 5px;
  color: var(--tvc-primary);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tvc-modal h2 {
  font-size: 21px;
  font-weight: 780;
  line-height: 1.25;
}

.tvc-close {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: var(--tvc-soft);
  color: #777083;
  font-size: 23px;
  line-height: 1;
}

.tvc-close:hover {
  background: var(--tvc-primary-soft);
  color: var(--tvc-primary);
}

.tvc-modal__description {
  margin: 10px 0 18px;
  color: var(--tvc-muted);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.55;
}

.tvc-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 10px;
  padding: 15px;
  border: 1px solid var(--tvc-border);
  border-radius: 15px;
  background: #fdfcff;
}

.tvc-category strong {
  display: block;
  color: #2c2640;
  font-size: 13px;
  font-weight: 760;
}

.tvc-category p {
  margin: 4px 0 0;
  color: var(--tvc-muted);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.5;
}

.tvc-category--interactive {
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.tvc-category--interactive:hover {
  border-color: #d5c9f2;
  background: #fbf9ff;
}

.tvc-always-on {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  background: #eefbf4;
  color: #198754;
  font-size: 9.5px;
  font-weight: 800;
  white-space: nowrap;
}

.tvc-switch {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  width: 42px;
  height: 24px;
}

.tvc-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.tvc-switch > span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #d9d5e2;
  transition: background 0.2s ease;
}

.tvc-switch > span::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--tvc-white);
  box-shadow: 0 2px 6px rgba(32, 24, 55, 0.2);
  content: '';
  transition: transform 0.2s ease;
}

.tvc-switch input:checked + span {
  background: var(--tvc-primary);
}

.tvc-switch input:checked + span::after {
  transform: translateX(18px);
}

.tvc-switch input:focus-visible + span {
  outline: 3px solid rgba(124, 58, 237, 0.22);
  outline-offset: 2px;
}

.tvc-policy-link {
  margin-top: 14px;
  padding: 4px 2px;
  background: transparent;
  color: #655d75;
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: #d8d2e1;
  text-underline-offset: 3px;
}

.tvc-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 20px;
  padding-top: 17px;
  border-top: 1px solid #f0edf5;
}

.tvc-modal__footer .tvc-button {
  min-width: 145px;
}

.tvc-button:focus-visible,
.tvc-text-button:focus-visible,
.tvc-policy-link:focus-visible,
.tvc-close:focus-visible,
.tvc-manage-button:focus-visible {
  outline: 3px solid rgba(124, 58, 237, 0.22);
  outline-offset: 2px;
}

@keyframes tvc-enter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes tvc-enter-modal {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes tvc-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 560px) {
  .tvc-banner {
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    width: calc(100vw - 24px);
    padding: 15px;
    border-radius: 18px;
  }

  .tvc-banner__actions {
    grid-template-columns: 1fr;
  }

  .tvc-banner__actions .tvc-button--primary {
    order: -1;
  }

  .tvc-manage-button {
    left: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    min-height: 33px;
    padding: 6px 8px;
  }

  .tvc-manage-button > span:last-child {
    display: none;
  }

  .tvc-modal {
    padding: 18px;
    border-radius: 19px;
  }

  .tvc-modal h2 {
    font-size: 18px;
  }

  .tvc-category {
    align-items: flex-start;
    gap: 12px;
    padding: 13px;
  }

  .tvc-always-on {
    white-space: normal;
    text-align: center;
  }

  .tvc-modal__footer {
    flex-direction: column-reverse;
  }

  .tvc-modal__footer .tvc-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tvc-banner,
  .tvc-backdrop,
  .tvc-modal {
    animation: none;
  }

  .tvc-button,
  .tvc-manage-button,
  .tvc-switch > span,
  .tvc-switch > span::after {
    transition: none;
  }
}
