/**
 * Конструктор печати (/constructor): тёмная тема.
 * Общий каркас — constructor-app-shared-dark.css; ниже — только тур Driver.js и тост «тур».
 */
@import url('constructor-app-shared-dark.css');
@import url('crop-modals-shared-dark.css');

/* Driver.js: тур (все шаги — один .driver-popover / .constructor-driver-popover) */
[data-theme="dark"] body.constructor-print-page .file-order-divider {
  background: rgba(99, 102, 241, 0.16);
  border-color: rgba(165, 180, 252, 0.35);
}
[data-theme="dark"] body.constructor-print-page .file-order-divider__name:focus {
  background: #1e293b;
}
[data-theme="dark"] body.constructor-print-page .file-order-divider__meta--stale {
  color: #fb923c;
}
[data-theme="dark"] body.constructor-print-page .file-order-divider__btn.btn-success.btn-icon-outline {
  background: var(--card, #252525);
  color: #86efac;
  border-color: #4ade80;
}
[data-theme="dark"] body.constructor-print-page .file-order-divider__btn.btn-success.btn-icon-outline:hover {
  background: rgba(74, 222, 128, 0.12);
  color: #bbf7d0;
}
[data-theme="dark"] body.constructor-print-page .file-order-divider__btn.btn-danger.btn-icon-outline {
  background: var(--card, #252525);
  color: #fca5a5;
  border-color: #f87171;
}
[data-theme="dark"] body.constructor-print-page .file-order-divider__btn.btn-danger.btn-icon-outline:hover {
  background: rgba(127, 29, 29, 0.35);
  color: #fecaca;
}
[data-theme="dark"] body.constructor-print-page .file-order-divider__btn--print {
  color: #94a3b8;
}
[data-theme="dark"] body.constructor-print-page .file-order-divider__btn--print.is-on,
[data-theme="dark"] body.constructor-print-page .file-order-divider__btn--print[aria-pressed="true"] {
  color: #c7d2fe;
  background: rgba(99, 102, 241, 0.22);
  border-color: rgba(165, 180, 252, 0.35);
}
[data-theme="dark"] body.constructor-print-page .file-order-divider__btn--print:hover,
[data-theme="dark"] body.constructor-print-page .file-order-divider__btn--print:focus {
  color: #c7d2fe;
  background: #1e293b;
  border-color: rgba(165, 180, 252, 0.35);
}
[data-theme="dark"] body.constructor-print-page .constructor-print-all-order-names {
  color: #94a3b8;
}
[data-theme="dark"] body.constructor-print-page .constructor-print-all-order-names.is-on,
[data-theme="dark"] body.constructor-print-page .constructor-print-all-order-names[aria-pressed="true"] {
  color: #c7d2fe;
  background: rgba(99, 102, 241, 0.22);
  border-color: rgba(165, 180, 252, 0.35);
}
[data-theme="dark"] body.constructor-print-page .constructor-print-all-order-names:hover,
[data-theme="dark"] body.constructor-print-page .constructor-print-all-order-names:focus {
  color: #c7d2fe;
  background: #1e293b;
  border-color: rgba(165, 180, 252, 0.35);
}
[data-theme="dark"] body.constructor-print-page .file-order-divider__btn--add {
  background: var(--card, #252525);
  color: #cbd5e1;
  border-color: #64748b;
}
[data-theme="dark"] body.constructor-print-page .file-order-divider__btn--add:hover {
  background: rgba(148, 163, 184, 0.12);
  color: #e2e8f0;
}

[data-theme="dark"] body.constructor-print-page .driver-popover,
[data-theme="dark"] body.constructor-print-page .constructor-driver-popover {
  background-color: var(--card) !important;
  color: var(--text) !important;
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.06) !important;
}

[data-theme="dark"] body.constructor-print-page .constructor-driver-popover .driver-popover-title,
[data-theme="dark"] body.constructor-print-page .driver-popover-title {
  color: var(--text) !important;
}

[data-theme="dark"] body.constructor-print-page .constructor-driver-popover .driver-popover-description,
[data-theme="dark"] body.constructor-print-page .driver-popover-description {
  color: var(--text-secondary) !important;
}

[data-theme="dark"] body.constructor-print-page .constructor-driver-popover .constructor-tour-demo-caption {
  color: var(--text-secondary) !important;
}

[data-theme="dark"] body.constructor-print-page .constructor-driver-popover .constructor-tour-demo-toggle-label {
  color: var(--text-muted) !important;
}

/* «Назад» и вторичные — не трогаем .driver-popover-next-btn */
[data-theme="dark"] body.constructor-print-page .driver-popover-footer button:not(.driver-popover-next-btn) {
  background-color: var(--bg-secondary) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
  text-shadow: none !important;
}

[data-theme="dark"] body.constructor-print-page .driver-popover-footer button:not(.driver-popover-next-btn):hover,
[data-theme="dark"] body.constructor-print-page .driver-popover-footer button:not(.driver-popover-next-btn):focus {
  background-color: var(--card) !important;
}

[data-theme="dark"] body.constructor-print-page .driver-popover-footer .driver-popover-next-btn {
  background: var(--primary) !important;
  color: #fff !important;
  border-color: var(--primary) !important;
}

[data-theme="dark"] body.constructor-print-page .driver-popover-footer .driver-popover-next-btn:hover {
  background: var(--primary-hover) !important;
  border-color: var(--primary-hover) !important;
}

[data-theme="dark"] body.constructor-print-page .driver-popover-progress-text,
[data-theme="dark"] body.constructor-print-page .constructor-driver-popover .driver-popover-progress-text {
  color: var(--text-muted) !important;
}

/* Крестик: убрать синий прямоугольник фокуса; аккуратный focus-visible */
[data-theme="dark"] body.constructor-print-page .driver-popover-close-btn {
  color: var(--text-muted) !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  border: none !important;
}

[data-theme="dark"] body.constructor-print-page .driver-popover-close-btn:hover {
  color: var(--text) !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

[data-theme="dark"] body.constructor-print-page .driver-popover-close-btn:focus:not(:focus-visible) {
  outline: none !important;
  box-shadow: none !important;
}

[data-theme="dark"] body.constructor-print-page .driver-popover-close-btn:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

/* Демо-кнопки в тексте шагов (в светлой теме — белый фон под иконками) */
[data-theme="dark"] body.constructor-print-page .constructor-driver-popover .constructor-tour-bar-btn-demo.btn.btn-icon {
  background: var(--bg-secondary) !important;
  border-color: rgba(77, 154, 255, 0.45) !important;
  color: var(--text) !important;
}

[data-theme="dark"] body.constructor-print-page .constructor-driver-popover .constructor-tour-bar-btn-demo .constructor-tour-help-svg {
  color: var(--text) !important;
}

[data-theme="dark"] body.constructor-print-page .constructor-driver-popover .constructor-tour-demo-btn--trim-outline {
  background: var(--bg-secondary) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

[data-theme="dark"] body.constructor-print-page .constructor-driver-popover .constructor-tour-demo-btn--trim-outline .constructor-svg-icon {
  color: var(--text) !important;
}

[data-theme="dark"] body.constructor-print-page .constructor-driver-popover .constructor-tour-demo-btn--recalc {
  background: var(--bg-secondary) !important;
  border-color: rgba(74, 222, 128, 0.45) !important;
  color: #86efac !important;
}

[data-theme="dark"] body.constructor-print-page .constructor-driver-popover .constructor-tour-demo-btn--palette {
  background: var(--bg-secondary) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

[data-theme="dark"] body.constructor-print-page .constructor-driver-popover .constructor-tour-demo-btn--trash {
  background: var(--bg-secondary) !important;
  border-color: rgba(248, 113, 113, 0.45) !important;
  color: #fca5a5 !important;
}

[data-theme="dark"] body.constructor-print-page .constructor-driver-popover .constructor-tour-demo-btn--remove {
  color: var(--text-muted) !important;
}

[data-theme="dark"] body.constructor-print-page .constructor-driver-popover .constructor-tour-demo-toggle--w-off {
  border-color: var(--border) !important;
  background: var(--bg-secondary) !important;
  color: var(--text-muted) !important;
}

[data-theme="dark"] body.constructor-print-page .constructor-driver-popover .constructor-tour-demo-toggle--w-on {
  border-color: #4ade80 !important;
  background: rgba(74, 222, 128, 0.12) !important;
  color: #86efac !important;
  box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.25) !important;
}

[data-theme="dark"] body.constructor-print-page .constructor-driver-popover .constructor-tour-demo-toggle--w-on .constructor-tour-demo-w-text {
  color: #86efac !important;
}

/* Тост-приглашение на тур */
[data-theme="dark"] body.constructor-print-page .toast .constructor-tour-bar-btn-demo.btn.btn-icon {
  background: var(--bg-secondary) !important;
  border-color: rgba(77, 154, 255, 0.45) !important;
  color: var(--text) !important;
}

[data-theme="dark"] body.constructor-print-page .toast .constructor-tour-bar-btn-demo .constructor-tour-help-svg {
  color: var(--text) !important;
}

[data-theme="dark"] body.constructor-print-page .toast.toast-tour,
[data-theme="dark"] body.constructor-print-page .toast:has(.toast-tour-block) {
  background: var(--card) !important;
  color: var(--text) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45) !important;
}

[data-theme="dark"] body.constructor-print-page .toast.toast-tour .toast-tour-title {
  color: var(--text) !important;
}

[data-theme="dark"] body.constructor-print-page .toast.toast-tour .toast-tour-text {
  color: var(--text-secondary) !important;
}
