/* DI-2b Import details: from the design's assets/css/import-details.css (assetsUI/data-integration-06-11-2026), lines 1-1936. Every selector is scoped under :where(.idt-page), the page's root, so nothing reaches other pages. */
/**
 * ============================================================================
 *  IMPORT DETAILS (assets/css/import-details.css)
 * ----------------------------------------------------------------------------
 *  Specific styling for Import Detail View.
 *  Inherits base CRM design tokens and works seamlessly with:
 *   - list-page.css (.lp-table, .lp-th, .lp-td, .lp-cb, .lp-search)
 *   - object-settings.css (.os-tabbar, .os-tabs, .os-tab)
 *   - data-integration.css (.di-tablewrap, .di-table, .di-tab-pane, .di-name-cell)
 *   - utilities.css
 * ============================================================================
 */

/* -------------------------------------------------------- Record Header ---- */
:where(.idt-page) .record-header {
  margin-bottom: var(--sp-6);
}

:where(.idt-page) .record-header__back {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--fast) var(--ease);
  margin-bottom: var(--sp-3);
}

:where(.idt-page) .record-header__back:hover {
  color: var(--brand);
}

:where(.idt-page) .record-header__body {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-6);
  flex-wrap: wrap;
}

:where(.idt-page) .record-header__main {
  flex: 1 1 300px;
  min-width: 0;
}

:where(.idt-page) .record-header__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  margin: 0 0 var(--sp-2) 0;
  word-break: break-word;
}

:where(.idt-page) .record-header__meta {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

:where(.idt-page) .record-header__meta-item {
  font-size: 13.5px;
  color: var(--text);
}

:where(.idt-page) .record-header__meta-item--subtle {
  color: var(--text-muted);
  font-size: 13px;
}

:where(.idt-page) .record-header__meta-item--strong {
  font-weight: 600;
}

:where(.idt-page) .record-header__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--sp-1);
  text-align: right;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  :where(.idt-page) .record-header__aside {
    align-items: flex-start;
    text-align: left;
    width: 100%;
  }
}

:where(.idt-page) .record-header__aside-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: var(--sp-1);
}

:where(.idt-page) .record-header__link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
  transition: color var(--fast) var(--ease);
}

:where(.idt-page) .record-header__link:hover {
  color: var(--brand-hover);
  text-decoration: underline;
}

/* ------------------------------------------------ Metrics Cards & Grid ---- */
:where(.idt-page) .metrics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}

@media (max-width: 1120px) {
  :where(.idt-page) .metrics-grid {
    grid-template-columns: 1fr;
  }
}

:where(.idt-page) .metric-items {
  display: grid;
  gap: var(--sp-4);
  text-align: center;
  padding-block: var(--sp-3);
}

:where(.idt-page) .metric-items--cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

:where(.idt-page) .metric-items--cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 640px) {
  :where(.idt-page) .metric-items--cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

:where(.idt-page) .metric-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

:where(.idt-page) .metric-item__label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: var(--sp-2);
}

:where(.idt-page) .metric-item__value {
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
}

:where(.idt-page) .metric-item__value--teal {
  color: var(--teal);
}

/* ------------------------------------------- Intent Signals Popover ---- */
:where(.idt-page) .info-popover-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
}

:where(.idt-page) .info-popover-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: transparent;
  border: none;
  padding: var(--sp-1) var(--sp-2);
  color: var(--brand);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  border-radius: var(--radius-sm);
  transition: color var(--fast) var(--ease);
}

:where(.idt-page) .info-popover-btn:hover {
  color: var(--brand-hover);
}

:where(.idt-page) .info-popover {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  width: 320px;
  max-width: calc(100vw - 32px);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-4);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity var(--fast) var(--ease),
    transform var(--fast) var(--ease),
    visibility var(--fast) var(--ease);
}

/* Arrow pointing up to the trigger button */
:where(.idt-page) .info-popover::after {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 0 7px 7px 7px;
  border-style: solid;
  border-color: transparent transparent var(--border-strong) transparent;
}

:where(.idt-page) .info-popover-trigger:hover .info-popover,
:where(.idt-page) .info-popover-trigger:focus-within .info-popover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

:where(.idt-page) .info-popover__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-3);
}

:where(.idt-page) .info-popover__brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}

:where(.idt-page) .info-popover__icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-contrast);
  font-size: 10px;
  font-weight: 800;
}

:where(.idt-page) .info-popover__sub {
  font-size: 12px;
  color: var(--text-muted);
}

:where(.idt-page) .info-popover__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
  margin-bottom: var(--sp-4);
}

:where(.idt-page) .info-popover__tag {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  line-height: 1.2;
}

:where(.idt-page) .info-popover__tag--yellow {
  background: var(--warning-bg);
  border-color: var(--warning);
  color: var(--warning);
}

:where(.idt-page) .info-popover__tag--purple {
  background: var(--indigo-bg);
  border-color: var(--indigo);
  color: var(--indigo);
}

