/* Bulk import split-screen preview + profile toolbar contrast */

:root {
  --bulk-preview-split-pct: 46%;
}

/* Higher contrast IE/OE/RP icons in bulk edit toolbar */
#doorStyleModal #import-tab .bulk-import-profile-toolbar {
  --shop-profile-btn-border: #334155;
  --shop-profile-btn-bg: #ffffff;
  --shop-profile-btn-bg-hover: #e8f2fc;
  --shop-profile-btn-border-active: #1a5a99;
  --shop-profile-icon-bg: #ffffff;
  --shop-profile-icon-border: #475569;
}

#doorStyleModal #import-tab .bulk-import-profile-toolbar {
  --shop-profile-btn-border: #334155;
  --shop-profile-btn-bg: #ffffff;
  --shop-profile-btn-bg-hover: #e8f2fc;
  --shop-profile-btn-border-active: #1a5a99;
  --shop-profile-icon-bg: #ffffff;
  --shop-profile-icon-border: #475569;
  --shop-profile-popover-border: rgba(15, 23, 42, 0.14);
  --shop-profile-popover-bg: #ffffff;
  --shop-profile-option-hover: #f1f5f9;
  --shop-profile-option-active-border: #1a5a99;
  --shop-profile-option-active-bg: #e8f2fc;
  --shop-profile-outline: #111827;
}

/* Beat theme-shared import-tab "all buttons white text" rule */
#doorStyleModal #import-tab .bulk-import-profile-toolbar .shop-profile-toolbar-btn,
#doorStyleModal #import-tab .bulk-import-profile-toolbar .shop-profile-toolbar-btn *,
#doorStyleModal #import-tab .bulk-import-profile-toolbar .shop-profile-popover,
#doorStyleModal #import-tab .bulk-import-profile-toolbar .shop-profile-popover__option,
#doorStyleModal #import-tab .bulk-import-profile-toolbar .shop-profile-popover__option *,
#doorStyleModal #import-tab .bulk-import-profile-toolbar .shop-profile-popover__code {
  color: #0f172a !important;
}

#doorStyleModal #import-tab .bulk-import-profile-toolbar .shop-profile-popover__icon {
  background: #ffffff !important;
  border: 1px solid #94a3b8 !important;
}

.bulk-import-split-shell__left #doorStyleModal #import-tab .bulk-import-profile-toolbar .shop-profile-toolbar-btn,
.bulk-import-split-shell__left #doorStyleModal #import-tab .bulk-import-profile-toolbar .shop-profile-toolbar-btn * {
  color: #0f172a !important;
}

#doorStyleModal #import-tab .bulk-import-profile-toolbar .shop-profile-toolbar-btn {
  border: 2px solid #334155 !important;
  background: #ffffff !important;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.18);
  color: #0f172a !important;
}

#doorStyleModal #import-tab .bulk-import-profile-toolbar .shop-profile-toolbar-btn:hover,
#doorStyleModal #import-tab .bulk-import-profile-toolbar .shop-profile-toolbar-btn[aria-expanded="true"] {
  background: #e8f2fc !important;
  border-color: #1a5a99 !important;
}

#doorStyleModal #import-tab .bulk-import-profile-toolbar .shop-profile-toolbar-btn__icon {
  width: 44px !important;
  height: 34px !important;
  background: #ffffff !important;
  border: 1px solid #475569 !important;
}

#doorStyleModal #import-tab .bulk-import-profile-toolbar .shop-profile-toolbar-btn__tag,
#doorStyleModal #import-tab .bulk-import-profile-toolbar .shop-profile-toolbar-btn__code {
  color: #0f172a !important;
  font-weight: 800;
}

#doorStyleModal #import-tab .bulk-edit-container .bulk-import-profile-preview-btn {
  background: #ffffff !important;
  color: #0f3460 !important;
  border: 2px solid #1a5a99 !important;
  font-weight: 700;
}

#doorStyleModal #import-tab .bulk-edit-container .bulk-import-profile-preview-btn:hover,
#doorStyleModal #import-tab .bulk-edit-container .bulk-import-profile-preview-btn.is-active {
  background: #dbeafe !important;
  color: #0f3460 !important;
}

