.cookie-banner {
  position: fixed;
  right: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  left: auto;
  z-index: 4015;
  box-sizing: border-box;
  width: min(820px, calc(100vw - 32px));
  max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  padding: 16px 20px;
  overflow: auto;
  color: #3a2116;
  background: #f7f3ed;
  border: 0;
  border-top: 1px solid rgba(58, 33, 22, .16);
  border-radius: 0;
  box-shadow: none;
  transform: translateX(50%);
  animation: cookieConsentEnter .24s ease;
}

.cookie-banner[hidden],
.cookie-btn[hidden] {
  display: none;
}

.cookie-banner--saindo {
  animation: cookieConsentExit .22s ease forwards;
}

@keyframes cookieConsentEnter {
  from { opacity: 0; transform: translate(50%, 10px); }
  to { opacity: 1; transform: translate(50%, 0); }
}

@keyframes cookieConsentExit {
  from { opacity: 1; transform: translate(50%, 0); }
  to { opacity: 0; transform: translate(50%, 8px); }
}

.cookie-inner {
  display: grid;
  gap: 12px;
  width: 100%;
}

.cookie-texto {
  display: grid;
  min-width: 0;
  gap: 6px;
  color: #3a2116;
}

.cookie-texto > strong {
  font-family: 'Bodoni Moda', Georgia, 'Times New Roman', serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.1;
}

.cookie-texto > p {
  max-width: 720px;
  margin: 0;
  color: #6b5b50;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
}

.cookie-link {
  width: fit-content;
  min-height: 24px;
  color: #3a2116;
  font-size: 13px;
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-preferencias {
  display: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 6px 0 0;
  padding: 12px 0 0;
  border: 0;
  border-top: 1px solid rgba(58, 33, 22, .12);
}

.cookie-preferencias:not([hidden]) {
  display: grid;
}

.cookie-preferencias legend {
  float: none;
  width: auto;
  margin: 0 0 8px;
  padding: 0;
  color: #3a2116;
  font-size: 13px;
  font-weight: 600;
}

.cookie-preferencia {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  color: #3a2116;
  font-size: 13px;
  line-height: 1.35;
}

.cookie-preferencia input {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin: 1px 0 0;
  accent-color: #3a2116;
}

.cookie-preferencia span {
  display: grid;
  gap: 3px;
}

.cookie-preferencia strong {
  font-size: 13px;
  font-weight: 600;
}

.cookie-preferencia small {
  color: #6b5b50;
  font-size: 12px;
  line-height: 1.35;
}

.cookie-acoes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 8px;
}

.cookie-btn {
  display: inline-flex;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  color: #3a2116;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
  transition: color .18s ease, background-color .18s ease, border-color .18s ease;
}

.cookie-btn--recusar,
.cookie-btn--secundario,
.cookie-btn--salvar {
  background: transparent;
}

.cookie-btn--aceitar {
  color: #f7f3ed;
  background: #3a2116;
  border-color: #3a2116;
}

.cookie-banner--expandido .cookie-btn--salvar {
  grid-column: 1 / -1;
}

.cookie-btn--aceitar:hover {
  color: #f7f3ed;
  background: #573522;
  border-color: #573522;
}

.cookie-btn--recusar:hover,
.cookie-btn--secundario:hover,
.cookie-btn--salvar:hover {
  background: rgba(58, 33, 22, .06);
}

.cookie-btn:focus-visible,
.cookie-link:focus-visible,
.cookie-preferencia input:focus-visible {
  outline: 2px solid #735c50;
  outline-offset: 2px;
}

.cookie-preferencia input:disabled {
  opacity: 1;
}

.cookie-preferences-link {
  min-height: 44px;
  padding: 8px 0;
  color: inherit;
  background: transparent;
  border: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

#contato.site-footer-luxury .footer-accordion__content > .cookie-preferences-link {
  display: block;
  color: #252525;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

#contato.site-footer-luxury .footer-accordion__content > .cookie-preferences-link:hover {
  color: #6c4a32;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 576px) {
  .cookie-banner {
    right: 50%;
    bottom: 0;
    width: 100%;
    max-height: calc(100dvh - env(safe-area-inset-top));
    padding: 14px 16px max(14px, env(safe-area-inset-bottom));
    border-top: 1px solid rgba(58, 33, 22, .16);
  }

  .cookie-inner {
    gap: 10px;
  }

  .cookie-texto {
    gap: 5px;
  }

  .cookie-texto > strong {
    font-size: 19px;
  }

  .cookie-texto > p {
    font-size: 13px;
    line-height: 1.4;
  }

  .cookie-preferencias {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .cookie-acoes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
  }

  .cookie-banner--expandido .cookie-acoes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cookie-btn {
    min-height: 44px;
    padding-inline: 6px;
    font-size: 13px;
  }

  .cookie-banner--expandido .cookie-btn--salvar {
    grid-column: 1 / -1;
  }

  #contato.site-footer-luxury .footer-accordion__content > .cookie-preferences-link {
    min-height: 44px;
    padding: 10px 0;
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-banner,
  .cookie-banner--saindo {
    animation: none;
  }
}