:where(.idt-page) .info-popover__tag--green {
  background: var(--success-bg);
  border-color: var(--success);
  color: var(--success);
}

:where(.idt-page) .info-popover__tag--blue {
  background: var(--info-bg);
  border-color: var(--info);
  color: var(--info);
}

:where(.idt-page) .info-popover__tag--neutral {
  background: var(--neutral-bg);
  border-color: var(--border);
  color: var(--text-muted);
}

:where(.idt-page) .info-popover__title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 var(--sp-1) 0;
}

:where(.idt-page) .info-popover__text {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-muted);
  margin: 0 0 var(--sp-2) 0;
}

:where(.idt-page) .info-popover__link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--brand);
  text-decoration: none;
}

:where(.idt-page) .info-popover__link:hover {
  color: var(--brand-hover);
  text-decoration: underline;
}

/* Strict constraint on popover icons to prevent size blowout */
:where(.idt-page) .info-popover svg,
:where(.idt-page) .info-popover .icon {
  width: 14px !important;
  height: 14px !important;
  max-width: 14px !important;
  max-height: 14px !important;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

/* ------------------------------------------------ Status Badges ---- */
:where(.idt-page) .badge--solid-info {
  background: var(--info);
  color: var(--brand-contrast);
  font-weight: 600;
  font-size: 11px;
  padding: 2px 8px;
}

:where(.idt-page) .badge--solid-success {
  background: var(--success);
  color: var(--brand-contrast);
  font-weight: 600;
  font-size: 11px;
  padding: 2px 8px;
}

:where(.idt-page) .badge--solid-client {
  background: #067647;
  color: var(--brand-contrast);
  font-weight: 600;
  font-size: 11px;
  padding: 2px 8px;
}

:where(.idt-page) .badge--solid-danger {
  background: #991b1b;
  color: #ffffff;
  font-weight: 600;
  font-size: 11px;
  padding: 2px 8px;
}

:where(.idt-page) .badge--solid-warning {
  background: #d97706;
  color: #ffffff;
  font-weight: 600;
  font-size: 11px;
  padding: 2px 8px;
}

:where(.idt-page) .badge--solid-teal {
  background: #0e7c86;
  color: #ffffff;
  font-weight: 600;
  font-size: 11px;
  padding: 2px 8px;
}

:where(.idt-page) .badge--solid-indigo {
  background: #6366f1;
  color: #ffffff;
  font-weight: 600;
  font-size: 11px;
  padding: 2px 8px;
}

:where(.idt-page) .badge--solid-orange {
  background: #fef0c7;
  color: #b54708;
  font-weight: 600;
  font-size: 11px;
  padding: 2px 8px;
}

:where(.idt-page) .badge--solid-pink {
  background: #fce7f3;
  color: #9d174d;
  font-weight: 600;
  font-size: 11px;
  padding: 2px 8px;
}

:where(.idt-page) .badge--mapped {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

/* ------------------------------------------------ Empty State ---- */
:where(.idt-page) .di-empty-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--success-bg);
  border: 3px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--sp-4);
  color: var(--success);
}

:where(.idt-page) .di-empty-circle svg,
:where(.idt-page) .di-empty-circle .icon {
  width: 36px !important;
  height: 36px !important;
  stroke-width: 2.5;
}

/* ------------------------------------------------ Bulk Actions Bar ---- */
:where(.idt-page) .di-tab-pane .lp-bulk {
  margin: 0 0 var(--sp-3) 0;
  padding: 6px 12px;
  background: var(--brand-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
  min-height: 44px;
}

:where(.idt-page) .di-tab-pane .lp-bulk[hidden] {
  display: none !important;
}

:where(.idt-page) .di-tab-pane .lp-bulk__left {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}

:where(.idt-page) .di-tab-pane .lp-bulk__acts {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

:where(.idt-page) .di-tab-pane .lp-bulkbtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
  text-decoration: none;
  white-space: nowrap;
}

:where(.idt-page) .di-tab-pane .lp-bulkbtn:hover,
:where(.idt-page) .di-tab-pane .lp-bulkbtn:focus-visible,
:where(.idt-page) .di-tab-pane .lp-bulkbtn[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.85);
  color: var(--brand);
}

:where(.idt-page) .di-tab-pane .lp-bulkbtn--danger {
  color: var(--danger);
}

:where(.idt-page) .di-tab-pane .lp-bulkbtn--danger:hover {
  background: var(--danger-bg);
  color: var(--danger);
}

:where(.idt-page) .di-tab-pane .lp-bulkbtn svg,
:where(.idt-page) .di-tab-pane .lp-bulkbtn .icon,
:where(.idt-page) .di-tab-pane .lp-bulkbtn .lp-i {
  width: 14px !important;
  height: 14px !important;
  max-width: 14px !important;
  max-height: 14px !important;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

:where(.idt-page) .di-tab-pane .lp-bulk__x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 50%;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
  margin-left: auto;
}

