/* Registration: a preview of each application in a modal (register-demo.js): its real page in a frame, which the
   suite menu on its left changes; Messenger and Webmail show their demo in the same frame (apercu-demo.css). */
html:has(.app-demo[open]){overflow:hidden}
.app-demo{--accent:#316b57;--accent-ink:#25553e;--accent-soft:#e7f0e9;width:min(1000px,calc(100vw - 48px));height:min(760px,calc(100vh - 48px));height:min(760px,calc(100dvh - 48px));max-width:none;max-height:none;margin:auto;padding:0;border:1px solid var(--pub-line);border-radius:18px;background:var(--pub-bg);color:var(--pub-ink);box-shadow:0 30px 80px #10181c40;overflow:hidden;font-size:14px;line-height:1.45}
.app-demo[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto;animation:demo-in .22s ease-out}
.app-demo::backdrop{background:#17211dad}
@keyframes demo-in{from{opacity:0;transform:translateY(10px) scale(.985)}}

/* Frame: header, page, footer. */
.app-demo-head{display:flex;align-items:flex-start;gap:14px;padding:18px 20px 14px;background:var(--pub-surface);border-bottom:1px solid var(--pub-line)}
.app-demo-head img{flex:none;width:40px;height:40px}
.app-demo-head>div{flex:1;min-width:0}
.app-demo-badge{display:inline-flex;margin:0 0 5px;padding:2px 9px;border-radius:999px;background:#fbf0d9;color:#6e4c10;font-size:11px;font-weight:650}
.app-demo-head h2{margin:0;font-size:21px;line-height:1.25;letter-spacing:-.02em}
.app-demo-head h2 small{font-size:14px;font-weight:500;letter-spacing:0;color:var(--pub-muted)}
.app-demo-head p:last-child{margin:3px 0 0;font-size:13px;color:var(--pub-muted)}
.app-demo-close{flex:none;display:grid;place-items:center;width:40px;height:40px;border:1px solid var(--pub-line);border-radius:10px;background:var(--pub-surface);font-size:24px;line-height:1;cursor:pointer;transition:background .15s}
.app-demo-close:hover{background:var(--pub-chip)}
/* The page (public/apercus) in a browser window, reduced to the width of the panel by register-demo.js. */
.app-demo-page{min-height:0;display:flex;padding:16px 18px}
.app-demo-foot [hidden]{display:none}
.app-demo-window{flex:1;min-width:0;display:flex;flex-direction:column;border:1px solid var(--pub-line);border-radius:14px;overflow:hidden;background:var(--pub-surface);box-shadow:0 1px 2px #1f2a2f0d,0 12px 32px #1f2a2f0f}
.app-demo-bar{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:8px 14px;border-bottom:1px solid var(--pub-line);background:var(--pub-panel);font-size:12px;color:#68757d}
.app-demo-url{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.app-demo-fictive{flex:none;padding:1px 8px;border-radius:999px;background:#fbf0d9;color:#6e4c10;font-weight:650}
.app-demo-viewport{position:relative;flex:1;min-height:0;overflow:hidden;background:#f6f8f7}
/* color-scheme: the previews follow the light public pages, whatever the visitor's system theme. */
.app-demo-viewport iframe{position:absolute;top:0;left:0;width:1280px;height:800px;border:0;background:#fff;color-scheme:light;transform-origin:0 0}
.app-demo-foot{display:flex;align-items:center;gap:10px;padding:12px 20px;background:var(--pub-surface);border-top:1px solid var(--pub-line)}
.app-demo-status{flex:1;min-width:0;display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;margin:0;font-size:13px;font-weight:500}
.app-demo-undo{padding:2px 8px;border:0;border-radius:6px;background:var(--accent-soft);color:var(--accent-ink);font-weight:650;cursor:pointer}
.app-demo-foot .btn{flex:none}

@media (prefers-reduced-motion:reduce){
    .app-demo[open]{animation:none}
}

/* Phones: the modal takes the whole screen. */
@media (max-width:700px){
    .app-demo{width:100vw;height:100vh;height:100dvh;border:0;border-radius:0}
    .app-demo-head{gap:12px;padding:12px 16px 10px}
    .app-demo-head img{width:32px;height:32px}
    .app-demo-head>div{display:flex;flex-direction:column}
    .app-demo-badge{order:1;align-self:flex-start;margin:4px 0 0}
    .app-demo-head h2{font-size:18px}
    .app-demo-head p:last-child{display:none}
    .app-demo-page{padding:12px}
    .app-demo-foot{flex-wrap:wrap;gap:8px;padding:10px 16px calc(10px + env(safe-area-inset-bottom))}
    .app-demo-status{flex-basis:100%}
    .app-demo-status:empty{display:none}
    .app-demo-foot [data-demo-reset]{padding-inline:14px}
    .app-demo-foot [data-demo-signup]{flex:1 1 auto}
}
}
