.ttgx-consent {
  position: fixed;
  z-index: 1000;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  left: max(1rem, env(safe-area-inset-left));
  max-width: 30rem;
  margin-left: auto;
  padding: 0.875rem;
  color: #242424;
  background: #fff;
  border: 1px solid #d5d5d5;
  border-radius: 0.75rem;
  box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.2);
}

.ttgx-consent[hidden] {
  display: none;
}

.ttgx-consent__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.ttgx-consent__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.ttgx-consent__close {
  display: grid;
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  margin: -0.5rem -0.5rem 0 0;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 0.375rem;
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  place-items: center;
  cursor: pointer;
}

.ttgx-consent__close:hover {
  background: #f0f0f0;
}

.ttgx-consent__message {
  margin: 0.375rem 0 0.625rem;
  font-size: 0.875rem;
  line-height: 1.4;
}

.ttgx-consent__details {
  margin-bottom: 0.625rem;
  font-size: 0.8125rem;
}

.ttgx-consent__details summary {
  width: fit-content;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  cursor: pointer;
}

.ttgx-consent__details .ttgx-consent__message {
  font-size: inherit;
}

.ttgx-consent__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.ttgx-consent__button {
  min-height: 2.25rem;
  padding: 0.375rem 0.75rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid #333;
  border-radius: 0.375rem;
  cursor: pointer;
}

.ttgx-consent__button--primary {
  color: #fff;
  background: #333;
}

.ttgx-consent__button--secondary {
  color: #242424;
  background: #fff;
}

.ttgx-consent__button:focus-visible,
.ttgx-consent__close:focus-visible,
.ttgx-cookie-settings:focus-visible {
  outline: 3px solid #1d70b8;
  outline-offset: 2px;
}

.ttgx-cookie-settings {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

@media (max-width: 32rem) {
  .ttgx-consent__actions {
    flex-direction: column-reverse;
  }

  .ttgx-consent__button {
    width: 100%;
  }
}