:where(.idt-page) .di-tab-pane .lp-bulk__x:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text);
}

:where(.idt-page) .di-tab-pane .lp-bulk__x svg,
:where(.idt-page) .di-tab-pane .lp-bulk__x .icon,
:where(.idt-page) .di-tab-pane .lp-bulk__x .lp-i {
  width: 14px !important;
  height: 14px !important;
}

/* More Dropdown Menu & Popovers */
:where(.idt-page) .di-bulk-more-menu {
  min-width: 290px;
  max-height: min(480px, calc(100vh - 120px));
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: 0 14px 36px rgba(16, 24, 40, 0.18), 0 2px 6px rgba(16, 24, 40, 0.08);
  z-index: 1100;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

/* Custom WebKit Scrollbar matching CRM standard (eliminates native browser arrows & grey bar) */
:where(.idt-page) .di-bulk-more-menu::-webkit-scrollbar,
:where(.idt-page) .dropdown__menu::-webkit-scrollbar,
:where(.idt-page) .ps-list::-webkit-scrollbar {
  width: 6px;
}

:where(.idt-page) .di-bulk-more-menu::-webkit-scrollbar-track,
:where(.idt-page) .dropdown__menu::-webkit-scrollbar-track,
:where(.idt-page) .ps-list::-webkit-scrollbar-track {
  background: transparent;
  margin: 6px 0;
}

:where(.idt-page) .di-bulk-more-menu::-webkit-scrollbar-thumb,
:where(.idt-page) .dropdown__menu::-webkit-scrollbar-thumb,
:where(.idt-page) .ps-list::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 10px;
}

:where(.idt-page) .di-bulk-more-menu::-webkit-scrollbar-thumb:hover,
:where(.idt-page) .dropdown__menu::-webkit-scrollbar-thumb:hover,
:where(.idt-page) .ps-list::-webkit-scrollbar-thumb:hover {
  background: var(--text-subtle);
}

:where(.idt-page) .di-bulk-more-menu::-webkit-scrollbar-button,
:where(.idt-page) .dropdown__menu::-webkit-scrollbar-button,
:where(.idt-page) .ps-list::-webkit-scrollbar-button {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

:where(.idt-page) .di-bulk-more-menu .dropdown__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  margin: 1px 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  border: 0;
  border-radius: 8px;
  background: transparent;
  width: 100%;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}

:where(.idt-page) .di-bulk-more-menu .dropdown__item:hover,
:where(.idt-page) .di-bulk-more-menu .dropdown__item:focus-visible {
  background: var(--surface-hover);
  color: var(--brand);
  outline: none;
}

:where(.idt-page) .di-bulk-more-menu .dropdown__item svg,
:where(.idt-page) .di-bulk-more-menu .dropdown__item .icon {
  width: 15px !important;
  height: 15px !important;
  max-width: 15px !important;
  max-height: 15px !important;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: color var(--fast) var(--ease);
}

:where(.idt-page) .di-bulk-more-menu .dropdown__item:hover svg,
:where(.idt-page) .di-bulk-more-menu .dropdown__item:hover .icon,
:where(.idt-page) .di-bulk-more-menu .dropdown__item:focus-visible svg,
:where(.idt-page) .di-bulk-more-menu .dropdown__item:focus-visible .icon {
  color: var(--brand);
}

/* Bulk Button Active / Open State */
:where(.idt-page) .lp-bulkbtn[aria-expanded="true"] {
  background: var(--surface) !important;
  color: var(--brand) !important;
  box-shadow: var(--shadow-sm);
}

:where(.idt-page) .lp-bulkbtn[aria-expanded="true"] .lp-i {
  color: var(--brand) !important;
  transform: rotate(180deg);
}

:where(.idt-page) .lp-bulkbtn .lp-i {
  transition: transform var(--fast) var(--ease);
}

/* Selected row highlight */
:where(.idt-page) .lp-tr.is-selected {
  background: var(--brand-soft) !important;
}

:where(.idt-page) .lp-tr.is-selected .lp-td {
  background: var(--brand-soft) !important;
}

