:root {
  --tlx-green: #80c37e;
  --tlx-green-hover: #70b86f;
  --tlx-text: #202522;
  --tlx-muted: #656b67;
  --tlx-border: #e1e5e2;
  --tlx-white: #ffffff;
  --tlx-shadow: 0 18px 60px rgba(18, 27, 21, 0.2);
}

html.tlx-consent-is-open,
html.tlx-consent-is-open body {
  overflow: hidden !important;
}

.tlx-consent,
.tlx-consent * {
  box-sizing: border-box;
}

.tlx-consent {
  position: relative;
  z-index: 2147483000;
  color: var(--tlx-text);
  font-family: inherit;
  line-height: 1.5;
  text-align: left;
}

.tlx-consent [hidden] {
  display: none !important;
}

.tlx-consent button,
.tlx-consent input {
  font-family: inherit;
}

.tlx-consent button {
  appearance: none;
  text-transform: none;
  letter-spacing: normal;
  box-shadow: none;
}

.tlx-consent .screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* The initial decision screen blocks interaction with the site, while keeping the actual UI compact. */
.tlx-consent__gate {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  padding: 22px;
  background: rgba(16, 20, 17, 0.56);
}

.tlx-consent--position-bottom-left .tlx-consent__gate {
  align-items: flex-end;
  justify-content: flex-start;
}

.tlx-consent--position-bottom-right .tlx-consent__gate {
  align-items: flex-end;
  justify-content: flex-end;
}

.tlx-consent--position-center .tlx-consent__gate {
  align-items: center;
  justify-content: center;
}

.tlx-consent__banner {
  position: relative;
  width: min(410px, calc(100vw - 44px));
  padding: 21px;
  border: 1px solid var(--tlx-border);
  border-radius: 12px;
  background: var(--tlx-white);
  box-shadow: var(--tlx-shadow);
}

.tlx-consent__brand {
  width: fit-content;
  margin-bottom: 10px;
  color: var(--tlx-green);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.tlx-consent__title,
.tlx-consent__modal-title,
.tlx-consent__category h3,
.tlx-consent__details h3 {
  margin: 0;
  color: var(--tlx-text);
  font-family: inherit;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: none;
}

.tlx-consent__title {
  padding-right: 38px;
  font-size: 19px;
  line-height: 1.25;
}

.tlx-consent__text {
  margin: 8px 0 18px;
  color: var(--tlx-muted);
  font-size: 14px;
  line-height: 1.55;
}

.tlx-consent__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.tlx-consent__button {
  min-height: 43px;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.tlx-consent__button:focus-visible,
.tlx-consent__icon-button:focus-visible,
.tlx-consent__settings-button:focus-visible,
.tlx-consent__switch input:focus-visible + span,
.tlx-consent-shortcode-button:focus-visible {
  outline: 3px solid rgba(128, 195, 126, 0.42);
  outline-offset: 2px;
}

.tlx-consent__button:active {
  transform: translateY(1px);
}

.tlx-consent__button--accept {
  border-color: var(--tlx-green);
  background: var(--tlx-green);
  color: #102011;
}

.tlx-consent__button--accept:hover {
  border-color: var(--tlx-green-hover);
  background: var(--tlx-green-hover);
}

.tlx-consent__button--reject {
  border: 2px solid #667069;
  background: var(--tlx-white);
  color: var(--tlx-text);
}

.tlx-consent__button--reject:hover {
  border-color: #3f4842;
  background: #f8faf8;
}

.tlx-consent__button--secondary {
  border-color: #d3d9d5;
  background: var(--tlx-white);
  color: var(--tlx-text);
}

.tlx-consent__button--secondary:hover {
  border-color: #aeb7b1;
  background: #f8faf8;
}

.tlx-consent__button--text {
  grid-column: 1 / -1;
  min-height: auto;
  padding: 6px 8px 0;
  border: 0;
  background: transparent;
  color: #405f44;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tlx-consent__button--text:hover {
  background: transparent;
  color: #28462d;
}

.tlx-consent__icon-button {
  position: relative;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--tlx-border);
  border-radius: 8px;
  background: var(--tlx-white);
  cursor: pointer;
}

.tlx-consent__icon-button::before,
.tlx-consent__icon-button::after {
  position: absolute;
  left: 9px;
  top: 15px;
  width: 14px;
  height: 1.5px;
  background: #343b36;
  content: '';
}

.tlx-consent__icon-button::before {
  transform: rotate(45deg);
}

.tlx-consent__icon-button::after {
  transform: rotate(-45deg);
}

.tlx-consent__banner-close {
  position: absolute;
  top: 12px;
  right: 12px;
}

.tlx-consent__overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483001;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(16, 20, 17, 0.62);
}

