/* ==========================================================================
   Aviso de consentimento de cookies (prefixo .lt-consent)
   Autocontido: usa só os tokens de cor e fonte de base.css, sem --lt-u, para
   funcionar igual nas páginas do chrome e na página do curso.
   Fica abaixo do cursor da marca (10001/10002) e acima de todo o resto.
   ========================================================================== */
.lt-consent,
.lt-consent [hidden] {
  box-sizing: border-box;
}

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

.lt-consent {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10000;
  width: min(440px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 24px;
  color: var(--white);
  background: var(--ink);
  font-family: var(--sans);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 240ms ease, transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.lt-consent.is-visible {
  opacity: 1;
  transform: none;
}

.lt-consent__title {
  margin: 0 0 10px;
  padding-right: 36px;
  color: var(--white);
  font-family: var(--display);
  font-size: 32px;
  font-weight: 400;
  line-height: 0.95;
  text-transform: uppercase;
}

.lt-consent__title:focus {
  outline: none;
}

.lt-consent__text {
  margin: 0;
  color: var(--gray-200);
  font-size: 14px;
  line-height: 1.5;
}

.lt-consent__text a {
  color: var(--white);
  text-decoration: underline;
  text-decoration-color: var(--green);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.lt-consent__text a:hover {
  color: var(--green);
}

/* Categorias */
.lt-consent__prefs {
  margin-top: 18px;
}

.lt-consent__option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 16px;
  row-gap: 2px;
  align-items: center;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.07);
}

.lt-consent__option + .lt-consent__option {
  margin-top: 6px;
}

.lt-consent__name {
  grid-column: 1;
  color: var(--white);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
}

.lt-consent__desc {
  grid-column: 1;
  color: var(--gray-400);
  font-size: 13px;
  line-height: 1.4;
}

.lt-consent__switch {
  grid-column: 2;
  grid-row: 1 / span 2;
  position: relative;
  width: 40px;
  height: 22px;
  margin: 0;
  background: var(--gray-700);
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: background-color 160ms ease;
}

.lt-consent__switch::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: var(--white);
  transition: transform 160ms ease, background-color 160ms ease;
}

.lt-consent__switch:checked {
  background: var(--green);
}

.lt-consent__switch:checked::before {
  background: var(--black);
  transform: translateX(18px);
}

.lt-consent__switch:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Ações */
.lt-consent__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
}

.lt-consent__btn {
  flex: 1 1 auto;
  min-height: 44px;
  padding: 12px 16px;
  border: 0;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

/* Superfície escura: verde vira branco e branco vira verde no hover. */
.lt-consent__btn--primary {
  color: var(--black);
  background: var(--green);
}

.lt-consent__btn--primary:hover {
  background: var(--white);
}

.lt-consent__btn--secondary {
  color: var(--black);
  background: var(--white);
}

.lt-consent__btn--secondary:hover {
  background: var(--green);
}

.lt-consent__link {
  padding: 12px 4px;
  border: 0;
  color: var(--gray-200);
  background: none;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.lt-consent__link:hover {
  color: var(--green);
}

.lt-consent__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  color: var(--gray-400);
  background: none;
  cursor: pointer;
}

.lt-consent__close::before,
.lt-consent__close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 2px;
  margin: -1px 0 0 -7px;
  background: currentColor;
}

.lt-consent__close::before {
  transform: rotate(45deg);
}

.lt-consent__close::after {
  transform: rotate(-45deg);
}

.lt-consent__close:hover {
  color: var(--white);
}

.lt-consent__btn:focus-visible,
.lt-consent__link:focus-visible,
.lt-consent__close:focus-visible,
.lt-consent__switch:focus-visible,
.lt-consent__text a:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

/* Botão "Preferências de cookies" (rodapé e política): parece link. */
.lt-consent-open {
  display: inline;
  padding: 0;
  border: 0;
  color: var(--gray-400);
  background: none;
  font: inherit;
  line-height: inherit;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color 160ms ease;
}

.lt-consent-open:hover {
  color: var(--green);
}

.lt-consent-open:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

@media (max-width: 620px) {
  .lt-consent {
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 88vh;
    padding: 20px 16px calc(16px + env(safe-area-inset-bottom));
  }

  .lt-consent__title {
    font-size: 28px;
  }

  .lt-consent__btn {
    flex-basis: 100%;
  }

  .lt-consent__link {
    width: 100%;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lt-consent {
    transition: none;
  }
}
