/* 3.6 stage 4C: the deck without a side panel. The selected slide carries its tools above the artboard; each tool opens a
   popover next to it (a bottom sheet on phones). The slides get the width the panel used to take. */
.editor250.deck360 .deck-workspace{grid-template-columns:176px minmax(0,1fr)}
@media(min-width:1700px){.editor250.deck360 .deck-workspace{grid-template-columns:192px minmax(0,1fr)}}
@media(max-width:1180px){.editor250.deck360 .deck-workspace{grid-template-columns:152px minmax(0,1fr)}}
@media(max-width:960px){.editor250.deck360 .deck-workspace{grid-template-columns:140px minmax(0,1fr)}}

/* One label height for every slide: selecting a slide while scrolling never shifts the strip. */
.editor250.deck360 .strip-slide-label{height:34px;padding:0 1px 8px;gap:8px;min-width:0}
.editor250.deck360 .strip-slide-label>span:nth-child(2){min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}

.deck360 .slide-toolbar{display:flex;align-items:center;gap:2px;flex:1;min-width:0}
.deck360 .slide-tool{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 10px;border:0;border-radius:7px;background:transparent;color:var(--muted);font:500 12px/1 inherit;white-space:nowrap;cursor:pointer;flex:none}
.deck360 .slide-tool svg{flex:none;color:var(--blue)}
.deck360 .slide-tool:hover:not(:disabled){background:var(--surface-hover);color:var(--ink)}
.deck360 .slide-tool[aria-expanded="true"]{background:var(--blue-soft);color:var(--blue)}
.deck360 .slide-tool:disabled{opacity:.5;cursor:default}
/* The layout is the slide's identity: its name reads first, as a quiet field rather than a button among buttons. */
.deck360 .layout-tool{background:var(--surface);box-shadow:inset 0 0 0 1px var(--line);margin-right:6px;flex:0 1 auto;min-width:0}
.deck360 .layout-tool b{font-weight:600;color:var(--ink);overflow:hidden;text-overflow:ellipsis;min-width:0}
.deck360 .layout-tool:hover:not(:disabled){box-shadow:inset 0 0 0 1px #b9c5e0}
.deck360 .more-tool{margin-left:auto;padding:0 8px;color:var(--ink)}
.deck360 .more-tool svg{color:var(--ink);stroke-width:2.4}

.deck360 .slide-popover{position:fixed;z-index:60;width:320px;max-height:min(72vh,580px);display:flex;flex-direction:column;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:12px;box-shadow:0 18px 48px #1b2b4a26,0 2px 6px #1b2b4a12;overflow:hidden}
.deck360 .slide-popover>header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 8px 8px 16px;border-bottom:1px solid var(--line)}
.deck360 .slide-popover>header strong{font-size:13px;font-weight:600}
.deck360 .slide-popover-body{overflow-y:auto;padding:2px 16px 12px;overscroll-behavior:contain;scrollbar-width:thin}
.deck360 .popover-group{padding:12px 0;border-top:1px solid var(--line)}
.deck360 .popover-group:first-child{border-top:0}
.deck360 .popover-group h3{font-size:11px;font-weight:600;color:var(--muted);margin:0 0 10px}
.deck360 .popover-group>.btn+.btn,.deck360 .popover-group>.slot-tile+.slot-tile,.deck360 .popover-group>.free-image-list+.btn{margin-top:6px}
.deck360 .popover-group>select{width:100%;margin-bottom:12px;font-size:12px}
.deck360 .popover-group .inspector-section .field{margin:0 0 12px}
.deck360 .popover-menu .btn{justify-content:flex-start;width:100%}
.deck360 .popover-current{display:flex;align-items:center;gap:8px;margin:12px 0 0;font-size:12px;font-weight:600}
.deck360 .popover-current svg{color:var(--blue)}
@media(prefers-reduced-motion:no-preference){.deck360 .slide-popover{animation:slide-popover-in .14s ease-out}}
@keyframes slide-popover-in{from{opacity:0;transform:translateY(-4px)}}

/* «+» between two rows (on hover or focus) and at the end of the rail. */
.deck360 .thumb-row{position:relative}
.deck360 .rail-add{position:absolute;left:50%;bottom:-12px;transform:translateX(-50%);z-index:3;width:22px;height:22px;padding:0;border-radius:50%;border:1px solid #c9d2e6;background:var(--surface);color:var(--blue);display:grid;place-items:center;opacity:0;cursor:pointer;box-shadow:0 2px 6px #1b2b4a1c}
.deck360 .thumb-row:hover .rail-add{opacity:1}
@media(prefers-reduced-motion:no-preference){.deck360 .rail-add{transition:opacity .12s}}
@media(hover:none){.deck360 .rail-add{display:none}}
.deck360 .rail-add-end{display:flex;align-items:center;justify-content:center;gap:6px;width:calc(100% - 4px);height:34px;margin:4px 2px 14px;border:1px dashed #c3cce0;border-radius:8px;background:transparent;color:var(--blue);font:500 12px/1 inherit;cursor:pointer}
.deck360 .rail-add-end:hover:not(:disabled){background:var(--surface-hover);border-style:solid}
.deck360 .rail-add-end:disabled,.deck360 .rail-add:disabled{opacity:.45;cursor:default}

/* A new slide waits in the strip as a dashed sheet; it becomes a slide once the author has typed and left it. */
.deck360 .ghost-slide .strip-slide-label{color:var(--blue)}
.deck360 .ghost-layout{margin-left:auto;display:inline-flex;align-items:center;gap:5px;color:var(--muted)}
.editor250.deck360 .ghost-frame{outline:1.5px dashed #9fb0d6;box-shadow:none;background:#fff;padding:5% 6% 0;box-sizing:border-box;cursor:text}
.deck360 .ghost-fields{display:flex;flex-direction:column;gap:18px;color:#20242d}
.deck360 .ghost-title{font:400 clamp(20px,2.4vw,36px)/1.15 Georgia,'Times New Roman',serif;color:#4460ac;outline:0;min-height:1.2em}
.deck360 .ghost-body{font:400 clamp(13px,1.15vw,18px)/1.45 Arial,Helvetica,sans-serif;white-space:pre-wrap;outline:0;min-height:4em}
.deck360 [data-ghost]:empty::before{content:attr(data-placeholder);color:#a9b2c4;pointer-events:none}
.deck360 [data-ghost]:focus{padding-left:10px;margin-left:-13px}
.deck360 .ghost-hint{position:absolute;left:6%;right:6%;bottom:4%;margin:0;font-size:11px;color:#8a93a6}
.deck360 .ghost-row .thumb-frame{display:grid;place-items:center;aspect-ratio:16/9;border:1.5px dashed #9fb0d6;border-radius:4px;color:var(--blue);background:var(--surface)}

.toast.has-action{display:flex;align-items:center;gap:16px}
.toast.visible.has-action{pointer-events:auto}
.toast .toast-action{border:0;background:transparent;color:#b8c9f5;font:600 12px/1 inherit;padding:6px 0;cursor:pointer;text-decoration:underline;text-underline-offset:3px}
.composition-auto{display:grid;place-items:center;aspect-ratio:16/9;background:var(--surface-alt);color:var(--blue);font:400 40px/1 Georgia,serif}

@media(max-width:1180px){.deck360 .slide-tool:not(.layout-tool)>span{display:none}.deck360 .slide-tool{padding:0 8px}}
@media(max-width:960px){.deck360 .rail-add-end>span{display:none}}
@media(max-width:720px){.deck360 .layout-tool>span{display:none}}
/* Phones: the rail is a row of thumbnails above the strip; the tools are icons; a popover is a bottom sheet. */
@media(max-width:620px){
 .editor250.deck360 .deck-workspace{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr)}
 .editor250.deck360 .slides-sidebar{border-right:0;border-bottom:1px solid var(--line)}
 .editor250.deck360 .slides-sidebar>header,.editor250.deck360 .slide-search,.editor250.deck360 .slides-sidebar>footer{display:none}
 .editor250.deck360 .thumbnail-rail{display:flex;flex-direction:row;gap:8px;overflow-x:auto;overflow-y:hidden;padding:8px 10px;max-height:none;scroll-snap-type:x proximity}
 .editor250.deck360 .thumb-row{flex:0 0 96px;margin:0;scroll-snap-align:start}
 .editor250.deck360 .thumb-actions{display:none}
 .deck360 .rail-add{display:none}
 .deck360 .rail-add-end{flex:0 0 54px;width:54px;height:auto;margin:0;flex-direction:column;font-size:10px}
 .deck360 .rail-add-end>span{display:none}
 .deck360 .slide-popover{left:0!important;right:0;top:auto!important;bottom:0;width:auto;max-height:72vh;border-radius:16px 16px 0 0}
 .deck360 .slide-tool{height:34px}
}

/* Text popover: «Вид» and «Перенести» under B/I/U. An unavailable move stays in the menu with its reason. */
.text-edit-popover .text-structure{display:flex;align-items:center;gap:8px;padding:8px 12px;border-bottom:1px solid var(--line);flex:none}
.text-edit-popover .text-menu{position:relative;flex:none}
.text-edit-popover .text-kind{flex:1;min-width:0}
.text-edit-popover .text-kind .text-move-toggle{width:100%;justify-content:flex-start}
.text-edit-popover .text-kind .text-move-toggle>span{color:var(--muted);font-weight:400}
.text-edit-popover .text-kind .text-move-toggle>b{flex:1;min-width:0;font-weight:600;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.text-edit-popover .text-kind .text-move-menu{left:0;right:auto;width:220px}
.text-edit-popover .text-move-menu [aria-checked="true"]{color:var(--blue);background:var(--blue-soft)}
.text-edit-popover .text-move-toggle{display:inline-flex;align-items:center;gap:5px;height:30px;padding:0 9px;border:1px solid var(--line);border-radius:6px;background:var(--surface);color:var(--ink);font:500 12px/1 inherit;cursor:pointer}
.text-edit-popover .text-move-toggle svg{transform:rotate(90deg)}
.text-edit-popover .text-move-toggle[aria-expanded="true"]{background:var(--blue-soft);border-color:var(--blue);color:var(--blue)}
.text-edit-popover .text-move-menu{position:absolute;right:0;top:calc(100% + 4px);z-index:5;width:236px;padding:5px;background:var(--surface);border:1px solid var(--line);border-radius:10px;box-shadow:0 12px 32px #1b2b4a24}
.text-edit-popover .text-move-menu [role^="menuitem"]{display:flex;flex-direction:column;align-items:flex-start;gap:2px;width:100%;padding:8px 10px;border:0;border-radius:7px;background:none;text-align:left;font:500 12px/1.3 inherit;color:var(--ink);cursor:pointer}
.text-edit-popover .text-move-menu [role^="menuitem"]:hover:not([aria-disabled="true"]){background:var(--surface-hover);outline:0}
.text-edit-popover .text-move-menu [aria-disabled="true"]{color:var(--muted);cursor:default}
.text-edit-popover .text-move-menu small{font-size:10.5px;font-weight:400;color:var(--muted)}
/* Focus returns to the rail row after adding or deleting a slide: a brand ring, not the browser's black frame. */
.editor250.deck360 .thumb-row:focus{outline:none}
/* No focus rings anywhere (decision of 15.10.2026): fields keep their own border colour while typing. */
:focus{outline:none}
