/* Плашка про V2 (видно у V1 і Pro) та оболонка Pro (усе під html.pro).
   Кольори тем лишаються зі styles.css — тут лише компонування і щільність. */

/* ---------- плашка про V2 ---------- */
.v2-pill { display: inline-flex; align-items: center; height: 26px; margin-left: 14px; border-radius: 13px; background: #edf1ff; border: 1px solid #c9d5ff; white-space: nowrap; overflow: hidden; flex-shrink: 0; }
.v2-pill-link { display: inline-flex; align-items: center; gap: 7px; height: 100%; padding: 0 4px 0 4px; color: #244ee4; font-size: 10px; font-weight: 700; text-decoration: none; }
.v2-pill-link b { display: grid; place-items: center; height: 18px; padding: 0 7px; border-radius: 9px; color: #fff; background: #315efb; font-size: 9px; letter-spacing: .3px; }
.v2-pill-link:hover span { text-decoration: underline; }
.history-actions .v2-pill-close { width: 22px; height: 24px; margin-right: 2px; border-radius: 11px; color: #6b7fc9; font-size: 14px; line-height: 1; }
.history-actions .v2-pill-close:hover { background: #dbe3ff; color: #244ee4; }
.theme-dark .v2-pill { background: #252b3d; border-color: #3a4672; }
.theme-dark .v2-pill-link { color: #a9bdff; }
.theme-dark .history-actions .v2-pill-close { color: #8291c7; }
.theme-dark .history-actions .v2-pill-close:hover { background: #323b59; color: #fff; }
@media (max-width: 1180px) { .v2-pill-link span { display: none; } }
.saved { white-space: nowrap; }

/* ---------- Pro: сітка ---------- */
html.pro .app-shell { grid-template: 36px minmax(0, 1fr) / 46px minmax(420px, 1fr) 318px; }
html.pro .app-shell.header-collapsed { grid-template: 0px 100vh / 46px minmax(420px, 1fr) 318px; }
html.pro .app-shell.side-collapsed { grid-template-columns: 46px minmax(420px, 1fr) 0px !important; }
html.pro .app-shell.side-collapsed.header-collapsed { grid-template: 0px 100vh / 46px minmax(420px, 1fr) 0px !important; }

/* ---------- Pro: верхній рядок із меню ---------- */
html.pro .topbar { grid-template-columns: auto auto 1fr auto; gap: 6px; padding: 0 8px 0 10px; overflow: visible; }
html.pro .brand { gap: 6px; font-size: 12px; letter-spacing: -.3px; }
html.pro .brand-mark { width: 20px; height: 20px; border-radius: 5px; box-shadow: none; }
html.pro .brand-mark svg { width: 13px; height: 13px; }
html.pro .pro-badge { padding: 1px 5px; border-radius: 3px; color: #fff; background: var(--blue); font-size: 8px; font-style: normal; font-weight: 800; letter-spacing: .4px; }
html.pro .theme-control { display: none; }
html.pro .history-actions button { width: 26px; height: 26px; border-radius: 4px; }
html.pro .history-actions svg { width: 16px; height: 16px; }
html.pro .open-button, html.pro .export-button { height: 26px; padding: 0 10px; border-radius: 4px; font-size: 10px; box-shadow: none; }
html.pro .open-button svg, html.pro .export-button svg { width: 14px; height: 14px; }
html.pro .header-collapse-btn { width: 26px; height: 26px; border-radius: 4px; }

html.pro .menubar { display: flex; align-items: center; margin-left: 6px; }
html.pro .menu-title { height: 24px; padding: 0 9px; border: 0; border-radius: 4px; background: transparent; color: inherit; font-size: 11px; font-weight: 600; cursor: default; }
html.pro .menu-title:hover, html.pro .menu-title.open { background: rgba(127,127,127,.2); }

.menu-list { position: fixed; z-index: 60; min-width: 250px; padding: 5px; border-radius: 6px; border: 1px solid #45494f; background: #2b2e33; box-shadow: 0 12px 34px rgba(0,0,0,.42); font-family: "Manrope", sans-serif; }
.menu-list hr { height: 1px; margin: 5px 4px; border: 0; background: #40444a; }
.menu-item { display: flex; align-items: center; justify-content: space-between; gap: 22px; width: 100%; height: 26px; padding: 0 10px; border: 0; border-radius: 4px; background: transparent; color: #e3e5e8; font-size: 11px; font-weight: 500; text-align: left; cursor: default; }
.menu-item:hover, .menu-item:focus-visible { background: #315efb; color: #fff; outline: 0; }
.menu-item kbd, .palette-item kbd { font: 500 10px "IBM Plex Mono", monospace; color: #9499a1; }
.menu-item:hover kbd, .menu-item:focus-visible kbd { color: #dce4ff; }

/* ---------- Pro: палітра команд ---------- */
.palette { position: fixed; inset: 0; z-index: 70; display: flex; justify-content: center; align-items: flex-start; padding-top: 14vh; background: rgba(0,0,0,.34); font-family: "Manrope", sans-serif; }
.palette-box { width: min(520px, calc(100vw - 32px)); border-radius: 8px; border: 1px solid #484c53; background: #2b2e33; box-shadow: 0 22px 60px rgba(0,0,0,.5); overflow: hidden; }
.palette-input { width: 100%; height: 42px; padding: 0 14px; border: 0; border-bottom: 1px solid #40444a; background: transparent; color: #f0f1f3; font-size: 14px; outline: 0; }
.palette-input::placeholder { color: #80858d; }
.palette-list { max-height: 46vh; overflow-y: auto; padding: 5px; scrollbar-width: thin; }
.palette-item { display: grid; grid-template-columns: 92px 1fr auto; align-items: center; gap: 10px; width: 100%; min-height: 30px; padding: 0 10px; border: 0; border-radius: 4px; background: transparent; color: #e3e5e8; font-size: 12px; text-align: left; cursor: default; }
.palette-item small { color: #8a8f97; font-size: 10px; }
.palette-item.active, .palette-item:hover { background: #315efb; color: #fff; }
.palette-item.active small, .palette-item.active kbd, .palette-item:hover small, .palette-item:hover kbd { color: #dce4ff; }
.palette-empty { margin: 0; padding: 14px; color: #8a8f97; font-size: 12px; text-align: center; }

/* ---------- Pro: панель інструментів ---------- */
html.pro .toolrail { padding: 6px 5px 8px; }
html.pro .tool-list { gap: 2px; }
html.pro .tool { min-height: 36px; height: 36px; padding: 0; border-radius: 4px; }
html.pro .tool > span, html.pro .help-tool small { display: none; }
html.pro .help-tool > span { display: grid; width: 20px; height: 20px; font-size: 11px; }
html.pro .tool.active::before { left: -5px; width: 2px; height: 22px; }

/* ---------- Pro: робоча зона ---------- */
html.pro .workspace { grid-template-rows: 40px minmax(0, 1fr) 64px; }
html.pro .workspace.top-collapsed { grid-template-rows: 0px minmax(0, 1fr) 64px; }
html.pro .workspace.bottom-collapsed { grid-template-rows: 40px minmax(0, 1fr) 0px; }
html.pro .workspace.top-collapsed.bottom-collapsed { grid-template-rows: 0px minmax(0, 1fr) 0px; }
html.pro .workspace-head { padding-top: 0; padding-bottom: 0; }
html.pro .workspace-head > div { flex-direction: row; align-items: center; gap: 8px; }
html.pro .workspace-head > div:first-child { align-items: baseline; gap: 10px; }
html.pro .compare { padding: 5px 9px; border-radius: 4px; }
html.pro .compare-modes { border-radius: 4px; }
html.pro .compare-modes button { height: 22px; border-radius: 3px; font-size: 9px; }
html.pro .theme-dark .compare kbd, html.pro .theme-dark .canvas-tools kbd { color: #b4b8bf; border-color: #5a5f67; background: rgba(255,255,255,.08); }
html.pro .filmstrip { padding: 6px 12px; }

/* ---------- Pro: док праворуч ---------- */
html.pro .panel-heading { min-height: 36px; padding: 0 10px 0 14px; }
html.pro .panel-heading > div { flex-direction: row; align-items: baseline; gap: 8px; }
html.pro .panel-heading strong { font-size: 12px; }
html.pro .settings-section { padding: 12px 14px 13px; }
