/* Consent banner and analytics UI — keep separate from the main site styles. */

body.has-consent-banner {
  padding-bottom: 7.5rem;
}

.analytics-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  padding: 0.85rem clamp(1rem, 3vw, 1.5rem) 1rem;
  pointer-events: none;
}

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

.analytics-consent-inner {
  pointer-events: auto;
  max-width: 46rem;
  margin: 0 auto;
  display: grid;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  background: #fff;
  color: #1a2740;
  border: 1px solid rgba(26, 39, 64, 0.12);
  border-radius: 0.9rem;
  box-shadow: 0 12px 32px rgba(26, 39, 64, 0.1);
}

.analytics-consent-text {
  margin: 0;
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #3a4a63;
}

.analytics-consent-text a {
  color: #3f7a68;
  text-underline-offset: 0.15em;
}

.analytics-consent-text a:hover {
  color: #336456;
}

.analytics-consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.analytics-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.55rem;
  padding: 0.55rem 1rem;
  border-radius: 0.7rem;
  border: 1px solid transparent;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.analytics-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(63, 122, 104, 0.35);
}

.analytics-btn-allow {
  background: #3f7a68;
  color: #fff;
}

.analytics-btn-allow:hover {
  background: #336456;
}

.analytics-btn-deny {
  background: #fff;
  color: #1a2740;
  border-color: rgba(26, 39, 64, 0.14);
}

.analytics-btn-deny:hover {
  border-color: rgba(63, 122, 104, 0.4);
  color: #336456;
}

.site-footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.25rem;
  margin: 0.85rem 0 0;
  padding: 0;
  list-style: none;
}

.site-footer .footer-links a {
  color: #5b6b82;
  font-size: 0.88rem;
  text-decoration: none;
}

.site-footer .footer-links a:hover {
  color: #3f7a68;
}

.site-footer .footer-links a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(63, 122, 104, 0.35);
  border-radius: 0.25rem;
}

@media (max-width: 640px) {
  body.has-consent-banner {
    padding-bottom: calc(8rem + env(safe-area-inset-bottom, 0px));
  }

  .analytics-consent {
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom, 0px));
  }

  .analytics-consent-inner {
    width: calc(100% - 16px);
    max-width: none;
    box-sizing: border-box;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(26, 39, 64, 0.08);
  }

  .analytics-consent-text {
    font-size: 14px;
    line-height: 1.35;
  }

  .analytics-consent-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .analytics-btn {
    width: 100%;
    min-height: 46px;
    height: 46px;
    padding: 0 8px;
    font-size: 14px;
    white-space: nowrap;
  }
}

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