/* smooth1 (sm1-): PRSXA + Pearl AI. Loads last, after pearl-a11y.css.
 * 1. Windows open in one smooth motion: What's new, Library, Creations and every Pearl Apps window (Apps, To-dos, Research,
 *    Automations). The fade and the small rise are a CSS animation that always plays from its first frame, using only
 *    opacity and movement (no resizing of text), so nothing jumps while the content is drawn.
 * 2. Creations keeps one height on computers, so it does not grow when the list arrives.
 * 3. Phones and tablets: these windows fill the screen, so the background blur behind them is not drawn (it cannot be seen
 *    there and it slowed the opening).
 * 4. The shortcut labels in the sidebar (Alt N, Ctrl K, Alt L) all use the same size, weight and colour.
 */

/* ---------- 1. one smooth opening */
@keyframes sm1-fade{from{opacity:0}to{opacity:1}}
@keyframes sm1-rise{from{transform:translate3d(0,10px,0)}to{transform:none}}
html body .pap-ov:not([hidden]),html body .plb-ov:not([hidden]),html body .pcr-ov:not([hidden]){animation:sm1-fade .18s ease-out backwards}
html body .pap-ov .pap,html body .plb-ov .plb,html body .pcr-ov .pcr{transform:none;transition:none}
html body .pap-ov:not([hidden]) .pap,html body .plb-ov:not([hidden]) .plb,html body .pcr-ov:not([hidden]) .pcr{animation:sm1-rise .22s cubic-bezier(.2,.8,.2,1) backwards}

/* ---------- 2. Creations keeps its height on computers */
@media (min-width:641px){html body .pcr-ov .pcr{height:min(88vh,760px)}}

/* ---------- 3. no hidden blur on phones and tablets */
@media (max-width:760px),(pointer:coarse){
  html body .pap-ov,html body .plb-ov,html body .pcr-ov{-webkit-backdrop-filter:none;backdrop-filter:none}
}

/* ---------- 4. one look for the sidebar shortcut labels */
html body #sidebar #new-chat-btn .pas-kbd,html body #sidebar .pas-search .pas-kbd,html body #sidebar .plb-side kbd{font-family:inherit;font-size:10.5px;font-weight:500;line-height:1.6;letter-spacing:0;padding:1px 6px;border-radius:6px;border:1px solid var(--app-border,#e4e7ec);color:var(--app-text-dim,#667085);background:transparent;opacity:1}

@media (prefers-reduced-motion:reduce){
  html body .pap-ov:not([hidden]),html body .plb-ov:not([hidden]),html body .pcr-ov:not([hidden]),
  html body .pap-ov:not([hidden]) .pap,html body .plb-ov:not([hidden]) .plb,html body .pcr-ov:not([hidden]) .pcr{animation:none}
}

/* ---------- 5. smooth2 (sm2-): computers. Opening or closing a window no longer redraws the whole page behind it.
 *    The page itself never scrolls (the chat scrolls inside it), so the page-wide scroll lock that every window switched on
 *    and off only made the browser lay out and paint the full page again at the start and end of each opening and closing.
 *    The page now keeps its one setting. The reader keeps its own. */
@media screen and (hover:hover) and (pointer:fine){html:not(.prdr-open){overflow:visible!important}}
/* 6. no background blur behind windows on computers either (Creations and the Pearl Apps windows), the same as What's new and Library */
@media screen and (hover:hover) and (pointer:fine){html body .pap-ov,html body .pcr-ov{-webkit-backdrop-filter:none;backdrop-filter:none}}
/* 7. What's new fades out when it closes, and clicks reach the page straight away */
html body .pwn-ov:not(.is-in){pointer-events:none}
/* 8. What's new lays out only the notes that are in view */
html body .pwn-ov .pwn-item{content-visibility:auto;contain-intrinsic-size:auto 104px}