@media (max-width: 768px) {
  :where(.idt-page) .di-tab-pane .lp-bulk {
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    padding-top: var(--sp-3);
  }
  :where(.idt-page) .di-tab-pane .lp-bulk__acts {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  :where(.idt-page) .di-tab-pane .lp-bulk__x {
    position: absolute;
    top: 8px;
    right: 8px;
    margin-left: 0;
  }
}

/* ------------------------------------------------ Modals & Drawers ---- */
/* Custom Radio styling using CRM theme tokens (matches reports-dashboard / create-dashboard) */
:where(.idt-page) .check__box--radio {
  border-radius: 50% !important;
}

:where(.idt-page) .check__box--radio::after {
  content: "" !important;
  width: 8px !important;
  height: 8px !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: var(--brand-contrast, #ffffff) !important;
  transform: scale(0) !important;
  transition: transform var(--fast) var(--ease) !important;
}

:where(.idt-page) .check:hover .check__box--radio {
  border-color: var(--brand);
}

:where(.idt-page) .check input[type="radio"]:checked + .check__box--radio {
  background: var(--brand) !important;
  border-color: var(--brand) !important;
}

:where(.idt-page) .check input[type="radio"]:checked + .check__box--radio::after {
  transform: scale(1) !important;
}

/* Allow custom dropdown to escape modal boundary and avoid clipping (matches reports-dashboard) */
:where(.idt-page) .modal-backdrop:not(.modal-backdrop--drawer) .modal {
  overflow: visible !important;
}

:where(.idt-page) .modal-backdrop:not(.modal-backdrop--drawer) .modal .modal__body {
  overflow: visible !important;
  position: relative;
  z-index: 5;
}

:where(.idt-page) .modal-backdrop:not(.modal-backdrop--drawer) .modal .modal__footer {
  position: relative;
  z-index: 1;
}

:where(.idt-page) .custom-select-wrapper.is-open {
  position: relative;
  z-index: 100;
}

:where(.idt-page) .custom-select-wrapper.is-open .custom-select__dropdown {
  z-index: 1100;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18), 0 2px 8px rgba(15, 23, 42, 0.08);
}

/* Ensure clean form field and label spacing in modals and sidedrawers */
:where(.idt-page) .modal .field,
:where(.idt-page) .modal-backdrop--drawer .field {
  display: grid;
  gap: 6px;
  margin-bottom: var(--sp-4);
}

:where(.idt-page) .modal .field:last-child,
:where(.idt-page) .modal-backdrop--drawer .field:last-child {
  margin-bottom: 0;
}

:where(.idt-page) .modal .field__label,
:where(.idt-page) .modal-backdrop--drawer .field__label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  margin: 0;
}

/* Delete confirm button disabled state matching theme */
:where(.idt-page) #bulkDeleteConfirmBtn:disabled {
  background: var(--surface-hover, #f2f4f7) !important;
  color: var(--text-muted, #98a2b3) !important;
  border-color: transparent !important;
  opacity: 0.7 !important;
  cursor: not-allowed !important;
}

/* Ensure full-width custom selects in modal/drawer forms fit neatly */
:where(.idt-page) .custom-select-wrapper.crm-w-100 {
  display: block;
  width: 100%;
}

:where(.idt-page) .custom-select-wrapper.crm-w-100 .custom-select__trigger {
  width: 100%;
}

:where(.idt-page) .custom-select-wrapper.crm-w-100 .custom-select__dropdown {
  min-width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

:where(.idt-page) .di-assoc-tree {
  max-height: 380px;
  overflow-y: auto;
}

:where(.idt-page) .di-assoc-toggle-btn {
  background: transparent;
  border: 0;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  font: inherit;
  cursor: pointer;
  padding: 0;
  color: var(--text);
}

:where(.idt-page) .di-assoc-toggle-btn:hover {
  color: var(--brand);
}

:where(.idt-page) .di-assoc-arrow {
  transition: transform var(--fast) var(--ease);
}

:where(.idt-page) .di-assoc-group.is-collapsed .di-assoc-arrow {
  transform: rotate(-90deg);
}

:where(.idt-page) .di-assoc-group.is-collapsed [data-assoc-subitems] {
  display: none;
}

/* Company Domain External Link */
:where(.idt-page) .di-domain-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--brand);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
}

:where(.idt-page) .di-domain-link:hover {
  text-decoration: underline;
}

:where(.idt-page) .di-domain-link svg,
:where(.idt-page) .di-domain-link .icon {
  width: 12px !important;
  height: 12px !important;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ---------------------------------------------------- Remappings Tab ---- */
:where(.idt-page) .di-remap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--sp-4, 16px);
}

:where(.idt-page) .di-remap-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

:where(.idt-page) .di-remap-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

:where(.idt-page) .di-remap-col {
  flex: 1;
  min-width: 0;
}

:where(.idt-page) .di-remap-col--right {
  text-align: right;
}

:where(.idt-page) .di-remap-label {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 4px;
}

