/**
 * Cookie consent banner (Stream C #5b).
 */

.saf-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9990;
  background: rgba(13, 17, 29, 0.96);
  color: #fff;
  padding: 16px;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.22);
}

.saf-consent__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
}

.saf-consent__copy {
  margin: 0;
  flex: 1 1 320px;
  font-size: 0.9375rem;
  line-height: 1.5;
}

/* .saf-consent prefix beats the Elementor kit's `.elementor-kit-N a`
   link rule (0,1,1) — without it the kit's #BD2727 cascades onto the
   dark banner and fails AA (axe color-contrast, 2026-06-12). */
.saf-consent a.saf-consent__link {
  color: #ffd966;
  text-decoration: underline;
}

.saf-consent a.saf-consent__link:hover,
.saf-consent a.saf-consent__link:focus-visible {
  color: #ffe699;
}

.saf-consent__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.saf-consent__btn {
  cursor: pointer;
  border-radius: 999px;
  padding: 10px 20px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  transition:
    background 0.15s ease,
    transform 0.1s ease,
    color 0.15s ease;
}

.saf-consent__btn--primary {
  background: #ffd966;
  color: #0d111d;
}

.saf-consent__btn--primary:hover,
.saf-consent__btn--primary:focus-visible {
  background: #ffe699;
  outline: 2px solid rgba(255, 217, 102, 0.5);
  outline-offset: 2px;
}

.saf-consent__btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.42);
}

.saf-consent__btn--ghost:hover,
.saf-consent__btn--ghost:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  outline: 2px solid rgba(255, 255, 255, 0.35);
  outline-offset: 2px;
}

@media (max-width: 600px) {
  .saf-consent {
    padding: 12px;
  }
  .saf-consent__inner {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    gap: 10px;
  }
  /* Clamp the copy so the banner stays a compact summary on phones
     (<= ~30% of a 375x812 viewport). Full policy remains reachable via
     the linked cookies page. A `max-height` clamp (not -webkit-line-clamp)
     because the copy is a flex item of .saf-consent__inner, and Chromium
     blockifies `display:-webkit-box` to `flow-root` on flex items, which
     silently disables line-clamp. max-height + overflow works regardless. */
  .saf-consent__copy {
    font-size: 0.875rem;
    line-height: 1.4;
    max-height: 5.6em; /* ~4 lines at line-height 1.4 */
    /* overflow-y:auto (not hidden) so the "cookie policy" link, which
       lives at the END of this paragraph, stays reachable even if an
       admin edits the copy longer than 4 lines. The default copy fits
       in ~3 lines, so no scrollbar shows in practice. */
    overflow-y: auto;
  }
  .saf-consent__actions {
    justify-content: stretch;
  }
  .saf-consent__btn {
    flex: 1 1 auto;
  }
}