body.theme-dark #doorStyleModal #import-tab .bulk-edit-container .bulk-import-profile-preview-btn {
  background: #1e3a5f !important;
  color: #e2e8f0 !important;
  border-color: #60a5fa !important;
}

body.theme-dark #doorStyleModal #import-tab .bulk-import-profile-toolbar .shop-profile-toolbar-btn__tag,
body.theme-dark #doorStyleModal #import-tab .bulk-import-profile-toolbar .shop-profile-toolbar-btn__code {
  color: #e2e8f0 !important;
}

.bulk-import-profile-toolbar .shop-profile-toolbar-btn {
  border: 2px solid #1a5a99 !important;
  background: #ffffff !important;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.18);
  color: #0f172a !important;
}

.bulk-import-profile-toolbar .shop-profile-toolbar-btn:hover,
.bulk-import-profile-toolbar .shop-profile-toolbar-btn[aria-expanded="true"] {
  background: #e8f2fc !important;
  border-color: #0d4f8b !important;
}

.bulk-import-profile-toolbar .shop-profile-toolbar-btn__icon {
  width: 44px !important;
  height: 34px !important;
  background: #ffffff !important;
  border: 1px solid #0f172a !important;
}

.bulk-import-profile-toolbar .shop-profile-toolbar-btn__icon .shop-profile-svg,
.bulk-import-profile-preview-panel__item .shop-profile-popover__icon .shop-profile-svg,
.bulk-import-profile-preview-panel__item .shop-profile-toolbar-btn__icon .shop-profile-svg {
  background: #ffffff !important;
}

.bulk-import-profile-toolbar .shop-profile-toolbar-btn__icon .shop-profile-svg__bg,
.bulk-import-profile-preview-panel__item .shop-profile-popover__icon .shop-profile-svg__bg,
.bulk-import-profile-preview-panel__item .shop-profile-toolbar-btn__icon .shop-profile-svg__bg {
  fill: #ffffff !important;
}

.bulk-import-profile-toolbar .shop-profile-toolbar-btn__icon .shop-profile-svg__outline,
.bulk-import-profile-preview-panel__item .shop-profile-popover__icon .shop-profile-svg__outline,
.bulk-import-profile-preview-panel__item .shop-profile-toolbar-btn__icon .shop-profile-svg__outline {
  stroke: #0f172a !important;
  stroke-width: 0.75 !important;
}

body.theme-dark .bulk-import-profile-toolbar .shop-profile-toolbar-btn__icon {
  background: #0f172a !important;
  border-color: #f8fafc !important;
}

body.theme-dark .bulk-import-profile-toolbar .shop-profile-toolbar-btn__icon .shop-profile-svg,
body.theme-dark .bulk-import-profile-preview-panel__item .shop-profile-popover__icon .shop-profile-svg,
body.theme-dark .bulk-import-profile-preview-panel__item .shop-profile-toolbar-btn__icon .shop-profile-svg {
  background: #0f172a !important;
}

body.theme-dark .bulk-import-profile-toolbar .shop-profile-toolbar-btn__icon .shop-profile-svg__bg,
body.theme-dark .bulk-import-profile-preview-panel__item .shop-profile-popover__icon .shop-profile-svg__bg,
body.theme-dark .bulk-import-profile-preview-panel__item .shop-profile-toolbar-btn__icon .shop-profile-svg__bg {
  fill: #0f172a !important;
}

body.theme-dark .bulk-import-profile-toolbar .shop-profile-toolbar-btn__icon .shop-profile-svg__outline,
body.theme-dark .bulk-import-profile-preview-panel__item .shop-profile-popover__icon .shop-profile-svg__outline,
body.theme-dark .bulk-import-profile-preview-panel__item .shop-profile-toolbar-btn__icon .shop-profile-svg__outline {
  stroke: #f8fafc !important;
}

.bulk-import-profile-toolbar .shop-profile-toolbar-btn__tag {
  color: #0f172a !important;
  font-weight: 800;
}

.bulk-import-profile-toolbar .shop-profile-toolbar-btn__code {
  color: #0f172a !important;
  font-weight: 700;
}

.bulk-import-profile-preview-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid #1a5a99;
  border-radius: 6px;
  background: #fff;
  color: #1a5a99;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.bulk-import-profile-preview-btn:hover,
