.thriveo-consent {
  --_bg: #fff;
  --_fg: #1b1b1b;
  --_muted: #5a5a5a;
  --_border: #d0d0d0;
  --_accent: #12d9e3;
  --_on-accent: #222f4c;
  --thriveo-consent-bg: var(--thriveo-color-bg, var(--wp--preset--color--base, var(--_bg)));
  --thriveo-consent-fg: var(--thriveo-color-text, var(--wp--preset--color--contrast, var(--_fg)));
  --thriveo-consent-muted: var(--thriveo-color-muted, var(--_muted));
  --thriveo-consent-border: var(--thriveo-color-border, var(--_border));
  --thriveo-consent-accent: var(--thriveo-color-accent, var(--wp--preset--color--primary, var(--_accent)));
  --thriveo-consent-on-accent: var(--thriveo-color-on-accent, var(--_on-accent));
  --thriveo-consent-radius: var(--thriveo-radius, 12px);
  --thriveo-consent-font: var(--thriveo-font-family, inherit);
  --thriveo-consent-banner-width: 33vw;
  --thriveo-consent-banner-min-width: 300px;
  --thriveo-consent-banner-gap: 16px;
  font-family: var(--thriveo-consent-font);
  color: var(--thriveo-consent-fg);
}

@media (prefers-color-scheme: dark) {
  .thriveo-consent {
    --_bg: #151a26;
    --_fg: #f2f4f8;
    --_muted: #aab2c3;
    --_border: #39425a;
  }
}

.thriveo-consent-unavailable .thriveo-open-consent,
.thriveo-consent-unavailable .thriveo-cookie-preferences,
.thriveo-consent[hidden],
.thriveo-consent [hidden] {
  display: none !important;
}

.thriveo-consent__backdrop {
  position: fixed;
  inset: 0;
  z-index: 99998;
  background: rgb(0 0 0 / 55%);
}

.thriveo-consent__banner,
.thriveo-consent__dialog {
  position: fixed;
  z-index: 99999;
  box-sizing: border-box;
  background: var(--thriveo-consent-bg);
  color: var(--thriveo-consent-fg);
  border: 1px solid var(--thriveo-consent-border);
  box-shadow: 0 8px 32px rgb(0 0 0 / 25%);
  padding: 1.25rem;
  line-height: 1.5;
}

.thriveo-consent--corner .thriveo-consent__banner {
  z-index: 99997;
  top: auto;
  right: var(--thriveo-consent-banner-gap);
  bottom: calc(var(--thriveo-consent-banner-gap) + env(safe-area-inset-bottom, 0px));
  left: auto;
  width: var(--thriveo-consent-banner-width);
  min-width: var(--thriveo-consent-banner-min-width);
  max-width: calc(100vw - 2 * var(--thriveo-consent-banner-gap));
  border-radius: var(--thriveo-consent-radius);
  container-type: inline-size;
}

.thriveo-consent--corner .thriveo-consent__actions {
  flex-wrap: wrap;
}

.thriveo-consent--corner .thriveo-consent__actions .thriveo-consent__button {
  flex: 1 1 0;
  min-width: 0;
  min-height: 2.5rem;
  padding: clamp(0.5rem, 2.5cqw, 0.85rem) clamp(0.35rem, 2cqw, 1rem);
  font-size: clamp(0.8125rem, 3.5cqw, 1rem);
  overflow-wrap: anywhere;
}

.thriveo-consent--corner .thriveo-consent__actions .thriveo-consent__button--link {
  order: 1;
  flex: 0 0 100%;
}

.thriveo-consent--modal .thriveo-consent__banner,
.thriveo-consent__dialog {
  top: 50%;
  left: 50%;
  width: min(36rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  transform: translate(-50%, -50%);
  border-radius: var(--thriveo-consent-radius);
}

.thriveo-consent__title {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  line-height: 1.3;
}

.thriveo-consent__text {
  margin: 0 0 0.75rem;
  color: var(--thriveo-consent-muted);
  font-size: 0.9rem;
}

.thriveo-consent__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 1rem;
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  line-height: 1.4;
}

.thriveo-consent--corner .thriveo-consent__links {
  font-size: clamp(0.6875rem, 2.6cqw, 0.75rem);
}

.thriveo-consent__links a {
  padding: 0.5rem 0.25rem;
  color: var(--thriveo-consent-muted);
  text-decoration: none;
}

.thriveo-consent__links a:hover,
.thriveo-consent__links a:focus-visible {
  color: var(--thriveo-consent-fg);
  text-decoration: underline;
}

