.cookie-settings-link {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #74c69d;
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-settings-link:focus-visible,
.ynf-cookie-button:focus-visible,
.ynf-cookie-close:focus-visible,
.ynf-cookie-policy-link:focus-visible,
.ynf-cookie-switch input:focus-visible + span {
  outline: 3px solid #74c69d;
  outline-offset: 4px;
}

.legal-identity-pending {
  margin-bottom: 9px !important;
  color: #f4dda0;
}

.ynf-cookie-banner,
.ynf-cookie-modal {
  font-family: Arial, Helvetica, sans-serif;
}

.ynf-cookie-banner[hidden],
.ynf-cookie-overlay[hidden] {
  display: none !important;
}

.ynf-cookie-banner {
  position: fixed;
  z-index: 5000;
  right: 16px;
  bottom: max(16px, env(safe-area-inset-bottom));
  left: 16px;
  width: min(720px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px;
  border: 1px solid rgba(116, 198, 157, .38);
  border-radius: 20px;
  background: rgba(5, 17, 13, .985);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .58);
  color: #f4f7f5;
}

.ynf-cookie-banner h2,
.ynf-cookie-modal h2 {
  margin: 0 0 8px;
  color: #f4f7f5;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  line-height: 1.2;
}

.ynf-cookie-banner p,
.ynf-cookie-modal p {
  margin: 0;
  color: #b8c7bf;
  font-size: 14px;
  line-height: 1.55;
}

.ynf-cookie-policy-link {
  color: #9ce0bc;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ynf-cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 16px;
}

.ynf-cookie-button {
  min-height: 48px;
  flex: 1 1 150px;
  padding: 11px 16px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 13px;
  background: rgba(255, 255, 255, .06);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
}

.ynf-cookie-button:hover {
  background: rgba(255, 255, 255, .11);
}

.ynf-cookie-button-primary {
  border-color: transparent;
  background: linear-gradient(135deg, #2d6a4f, #40916c);
}

.ynf-cookie-button-primary:hover {
  background: linear-gradient(135deg, #34785b, #4aa77d);
}

.ynf-cookie-overlay {
  position: fixed;
  z-index: 5100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, .72);
}

.ynf-cookie-modal {
  position: relative;
  width: min(620px, 100%);
  max-height: min(720px, calc(100dvh - 36px));
  overflow: auto;
  padding: 25px;
  border: 1px solid rgba(116, 198, 157, .35);
  border-radius: 22px;
  background: #07150f;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .66);
  color: #f4f7f5;
}

.ynf-cookie-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 12px;
  background: rgba(255, 255, 255, .06);
  color: #fff;
  cursor: pointer;
  font-size: 24px;
}

.ynf-cookie-category {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 14px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 15px;
  background: rgba(255, 255, 255, .035);
}

.ynf-cookie-category strong {
  display: block;
  margin-bottom: 4px;
  color: #fff;
  font-size: 15px;
}

.ynf-cookie-status {
  color: #9ce0bc;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.ynf-cookie-switch {
  position: relative;
  display: inline-flex;
  width: 52px;
  height: 30px;
  cursor: pointer;
}

.ynf-cookie-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.ynf-cookie-switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #465049;
  transition: background .2s ease;
}

.ynf-cookie-switch span::after {
  position: absolute;
  width: 22px;
  height: 22px;
  top: 4px;
  left: 4px;
  border-radius: 50%;
  background: #fff;
  content: "";
  transition: transform .2s ease;
}

.ynf-cookie-switch input:checked + span {
  background: #40916c;
}

.ynf-cookie-switch input:checked + span::after {
  transform: translateX(22px);
}

.ynf-cookie-modal-note {
  margin-top: 16px !important;
  font-size: 13px !important;
}

body.ynf-cookie-modal-open {
  overflow: hidden;
}

@media (max-width: 560px) {
  .ynf-cookie-banner {
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 10px;
    width: calc(100% - 20px);
    padding: 17px;
  }

  .ynf-cookie-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .ynf-cookie-button {
    width: 100%;
  }

  .ynf-cookie-modal {
    padding: 22px 17px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ynf-cookie-switch span,
  .ynf-cookie-switch span::after {
    transition: none;
  }
}

/*
 * Alinhamento do rodape legal.
 * Todos os links e o botao de preferencias recebem a mesma caixa e o mesmo
 * alinhamento vertical. No mobile, a grade evita que "Configurar cookies"
 * fique isolado ou pareca deslocado em relacao aos demais itens.
 */
footer .footer-links,
footer .legal-footer-links {
  align-items: center;
}

footer .footer-links > a,
footer .footer-links > .cookie-settings-link,
footer .legal-footer-links > a,
footer .legal-footer-links > .cookie-settings-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 0;
  padding: 4px 2px;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
}

@media (max-width: 700px) {
  footer .footer-links,
  footer .legal-footer-links {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
    width: min(100%, 520px);
    margin-right: auto;
    margin-left: auto;
  }

  footer .footer-links > a,
  footer .footer-links > .cookie-settings-link,
  footer .legal-footer-links > a,
  footer .legal-footer-links > .cookie-settings-link {
    grid-column: span 2;
    width: 100%;
    min-width: 0;
    padding: 6px 3px;
    white-space: normal;
  }

  footer .legal-footer-links > :nth-child(4),
  footer .legal-footer-links > :nth-child(5),
  footer .legal-footer-links > :nth-child(6),
  footer .legal-footer-links > :nth-child(7) {
    grid-column: span 3;
  }
}
