/* CAE ROW DISCLOSURE — the motion half of the See More / Load More row contract.
 *
 * Every selector here is a STATE the behaviour writes (assets/interact/row-disclosure.js), never
 * a page, a band or a Figma node id: `is-cae-rowdisc-gliding` is set for the length of one
 * open/close and removed again, and `[data-cae-rowdisc-toggle]` is written only on a control
 * that actually operates something. A row nobody wired matches nothing in this file, so a page
 * that serves the drawn control and no overflow is byte-identical to how it served before.
 *
 * THE GLIDE. Kate Shawver, ClickUp 869ew3ejh (Media landing), verbatim: "See More under each row
 * shows 3 more rows with a gliding open-panel". The panel is the ROW, and the glide is a height
 * transition between its closed and open heights, driven from JS which supplies both numbers.
 * Only `height` is animated — not `max-height`, whose overshoot makes a tall reveal look like it
 * pauses, and not `display`, which cannot transition at all.
 *
 * REDUCED MOTION IS NOT A NICETY HERE. A row can reveal 45 case-study cards; that is a large
 * amount of movement for a reader who has asked the operating system for less of it. Under
 * `prefers-reduced-motion: reduce` the transition is removed outright and the JS skips the
 * measure/flush entirely, so the reveal is instantaneous and identical to the pure-CSS floor
 * these pages served before this rule existed.
 */

.is-cae-rowdisc-gliding {
  transition: height 320ms cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: height;
}

/* The drawn control is a real button once the behaviour is on it: it must show a pointer and it
 * must show a focus ring, because it is now reachable by keyboard. The ring is the UA's own
 * `:focus-visible` outline offset off the pill, not a colour this sheet invents. */
[data-cae-rowdisc-toggle] .wp-block-button__link,
[data-cae-rowdisc-toggle] a[role="button"],
[data-cae-rowdisc-toggle] > a {
  cursor: pointer;
}

[data-cae-rowdisc-toggle] [role="button"]:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

/* The cards a Load More reveals fade in (Kate 2026-10-17, 869ew7a0p: "where I can see the new content fade in");
 * the News Load More's 450 ms opacity. Set by row-disclosure.js for one reveal and removed at animationend. */
.is-cae-rowdisc-new {
  animation: cae-rowdisc-fade-in 450ms ease both;
}
@keyframes cae-rowdisc-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .is-cae-rowdisc-gliding {
    transition: none;
  }
  .is-cae-rowdisc-new {
    animation: none;
  }
}