.bulk-import-profile-preview-btn.is-active {
  background: #e8f2fc;
}

.bulk-import-profile-preview-panel {
  display: none;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  gap: 10px;
}

.bulk-import-profile-preview-panel.is-open {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bulk-import-profile-preview-panel__item {
  text-align: center;
}

.bulk-import-profile-preview-panel__item span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 4px;
}

.bulk-import-profile-preview-panel__item .shop-profile-popover__icon,
.bulk-import-profile-preview-panel__item .shop-profile-toolbar-btn__icon {
  width: 100% !important;
  max-width: 120px;
  height: 72px !important;
  margin: 0 auto;
  background: #ffffff !important;
  border: 1px solid #0f172a !important;
  border-radius: 6px;
}

body.theme-dark .bulk-import-profile-preview-panel__item .shop-profile-popover__icon,
body.theme-dark .bulk-import-profile-preview-panel__item .shop-profile-toolbar-btn__icon {
  background: #0f172a !important;
  border-color: #f8fafc !important;
}

/* Final dark-mode parity: beat import-tab light selectors that use #doorStyleModal #import-tab specificity */
body.theme-dark #doorStyleModal #import-tab .bulk-import-profile-toolbar {
  --shop-profile-btn-bg: #0f172a;
  --shop-profile-btn-bg-hover: #1e293b;
  --shop-profile-btn-border: #f8fafc;
  --shop-profile-icon-bg: #0f172a;
  --shop-profile-icon-border: #f8fafc;
  --shop-profile-popover-bg: #0b1220;
  --shop-profile-popover-border: rgba(248, 250, 252, 0.24);
  --shop-profile-outline: #f8fafc;
}

body.theme-dark #doorStyleModal #import-tab .bulk-import-profile-toolbar .shop-profile-toolbar-btn,
body.theme-dark #doorStyleModal #import-tab .bulk-import-profile-toolbar .shop-profile-popover,
body.theme-dark #doorStyleModal #import-tab .bulk-import-profile-toolbar .shop-profile-popover__option,
body.theme-dark #doorStyleModal #import-tab .bulk-import-profile-toolbar .shop-profile-popover__code,
body.theme-dark #doorStyleModal #import-tab .bulk-import-profile-toolbar .shop-profile-toolbar-btn__tag,
body.theme-dark #doorStyleModal #import-tab .bulk-import-profile-toolbar .shop-profile-toolbar-btn__code {
  color: #f8fafc !important;
}

body.theme-dark #doorStyleModal #import-tab .bulk-import-profile-toolbar .shop-profile-toolbar-btn {
  background: #0f172a !important;
  border-color: #f8fafc !important;
}

body.theme-dark #doorStyleModal #import-tab .bulk-import-profile-toolbar .shop-profile-toolbar-btn:hover,
body.theme-dark #doorStyleModal #import-tab .bulk-import-profile-toolbar .shop-profile-toolbar-btn[aria-expanded="true"] {
  background: #1e293b !important;
  border-color: #93c5fd !important;
}

body.theme-dark #doorStyleModal #import-tab .bulk-import-profile-toolbar .shop-profile-toolbar-btn__icon,
body.theme-dark #doorStyleModal #import-tab .bulk-import-profile-toolbar .shop-profile-popover__icon,
body.theme-dark #doorStyleModal #import-tab .bulk-import-profile-preview-panel__item .shop-profile-popover__icon,
body.theme-dark #doorStyleModal #import-tab .bulk-import-profile-preview-panel__item .shop-profile-toolbar-btn__icon {
  background: #0f172a !important;
  border-color: #f8fafc !important;
}

body.theme-dark #doorStyleModal #import-tab .bulk-import-profile-toolbar .shop-profile-toolbar-btn__icon .shop-profile-svg,
body.theme-dark #doorStyleModal #import-tab .bulk-import-profile-toolbar .shop-profile-popover__icon .shop-profile-svg,
body.theme-dark #doorStyleModal #import-tab .bulk-import-profile-preview-panel__item .shop-profile-popover__icon .shop-profile-svg,
body.theme-dark #doorStyleModal #import-tab .bulk-import-profile-preview-panel__item .shop-profile-toolbar-btn__icon .shop-profile-svg {
  background: #0f172a !important;
}