:where(.idt-page) .di-remap-name {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

:where(.idt-page) .di-remap-arrow {
  color: var(--text-muted);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

:where(.idt-page) .di-remap-arrow svg,
:where(.idt-page) .di-remap-arrow .icon {
  width: 15px !important;
  height: 15px !important;
  color: var(--text-muted);
}

:where(.idt-page) .di-remap-body {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

:where(.idt-page) .di-remap-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
  color: var(--text);
}

:where(.idt-page) .di-remap-val {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

:where(.idt-page) .di-remap-val--right {
  text-align: right;
  display: flex;
  justify-content: flex-end;
}

:where(.idt-page) .di-remap-pill {
  display: inline-block;
  padding: 3px 10px;
  background: var(--surface-2, #f2f4f7);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ---------------------------------------------------- Responsive OS Tabs & More Menu ---- */
:where(.idt-page) .os-tabbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-strong);
  position: relative;
  width: 100%;
}

:where(.idt-page) .os-tabs {
  display: flex;
  align-items: flex-end;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  position: relative;
  margin-bottom: -1px;
  max-width: 100%;
}

:where(.idt-page) .os-tabs > .os-tab {
  flex-shrink: 0;
}

:where(.idt-page) .os-tabs > .os-tab:only-child,
:where(.idt-page) .os-tabs > .os-tab:last-of-type {
  border-top-right-radius: var(--radius-sm, 6px);
  border-right: 1px solid var(--border-strong);
}

:where(.idt-page) .os-tab-more {
  flex-shrink: 0;
  position: relative;
  display: inline-flex;
}

:where(.idt-page) .os-tab-more .os-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  border-top-right-radius: var(--radius-sm, 6px);
}

:where(.idt-page) .os-tab-more .os-tab svg,
:where(.idt-page) .os-tab-more .os-tab .icon {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  transition: transform var(--fast) var(--ease);
}

:where(.idt-page) .os-tab-more .os-tab[aria-expanded="true"] svg,
:where(.idt-page) .os-tab-more .os-tab[aria-expanded="true"] .icon {
  transform: rotate(180deg);
}

:where(.idt-page) .os-pop--menu {
  min-width: 190px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius, 8px);
  box-shadow: 0 14px 36px rgba(16, 24, 40, 0.18), 0 2px 6px rgba(16, 24, 40, 0.08);
  z-index: 1200;
}

:where(.idt-page) .os-menu__item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 9px 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  text-align: left;
  text-decoration: none;
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}

:where(.idt-page) .os-menu__item:hover,
:where(.idt-page) .os-menu__item:focus-visible {
  background: var(--surface-hover);
  color: var(--brand);
  outline: none;
}

:where(.idt-page) .os-menu__item.is-active {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
}

/* ------------------------------------------------ Inline Table Cell Editing ---- */
:where(.idt-page) .lp-td[data-editable] {
  cursor: pointer;
  position: relative;
  user-select: none;
}

:where(.idt-page) .lp-td[data-editable="text"] .lp-editable-text {
  display: inline-block;
  padding: 4px 6px;
  border-radius: var(--radius-sm, 4px);
  border: 1px solid transparent;
  min-height: 24px;
  line-height: 1.35;
  transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease);
}

:where(.idt-page) .lp-td[data-editable="text"]:hover .lp-editable-text {
  background: var(--surface-hover);
  border-color: var(--border);
}

:where(.idt-page) .lp-inline-input {
  width: 100%;
  min-width: 90px;
  height: 32px;
  padding: 4px 8px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--brand);
  border-radius: var(--radius-sm, 6px);
  box-shadow: 0 0 0 2px var(--brand-soft);
  outline: none;
  box-sizing: border-box;
}

:where(.idt-page) .lp-inline-input:focus {
  border-color: var(--brand);
}

/* Select cell */
:where(.idt-page) .lp-editable-cell--select {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 110px;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
  transition: all var(--fast) var(--ease);
}

:where(.idt-page) .lp-td[data-editable="select"]:hover .lp-editable-cell--select {
  border-color: var(--border);
  background: var(--surface-hover);
}

:where(.idt-page) .lp-td[data-editable="select"].is-editing .lp-editable-cell--select {
  border-color: var(--border-strong);
  background: var(--surface);
  box-shadow: 0 0 0 2px var(--brand-soft);
}

:where(.idt-page) .lp-editable-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform var(--fast) var(--ease), color var(--fast) var(--ease);
}

:where(.idt-page) .lp-td[data-editable="select"].is-editing .lp-editable-chevron {
  transform: rotate(180deg);
  color: var(--text);
}

/* Floating Popover */
:where(.idt-page) .lp-inline-popover {
  position: fixed;
  z-index: 2000;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius, 8px);
  box-shadow: 0 14px 36px rgba(16, 24, 40, 0.18), 0 2px 6px rgba(16, 24, 40, 0.08);
  padding: 8px;
  min-width: 175px;
  box-sizing: border-box;
  animation: lpPopIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lpPopIn {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

:where(.idt-page) .lp-inline-popover__search {
  position: relative;
  margin-bottom: 6px;
}

:where(.idt-page) .lp-inline-popover__input {
  width: 100%;
  height: 32px;
  padding: 4px 28px 4px 10px;
  font-size: 12.5px;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill, 9999px);
  background: var(--surface);
  color: var(--text);
  outline: none;
  box-sizing: border-box;
  transition: border-color var(--fast), box-shadow var(--fast);
}

:where(.idt-page) .lp-inline-popover__input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand-soft);
}

:where(.idt-page) .lp-inline-popover__search-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  display: inline-flex;
}

:where(.idt-page) .lp-inline-popover__list {
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 2px;
}

