/**
 * klaro.paper.css — Open Steppe consent-notice skin (pre-launch)
 *
 * Pairs with the stripped Klaro engine build `klaro-no-translations-no-css.js`,
 * which injects NO CSS of its own — so this file is the complete stylesheet
 * for the notice. Nothing here depends on the theme's compiled Tailwind
 * classes; it consumes the theme's :root design tokens when the OpenSteppe
 * theme is active, and falls back to hard values (same oklch tokens) if it is
 * not — mirroring Klaro's own var(--x, default) pattern.
 *
 * Scope: NOTICE ONLY. Modal / service-list / switch selectors are deliberately
 * unstyled — notice mode (no services, hideLearnMore) never renders them. When
 * the institutional consent layer is stood up, extend this file rather than
 * reintroducing Klaro's stock CSS.
 *
 * Register: matches the landing page — paper/ink, IBM Plex Sans, the animated
 * 1px link-underline, the focus-ring spec, hairline rules, zero drop-shadow,
 * zero filled buttons. Full-bleed bar, not a floating "cookie" card.
 *
 * Version: 0.1 (draft) · 2026-07-05
 */

/* --- Token bridge: theme tokens when present, hard fallbacks otherwise --- */
.klaro {
  --os-paper:     var(--color-paper,          oklch(97.5% .005 85));
  --os-ink:       var(--color-ink,            oklch(12% .008 70));
  --os-body:      var(--color-body-text,      oklch(20% .006 75));
  --os-secondary: var(--color-secondary-text, oklch(48% .005 75));
  --os-hairline:  var(--color-hairline,       oklch(82% .005 80));
  --os-sans:      var(--font-sans, "IBM Plex Sans", sans-serif);
  --os-serif:     var(--font-serif, "Spectral", serif);
  --os-ease:      var(--ease-out-expo, cubic-bezier(.16, 1, .3, 1));
}

/* Klaro toggles this class when the notice should not be shown; with the
   no-css build we must hide it ourselves. */
.klaro .cookie-notice.cookie-notice-hidden { display: none; }

