:root {
  --analytics-consent-height: 0px;
}

.analytics-consent {
  position: fixed;
  inset-inline: 0;
  inset-block-end: 0;
  z-index: 40;
  padding: 18px max(20px, env(safe-area-inset-right)) calc(18px + env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  color: #1f2b26;
  background: #fffaf1;
  border-block-start: 1px solid rgba(15, 99, 87, 0.2);
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

.analytics-consent__inner {
  width: min(100%, 1280px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px clamp(28px, 5vw, 72px);
}

.analytics-consent__copy {
  min-width: 0;
}

.analytics-consent__title {
  margin: 0 0 4px;
  color: #0f6357;
  font-family: 'Newsreader', 'Fraunces', Georgia, 'Times New Roman', serif;
  font-size: clamp(1.25rem, 1.5vw, 1.5rem);
  font-weight: 600;
  line-height: 1.15;
}

.analytics-consent__text {
  max-width: 72ch;
  margin: 0;
  color: #344a45;
  font-size: 0.9375rem;
  line-height: 1.5;
  overflow-wrap: break-word;
}

.analytics-consent__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.analytics-consent__button,
.analytics-consent__preferences {
  min-height: 44px;
  border-radius: 999px;
  font: 600 0.875rem/1.2 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  cursor: pointer;
}

.analytics-consent__button {
  padding: 11px 18px;
  border: 1px solid #0f6357;
}

.analytics-consent__button--accept {
  color: #1f2b26;
  background: #e2703f;
  border-color: #e2703f;
}

.analytics-consent__button--continue {
  color: #0f6357;
  background: transparent;
}

.analytics-consent__button:hover,
.analytics-consent__preferences:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.analytics-consent__button:focus-visible,
.analytics-consent__preferences:focus-visible {
  outline: 3px solid #e2703f;
  outline-offset: 3px;
}

.analytics-consent__preferences {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-block-start: 14px;
  padding: 9px 14px;
  color: inherit;
  background: transparent;
  border: 1px solid currentColor;
}

footer > .analytics-consent__preferences {
  position: static;
}

.analytics-consent__preferences[hidden] {
  display: none;
}

body.analytics-consent-open {
  padding-block-end: var(--analytics-consent-height);
}

.analytics-consent-open .gali-voltar-topo {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.analytics-consent-open .gc {
  min-height: calc(100svh - var(--analytics-consent-height));
}

.analytics-consent-open .gc-corpo::after {
  content: '';
  display: block;
  height: var(--analytics-consent-height);
}

.analytics-consent-open .gc-data-form {
  scroll-margin-block-end: var(--analytics-consent-height);
}

@media (max-width: 767px) {
  .analytics-consent {
    padding-block-start: 16px;
  }

  .analytics-consent__inner {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .analytics-consent__actions {
    display: grid;
    grid-template-columns: 1fr;
  }

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

@media (min-width: 380px) and (max-width: 767px) {
  .analytics-consent__actions {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr);
  }

  .analytics-consent__button {
    padding-inline: 12px;
    font-size: 0.8125rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .analytics-consent,
  .analytics-consent__button,
  .analytics-consent__preferences {
    scroll-behavior: auto;
    transition: none;
  }
}