body.theme-dark #doorStyleModal #import-tab .bulk-import-profile-toolbar .shop-profile-toolbar-btn__icon .shop-profile-svg__bg,
body.theme-dark #doorStyleModal #import-tab .bulk-import-profile-toolbar .shop-profile-popover__icon .shop-profile-svg__bg,
body.theme-dark #doorStyleModal #import-tab .bulk-import-profile-preview-panel__item .shop-profile-popover__icon .shop-profile-svg__bg,
body.theme-dark #doorStyleModal #import-tab .bulk-import-profile-preview-panel__item .shop-profile-toolbar-btn__icon .shop-profile-svg__bg {
  fill: #0f172a !important;
}

body.theme-dark #doorStyleModal #import-tab .bulk-import-profile-toolbar .shop-profile-toolbar-btn__icon .shop-profile-svg__outline,
body.theme-dark #doorStyleModal #import-tab .bulk-import-profile-toolbar .shop-profile-popover__icon .shop-profile-svg__outline,
body.theme-dark #doorStyleModal #import-tab .bulk-import-profile-preview-panel__item .shop-profile-popover__icon .shop-profile-svg__outline,
body.theme-dark #doorStyleModal #import-tab .bulk-import-profile-preview-panel__item .shop-profile-toolbar-btn__icon .shop-profile-svg__outline {
  stroke: #f8fafc !important;
  stroke-width: 0.75 !important;
}

body.theme-dark #doorStyleModal #import-tab .bulk-import-profile-preview-panel__item span {
  color: #e2e8f0 !important;
}

/* Split-screen preview mode — true docked layout */
body.bulk-import-preview-active {
  overflow: hidden;
}

body.bulk-import-preview-active .panel-left,
body.bulk-import-preview-active .panel-right {
  visibility: hidden !important;
  pointer-events: none !important;
}

.bulk-import-split-shell {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  background: rgba(15, 23, 42, 0.35);
  overflow: hidden;
}

.bulk-import-split-shell[hidden] {
  display: none !important;
}

.bulk-import-split-shell__left {
  flex: 0 0 var(--bulk-preview-split-pct, 46%);
  min-width: 280px;
  max-width: none;
  width: auto;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: rgba(15, 23, 42, 0.45);
}

.bulk-import-split-shell__right {
  flex: 1 1 auto;
  min-width: 240px;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #13253a;
  overflow: hidden;
  position: relative;
}

.bulk-import-split-shell__divider {
  flex: 0 0 8px;
  cursor: col-resize;
  touch-action: none;
  background: linear-gradient(90deg, transparent, rgba(26, 90, 153, 0.45), transparent);
}

.bulk-import-split-shell__divider:hover,
.bulk-import-split-shell__divider.is-dragging {
  background: linear-gradient(90deg, transparent, rgba(26, 90, 153, 0.75), transparent);
}

.bulk-import-split-shell__left #doorStyleModal.modal {
  position: relative !important;
  inset: auto !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  overflow: hidden !important;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  z-index: auto !important;
}

.bulk-import-split-shell__left #doorStyleModal.bulk-import-view.modal {
  align-items: stretch !important;
  justify-content: flex-start !important;
}

.bulk-import-split-shell__left #doorStyleModal .modal-content {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  height: 100% !important;
  max-height: none !important;
  margin: 0 !important;
  border-radius: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
  flex: 1 1 auto;
  min-height: 0;
  box-sizing: border-box;
}

.bulk-import-split-shell__left #doorStyleModal.bulk-import-view .modal-content {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  max-height: none !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

.bulk-import-split-shell__left #doorStyleModal.bulk-import-view #import-tab.tab-content.active {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}

.bulk-import-split-shell__left #doorStyleModal.bulk-import-view #import-tab .bulk-import-table-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto !important;
}

.bulk-import-split-shell__left #doorStyleModal #import-tab.tab-content.active {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  flex: 1 1 auto;
  box-sizing: border-box;
}

