/*
 * smie.ai consent banner: minimal layout plus restylable defaults.
 * Layout rules (position, stacking, width) use the #smie-consent id so they always hold.
 * Every cosmetic rule sits inside :where(), which has zero specificity, so the design
 * system's own .button / .button.secondary / .consent-panel rules win without !important.
 * Restyle through the custom properties below or with the design's own classes.
 */
#smie-consent {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 2147483000;
  max-width: 640px;
  margin: 0 auto;
}
#smie-consent[hidden] { display: none; }

:where(#smie-consent) {
  --consent-bg: var(--surface, #ffffff);
  --consent-fg: var(--ink, #14181c);
  --consent-muted: var(--muted, #4a5560);
  --consent-line: var(--line, #d7dde2);
  --consent-accent: var(--green, #1f6b47);
  --consent-radius: 10px;
  --consent-shadow: 0 12px 40px rgba(20, 24, 28, 0.18);
  font: inherit;
  color: var(--consent-fg);
}
:where(#smie-consent) .consent-panel {
  background: var(--consent-bg);
  color: var(--consent-fg);
  border: 1px solid var(--consent-line);
  border-radius: var(--consent-radius);
  box-shadow: var(--consent-shadow);
  padding: 20px 22px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}
:where(#smie-consent) .consent-title { font-size: 1.15rem; line-height: 1.3; margin: 0 0 8px; }
:where(#smie-consent) .consent-text { margin: 0 0 14px; color: var(--consent-muted); font-size: 0.95rem; line-height: 1.55; }
:where(#smie-consent) .consent-text a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
:where(#smie-consent) .consent-options { display: flex; flex-wrap: wrap; gap: 10px; }
/* Equal weight: the three choices share one style. Never give one of them a primary look. */
:where(#smie-consent) .consent-choice {
  flex: 1 1 160px;
  min-height: 44px;
  padding: 10px 14px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--consent-fg);
  background: transparent;
  border: 1px solid var(--consent-fg);
  border-radius: 999px;
  cursor: pointer;
}
:where(#smie-consent) .consent-choice:hover { background: rgba(20, 24, 28, 0.06); }
:where(#smie-consent) .consent-choice:focus-visible,
:where(#smie-consent) .consent-close:focus-visible { outline: 3px solid var(--consent-accent); outline-offset: 2px; }
:where(#smie-consent) .consent-choice[aria-pressed="true"] { border-width: 2px; }
:where(#smie-consent) .consent-status { margin: 12px 0 0; font-size: 0.9rem; color: var(--consent-accent); }
:where(#smie-consent) .consent-status:empty { display: none; }
:where(#smie-consent) .consent-close {
  margin-top: 12px;
  min-height: 44px;
  padding: 8px 4px;
  font: inherit;
  font-size: 0.9rem;
  color: var(--consent-fg);
  background: none;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
:where(#smie-consent) .consent-close[hidden] { display: none; }

/* Footer control "Endre samtykke": a real button that looks like a footer link by default. */
:where([data-consent-open]) {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

@media (max-width: 480px) {
  #smie-consent { left: 8px; right: 8px; bottom: 8px; }
  :where(#smie-consent) .consent-panel { padding: 16px; }
  :where(#smie-consent) .consent-choice { flex-basis: 100%; }
}
@media (prefers-reduced-motion: no-preference) {
  :where(#smie-consent) .consent-panel { animation: smie-consent-in 0.2s ease-out; }
  @keyframes smie-consent-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