:where(.idt-page) .lp-inline-popover__list::-webkit-scrollbar {
  width: 6px;
}
:where(.idt-page) .lp-inline-popover__list::-webkit-scrollbar-track {
  background: transparent;
}
:where(.idt-page) .lp-inline-popover__list::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 3px;
}
:where(.idt-page) .lp-inline-popover__list::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

:where(.idt-page) .lp-inline-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
  transition: background var(--fast) var(--ease);
  user-select: none;
}

:where(.idt-page) .lp-inline-opt:hover {
  background: var(--surface-hover);
}

:where(.idt-page) .lp-inline-opt.is-selected {
  background: var(--brand-soft);
}

:where(.idt-page) .lp-inline-opt__check {
  color: var(--brand);
  flex-shrink: 0;
  margin-left: 8px;
}

:where(.idt-page) .lp-inline-popover__empty {
  padding: 12px 8px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

/* ------------------------------------------------ Rows with Errors View ---- */
:where(.idt-page) .di-view-filter {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-size: 13.5px;
}

:where(.idt-page) .di-view-filter__lbl {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}

:where(.idt-page) .di-radio-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 400;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}

:where(.idt-page) .di-radio-input {
  width: 15px;
  height: 15px;
  accent-color: var(--brand, #0091ae);
  cursor: pointer;
  margin: 0;
}

:where(.idt-page) .di-radio-text {
  line-height: 1.4;
}

/* Stacked Header Cell for Unmapped and Selected Columns */
:where(.idt-page) .di-th-in--stacked {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  height: 52px;
  padding: 6px 14px;
}

:where(.idt-page) .di-th-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 400;
  line-height: 1.2;
}

/* Error Cell in Column 1 */
:where(.idt-page) .di-td--error {
  height: auto;
  min-height: 52px;
  padding: 8px 14px;
  vertical-align: middle;
}

:where(.idt-page) .di-error-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

:where(.idt-page) .di-error-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

:where(.idt-page) .di-error-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ea580c;
  cursor: pointer;
  outline: none;
}

:where(.idt-page) .di-error-warning-icon {
  width: 16px;
  height: 16px;
  color: #ea580c;
  flex-shrink: 0;
}

:where(.idt-page) .di-error-title {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text);
}

:where(.idt-page) .di-error-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 24px;
}

:where(.idt-page) .di-error-loc {
  font-size: 12px;
  color: var(--text-muted);
}

:where(.idt-page) .di-error-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 4px;
  opacity: 0.7;
  transition: opacity var(--fast), color var(--fast), background var(--fast);
}

:where(.idt-page) .di-error-copy:hover {
  opacity: 1;
  color: var(--brand);
  background: var(--surface-hover);
}

:where(.idt-page) .di-error-copy.is-copied {
  color: var(--teal, #0091ae);
  opacity: 1;
}

:where(.idt-page) .di-copy-icon {
  width: 12px;
  height: 12px;
  display: block;
}

/* Category Cell in Column 2 */
:where(.idt-page) .di-td--category {
  height: auto;
  padding: 8px 14px;
  vertical-align: middle;
}

:where(.idt-page) .di-cat-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

:where(.idt-page) .di-edit-cell-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 4px;
  transition: background var(--fast), color var(--fast);
}

:where(.idt-page) .di-edit-cell-btn:hover {
  background: var(--surface-hover);
  color: var(--text);
}

:where(.idt-page) .di-edit-icon {
  width: 13px;
  height: 13px;
  display: block;
}

:where(.idt-page) .di-cat-val {
  font-weight: 500;
  font-size: 13.5px;
  color: var(--text);
}

/* Static in-cell popover is hidden so it never clips against sticky columns or table overflow */
:where(.idt-page) .di-error-cell .di-error-popover {
  display: none !important;
}

/* Floating Dynamic Error Tooltip Popover (Fixed in viewport, auto-positioned, immune to container clipping) */
:where(.idt-page) .di-floating-popover {
  position: fixed;
  z-index: 100000;
  width: 290px;
  max-width: calc(100vw - 24px);
  background: #111827;
  color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.45), 0 8px 10px -6px rgba(0, 0, 0, 0.35);
  padding: 12px 14px;
  text-align: left;
  pointer-events: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 120ms ease, visibility 120ms ease;
  line-height: 1.4;
}

:where(.idt-page) .di-floating-popover.is-visible {
  opacity: 1;
  visibility: visible;
}

:where(.idt-page) .di-floating-popover[hidden] {
  display: none !important;
}

:where(.idt-page) .di-floating-popover__arrow {
  position: absolute;
  width: 0;
  height: 0;
  border-width: 6px;
  border-style: solid;
}

/* Arrow points UP when popover is placed below trigger */
:where(.idt-page) .di-floating-popover[data-placement="bottom"] .di-floating-popover__arrow {
  bottom: 100%;
  border-color: transparent transparent #111827 transparent;
}

/* Arrow points DOWN when popover is placed above trigger */
:where(.idt-page) .di-floating-popover[data-placement="top"] .di-floating-popover__arrow {
  top: 100%;
  border-color: #111827 transparent transparent transparent;
}

