/* WorkLine 1.9.88 */

/* ---------- «Стекло» в основных вкладках: как у окон — серо-затемнённое, прозрачность по ползунку (до 80 %) ---------- */
html[data-wallpaper]:not([data-wallpaper="none"]) { --tint-card-rgb: var(--card-rgb); --tint-bg-rgb: var(--bg-rgb); }
html[data-wallpaper]:not([data-wallpaper="none"]) {
  --glass: rgba(var(--tint-card-rgb), var(--wl-surface-alpha, 1));
  --glass-soft: rgba(var(--tint-bg-rgb), var(--wl-surface-alpha-soft, 1));
}
html[data-wallpaper]:not([data-wallpaper="none"]) #app-root {
  --card-rgb: var(--tint-card-rgb); --bg-rgb: var(--tint-bg-rgb);
  --card: var(--glass); --surface: var(--glass); --bg: var(--glass-soft); --surface-2: var(--glass-soft);
}
html[data-wallpaper]:not([data-wallpaper="none"]) #app-root :is(.drinks-card, .settings-card, .orders-supplier-card, .wo-month-block, .tasks-quick-add, .ware-row, .nkl-card, .res-card) {
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
/* поиск в шапке — тоже прозрачный, как всё остальное */
html[data-wallpaper]:not([data-wallpaper="none"]) form.global-search-bar {
  background: var(--glass) !important; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
html[data-wallpaper]:not([data-wallpaper="none"]) form.global-search-bar input { background: transparent !important; }

/* ---------- Заказы: поиск — круглой кнопкой-лупой, как на складе ---------- */
#orders .orders-toolbar #orders-search { display: none !important; }
#orders .orders-toolbar { justify-content: flex-end; }
#orders .orders-toolbar-actions { width: 100%; justify-content: flex-start; }

/* ---------- Склад → «Вес бутылок»: во весь экран, строки — карточками как в заказах ---------- */
.inv-w-bg:has(.inv-bw) { align-items: stretch; padding: 0; background: rgba(0, 0, 0, .35); }
.inv-w-bg .sch-sheet.inv-bw {
  width: 100%; max-width: none; height: 100%; max-height: none !important; border-radius: 0; box-sizing: border-box;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 14px calc(12px + env(safe-area-inset-bottom, 0px)); margin: 0;
}
.inv-bw .inv-bw-list { display: flex; flex-direction: column; gap: 8px; padding: 2px 0 8px; margin: 8px 0 6px; }
.inv-bw .inv-bw-row { border: 1px solid var(--wl-line, var(--border)); border-radius: 14px; background: var(--card); padding: 0 12px; flex: 0 0 auto; }
.inv-bw .inv-bw-row .inv-bw-h { padding: 12px 0; }
.inv-bw .inv-bw-row:not(.is-collapsed) { border-color: rgba(var(--primary-rgb), .55); }
.inv-bw .inv-bw-q { height: 46px; border-radius: 14px; }
.inv-bw .inv-bw-add { padding-top: 6px; }

/* ---------- Посуда: строка в одну линию; «в заказе» — корзина в строке с описанием ---------- */
#inv-pane-ware .ware-row { flex-wrap: nowrap !important; row-gap: 0; gap: 8px; padding: 9px 8px 9px 10px; }
#inv-pane-ware .ware-row > * { order: 0 !important; margin: 0 !important; }
#inv-pane-ware .ware-row .ware-main { flex: 1 1 auto; min-width: 0; }
#inv-pane-ware .ware-row .ware-name { overflow-wrap: break-word; word-break: normal; hyphens: auto; }
.ware-inord { white-space: nowrap; }
.ware-inord .wl-icon { vertical-align: -2px; }
@media (max-width: 440px) {
  #inv-pane-ware .ware-row { gap: 5px; padding: 8px 6px 8px 8px; }
  #inv-pane-ware .drinks-card { padding-left: 8px; padding-right: 8px; }
  #inv-pane-ware .ware-photo { flex-basis: 34px; width: 34px; height: 34px; border-radius: 10px; }
  #inv-pane-ware .ware-photo:not(.has) { display: none; } /* фото добавляется в «Изменить» */
  #inv-pane-ware .ware-cart, #inv-pane-ware .ware-step { width: 28px; height: 32px; border-radius: 9px; }
  #inv-pane-ware .ware-qty { gap: 3px; }
  #inv-pane-ware .ware-qty-in { width: 36px; height: 32px; font-size: 15px; padding: 0 2px; border-radius: 9px; }
  #inv-pane-ware .ware-more { width: 22px; height: 32px; flex: 0 0 22px; }
}
/* список заказа посуды: [− число +] по центру */
.ware-orow { justify-content: center; }
.ware-orow .ware-main { order: 0; }
.ware-orow::before { content: ''; flex: 0 0 34px; order: 1; }
.ware-orow .ware-qty { order: 2; margin: 0 0 0 auto !important; }
.ware-orow .ware-ounit { order: 3; margin-right: auto; }
.ware-orow .ware-more, .ware-orow .ware-more-ph { order: 4; }

/* ---------- Списания: «+ Шаблон / ✎ / − Шаблон» не уходят вниз ---------- */
.wo-collapsible-head { flex-wrap: nowrap !important; gap: 6px; }
.wo-collapsible-head .collapsible-card-toggle { flex: 1 1 0 !important; min-width: 0; }
.wo-collapsible-head .collapsible-card-toggle > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wo-collapsible-head .orders-small-btn { flex: 0 0 auto; }
@media (max-width: 440px) {
  .wo-collapsible-head { gap: 4px; }
  [data-skin] .wo-collapsible-head .orders-small-btn { padding: 4px 6px !important; font-size: 11px !important; gap: 3px; min-height: 0; height: 30px; }
  .wo-collapsible-head .orders-small-btn .wl-icon { width: 12px; height: 12px; }
  .wo-collapsible-head .collapsible-card-toggle { min-width: 76px; }
  .wo-collapsible-head .collapsible-card-toggle > span:first-child { font-size: 13.5px; }
  .wo-collapsible-head .collapsible-card-chevron { margin-left: 2px; }
  .wo-collapsible-head .collapsible-card-toggle { font-size: 14px; }
}

/* ---------- Накладные: «Категория» и «Изменить» всегда на виду, категории — списком ---------- */
.nkl-cat-actions { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 8px; }
.nkl-cat-actions[hidden] { display: none; }

/* ---------- Меню: без вспышки при открытии позиции ---------- */
.em-item, .em-item * { -webkit-tap-highlight-color: transparent; }
.em-item { -webkit-user-select: none; user-select: none; transition: none; }
.em-item:active { background: var(--card); }
.em-big { background-color: transparent; }
.em-sheet-bg { transition: opacity .12s ease; }

/* ---------- Задачи: «+» поверх списка, строка добавления выезжает снизу ---------- */
.tasks-fab { display: none !important; }
.task-add-fab { z-index: 900; }
#tasks-quick-add { display: none; }
body.task-add-open #tasks-quick-add {
  display: block; position: fixed; left: 12px; right: 12px; bottom: calc(var(--kb, 0px) + 12px + env(safe-area-inset-bottom, 0px)); z-index: 8100; margin: 0;
  border: 1.5px solid rgba(var(--primary-rgb), .45); border-radius: 18px; padding: 10px 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
  background: rgb(var(--card-rgb)); animation: invBarIn .16s ease-out both;
}
body.task-add-open #tasks-quick-add .tasks-quick-main { padding-right: 36px; }
body.task-add-open .tabs { visibility: hidden; }
.tasks-quick-x { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: transparent; color: var(--text); opacity: .6; display: none; align-items: center; justify-content: center; padding: 0; }
body.task-add-open .tasks-quick-x { display: inline-flex; }

