:root {
  --qp-consent-accent: var(--tp-theme-primary, #00a1b6);
  --qp-consent-accent-strong: var(--tp-theme-primary, #00a1b6);
  --qp-consent-overlay: rgba(0, 0, 0, 0.12);
  --qp-consent-bar-bg: rgba(0, 0, 0, 0.65);
  --qp-consent-surface: var(--tp-common-white, #fff);
  --qp-consent-text: var(--tp-grey-2, #203247);
  --qp-consent-text-light: rgba(255, 255, 255, 0.94);
  --qp-consent-muted: var(--tp-grey-1, #ba8c78);
  --qp-consent-muted-light: rgba(255, 255, 255, 0.8);
  --qp-consent-line-light: var(--tp-border-4, rgba(255, 255, 255, 0.6));
  --qp-consent-line-dark: var(--tp-border-1, rgba(31, 49, 48, 0.1));
  --qp-consent-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  --qp-consent-shadow-panel: 0 20px 60px rgba(0, 0, 0, 0.35);
  --qp-consent-radius: 14px;
  --qp-consent-radius-panel: 16px;
  --qp-consent-pill: 26px;
}

body.qp-consent-lock {
  overflow: hidden;
}

#qp-consent {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  font-family: var(--tp-ff-body, inherit);
  pointer-events: none;
}

#qp-consent.is-open {
  display: block;
}

@keyframes qp-consent-rise {
  from {
    transform: translateY(calc(100% + 40px));
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes qp-consent-panel-rise {
  from {
    transform: translateY(40px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.qp-consent__overlay {
  position: absolute;
  inset: 0;
  background: var(--qp-consent-overlay);
  -webkit-backdrop-filter: blur(0.5px);
  backdrop-filter: blur(0.5px);
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
}

#qp-consent.is-details-open .qp-consent__overlay {
  opacity: 1;
  pointer-events: auto;
}

.qp-consent__bar,
.qp-consent__details-panel {
  pointer-events: auto;
}

.qp-consent__bar {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 16px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--qp-consent-radius);
  background: var(--qp-consent-bar-bg);
  box-shadow: var(--qp-consent-shadow);
  color: var(--qp-consent-text-light);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  transform: translateY(calc(100% + 40px));
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
  font-family: var(--tp-ff-body, inherit);
}

#qp-consent.is-open .qp-consent__bar {
  transform: translateY(0);
  opacity: 1;
  animation: qp-consent-rise 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

#qp-consent.is-details-open .qp-consent__bar {
  opacity: 0.12;
  pointer-events: none;
}

.qp-consent__bar-header {
  margin: 0;
}

.qp-consent__eyebrow {
  margin: 0 0 4px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.qp-consent__title {
  margin: 0;
  color: var(--qp-consent-text-light);
  font-family: var(--tp-ff-body, inherit);
  font-size: clamp(18px, 1.45vw, 22px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.qp-consent__bar-text {
  margin: 6px 0 0;
  color: var(--qp-consent-muted-light);
  font-family: var(--tp-ff-p, var(--tp-ff-body, inherit));
  font-size: 14px;
  line-height: 1.45;
  max-width: 900px;
}

.qp-consent__bar-actions,
.qp-consent__details-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.qp-consent__bar-actions {
  justify-content: flex-end;
}

.qp-consent__btn,
.qp-consent__text-action {
  min-height: 42px;
  border-radius: var(--qp-consent-pill);
  border: 1px solid transparent;
  padding: 10px 14px;
  font-family: var(--tp-ff-body, inherit);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: all 0.3s ease-out;
}

.qp-consent__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.qp-consent__btn--primary {
  background: var(--qp-consent-accent);
  border-color: var(--qp-consent-accent);
  color: var(--tp-common-white, #fff);
}

.qp-consent__btn--primary:hover,
.qp-consent__btn--primary:focus-visible {
  background: var(--qp-consent-accent-strong);
  border-color: var(--qp-consent-accent-strong);
  color: var(--tp-common-white, #fff);
}

.qp-consent__btn--secondary {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--qp-consent-text-light);
}

.qp-consent__btn--secondary:hover,
.qp-consent__btn--secondary:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.18);
}

.qp-consent__btn--ghost {
  color: var(--qp-consent-accent);
  background: transparent;
  border-color: transparent;
}

.qp-consent__btn--ghost:hover,
.qp-consent__btn--ghost:focus-visible {
  background: rgba(0, 161, 182, 0.08);
  border-color: rgba(0, 161, 182, 0.08);
}

.qp-consent__text-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 0;
  min-height: 42px;
  border: 0;
  background: transparent;
  color: var(--qp-consent-accent);
}

.qp-consent__text-action:hover {
  opacity: 0.84;
}

.qp-consent__text-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-size: 13px;
  line-height: 1;
}

.qp-consent__details {
  position: absolute;
  inset: 0;
  display: none;
  pointer-events: none;
}

#qp-consent.is-details-open .qp-consent__details {
  display: block;
}

.qp-consent__details-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16px;
  width: min(calc(100% - 32px), 1180px);
  margin: 0 auto;
  max-height: min(calc(100vh - 32px), 760px);
  overflow: auto;
  border: 1px solid var(--qp-consent-line-dark);
  border-radius: var(--qp-consent-radius-panel);
  background: var(--qp-consent-surface);
  box-shadow: var(--qp-consent-shadow-panel);
  color: var(--qp-consent-text);
  transform: translateY(32px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
  font-family: var(--tp-ff-body, inherit);
}

#qp-consent.is-details-open .qp-consent__details-panel {
  transform: translateY(0);
  opacity: 1;
  animation: qp-consent-panel-rise 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.qp-consent__details-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 10px;
}

.qp-consent__details-title {
  margin: 0;
  font-family: var(--tp-ff-body, inherit);
  color: var(--tp-theme-primary, #00a1b6);
  font-size: clamp(24px, 2.2vw, 32px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.qp-consent__details-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: rgba(32, 50, 71, 0.06);
  color: var(--qp-consent-text);
  font-size: 22px;
  cursor: pointer;
  transition: all 0.3s ease-out;
}

.qp-consent__details-close:hover,
.qp-consent__details-close:focus-visible {
  background: rgba(0, 161, 182, 0.1);
  color: var(--qp-consent-accent);
}

.qp-consent__details-body {
  padding: 0 22px 18px;
}

.qp-consent__tabs {
  display: flex;
  gap: 8px;
  padding: 0 22px 14px;
  border-bottom: 1px solid var(--qp-consent-line-dark);
}

.qp-consent__tab {
  min-height: 40px;
  padding: 10px 16px;
  border: 1px solid var(--qp-consent-line-dark);
  border-radius: 26px;
  background: rgba(32, 50, 71, 0.04);
  color: var(--qp-consent-text);
  font-family: var(--tp-ff-body, inherit);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

.qp-consent__tab.is-active {
  background: var(--qp-consent-accent);
  border-color: var(--qp-consent-accent);
  color: var(--tp-common-white, #fff);
}

.qp-consent__details-text {
  margin: 0 0 16px;
  color: var(--qp-consent-muted);
  font-family: var(--tp-ff-p, var(--tp-ff-body, inherit));
  font-size: 14px;
  line-height: 1.6;
}

.qp-consent__details-text--compact {
  margin-bottom: 10px;
}

.qp-consent__setting,
.qp-consent__tech {
  padding: 16px;
  border: 1px solid var(--qp-consent-line-dark);
  border-radius: var(--qp-consent-radius);
  background: var(--tp-common-white, #fff);
}

.qp-consent__setting + .qp-consent__setting,
.qp-consent__setting + .qp-consent__tech {
  margin-top: 12px;
}

.qp-consent__setting-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.qp-consent__setting-title,
.qp-consent__tech-title {
  margin: 0;
  color: var(--tp-theme-primary, #00a1b6);
  font-family: var(--tp-ff-body, inherit);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}

.qp-consent__setting-text {
  margin: 8px 0 0;
  color: var(--qp-consent-muted);
  font-family: var(--tp-ff-p, var(--tp-ff-body, inherit));
  font-size: 13px;
  line-height: 1.6;
}

.qp-consent__setting-note {
  margin: 10px 0 0;
  color: var(--qp-consent-text);
  font-family: var(--tp-ff-p, var(--tp-ff-body, inherit));
  font-size: 13px;
  line-height: 1.55;
}

.qp-consent__badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-top: 6px;
  padding: 0 9px;
  border-radius: 50px;
  background: rgba(0, 161, 182, 0.12);
  color: var(--qp-consent-accent);
  font-size: 11px;
  font-weight: 600;
}

.qp-consent__switch-wrap {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}

.qp-consent__switch-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.qp-consent__switch-wrap.is-locked .qp-consent__switch-input {
  cursor: default;
}

.qp-consent__switch-ui {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 30px;
  border-radius: 50px;
  background: rgba(32, 50, 71, 0.14);
  transition: background-color 0.14s ease;
}

.qp-consent__switch-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.14s ease;
}

.qp-consent__switch-input:checked + .qp-consent__switch-ui {
  background: var(--qp-consent-accent);
}

.qp-consent__switch-input:checked + .qp-consent__switch-ui::after {
  transform: translateX(22px);
}

.qp-consent__switch-input:focus-visible + .qp-consent__switch-ui {
  outline: 2px solid var(--qp-consent-accent);
  outline-offset: 2px;
}

.qp-consent__detail-box {
  margin-top: 10px;
  border-top: 1px solid var(--qp-consent-line-dark);
  padding-top: 10px;
}

.qp-consent__detail-box summary {
  list-style: none;
  cursor: pointer;
  color: var(--qp-consent-accent);
  font-family: var(--tp-ff-body, inherit);
  font-size: 13px;
  font-weight: 600;
}

.qp-consent__detail-box summary::-webkit-details-marker {
  display: none;
}

.qp-consent__detail-box summary::after {
  content: "+";
  margin-left: 8px;
}

.qp-consent__detail-box[open] summary::after {
  content: "-";
}

.qp-consent__detail-box p {
  margin: 8px 0 0;
  color: var(--qp-consent-muted);
  font-family: var(--tp-ff-p, var(--tp-ff-body, inherit));
  font-size: 13px;
  line-height: 1.55;
}

.qp-consent__tech {
  margin-top: 12px;
}

.qp-consent__tech-list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--qp-consent-muted);
  font-size: 13px;
  line-height: 1.6;
}

.qp-consent__tech--implementation {
  border-color: var(--qp-consent-line-dark);
  background: var(--tp-common-white, #fff);
}

.qp-consent__tech--declaration {
  margin-top: 12px;
}

.qp-consent__tech-list--implementation {
  margin-top: 0;
}

.qp-consent__policy-links {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 0;
  color: var(--qp-consent-muted);
  font-family: var(--tp-ff-body, inherit);
  font-size: 13px;
}

.qp-consent__policy-links a {
  color: var(--qp-consent-accent);
  text-decoration: none;
}

.qp-consent__policy-links a:hover {
  text-decoration: underline;
}

.qp-consent__details-actions {
  padding: 0 22px 22px;
}

.qp-consent__declaration-body > * + * {
  margin-top: 12px;
}

.qp-consent__declaration-table-wrap {
  margin-top: 10px;
  overflow-x: auto;
}

.qp-consent__declaration-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--tp-ff-p, var(--tp-ff-body, inherit));
  font-size: 12px;
  line-height: 1.5;
}

.qp-consent__declaration-table th,
.qp-consent__declaration-table td {
  padding: 10px 8px;
  border-top: 1px solid var(--qp-consent-line-dark);
  text-align: left;
  vertical-align: top;
}

.qp-consent__declaration-table th {
  color: var(--qp-consent-text);
  font-family: var(--tp-ff-body, inherit);
  font-weight: 600;
}

.qp-consent__declaration-name {
  color: var(--qp-consent-text);
  font-family: var(--tp-ff-body, inherit);
  font-weight: 600;
}

.qp-consent__declaration-meta {
  margin-top: 4px;
  color: var(--qp-consent-muted);
  font-size: 11px;
}

.qp-consent__details-actions .qp-consent__text-action {
  margin-left: auto;
}

#qp-consent :focus-visible {
  outline: 2px solid var(--qp-consent-accent);
  outline-offset: 2px;
}

html[dir="rtl"] .qp-consent__tech-list,
.qp-consent[dir="rtl"] .qp-consent__tech-list {
  padding-left: 0;
  padding-right: 18px;
}

html[dir="rtl"] .qp-consent__detail-box summary::after,
.qp-consent[dir="rtl"] .qp-consent__detail-box summary::after {
  margin-left: 0;
  margin-right: 8px;
}

html[dir="rtl"] .qp-consent__details-actions .qp-consent__text-action,
.qp-consent[dir="rtl"] .qp-consent__details-actions .qp-consent__text-action {
  margin-left: 0;
  margin-right: auto;
}

@media (max-width: 991.98px) {
  .qp-consent__bar {
    grid-template-columns: 1fr;
  }

  .qp-consent__bar-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 767.98px) {
  .qp-consent__bar {
    left: 10px;
    right: 10px;
    bottom: 10px;
    gap: 12px;
    padding: 14px;
    border-radius: var(--qp-consent-radius);
  }

  .qp-consent__title {
    font-size: 24px;
  }

  .qp-consent__bar-text,
  .qp-consent__details-text,
  .qp-consent__setting-text,
  .qp-consent__detail-box p,
  .qp-consent__tech-list,
  .qp-consent__policy-links {
    font-size: 12px;
  }

  .qp-consent__bar-actions,
  .qp-consent__details-actions {
    gap: 8px;
  }

  .qp-consent__btn {
    flex: 1 1 calc(50% - 8px);
    min-height: 40px;
    padding: 0 14px;
  }

  .qp-consent__text-action {
    width: 100%;
    justify-content: flex-start;
  }

  .qp-consent__details-panel {
    width: calc(100% - 20px);
    bottom: 10px;
    max-height: min(calc(100vh - 16px), 86vh);
    border-radius: var(--qp-consent-radius-panel);
  }

  .qp-consent__details-header,
  .qp-consent__tabs,
  .qp-consent__details-body,
  .qp-consent__details-actions {
    padding-left: 16px;
    padding-right: 16px;
  }

  .qp-consent__details-header {
    padding-top: 16px;
  }

  .qp-consent__tabs {
    padding-bottom: 12px;
  }

  .qp-consent__tab {
    flex: 1 1 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .qp-consent__bar,
  .qp-consent__details-panel,
  .qp-consent__overlay,
  .qp-consent__btn,
  .qp-consent__tab,
  .qp-consent__details-close {
    animation: none !important;
    transition: none !important;
  }

  .qp-consent__bar,
  .qp-consent__details-panel {
    transform: none !important;
  }
}
