/* Namespaced public workspace. */
body.zvos-frame{margin:0;padding:16px;font-family:system-ui,-apple-system,"Segoe UI",sans-serif;overflow-wrap:anywhere}
.zvos,.zvos *{box-sizing:border-box}
.zvos{position:relative;isolation:isolate;color:var(--zvos-text);font:400 15px/1.5 system-ui,-apple-system,"Segoe UI",sans-serif;border-radius:var(--zvos-radius);background:var(--zvos-background);overflow:hidden;margin:24px 0}
.zvos [hidden],.zvos-running [hidden]{display:none!important}
.zvos.zvos--desktop{width:min(100%,var(--zvos-width,1440px));max-width:100%;height:var(--zvos-height);min-height:320px;margin-inline:auto}
/* Block themes can set both lateral margins to auto with !important. */
#zv-frontend-os.zvos--desktop[data-align="left"] { margin-left: 0 !important; margin-right: auto !important; }
#zv-frontend-os.zvos--desktop[data-align="center"] { margin-left: auto !important; margin-right: auto !important; }
#zv-frontend-os.zvos--desktop[data-align="right"] { margin-left: auto !important; margin-right: 0 !important; }
.zvos-heading{display:flex;justify-content:space-between;gap:12px;padding:14px 20px;background:var(--zvos-sidebar);color:var(--zvos-sidebar-text);font-weight:600;letter-spacing:.02em}
.zvos-heading span:last-child{font-weight:400;opacity:.8}
.zvos-apps{display:grid;grid-template-columns:repeat(auto-fill,minmax(100px,1fr));gap:12px;padding:20px;align-content:start}
.zvos--desktop .zvos-apps{position:absolute;inset:54px auto 40px 0;width:130px;overflow:auto;grid-template-columns:1fr;padding:8px;z-index:0}
.zvos .zvos-app{color:var(--zvos-sidebar-text);background:var(--zvos-sidebar);border:1px solid transparent;display:flex;flex-direction:column;align-items:center;gap:8px;padding:12px 6px;text-decoration:none!important;border-radius:8px;overflow-wrap:anywhere;text-align:center;line-height:1.3;font-size:13px}
.zvos .zvos-app:hover{border-color:var(--zvos-accent);box-shadow:0 0 0 1px var(--zvos-accent)}
.zvos .zvos-app .dashicons{width:var(--zvos-icon-size);height:var(--zvos-icon-size);font-size:var(--zvos-icon-size);color:var(--zvos-accent)}
.zvos :focus-visible,.zvos-running button:focus-visible{outline:3px solid var(--zvos-accent,#148fc2);outline-offset:3px}
.zvos-window-layer{position:absolute;inset:54px 0 44px;pointer-events:none;overflow:hidden}
.zvos-has-taskbar .zvos-window-layer{bottom:0}
.zvos-window{pointer-events:auto;position:absolute;display:flex;flex-direction:column;border:1px solid var(--zvos-border);border-radius:var(--zvos-radius);background:var(--zvos-surface);color:var(--zvos-text);box-shadow:0 16px 50px #0004;overflow:hidden;max-width:100%;min-height:180px;opacity:var(--zvos-opacity)}
.zvos-window.is-active{box-shadow:0 18px 60px #0006;border-color:var(--zvos-accent);opacity:1}
.zvos-window.is-maximized{inset:0!important;width:100%!important;height:100%!important;border-radius:0}
.zvos-titlebar{display:flex;align-items:center;justify-content:space-between;background:var(--zvos-sidebar);color:var(--zvos-sidebar-text);min-height:44px;flex:0 0 auto;cursor:move;user-select:none;touch-action:none}
.zvos .zvos-titlebar h2{margin:0!important;padding:9px 14px;font:600 14px/1.4 system-ui;color:inherit;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0}
.zvos-controls{display:flex;align-self:stretch}
.zvos .zvos-controls button{border:0;border-radius:0;color:inherit;background:transparent;font:400 20px/1 system-ui;width:44px;min-height:44px;margin:0;padding:4px;cursor:pointer}
.zvos .zvos-controls button:hover{background:#ffffff26}
.zvos .zvos-controls button[data-zvos-action=close]:hover{background:#bc2636;color:#fff}
.zvos-window-body{padding:16px;flex:1;min-height:0;overflow:auto;overscroll-behavior:contain}
.zvos-window-body:has(>iframe){display:flex;flex-direction:column;padding:0}
.zvos-window-body iframe{width:100%;min-height:240px;flex:1;border:0;background:#fff}
.zvos-direct-link{display:block;flex:none;font-size:13px;padding:8px 12px;color:var(--zvos-text);background:var(--zvos-canvas)}
.zvos .zvos-resize{position:absolute;right:0;bottom:0;cursor:nwse-resize;touch-action:none;border:0;border-radius:0;background:var(--zvos-surface);color:var(--zvos-text);width:26px;height:26px;padding:0;line-height:26px}
.zvos-window.is-maximized .zvos-resize{display:none}
.zvos-dragging iframe{pointer-events:none}
.zvos-running{display:flex;gap:5px;align-items:center;overflow:auto;padding:4px;max-width:100%;position:absolute;inset:auto 0 0;min-height:40px;background:var(--zvos-sidebar,#123554);z-index:20}
#wtbTaskbar .zvos-running{position:static;inset:auto;min-height:0;background:transparent;flex:0 1 auto;max-width:45vw;z-index:auto}
.zvos-running .zvos-task{white-space:nowrap;max-width:160px;overflow:hidden;text-overflow:ellipsis;color:inherit;background:transparent;border:1px solid currentColor;border-radius:5px;min-height:32px;min-width:44px;font:500 12px system-ui;padding:6px 10px;cursor:pointer;opacity:.8}
.zvos>.zvos-running{color:var(--zvos-sidebar-text)}
.zvos-task[aria-pressed=true]{box-shadow:inset 0 -3px 0 currentColor;opacity:1}
.zvos-running .is-minimized{border-style:dashed}
.zvos-status{position:absolute!important;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;margin:0}
.zvos-empty{padding:20px;color:var(--zvos-sidebar-text)}
.zvos--classic .zvos-window-layer{position:relative;inset:auto;min-height:0}
.zvos--classic .zvos-window{position:relative;inset:auto!important;width:100%!important;height:540px!important;max-height:80vh}
.zvos--classic .zvos-titlebar{cursor:default}
.zvos--classic .zvos-resize,.zvos--classic [data-zvos-action=maximize]{display:none}
.zvos--classic:not(.zvos-has-taskbar){padding-bottom:40px}
.zvos--animated .zvos-window{animation:zvos-open .16s ease-out}
@keyframes zvos-open{from{transform:translateY(8px);opacity:.6}to{transform:translateY(0);opacity:1}}
body.wtb-taskbar-pos-left #wtbTaskbar .zvos-running,body.wtb-taskbar-pos-right #wtbTaskbar .zvos-running{flex-direction:column;max-width:100%;max-height:40vh}
body.wtb-taskbar-pos-left #wtbTaskbar .zvos-task,body.wtb-taskbar-pos-right #wtbTaskbar .zvos-task{max-width:100%;width:100%;min-width:0}
@media(max-width:680px){
 .zvos.zvos--desktop{height:min(var(--zvos-height),78vh);height:min(var(--zvos-height),78svh)}
 .zvos--desktop .zvos-apps{inset-inline:0;width:auto;grid-template-columns:repeat(auto-fill,minmax(85px,1fr));padding:12px}
 .zvos .zvos-window:not([data-zvos-tray-window]){position:absolute;inset:0!important;width:100%!important;height:100%!important;border-radius:0}
 .zvos--classic .zvos-window{position:relative;height:500px!important}
 .zvos .zvos-titlebar{cursor:default}
 .zvos .zvos-resize,.zvos [data-zvos-action=maximize]{display:none}
 /* Mobile restores from desktop shortcuts; no extra Start menu or crowded tabs. */
 #wtbTaskbar .zvos-running{display:none}
 .zvos-running .zvos-task{max-width:95px}
 .zvos-window-body{padding:10px}
}
@media(prefers-reduced-motion:reduce){.zvos--animated .zvos-window{animation:none}}

/* 3.129.2: alternate desktop grid and unclipped geometry on narrow containers. */
.zvos--desktop[data-icon-layout=grid] .zvos-apps{inset:54px 0 40px;width:auto;grid-template-columns:repeat(auto-fill,minmax(100px,1fr));align-content:start;padding:12px}
.zvos--desktop.zvos-has-taskbar .zvos-apps{bottom:0}
.zvos-window{min-height:0}
.zvos-window-layer{top:54px}
.zvos-window-body{background:var(--zvos-canvas)}
.zvos-window-body:has(>iframe){background:var(--zvos-surface)}
@media(max-width:680px){.zvos--desktop[data-icon-layout=grid] .zvos-apps{grid-template-columns:repeat(auto-fill,minmax(85px,1fr))}}

/* The real Windows Taskbar flows inside the desktop only when explicitly docked. */
.zvos-taskbar-slot {
    position: absolute;
    inset: auto 0 0;
    container-type: inline-size;
    z-index: 20;
}

.zvos-wtb-embedded .zvos-window-layer { z-index: 0; }
.zvos.zvos-wtb-embedded.zvos-has-taskbar :is(.zvos-window-layer, .zvos-apps) {
    bottom: var(--zvos-taskbar-height, 46px);
}

#zv-frontend-os .zvos-taskbar-slot > #wtbTaskbar {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 46px !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 3px 6px !important;
    border-radius: 0 !important;
}

.zvos-taskbar-slot #wtbTaskbar .taskbar-container {
    display: flex !important;
    flex-flow: row wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 4px !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    min-height: 40px !important;
    max-height: none !important;
}

.zvos-taskbar-slot #wtbTaskbar :is(.left-section, .center-section, .right-section) {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 4px !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
}

.zvos-taskbar-slot #wtbTaskbar .left-section { order: 0; flex: 0 0 auto !important; }
.zvos-taskbar-slot #wtbTaskbar .center-section { order: 1; flex: 0 1 auto !important; flex-wrap: wrap; }
.zvos-taskbar-slot #wtbTaskbar .right-section { order: 3; flex: 0 0 auto !important; margin-inline-start: auto; }
.zvos-taskbar-slot #wtbTaskbar :is(.start-button, .notification-item, .calendar-trigger) {
    min-width: 34px;
    min-height: 34px !important;
}
.zvos-taskbar-slot #wtbTaskbar .zvos-running {
    display: flex;
    order: 2;
    flex: 1 1 96px;
    min-width: 0;
    max-width: 100%;
    padding: 2px;
}
.zvos-taskbar-slot #wtbTaskbar .zvos-running:empty { display: none; }
.zvos-taskbar-slot #wtbTaskbar .zvos-task { flex: 0 0 auto; }

@container (max-width: 640px) {
    .zvos-taskbar-slot #wtbTaskbar .right-section { order: 1; }
    .zvos-taskbar-slot #wtbTaskbar .center-section { order: 2; flex: 1 1 100% !important; }
    .zvos-taskbar-slot #wtbTaskbar .zvos-running { order: 3; flex-basis: 100%; }
}

/* Public desktop shortcut tools. */
.zvos-file-picker, .zvos [data-zvos-open-files] { margin-bottom: 12px; }
.zvos [data-zvos-open-files] h3 { margin: 0 0 8px; font-size: 15px; color: inherit; }
.zvos [data-zvos-open-files] button { max-width: 100%; overflow-wrap: anywhere; text-align: left; }
.zvos-window-body.zvos-local-file { display: flex; flex-direction: column; padding: 0; }
.zvos-file-note, .zvos-file-text { margin: 0; padding: 12px; }
.zvos-file-text { white-space: pre-wrap; overflow-wrap: anywhere; color: inherit; flex: 1 0 auto; }
.zvos-local-file video { display: block; width: 100%; min-height: 120px; max-height: 100%; background: #101318; object-fit: contain; flex: 1; }

.zvos .zvos-system-app {
    width: 100%;
    margin: 0;
    font-family: inherit;
    cursor: pointer;
}

.zvos .zvos-system-app.is-drop-target {
    outline: 3px solid var(--zvos-accent);
    outline-offset: -3px;
}

.zvos .zvos-tool-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.zvos .zvos-tool-list > li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 16px;
    padding: 10px 12px;
    color: var(--zvos-text);
    background: var(--zvos-surface);
    border: 1px solid var(--zvos-border);
    border-radius: var(--zvos-radius);
}

.zvos .zvos-tool-name,
.zvos .zvos-tool-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.zvos .zvos-tool-name {
    min-width: 0;
    overflow-wrap: anywhere;
    font-weight: 600;
}

.zvos .zvos-tool-name .dashicons {
    flex: 0 0 auto;
    color: var(--zvos-accent);
}

.zvos .zvos-tool-actions {
    flex-wrap: wrap;
}

.zvos .zvos-tool-actions button {
    min-height: 36px;
    margin: 0;
    padding: 5px 10px;
    border: 1px solid var(--zvos-border);
    border-radius: max(3px, calc(var(--zvos-radius) / 2));
    background: var(--zvos-canvas);
    color: var(--zvos-text);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

.zvos .zvos-tool-actions button:hover {
    border-color: var(--zvos-accent);
}

.zvos .zvos-tool-state {
    font-size: 13px;
}

.zvos .zvos-tool-empty {
    margin: 0;
}

/* Shortcut placement uses the full desktop without covering its taskbar. */
.zvos--desktop .zvos-apps.zvos-shortcut-layout {
    --zvos-shortcut-width: 110px;
    --zvos-shortcut-height: calc(var(--zvos-icon-size, 48px) + 64px);
    inset-inline: 0;
    width: auto;
    grid-template-columns: repeat(var(--zvos-shortcut-columns, 1), minmax(0, min(var(--zvos-shortcut-width), 100%)));
    grid-auto-rows: var(--zvos-shortcut-height);
    align-content: start;
    justify-content: start;
    gap: 12px;
    padding: 12px;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-gutter: stable;
}

.zvos .zvos-shortcut-layout .zvos-app {
    position: relative;
    justify-content: center;
    min-width: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 8px 6px;
    gap: 6px;
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.zvos .zvos-shortcut-layout .zvos-app > span:last-child {
    display: -webkit-box;
    max-width: 100%;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.zvos .zvos-shortcut-layout .zvos-app.is-dragging {
    z-index: 1;
    cursor: grabbing;
    pointer-events: none;
    outline: 2px solid var(--zvos-accent);
    outline-offset: -2px;
    box-shadow: 0 4px 14px #0005;
}

@media (max-width: 680px) {
    .zvos--desktop .zvos-apps.zvos-shortcut-layout {
        --zvos-shortcut-width: 90px;
    }
}