/* ---------- Ассистент: свайп по чату — «Переименовать» и «Удалить» ---------- */
.wl-ai-hrow:not(.ren) { position: relative; overflow: hidden; border-radius: 12px; touch-action: pan-y; }
.wl-ai-hrow:not(.ren) .wl-ai-hopen { position: relative; z-index: 1; width: 100%; flex: 1 1 100%; background: rgb(var(--card-rgb)); transform: translateX(var(--sw, 0px)); transition: transform .18s ease; }
.wl-ai-hrow.sw { --sw: -112px; }
.wl-ai-hrow.drag .wl-ai-hopen { transition: none; }
.wl-ai-hrow:not(.ren) .wl-ai-hren, .wl-ai-hrow:not(.ren) .wl-ai-hdel { position: absolute; top: 0; bottom: 0; width: 56px; flex: none; border-radius: 0; opacity: 1; color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.wl-ai-hrow:not(.ren) .wl-ai-hren { right: 56px; background: var(--primary); }
.wl-ai-hrow:not(.ren) .wl-ai-hdel { right: 0; background: #e24c4c; }

/* ещё белые элементы в основных вкладках — тоже стекло по ползунку */
html[data-wallpaper]:not([data-wallpaper="none"]) #app-root :is(.task-card, .tasks-day, .tasks-month-day, .tasks-month-card) { background: var(--glass) !important; }
html[data-wallpaper]:not([data-wallpaper="none"]) #app-root :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]):not(#global-search-input), select, textarea) {
  background-color: var(--glass-soft) !important;
}
body.task-add-open #tasks-quick-add { background: rgb(var(--card-rgb)) !important; }
@media (max-width: 440px) { .wo-tpl-sub { display: none; } }
@media (max-width: 390px) { .wo-collapsible-head .wo-bw { display: none; } .wo-collapsible-head .orders-small-btn { min-width: 34px; justify-content: center; } }