.tlx-consent__modal {
  display: flex;
  flex-direction: column;
  width: min(700px, 100%);
  max-height: min(860px, calc(100vh - 36px));
  overflow: hidden;
  border: 1px solid var(--tlx-border);
  border-radius: 14px;
  background: var(--tlx-white);
  box-shadow: var(--tlx-shadow);
}

.tlx-consent__modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 24px 18px;
  border-bottom: 1px solid var(--tlx-border);
}

.tlx-consent__modal-title {
  font-size: 24px;
  line-height: 1.2;
}

.tlx-consent__modal-intro {
  max-width: 560px;
  margin: 8px 0 0;
  color: var(--tlx-muted);
  font-size: 14px;
}

.tlx-consent__modal-body {
  overflow-y: auto;
  padding: 20px 24px 24px;
}

.tlx-consent__category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 17px 0;
  border-bottom: 1px solid var(--tlx-border);
}

.tlx-consent__category:first-child {
  padding-top: 0;
}

.tlx-consent__category-copy {
  min-width: 0;
}

.tlx-consent__category h3,
.tlx-consent__details h3 {
  font-size: 16px;
}

.tlx-consent__category p,
.tlx-consent__details p {
  margin: 5px 0 0;
  color: var(--tlx-muted);
  font-size: 13px;
}

.tlx-consent__always-active {
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid #d7e5d8;
  border-radius: 999px;
  background: #ffffff;
  color: #467a47;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.tlx-consent__switch {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.tlx-consent__switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.tlx-consent__switch > span[aria-hidden='true'] {
  position: relative;
  display: block;
  width: 46px;
  height: 26px;
  border: 1px solid #cfd5d1;
  border-radius: 999px;
  background: #e8ece9;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.tlx-consent__switch > span[aria-hidden='true']::after {
  position: absolute;
  left: 3px;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  content: '';
  transition: transform 160ms ease;
}

.tlx-consent__switch input:checked + span {
  border-color: var(--tlx-green);
  background: var(--tlx-green);
}

.tlx-consent__switch input:checked + span::after {
  transform: translateX(20px);
}

.tlx-consent__details {
  margin-top: 22px;
  padding: 18px;
  border: 1px solid var(--tlx-border);
  border-radius: 10px;
  background: #ffffff;
}

.tlx-consent__meta {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.tlx-consent__meta div {
  display: grid;
  grid-template-columns: minmax(150px, 0.75fr) 1.25fr;
  gap: 14px;
}

.tlx-consent__meta dt,
.tlx-consent__meta dd {
  margin: 0;
  font-size: 13px;
}

.tlx-consent__meta dt {
  color: var(--tlx-muted);
}

.tlx-consent__meta dd {
  color: var(--tlx-text);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.tlx-consent__privacy-policy {
  display: inline-block;
  margin-top: 14px;
  color: #3e7440;
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tlx-consent__modal-footer {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  gap: 9px;
  padding: 16px 24px;
  border-top: 1px solid var(--tlx-border);
  background: #ffffff;
}

.tlx-consent__settings-button {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 2147482999;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid #d8ddd9;
  border-radius: 8px;
  background: #ffffff;
  color: #414843;
  box-shadow: 0 5px 18px rgba(24, 34, 27, 0.1);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.tlx-consent-shortcode-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

@media (max-width: 620px) {
  .tlx-consent__gate {
    padding: 12px;
  }

  .tlx-consent--position-bottom-left .tlx-consent__gate,
  .tlx-consent--position-bottom-right .tlx-consent__gate {
    align-items: flex-end;
    justify-content: center;
  }

  .tlx-consent__banner {
    width: 100%;
    padding: 18px;
  }

  .tlx-consent__overlay {
    align-items: end;
    padding: 0;
  }

  .tlx-consent__modal {
    width: 100%;
    max-height: 92vh;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 14px 14px 0 0;
  }

  .tlx-consent__modal-header,
  .tlx-consent__modal-body {
    padding-right: 18px;
    padding-left: 18px;
  }

  .tlx-consent__modal-title {
    font-size: 21px;
  }

  .tlx-consent__category {
    gap: 15px;
  }

  .tlx-consent__meta div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .tlx-consent__modal-footer {
    grid-template-columns: 1fr 1fr;
    padding: 14px 18px calc(14px + env(safe-area-inset-bottom));
  }

  .tlx-consent__modal-footer .tlx-consent__button--reject {
    grid-column: 1 / -1;
    order: 3;
  }
}

@media (max-width: 430px) {
  .tlx-consent__actions {
    grid-template-columns: 1fr;
  }

  .tlx-consent__button--text {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tlx-consent__button,
  .tlx-consent__switch > span[aria-hidden='true'],
  .tlx-consent__switch > span[aria-hidden='true']::after {
    transition: none;
  }
}
