.analytics-consent {
  position: fixed;
  z-index: 1000;
  left: max(12px, env(safe-area-inset-left, 0px));
  right: max(12px, env(safe-area-inset-right, 0px));
  bottom: max(12px, env(safe-area-inset-bottom, 0px));
  width: auto;
  max-width: 760px;
  max-height: 60vh;
  max-height: 60svh;
  margin: 0 auto;
  padding: 20px 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 23px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #b9c2ac;
  border-radius: 5px;
  background: #f6f5f1;
  color: #232620;
  box-shadow: 0 6px 32px #20271f24;
  font-family: 'DM Sans', sans-serif;
}

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

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

.analytics-consent__copy h2 {
  margin: 0 0 7px;
  font-family: 'Manrope', 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.3px;
  line-height: 1.4;
}

.analytics-consent__copy p {
  margin: 0;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.75;
  color: #59614f;
  overflow-wrap: anywhere;
}

.analytics-consent__copy p + p {
  margin-top: 7px;
}

.analytics-consent__copy a {
  color: #465638;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.analytics-consent__privacy {
  display: inline-block;
  margin: 8px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #465638;
  font: inherit;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.7;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.analytics-consent__actions,
.analytics-preferences__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 10px;
}

.analytics-consent__actions {
  width: 238px;
}

.analytics-consent__actions button,
.analytics-preferences__actions button {
  min-height: 45px;
  width: 100%;
  margin: 0;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #879672;
  border-radius: 3px;
  background: #d4ddbd;
  color: #273020;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 550;
  line-height: 1.45;
  text-align: center;
  white-space: normal;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
  transform: none;
}

.analytics-consent__actions button:hover,
.analytics-preferences__actions button:hover {
  background: #e2e8d2;
  border-color: #596746;
  transform: none;
}

.analytics-consent__actions button:disabled,
.analytics-preferences__actions button:disabled {
  opacity: .65;
  cursor: wait;
}

.analytics-consent button:focus-visible,
.analytics-consent a:focus-visible,
.analytics-settings-button:focus-visible,
.analytics-preferences button:focus-visible,
.analytics-preferences a:focus-visible {
  outline: 2px solid #596746;
  outline-offset: 4px;
}

.analytics-settings-button {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  line-height: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.analytics-preferences {
  width: min(590px, calc(100% - 32px));
}

.analytics-preferences__actions {
  margin-top: 27px;
}

.analytics-preferences .analytics-preferences__status {
  margin-top: 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  line-height: 1.75;
  color: #4f603f;
  overflow-wrap: anywhere;
}

.analytics-preferences__status:empty {
  display: none;
}

@media (max-width: 680px) {
  .analytics-consent {
    grid-template-columns: minmax(0, 1fr);
    gap: 15px;
    padding: 18px;
  }

  .analytics-consent__copy h2 {
    font-size: 16px;
  }

  .analytics-consent__copy p {
    font-size: 12px;
    line-height: 1.7;
  }

  .analytics-consent__actions {
    width: 100%;
  }

  .analytics-consent__actions button,
  .analytics-preferences__actions button {
    min-height: 46px;
  }

  .analytics-preferences__actions {
    gap: 10px;
    margin-top: 23px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .analytics-consent *,
  .analytics-preferences * {
    transition: none !important;
  }
}
