/* 🖐 crm-ccal-dnd.css — перетаскивание заказа в «Kalendarzu brygad» (app/crm-ccal-dnd.js, 22.10.2026).
   Цвета — токены дизайна (tokens.css / ui.css), светлая и тёмная тема одинаково. Цели нажатия ≥ 44 px. */

/* карточка, которую можно тащить */
.crm-ccal-j[data-dnd]{cursor:grab;touch-action:manipulation;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.crm-ccal-j[data-dnd]:focus-visible{outline:2px solid var(--accent,#2f6b3a);outline-offset:-2px}
.crm-ccal-j.ccd-press{background:var(--accent-soft,rgba(47,107,58,.12));transition:background .4s}
.crm-ccal-j.ccd-src{opacity:.35}
.crm-ccal-acts{display:flex;flex-wrap:wrap;gap:6px;margin-top:4px}
.crm-ccal-acts>.ui-btn.sm.crm-ccal-ed{margin-top:0}
.crm-ccal-hint{margin:-4px 12px 10px;font-size:12.5px;color:var(--text-3,var(--text-dim))}

/* призрак за указателем */
.ccd-ghost{position:fixed;left:0;top:0;z-index:2147483000;pointer-events:none;margin:0;border:1px solid var(--accent,#2f6b3a);border-radius:var(--r-md,10px);
  background:var(--raise,var(--surface,#fff));box-shadow:var(--shadow-pop,0 8px 24px rgba(0,0,0,.25));opacity:.95;cursor:grabbing;will-change:transform}
.ccd-ghost .crm-ccal-acts,.ccd-ghost .crm-ccal-jo{display:none}

/* колонки на время перетаскивания: шкала часов поверх карточек */
.ccd-on .crm-ccal-c{position:relative;min-height:var(--ccd-min,480px)}
.ccd-on,.ccd-on *{cursor:grabbing}
.ccd-tl{position:absolute;left:0;right:0;bottom:0;z-index:3;background:color-mix(in srgb,var(--surface,#fff) 94%,transparent);border-top:1px solid var(--border-soft,rgba(0,0,0,.08))}
.ccd-hr{position:absolute;left:0;right:0;height:0;border-top:1px dashed var(--border-soft,rgba(0,0,0,.12))}
.ccd-hr>b{position:absolute;left:4px;top:1px;font-size:10.5px;font-weight:600;color:var(--text-3,#777);font-variant-numeric:tabular-nums}
.ccd-busy{position:absolute;left:28px;right:6px;border-radius:4px;background:var(--surface-3,rgba(0,0,0,.08));
  background-image:repeating-linear-gradient(135deg,transparent 0 5px,rgba(127,127,127,.18) 5px 7px)}
.ccd-busy.cancelled{background:transparent;border:1px dashed var(--text-3,#888)}
.ccd-busy.block{background-color:var(--crit-bg,rgba(198,40,40,.08))}
.ccd-busy.hold{background:var(--warn-bg,rgba(178,106,0,.08));border:1px dashed var(--warn,#b26a00)}   /* ⏳ 27.10 wstępna rezerwacja rzeczoznawcy */
.ccd-tl.off,.ccd-tl.block{background:color-mix(in srgb,var(--warn-bg,#fff3e0) 85%,transparent)}
.ccd-tl.block{background:color-mix(in srgb,var(--crit-bg,#fdecea) 85%,transparent)}
.ccd-allx{position:absolute;left:28px;right:6px;top:8px;font-size:12px;font-weight:600;color:var(--text-2,#555)}
.crm-ccal-c.ccd-tgt{border-color:var(--accent,#2f6b3a);box-shadow:0 0 0 2px var(--accent-soft,rgba(47,107,58,.25))}
.ccd-band{position:absolute;left:26px;right:4px;z-index:2;min-height:18px;border-radius:6px;background:var(--accent-soft,rgba(47,107,58,.2));
  border:2px solid var(--accent,#2f6b3a);display:flex;align-items:flex-start}
.ccd-band>span{margin:1px 6px;font-size:12px;font-weight:700;color:var(--text,#111);font-variant-numeric:tabular-nums;white-space:nowrap}
.ccd-band.bad{border-color:var(--crit,#c62828);background:var(--crit-bg,rgba(198,40,40,.12))}
.ccd-band[hidden]{display:none}

/* плашка «Przeniesiono … · Cofnij» / «Brygada zajęta …» */
.ccd-bar{position:fixed;left:50%;bottom:calc(16px + env(safe-area-inset-bottom,0px));z-index:2147483001;transform:translateX(-50%);display:none;align-items:center;gap:10px;
  width:max-content;max-width:calc(100% - 24px);padding:8px 8px 8px 14px;border:1px solid var(--border-strong,rgba(0,0,0,.2));border-radius:var(--r-lg,12px);
  background:var(--raise,#fff);color:var(--text,#111);box-shadow:var(--shadow-pop,0 8px 24px rgba(0,0,0,.25));font-size:14px;line-height:1.35}
.ccd-bar.on{display:flex}
.ccd-bar.warn{box-shadow:inset 3px 0 0 var(--warn,#b26a00),var(--shadow-pop,0 8px 24px rgba(0,0,0,.25))}
.ccd-bar.crit{box-shadow:inset 3px 0 0 var(--crit,#c62828),var(--shadow-pop,0 8px 24px rgba(0,0,0,.25))}
.ccd-bt{margin:0;min-width:0;overflow-wrap:anywhere}
.ccd-ba{display:flex;gap:6px;flex-shrink:0}
.ccd-ba>.ui-btn,.ccd-bx{min-height:44px;min-width:44px}
.ccd-bx{border:0;background:transparent;color:var(--text-2,#555);font:inherit;font-size:20px;cursor:pointer;border-radius:var(--r-sm,6px)}
.ccd-bx:hover,.ccd-bx:focus-visible{background:var(--surface-2,rgba(0,0,0,.05))}
@media (max-width:599px){.ccd-bar{flex-wrap:wrap;left:12px;right:12px;width:auto;transform:none}.ccd-ba{width:100%}.ccd-ba>.ui-btn{flex:1}}

/* меню «⇄ Przenieś» */
.ccd-menu{position:fixed;z-index:2147483001;width:min(340px,calc(100vw - 16px));max-height:min(80vh,560px);overflow:auto;padding:12px;border:1px solid var(--border-strong,rgba(0,0,0,.2));
  border-radius:var(--r-lg,12px);background:var(--raise,#fff);color:var(--text,#111);box-shadow:var(--shadow-pop,0 8px 24px rgba(0,0,0,.25))}
.ccd-menu h3{margin:0 0 8px;font-size:15px}
.ccd-ml{margin:10px 0 6px;font-size:12px;font-weight:600;color:var(--text-2,#555);text-transform:uppercase;letter-spacing:.03em}
.ccd-chips{display:flex;flex-wrap:wrap;gap:6px}
.ccd-chip{min-height:44px;min-width:56px;padding:0 10px;border:1px solid var(--border-strong,rgba(0,0,0,.2));border-radius:999px;background:var(--surface,#fff);color:var(--text,#111);
  font:inherit;font-size:13.5px;font-variant-numeric:tabular-nums;cursor:pointer}
.ccd-chip[aria-pressed=true]{background:var(--accent-soft,rgba(47,107,58,.15));border-color:var(--accent,#2f6b3a);font-weight:700}
.ccd-crews{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}
.ccd-crew{display:flex;width:100%;min-height:44px;align-items:center;justify-content:space-between;gap:8px;padding:6px 10px;border:1px solid var(--border-soft,rgba(0,0,0,.1));
  border-radius:var(--r-md,10px);background:var(--surface,#fff);color:var(--text,#111);font:inherit;text-align:left;cursor:pointer}
.ccd-crew>small{flex-shrink:0;font-size:12px;color:var(--ok,#2e7d32)}
.ccd-crew.busy>small{color:var(--crit,#c62828)}
.ccd-crew:hover,.ccd-crew:focus-visible,.ccd-chip:hover,.ccd-chip:focus-visible{border-color:var(--accent,#2f6b3a)}
.ccd-mf{display:flex;justify-content:flex-end;margin-top:10px}
.ccd-mf>.ui-btn{min-height:44px}
@media (max-width:599px){.ccd-menu{left:8px;right:8px;bottom:8px;top:auto;width:auto}}

.ccd-live{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
@media (prefers-reduced-motion:reduce){.crm-ccal-j.ccd-press{transition:none}}

/* ↔ полоса прокрутки бригад СВЕРХУ (зеркало .crm-ccal; нижняя спрятана, пока верхняя видна) */
.ccd-hw{position:relative}
.ccd-hs{position:sticky;top:var(--ccd-top,0px);z-index:4;overflow-x:scroll;overflow-y:hidden;height:16px;margin:0 12px 6px;
  background:var(--surface,var(--panel,#fff));border-radius:999px;scrollbar-width:thin;scrollbar-color:var(--text-3,#999) transparent}
.ccd-hs[hidden]{display:none}
.ccd-hsi{height:1px}
.ccd-hs::-webkit-scrollbar{height:10px}
.ccd-hs::-webkit-scrollbar-thumb{background:var(--text-3,#999);border-radius:999px}
.ccd-hs::-webkit-scrollbar-track{background:var(--surface-2,rgba(0,0,0,.05));border-radius:999px}
.crm-ccal.ccd-hsx{scrollbar-width:none}
.crm-ccal.ccd-hsx::-webkit-scrollbar{display:none}