.thriveo-consent__actions {
  flex-wrap: wrap;
}

.thriveo-consent--corner .thriveo-consent__actions .thriveo-consent__button {
  flex: 1 1 0;
  min-width: 0;
  min-height: 2.5rem;
  padding: clamp(0.5rem, 2.5cqw, 0.85rem) clamp(0.35rem, 2cqw, 1rem);
  font-size: clamp(0.75rem, 3.5cqw, 1rem);
  overflow-wrap: anywhere;
}

.thriveo-consent--corner .thriveo-consent__actions .thriveo-consent__button--link {
  order: 1;
  flex: 0 0 100%;
}

.thriveo-consent--modal .thriveo-consent__banner,
.thriveo-consent__dialog {
  top: 50%;
  left: 50%;
  width: min(36rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  transform: translate(-50%, -50%);
  border-radius: var(--thriveo-consent-radius);
}

.thriveo-consent__title {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  line-height: 1.3;
}

.thriveo-consent__text {
  margin: 0 0 0.75rem;
  color: var(--thriveo-consent-muted);
  font-size: 0.9rem;
}

.thriveo-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.thriveo-consent__button,
.thriveo-consent-placeholder button {
  flex: 1 1 8rem;
  padding: 0.65rem 1rem;
  border: 2px solid var(--thriveo-consent-accent);
  border-radius: var(--thriveo-consent-radius);
  background: var(--thriveo-consent-accent);
  color: var(--thriveo-consent-on-accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.thriveo-consent__button--secondary {
  border-color: var(--thriveo-consent-fg);
  background: transparent;
  color: var(--thriveo-consent-fg);
}

.thriveo-consent__button--link {
  border-color: transparent;
  background: transparent;
  color: var(--thriveo-consent-fg);
  text-decoration: underline;
}

.thriveo-consent__button:focus-visible,
.thriveo-consent__close:focus-visible,
.thriveo-consent__switch:focus-visible,
.thriveo-consent summary:focus-visible,
.thriveo-consent a:focus-visible {
  outline: 3px solid var(--thriveo-consent-fg);
  outline-offset: 2px;
}

.thriveo-open-consent {
  cursor: pointer;
}

.thriveo-open-consent:focus-visible {
  outline: 2px solid var(--thriveo-color-focus, var(--wp--preset--color--primary, currentcolor));
  outline-offset: 2px;
}

:where(.thriveo-cookie-preferences__button--link) {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  text-decoration: inherit;
}

.thriveo-cookie-preferences__button--link:hover,
.thriveo-cookie-preferences__button--link:focus-visible {
  text-decoration: underline;
}

.thriveo-consent__dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.thriveo-consent__close {
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.thriveo-consent__categories {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.thriveo-consent__category {
  padding: 0.75rem 0;
  border-top: 1px solid var(--thriveo-consent-border);
}

.thriveo-consent__category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.thriveo-consent__always {
  color: var(--thriveo-consent-muted);
  font-size: 0.85rem;
  font-weight: 400;
}

.thriveo-consent__switch {
  width: 1.4rem;
  height: 1.4rem;
  accent-color: var(--thriveo-consent-accent);
}

.thriveo-consent__cookies {
  font-size: 0.85rem;
}

.thriveo-consent__cookies summary {
  cursor: pointer;
}

.thriveo-consent__cookies table {
  width: 100%;
  margin-top: 0.5rem;
  border-collapse: collapse;
}

.thriveo-consent__cookies th,
.thriveo-consent__cookies td {
  padding: 0.35rem;
  border-bottom: 1px solid var(--thriveo-consent-border);
  text-align: left;
  vertical-align: top;
}

.thriveo-consent-placeholder {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem;
  border: 1px dashed var(--thriveo-consent-border);
  border-radius: var(--thriveo-consent-radius, 12px);
  text-align: center;
}

.thriveo-consent-placeholder p {
  margin: 0;
}

.thriveo-consent-placeholder button {
  flex: 0 0 auto;
}

@media (max-width: 909px) {
  .thriveo-consent--corner .thriveo-consent__banner {
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    min-width: 0;
    max-width: 100vw;
    padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
    border-width: 1px 0 0;
    border-radius: var(--thriveo-consent-radius) var(--thriveo-consent-radius) 0 0;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .thriveo-consent__banner,
  .thriveo-consent__dialog {
    animation: thriveo-consent-in 0.2s ease-out;
  }

  @keyframes thriveo-consent-in {
    from {
      opacity: 0;
    }
  }
}