:where(.idt-page) .di-floating-popover__text {
  margin: 0 0 8px 0;
  font-size: 12px;
  line-height: 1.5;
  color: #f3f4f6;
  white-space: normal;
  word-break: break-word;
}

:where(.idt-page) .di-floating-popover__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: #38bdf8;
  text-decoration: none;
  transition: color var(--fast);
}

:where(.idt-page) .di-floating-popover__link:hover {
  color: #7dd3fc;
  text-decoration: underline;
}

/* Rows with Errors Table Container & Sticky First Column */
:where(.idt-page) .di-error-tablewrap {
  border-radius: var(--radius-lg, 8px) !important;
  border: 1px solid var(--border);
  background: var(--surface);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
}

:where(.idt-page) #rowsWithErrorsTable {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  min-width: 900px;
}

:where(.idt-page) #rowsWithErrorsTable th {
  background-color: var(--surface-2, #f9fafb);
  border-bottom: 1px solid var(--border-strong);
}

/* Sticky first column (Header + Data Cells) */
:where(.idt-page) #rowsWithErrorsTable th:first-child {
  position: sticky;
  left: 0;
  top: 0;
  z-index: 20;
  background-color: var(--surface-2, #f9fafb);
  border-right: 1px solid var(--border);
  box-shadow: 2px 0 6px -1px rgba(0, 0, 0, 0.08);
  min-width: 220px;
  max-width: 260px;
  width: 240px;
}

:where(.idt-page) #rowsWithErrorsTable td:first-child,
:where(.idt-page) #rowsWithErrorsTable td.di-td--error {
  position: sticky;
  left: 0;
  z-index: 10;
  background-color: var(--surface, #ffffff);
  border-right: 1px solid var(--border);
  box-shadow: 2px 0 6px -1px rgba(0, 0, 0, 0.08);
  min-width: 220px;
  max-width: 260px;
  width: 240px;
}

:where(.idt-page) #rowsWithErrorsTable tr:hover > td:first-child,
:where(.idt-page) #rowsWithErrorsTable tr:hover > td.di-td--error {
  background-color: var(--surface-hover, #f3f4f6);
}

/* Mapped only states for sticky column */
:where(.idt-page) #rowsWithErrorsTable.is-mapped-only td:first-child,
:where(.idt-page) #rowsWithErrorsTable.is-mapped-only td.di-td--error {
  background-color: #fdf2f2 !important;
}

:where(.idt-page) #rowsWithErrorsTable.is-mapped-only tr:hover > td:first-child,
:where(.idt-page) #rowsWithErrorsTable.is-mapped-only tr:hover > td.di-td--error {
  background-color: #fee2e2 !important;
}

/* Minimum width for columns so horizontal scrolling triggers properly */
:where(.idt-page) #rowsWithErrorsTable th:not(:first-child),
:where(.idt-page) #rowsWithErrorsTable td:not(:first-child) {
  min-width: 140px;
}

/* When only mapped columns is toggled (Matching frame 00:47) */
:where(.idt-page) #rowsWithErrorsTable.is-mapped-only [data-col-unmapped] {
  display: none !important;
}

:where(.idt-page) #rowsWithErrorsTable.is-mapped-only .di-error-tr,
:where(.idt-page) #rowsWithErrorsTable.is-mapped-only .di-error-tr .lp-td {
  background-color: #fdf2f2 !important;
}

:where(.idt-page) #rowsWithErrorsTable.is-mapped-only .di-error-tr:hover,
:where(.idt-page) #rowsWithErrorsTable.is-mapped-only .di-error-tr:hover .lp-td {
  background-color: #fee2e2 !important;
}

@keyframes crmCellFlash {
  0% { background-color: #fef08a; }
  100% { background-color: transparent; }
}

:where(.idt-page) .crm-highlight-flash {
  animation: crmCellFlash 1.5s ease-out;
  border-radius: 4px;
}

/* ------------------------------------ Draggable Troubleshoot Modal ---- */
:where(.idt-page) .di-troubleshoot-modal {
  position: fixed;
  width: 460px;
  max-width: calc(100vw - 24px);
  height: 580px;
  max-height: calc(100vh - 80px);
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius-lg, 12px);
  box-shadow: var(--shadow-xl, 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1));
  z-index: 1050;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: box-shadow var(--fast) var(--ease);
}

:where(.idt-page) .di-troubleshoot-modal[hidden] {
  display: none !important;
}

:where(.idt-page) .di-troubleshoot-modal.is-drag {
  user-select: none;
  box-shadow: 0 25px 35px -5px rgba(0, 0, 0, 0.25), 0 10px 10px -5px rgba(0, 0, 0, 0.15);
}

:where(.idt-page) .di-ts-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--surface-2, #f9fafb);
  border-bottom: 1px solid var(--border, #e5e7eb);
  gap: 12px;
  flex-shrink: 0;
}

