/*
 * Cookie consent banner -- production styles.
 *
 * Consent + GA4 Analytics Implementation sprint. Self-contained
 * (imports the shared design tokens directly, same convention as
 * components/cta/cta.css) since this renders on every page, not just
 * one page's own stylesheet. Fixed near the bottom of the viewport,
 * never a full-screen modal/backdrop -- small, calm, professional, per
 * the approved spec.
 */

@import url("../../config/tokens/tokens.generated.css");

.sr-cookie-consent {
  position: fixed;
  left: var(--space-m);
  right: var(--space-m);
  bottom: var(--space-m);
  z-index: 1000;
  box-sizing: border-box;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-m);
  padding: var(--space-m) var(--space-l);
  border-radius: var(--radius-medium);
  border: 1px solid var(--color-border);
  background: var(--color-background); /* cream, per spec */
  color: var(--color-text-primary); /* charcoal, per spec */
  box-shadow: 0 4px 20px rgba(26, 26, 26, 0.12);
  font-family: var(--font-family-body);
}

.sr-cookie-consent__content {
  flex: 1 1 260px;
  min-width: 0;
}

.sr-cookie-consent__title {
  margin: 0 0 var(--space-xs);
  font-family: var(--font-family-display);
  font-size: var(--font-h3-size);
  line-height: var(--font-h3-line-height);
  font-weight: var(--font-h3-weight);
  color: var(--color-text-primary);
}

.sr-cookie-consent__body {
  margin: 0;
  font-size: var(--font-body-size);
  line-height: var(--font-body-line-height);
  color: var(--color-text-secondary);
}

.sr-cookie-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s);
  flex: 0 0 auto;
}

.sr-cookie-consent__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px; /* approved touch-target minimum, same as components/cta */
  padding: var(--space-s) var(--space-l);
  border-radius: var(--radius-medium);
  font: inherit;
  font-size: var(--font-button-size);
  font-weight: var(--font-button-weight);
  cursor: pointer;
  box-sizing: border-box;
  transition: opacity var(--motion-functional-duration) var(--motion-functional-easing),
    transform var(--motion-functional-duration) var(--motion-functional-easing);
}

/* Accept: solid terracotta/red, the one primary action -- exactly
   color.primary (#C0392B), matching the approved spec's explicit
   color call-out. */
.sr-cookie-consent__button--accept {
  border: none;
  background: var(--color-primary);
  color: var(--color-surface);
}

.sr-cookie-consent__button--accept:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Reject: equal visual weight, never visually hidden/deceptive --
   a real bordered button, not a ghost link buried in fine print. */
.sr-cookie-consent__button--reject {
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-primary);
}

.sr-cookie-consent__button--reject:hover {
  border-color: var(--color-muted);
}

@media (max-width: 767px) {
  .sr-cookie-consent {
    left: var(--space-s);
    right: var(--space-s);
    bottom: var(--space-s);
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-m);
  }

  .sr-cookie-consent__actions {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sr-cookie-consent__button {
    transition: none;
  }
  .sr-cookie-consent__button--accept:hover {
    transform: none;
  }
}
