/* Usage windows of the home page: each card of #usages opens a window whose tabs show the real screens of the suite,
   rendered by their applications with demo data (public/apercus) and reduced in a sandboxed frame by usages.js. */

/* Cards of the usages: the whole card opens the window. */
.audiences article{position:relative}
.audience-open{display:inline-flex;align-items:center;gap:6px;margin-top:12px;padding:0;border:0;background:none;font:inherit;font-size:14px;font-weight:600;color:var(--pub-green-text);cursor:pointer}
.audience-open[hidden]{display:none}
.audience-open::after{content:"";position:absolute;inset:0}
.audience-open:focus-visible{outline:none}
.audiences article:has(.audience-open:focus-visible){outline:2px solid var(--pub-green);outline-offset:-2px}
.audience-open span{transition:transform .15s}
.audiences article:hover .audience-open span{transform:translateX(3px)}

/* The window. */
html.uv-open{overflow:hidden}
.uv-dialog{width:min(1180px,calc(100vw - 32px));max-width:none;height:min(860px,calc(100dvh - 32px));max-height:none;padding:0;border:0;border-radius:18px;background:var(--pub-surface);color:var(--pub-ink);box-shadow:0 24px 64px rgba(16,24,20,.28);overflow:hidden}
.uv-dialog::backdrop{background:rgba(16,24,20,.55)}
.uv-dialog[open]{animation:uv-in .2s ease-out}
@keyframes uv-in{from{opacity:0;transform:translateY(8px)}}
@media(prefers-reduced-motion:reduce){.uv-dialog[open]{animation:none}}
.uv-frame{display:flex;flex-direction:column;height:100%}
.uv-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding:22px 24px 18px;border-bottom:1px solid var(--pub-line-soft)}
.uv-head .eyebrow{margin-bottom:6px}
.uv-head h2{margin:0 0 6px;font-size:24px;line-height:1.2;letter-spacing:-.03em;color:var(--pub-ink-strong)}
.uv-lead{margin:0;max-width:80ch;font-size:15px;line-height:1.55;color:var(--pub-muted)}
.uv-close{flex:none;width:40px;height:40px;border:0;border-radius:10px;background:var(--pub-chip);color:var(--pub-ink);font-size:24px;line-height:1;cursor:pointer}
.uv-close:hover{background:var(--pub-soft)}
.uv-body{flex:1;min-height:0;display:grid;grid-template-columns:240px minmax(0,1fr);align-items:start;gap:20px;padding:20px 24px;overflow-y:auto}
.uv-tabs{display:flex;flex-direction:column;gap:8px}
.uv-tab{display:grid;grid-template-columns:24px minmax(0,1fr);column-gap:10px;align-items:center;padding:12px;border:1px solid var(--pub-line);border-radius:12px;background:var(--pub-surface);color:var(--pub-ink);font:inherit;text-align:left;cursor:pointer;transition:border-color .15s,background .15s}
.uv-tab img{grid-row:span 2}
.uv-tab strong{font-size:14px;line-height:1.3}
.uv-tab small{font-size:12px;line-height:1.35;color:var(--pub-quiet)}
.uv-tab:hover{background:var(--pub-tint)}
.uv-tab[aria-selected=true]{border-color:var(--pub-green);background:var(--pub-tint);box-shadow:inset 3px 0 0 var(--pub-green)}
.uv-tab:focus-visible{outline:2px solid var(--pub-green);outline-offset:2px}
.uv-panel{min-width:0;margin:0}
.uv-panel[hidden]{display:none}
.uv-caption{margin:0 2px 14px;font-size:15px;line-height:1.6;color:var(--pub-ink)}

/* A browser window around the real page, reduced to the width of the panel. */
.uv-window{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}
.uv-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}
.uv-url{min-width:0;padding:3px 10px;border-radius:999px;background:var(--pub-chip);color:var(--pub-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.uv-demo{flex:none;font-size:11px;font-weight:600;color:#6d7a7f}
.uv-viewport{position:relative;height:clamp(300px,calc(100dvh - 400px),520px);overflow:hidden;background:#f6f8f7}
/* color-scheme: the previews follow the light home page, whatever the visitor's system theme. */
.uv-viewport iframe{position:absolute;top:0;left:0;width:1280px;height:800px;border:0;background:#fff;color-scheme:light;transform-origin:0 0}

.uv-foot{display:flex;justify-content:space-between;align-items:center;gap:12px 24px;flex-wrap:wrap;padding:14px 24px;border-top:1px solid var(--pub-line-soft);background:var(--pub-panel)}
.uv-offer{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 8px;margin:0;font-size:14px}
.uv-offer strong{font-size:17px;color:var(--pub-ink-strong)}
.uv-offer small{color:var(--pub-muted)}
.uv-offer-facts{flex-basis:100%;font-size:13px;color:var(--pub-quiet)}
.uv-foot .btn{min-height:42px;padding:0 18px;font-size:14px}

/* Phones: the window takes the screen and scrolls as a whole; the screens become a row of tabs, and the previews
   show the phone layout of each page (usages.js). */
@media(max-width:760px){
    .uv-dialog{width:100%;height:100%;max-height:100%;margin:0;border-radius:0}
    .uv-frame{overflow-y:auto}
    .uv-head{padding:16px 64px 14px 16px}
    .uv-head h2{font-size:20px}
    .uv-lead{font-size:14px}
    .uv-close{position:fixed;top:10px;right:10px;z-index:3;box-shadow:0 2px 8px #1f2a2f26}
    .uv-body{flex:none;grid-template-columns:minmax(0,1fr);gap:14px;padding:14px 16px;overflow:visible}
    .uv-tabs{flex-direction:row;gap:6px;margin:0 -16px;padding:0 16px 2px;overflow-x:auto;scrollbar-width:none}
    .uv-tab{flex:none;grid-template-columns:20px auto;padding:8px 12px}
    .uv-tab img{grid-row:auto;width:20px;height:20px}
    .uv-tab small{display:none}
    .uv-caption{font-size:14px}
    .uv-viewport{height:min(68vh,600px)}
    .uv-foot{padding:12px 16px 16px}
    .uv-foot .actions{width:100%}
    .uv-foot .btn{flex:1 1 auto}
}