:where(.idt-page) .di-ts-head__left {
  display: flex;
  align-items: center;
  gap: 12px;
}

:where(.idt-page) .di-ts-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 0;
  padding: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted, #64748b);
  cursor: pointer;
  transition: color var(--fast);
}

:where(.idt-page) .di-ts-back:hover {
  color: var(--brand, #0091ae);
}

:where(.idt-page) .di-ts-newtab {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--brand, #0091ae);
  text-decoration: none;
}

:where(.idt-page) .di-ts-newtab:hover {
  text-decoration: underline;
}

:where(.idt-page) .di-ts-head__grip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 24px;
  color: var(--text-muted, #94a3b8);
  cursor: grab;
  border-radius: 4px;
  transition: background var(--fast), color var(--fast);
}

:where(.idt-page) .di-ts-head__grip:hover {
  background: var(--surface-hover, #f1f5f9);
  color: var(--text, #1e293b);
}

:where(.idt-page) .di-troubleshoot-modal.is-drag .di-ts-head__grip {
  cursor: grabbing;
}

:where(.idt-page) .di-ts-head__right {
  display: flex;
  align-items: center;
}

:where(.idt-page) .di-ts-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 0;
  background: transparent;
  color: var(--text-muted, #64748b);
  border-radius: 4px;
  cursor: pointer;
  transition: background var(--fast), color var(--fast);
}

:where(.idt-page) .di-ts-close:hover {
  background: var(--surface-hover, #f1f5f9);
  color: var(--text, #1e293b);
}

:where(.idt-page) .di-ts-body {
  padding: 18px 20px;
  overflow-y: auto;
  flex: 1 1 auto;
}

:where(.idt-page) .di-ts-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text, #0f172a);
  margin: 0 0 4px 0;
  line-height: 1.35;
}

:where(.idt-page) .di-ts-sub {
  font-size: 12px;
  color: var(--text-muted, #64748b);
  margin: 0 0 14px 0;
}

:where(.idt-page) .di-ts-intro {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text, #334155);
  margin: 0 0 16px 0;
}

:where(.idt-page) .di-ts-video-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-2, #f8fafc);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 20px;
}

:where(.idt-page) .di-ts-video-thumb {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  background: #ea580c;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
}

:where(.idt-page) .di-ts-play-icon {
  width: 20px;
  height: 20px;
  margin-left: 2px;
}

:where(.idt-page) .di-ts-video-tag {
  font-size: 11px;
  font-weight: 600;
  color: #ea580c;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

:where(.idt-page) .di-ts-video-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #0f172a);
  margin: 2px 0;
  line-height: 1.3;
}

:where(.idt-page) .di-ts-video-time {
  font-size: 11.5px;
  color: var(--text-muted, #64748b);
}

:where(.idt-page) .di-ts-section {
  padding: 14px 0;
  border-top: 1px solid var(--border, #e2e8f0);
  transition: background-color 0.4s ease;
}

:where(.idt-page) .di-ts-section.is-highlighted {
  background-color: var(--warning-bg, #fffbeb);
  border-radius: 6px;
  padding: 14px 8px;
}

:where(.idt-page) .di-ts-sec-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text, #0f172a);
  margin: 0 0 10px 0;
}

:where(.idt-page) .di-ts-block {
  margin-bottom: 12px;
}

:where(.idt-page) .di-ts-block-lbl {
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #1e293b);
  margin: 0 0 4px 0;
}

:where(.idt-page) .di-ts-block p {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-muted, #475569);
  margin: 0;
}

:where(.idt-page) .di-troubleshoot-trigger {
  text-decoration: underline;
  text-decoration-style: dashed;
  text-underline-offset: 3px;
  cursor: pointer;
  color: var(--brand, #0091ae);
}

:where(.idt-page) .di-troubleshoot-trigger:hover {
  color: var(--brand-hover, #007a93);
}

/* ==========================================================================
   DROPDOWN AUTO-POSITIONING & SCROLLBAR PREVENTION (Import Details)
   ========================================================================== */
:where(.idt-page) .dropdown {
  position: relative;
}

:where(.idt-page) .dropdown__menu {
  position: absolute;
  top: calc(100% + 4px);
  z-index: 1050;
  box-sizing: border-box;
  box-shadow: var(--shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05));
  margin: 0;
  transition: opacity 0.12s ease, transform 0.12s ease;
}

:where(.idt-page) .dropdown__menu--right {
  right: 0 !important;
  left: auto !important;
}

:where(.idt-page) .dropdown__menu--left {
  left: 0 !important;
  right: auto !important;
}

:where(.idt-page) .dropdown__menu--up,
:where(.idt-page) .lp-pop--up {
  top: auto !important;
  bottom: calc(100% + 4px) !important;
  transform-origin: bottom right;
}

/* Prevent unwanted page body scrollbars when dropdowns open */
body:has(:where(.idt-page) .record-header) {
  overflow-x: hidden;
}

