/**
 * Конструктор печати (/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 .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.toast-tour.visible {
  background: rgba(0, 0, 0, 0.52) !important;
}
[data-theme="dark"] body.constructor-print-page #toast.toast.toast-tour.visible .toast-tour-block {
  background: var(--card) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !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;
}
