/* Disclosures keep their state transition; pointer feedback does not paint a surface. */
html[data-hub-overlay="open"], .lc-page { overflow-x: clip; }

:is(.lc-compact-summary, .lc-call-section) .lc-icon:last-child { transition: rotate var(--ds-dur) var(--ds-ease-out); }

/* Folded explanatory notes, not warnings, navigation or report actions. */
button[data-lc-info] {
  display: inline-grid; place-items: center; flex: none;
  inline-size: var(--ds-touch); block-size: var(--ds-touch); padding: 0;
  min-inline-size: var(--ds-touch); min-block-size: var(--ds-touch);
  border: 0; border-radius: 50%; background: transparent;
  color: var(--ds-ink-muted); cursor: pointer;
}
[data-lc-info][hidden] { display: none; }
[data-lc-info] > svg.lc-icon {
  inline-size: var(--ds-icon); block-size: var(--ds-icon); scale: 1;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
/* Mark the expanded state, not hover or press. Keyboard users still get an outline. */
[data-lc-info][aria-expanded="true"] { color: var(--ds-ink-accent); }
[data-lc-info]:focus-visible { outline: var(--ds-focus-ring); outline-offset: var(--ds-focus-offset); }
.lc-info-note:not([hidden]) {
  display: grid; gap: var(--ds-space-2); margin: 0; padding: var(--ds-space-2) var(--ds-space-3);
  border-radius: var(--ds-radius-inset); background: var(--ds-surface-inset);
  color: var(--ds-ink-muted); font-size: var(--ds-fs-label); line-height: 1.45;
  box-sizing: border-box; min-inline-size: 0; overflow-wrap: anywhere;
}
p.lc-info-note:not([hidden]) { display: block; }
.lc-info-note[hidden] { display: none; }
:is(.lc-info-heading, .lc-compact-heading, .lc-page-title-line) {
  display: flex; align-items: center; gap: var(--ds-space-2); min-inline-size: 0;
}

/* Like Radix's state-keyed entrances, these run on the live elements only.
   Closing is still native and immediate: no exit copy, delayed hide, or focus timer. */
@keyframes lc-content-in { from { opacity: .84; } }
@keyframes lc-window-in { from { opacity: .88; translate: 0 4px; } }
@keyframes lc-quiet-wait { 50% { opacity: .78; } }
@keyframes lc-count-tick { from { opacity: .84; } }

@media (prefers-reduced-motion: no-preference) {
  /* Page content, not the fixed/sticky chrome. Cards remain native scroll targets. */
  html:not([data-hub-motion="reduced"]) :is(
    #hub-dialog[open] [data-hub-panel]:not([hidden]),
    .set-group[data-set-cat]:not([hidden]),
    details[open] > .set-body,
    .lc-info-note:not([hidden]),
    :is(#chat-1x1-compose-bar, #news-form):not([hidden]),
    .chat-lc-spoiler--opened > .chat-lc-media
  ),
  html[data-lc-sheet="open"]:not([data-hub-overlay="open"], [data-hub-motion="reduced"]) .find-page {
    animation: lc-content-in var(--ds-dur) var(--ds-ease-out);
  }
  /* Do not move a media/fullscreen surface away from its measured safe-area bounds. */
  html:not([data-hub-motion="reduced"]) dialog.lc-modal:modal:not(#chat-once-viewer, #chat-attachment-preview, #chat-1x1-viewer) {
    animation: lc-window-in var(--ds-dur-sheet) var(--ds-ease-out);
  }
  html:not([data-hub-motion="reduced"]) .find-slide :is(.find-slide-title, .find-slide-text) {
    transition: opacity var(--ds-dur-swipe) var(--ds-ease-out);
  }
  html:not([data-hub-motion="reduced"]) .find-slide:not([data-current="true"]) :is(.find-slide-title, .find-slide-text) { opacity: .84; }
  html:not([data-hub-motion="reduced"]) :is(.find-go, .set-segment:not(.lc-segmented) > button) {
    transition: background-color var(--ds-dur-fast) ease, color var(--ds-dur-fast) ease, opacity var(--ds-dur-fast) ease;
  }
  html:not([data-hub-motion="reduced"]) :is(
    #chat-1x1-search-overlay:not([hidden]) > #chat-1x1-search-status,
    #find-mic-status:not([hidden]),
    .lc-stats-status[data-state="loading"],
    .lc-home-checkin[aria-busy="true"] > .lc-check-glyph
  ) { animation: lc-quiet-wait 1.5s ease-in-out 3; }
  /* The same numeral slot refreshes only when the server-derived second changes. */
  html:not([data-hub-motion="reduced"]) .ct-timer-time[data-tick="a"] { animation: lc-count-tick var(--ds-dur-fast) var(--ds-ease-out); }
  html:not([data-hub-motion="reduced"]) .ct-timer-time[data-tick="b"] { animation: lc-content-in var(--ds-dur-fast) var(--ds-ease-out); }
}
