.analytics-consent[hidden] {
  display: none !important;
}

.analytics-consent {
  position: fixed;
  z-index: 10000;
  right: clamp(0.75rem, 2vw, 1.5rem);
  bottom: clamp(0.75rem, 2vw, 1.5rem);
  left: clamp(0.75rem, 2vw, 1.5rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  width: min(600px, calc(100vw - clamp(1.5rem, 4vw, 3rem)));
  margin-left: auto;
  padding: 0.7rem 0.7rem 0.7rem 1.05rem;
  color: #f7f5f0;
  background: rgba(20, 20, 18, 0.96);
  border: 1px solid rgba(247, 245, 240, 0.16);
  border-radius: 0.85rem;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.24);
  /* Toma la tipografía de cada página (Geist en la home). */
  font-family: inherit;
  opacity: 0;
  transform: translateY(0.8rem);
  transition: opacity 180ms ease, transform 220ms ease;
}

.analytics-consent.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.analytics-consent__description {
  margin: 0;
  color: rgba(247, 245, 240, 0.8);
  font-size: 0.8rem;
  line-height: 1.45;
}

.analytics-consent__link {
  color: #d98a64;
  white-space: nowrap;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.analytics-consent__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.analytics-consent button {
  min-height: 2.25rem;
  padding: 0.55rem 0.8rem;
  color: #f7f5f0;
  background: transparent;
  border: 1px solid rgba(247, 245, 240, 0.32);
  border-radius: 999px;
  font: 600 0.7rem/1 "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}

.analytics-consent button:hover,
.analytics-consent button:focus-visible {
  border-color: #f7f5f0;
  outline: none;
}

.analytics-consent button.analytics-consent__accept {
  color: #171715;
  background: #f7f5f0;
  border-color: #f7f5f0;
}

.analytics-consent button.analytics-consent__accept:hover,
.analytics-consent button.analytics-consent__accept:focus-visible {
  background: #d98a64;
  border-color: #d98a64;
}

@media (max-width: 640px) {
  .analytics-consent {
    grid-template-columns: 1fr;
    gap: 0.7rem;
    align-items: stretch;
    padding: 0.85rem;
  }

  .analytics-consent__actions {
    justify-content: stretch;
  }

  .analytics-consent button {
    flex: 1 1 10rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .analytics-consent {
    transition: none;
  }
}
