/* «Капля процесса» и карточка итога (23.10.2026) — public/proc-drop.js.
   Цвета: идёт процесс — фиолетовый (не путать с голубой Каплей-помощником), итог — зелёный / жёлтый /
   красный / серо-синий. Не перекрывает экран: кликать можно и вокруг; закрыть — ✕ или Esc. */
#proc-drop {
  --pd: #7a5af8;            /* идёт процесс */
  --pd-soft: #f4f3ff;
  position: fixed;
  left: 50%;
  top: 34%;
  transform: translate(-50%, -50%);
  z-index: 2300;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  width: min(560px, calc(100vw - 32px));
}
#proc-drop[hidden] { display: none; }
#proc-drop.pd-k-success { --pd: #12b76a; --pd-soft: #ecfdf3; }
#proc-drop.pd-k-warning { --pd: #f79009; --pd-soft: #fffaeb; }
#proc-drop.pd-k-error   { --pd: #f04438; --pd-soft: #fef3f2; }
#proc-drop.pd-k-info    { --pd: #4e6584; --pd-soft: #f2f4f7; }

.pd-stage { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.pd-drop { width: 64px; height: 80px; filter: drop-shadow(0 8px 18px rgba(16, 24, 40, 0.22)); transition: transform 0.2s; }
.pd-drop path { fill: var(--pd); transition: fill 0.35s; }
.pd-shine { fill: rgba(255, 255, 255, 0.45); }
.pd-ring { position: absolute; left: 50%; top: 52px; width: 70px; height: 70px; margin-left: -35px; border-radius: 50%; border: 3px solid var(--pd); opacity: 0; }
.pd-running .pd-drop { animation: pd-bob 1.2s ease-in-out infinite; }
.pd-running .pd-ring { animation: pd-ripple 1.6s ease-out infinite; }
.pd-label { min-height: 0; text-align: center; font-weight: 600; font-size: 14px; color: #1d2939; background: rgba(255, 255, 255, 0.94); border-radius: 999px; padding: 6px 14px; box-shadow: 0 4px 14px rgba(16, 24, 40, 0.14); }
.pd-label:empty { display: none; }
.pd-time { margin-left: 10px; color: #667085; font-weight: 500; font-variant-numeric: tabular-nums; }
#proc-drop:not(.pd-running):not(.pd-done) .pd-stage { display: none; }

.pd-card { pointer-events: auto; width: 100%; background: #fff; border-radius: 14px; border: 1px solid var(--pd); box-shadow: 0 18px 40px rgba(16, 24, 40, 0.22); overflow: hidden; }
.pd-card[hidden] { display: none; }
.pd-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 14px; background: var(--pd-soft); border-bottom: 1px solid var(--border, #e4e7ec); }
.pd-head b { flex: 1 1 auto; font-size: 15px; color: #1d2939; }
.pd-mini { width: 12px; height: 15px; background: var(--pd); clip-path: path('M6 0C6 0 0 7 0 10a6 6 0 0 0 12 0C12 7 6 0 6 0Z'); flex: 0 0 auto; }
.pd-x { border: none; background: transparent; font-size: 16px; line-height: 1; padding: 6px 8px; border-radius: 8px; cursor: pointer; color: #475467; min-height: 36px; min-width: 36px; } /* 28 → 36: №261109-КИ-6 */
.pd-x:hover { background: rgba(16, 24, 40, 0.08); color: #101828; }
.pd-list { list-style: none; margin: 0; padding: 6px 0; max-height: 42vh; overflow-y: auto; }
.pd-m { display: flex; gap: 10px; align-items: flex-start; padding: 7px 14px; font-size: 14px; line-height: 1.4; color: #1d2939; }
.pd-m + .pd-m { border-top: 1px dashed #eaecf0; }
.pd-dot { flex: 0 0 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: #98a2b3; }
.pd-m-success .pd-dot { background: #12b76a; }
.pd-m-warning .pd-dot { background: #f79009; }
.pd-m-error .pd-dot { background: #f04438; }
.pd-m-error .pd-txt { color: #b42318; }
.pd-txt { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; white-space: pre-line; }
.pd-at { flex: 0 0 auto; color: #667085; font-size: 11px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.pd-link { cursor: pointer; }
.pd-link:hover .pd-txt { text-decoration: underline; }
.pd-foot { padding: 6px 14px 9px; font-size: 11px; color: #667085; text-align: right; }
.pd-bump .pd-drop { animation: pd-pop 0.45s ease-out; }

@keyframes pd-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes pd-ripple { 0% { transform: scale(0.5); opacity: 0.55; } 100% { transform: scale(1.7); opacity: 0; } }
@keyframes pd-pop { 0% { transform: scale(0.85); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .pd-running .pd-drop, .pd-running .pd-ring, .pd-bump .pd-drop { animation: none; } }

@media (max-width: 600px) {
  #proc-drop { top: 30%; }
  .pd-drop { width: 52px; height: 65px; }
  .pd-list { max-height: 46vh; }
}

html[data-theme="dark"] .pd-card { background: #1b1d22; }
html[data-theme="dark"] .pd-head { background: color-mix(in srgb, var(--pd) 16%, #1b1d22); border-bottom-color: #2a2d33; }
html[data-theme="dark"] .pd-head b, html[data-theme="dark"] .pd-m { color: #e6e8eb; }
html[data-theme="dark"] .pd-m-error .pd-txt { color: #fda29b; }
html[data-theme="dark"] .pd-label { background: rgba(27, 29, 34, 0.94); color: #e6e8eb; }
html[data-theme="dark"] .pd-x { color: #c3c7cf; }
html[data-theme="dark"] .pd-m + .pd-m { border-top-color: #2a2d33; }

/* 09.11.2026, №261109-КИ-6: серый текст окна ошибки был 2,58 на белом (#98a2b3) — теперь #667085 (≥ 4,5); в тёмной — светлее */
html[data-theme="dark"] .pd-at, html[data-theme="dark"] .pd-foot { color: #a3abb8; }