/* --- Container: full-bleed hairline bar, pinned bottom, no card, no shadow --- */
.klaro .cookie-notice:not(.cookie-modal-notice) {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  top: auto;
  width: 100%;
  max-width: none;
  margin: 0;
  z-index: 999;
  background: var(--os-paper);
  border: 0;
  border-top: 1px solid var(--os-hairline);
  border-radius: 0;
  box-shadow: none;
  color: var(--os-body);
  font-family: var(--os-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Neutralise Klaro's desktop floating-card treatment at every breakpoint. */
@media (min-width: 1024px) {
  .klaro .cookie-notice:not(.cookie-modal-notice) {
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    max-width: none;
    border-radius: 0;
    box-shadow: none;
  }
}

/* --- Body: one editorial row — text left, actions right --- */
.klaro .cookie-notice .cn-body {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 24px;
  bottom: auto;
}

@media (min-width: 768px) {
  .klaro .cookie-notice .cn-body {
    padding: 16px 8vw;
  }
}

/* Optional notice title (off by default in notice mode). */
.klaro .cookie-notice .cn-body h2 {
  margin: 0;
  font-family: var(--os-serif);
  font-weight: 500;
  font-size: 15px;
  line-height: 24px;
  letter-spacing: 0.01em;
  color: var(--os-ink);
}

/* Notice text. */
.klaro .cookie-notice .cn-body p {
  margin: 0;
  flex: 1 1 auto;
  color: var(--os-secondary);
  font-family: var(--os-sans);
  font-size: 13px;
  line-height: 24px;
  text-align: left;
  text-wrap: pretty;
}

.klaro .cookie-notice .cn-body p strong {
  color: var(--os-body);
  font-weight: 500;
}

/* "Policy changed" line, if ever shown — no stock underline. */
.klaro .cookie-notice .cn-body p.cn-changes {
  text-decoration: none;
  color: var(--os-body);
}

/* --- Actions row --- */
.klaro .cookie-notice .cn-body .cn-ok {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 0;
  flex: 0 0 auto;
}

.klaro .cookie-notice .cn-body .cn-buttons {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0;
}

/* Reset every actionable element to the page's flat, borderless baseline. */
.klaro .cookie-notice .cm-btn,
.klaro .cookie-notice .cm-link,
.klaro .cookie-notice .cn-learn-more,
.klaro .cookie-notice a {
  -webkit-appearance: none;
  appearance: none;
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font-family: var(--os-sans);
  font-size: 13px;
  line-height: 24px;
  letter-spacing: normal;
  color: var(--os-ink);
  text-decoration: none;
  position: relative;
  white-space: nowrap;
}

/*
 * PRIMARY action (accept / "ok"): hairline ghost box for affordance — a bare
 * text link reads as too weak a dismiss for a notice. Stays inside the page's
 * material vocabulary (1px ink rule, no fill). To make it a pure text-button
 * instead, delete this block: it will inherit the underline treatment below.
 */
.klaro .cookie-notice .cm-btn.cm-btn-success,
.klaro .cookie-notice .cm-btn.cm-btn-success-var {
  padding: 7px 16px;
  border: 1px solid var(--os-ink);
  color: var(--os-ink);
  font-weight: 500;
  transition: color .2s var(--os-ease), background-color .2s var(--os-ease);
}

.klaro .cookie-notice .cm-btn.cm-btn-success:hover,
.klaro .cookie-notice .cm-btn.cm-btn-success:focus-visible,
.klaro .cookie-notice .cm-btn.cm-btn-success-var:hover,
.klaro .cookie-notice .cm-btn.cm-btn-success-var:focus-visible {
  background: var(--os-ink);
  color: var(--os-paper);
}

/* The ghost button opts out of the animated underline. */
.klaro .cookie-notice .cm-btn.cm-btn-success::after,
.klaro .cookie-notice .cm-btn.cm-btn-success-var::after {
  content: none;
}

/* SECONDARY actions (decline / info / learn-more link): quiet text register. */
.klaro .cookie-notice .cm-btn.cm-btn-info,
.klaro .cookie-notice .cm-btn.cm-btn-close,
.klaro .cookie-notice .cm-btn.cm-btn-danger,
.klaro .cookie-notice .cn-decline,
.klaro .cookie-notice .cm-link,
.klaro .cookie-notice .cn-learn-more {
  color: var(--os-secondary);
  font-weight: 400;
}

.klaro .cookie-notice .cm-btn:disabled {
  opacity: .5;
  cursor: default;
}

/* Animated 1px underline — the theme's .link-underline behaviour. */
.klaro .cookie-notice .cm-btn::after,
.klaro .cookie-notice .cm-link::after,
.klaro .cookie-notice .cn-learn-more::after,
.klaro .cookie-notice a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: 0 100%;
  transition: transform .4s var(--os-ease);
}

.klaro .cookie-notice .cm-btn:hover::after,
.klaro .cookie-notice .cm-btn:focus-visible::after,
.klaro .cookie-notice .cm-link:hover::after,
.klaro .cookie-notice .cm-link:focus-visible::after,
.klaro .cookie-notice .cn-learn-more:hover::after,
.klaro .cookie-notice .cn-learn-more:focus-visible::after,
.klaro .cookie-notice a:hover::after,
.klaro .cookie-notice a:focus-visible::after {
  transform: scaleX(1);
}

/* Focus ring — the theme's .focus-ring spec. */
.klaro .cookie-notice .cm-btn:focus-visible,
.klaro .cookie-notice .cm-link:focus-visible,
.klaro .cookie-notice .cn-learn-more:focus-visible,
.klaro .cookie-notice a:focus-visible {
  outline: 1px solid var(--os-secondary);
  outline-offset: 6px;
  border-radius: 2px;
}

/* Respect reduced-motion — same posture as the theme. */
@media (prefers-reduced-motion: reduce) {
  .klaro .cookie-notice .cm-btn,
  .klaro .cookie-notice .cm-btn::after,
  .klaro .cookie-notice .cm-link::after,
  .klaro .cookie-notice .cn-learn-more::after,
  .klaro .cookie-notice a::after {
    transition: none;
  }
}

/* Tablet / large phone: keep the single row; tighten padding and gap. */
@media (max-width: 767px) {
  .klaro .cookie-notice .cn-body {
    gap: 16px;
    padding: 14px 20px;
  }
}

/* Phones: stack tightly, keep the button compact. */
@media (max-width: 559px) {
  .klaro .cookie-notice .cn-body {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
  }

  .klaro .cookie-notice .cn-body .cn-ok {
    width: 100%;
    justify-content: flex-start;
    gap: 16px;
  }

  .klaro .cookie-notice .cm-btn.cm-btn-success,
  .klaro .cookie-notice .cm-btn.cm-btn-success-var {
    padding: 6px 14px;
  }

  .klaro .cookie-notice .cn-body p {
    font-size: 12.5px;
    line-height: 19px;
  }
}