.bulk-import-split-shell__left #doorStyleModal #import-tab .bulk-import-table-inner,
.bulk-import-split-shell__left #doorStyleModal #import-tab #specificationsTable {
  width: 100% !important;
  max-width: none !important;
}

.bulk-import-split-shell__right .panel-middle.panel-middle--with-toolbar {
  position: relative !important;
  inset: auto !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  width: 100% !important;
  height: 100% !important;
  flex: 1 1 auto;
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
  z-index: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  pointer-events: auto !important;
}

.bulk-import-split-shell__right #viewerContainer {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  width: 100% !important;
  height: auto !important;
  position: relative !important;
}

.bulk-import-split-shell__right #viewerCanvas {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
}

.bulk-import-split-shell__right #door-import-toolbar-btn {
  display: none !important;
}

#bulkImportPreviewResizeHandle {
  display: none !important;
}

.bulk-import-collapsible {
  margin-bottom: 16px;
}

.bulk-import-collapsible__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  background: rgba(15, 23, 42, 0.04);
  color: inherit;
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.bulk-import-collapsible__toggle--section {
  border-radius: 6px 6px 0 0;
}

.bulk-import-collapsible.is-collapsed .bulk-import-collapsible__toggle--section {
  border-radius: 6px;
}

.bulk-import-collapsible__label {
  font-weight: 700;
  font-size: 14px;
  flex: 0 0 auto;
}

.bulk-import-collapsible__summary {
  flex: 1 1 auto;
  font-size: 12px;
  opacity: 0.75;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bulk-import-collapsible__chevron {
  flex: 0 0 auto;
  font-size: 11px;
  transition: transform 0.2s ease;
}

.bulk-import-collapsible.is-collapsed .bulk-import-collapsible__chevron {
  transform: rotate(-90deg);
}

.bulk-import-collapsible__body[hidden] {
  display: none !important;
}

#bulkImportStatsCollapsible.summary-stats-container {
  padding: 0;
  border: 1px solid var(--import-border-color, #dee2e6);
  border-radius: 6px;
  overflow: hidden;
}

#bulkImportStatsCollapsible .bulk-import-collapsible__body {
  padding: 12px;
}

#specificationsTable tr.import-row-auto-sized {
  background: rgba(255, 193, 7, 0.12);
}

body.theme-dark #specificationsTable tr.import-row-auto-sized {
  background: rgba(255, 193, 7, 0.16);
}

#bulkImportSubmitBtn.is-added {
  background: #6c757d !important;
  border-color: #6c757d !important;
  cursor: not-allowed !important;
  opacity: 0.92;
}

#bulkImportSubmitBtn.is-submitting {
  opacity: 0.8;
  cursor: wait !important;
}

/* Hide stale GLB loading overlay once parametric preview is visible */
.bulk-import-split-shell__right #viewerContainer:has(canvas) #model-loading-indicator {
  display: none !important;
}

.bulk-import-preview-controls {
  position: absolute;
  top: 52px;
  right: 12px;
  z-index: 12010;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bulk-import-preview-controls button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
}

.bulk-import-preview-controls button:hover {
  background: rgba(26, 90, 153, 0.9);
}

.bulk-import-preview-source {
  position: absolute;
  left: 12px;
  top: 52px;
  z-index: 12010;
  max-width: 55%;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.72);
  color: #e2e8f0;
  font-size: 11px;
  line-height: 1.35;
}

.import-row-actions {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
}

.import-row-actions button {
  border: none;
  border-radius: 3px;
  padding: 2px 6px;
  cursor: pointer;
  font-size: 10px;
  line-height: 1.2;
}

.import-row-copy-btn {
  background: #17a2b8;
  color: #fff;
}

.import-row-delete-btn {
  background: #dc3545;
  color: #fff;
}

tr.import-row-preview-focus td {
  background: #e8f4fd !important;
}

@media (max-width: 900px) {
  .bulk-import-split-shell {
    flex-direction: column;
  }

  .bulk-import-split-shell__left {
    flex: 0 0 55% !important;
    max-width: none;
    min-width: 0;
    width: 100%;
  }

  .bulk-import-split-shell__right {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
  }

  .bulk-import-split-shell__divider {
    flex: 0 0 8px;
    width: 100%;
    height: 8px;
    cursor: row-resize;
  }
}
