/* ARP_FIX6_UIUX2_PROGRESSIVE — additive UI only. Classic interface stays in DOM. */
:root {
  --uiux2-accent: #3b6fe0;
  --uiux2-accent-hover: #2f5fc7;
  --uiux2-accent-soft: #eef3ff;
  --uiux2-surface: #ffffff;
  --uiux2-bg: #f5f7fa;
  --uiux2-border: #e1e6ee;
  --uiux2-border-soft: #edf0f5;
  --uiux2-text: #242936;
  --uiux2-muted: #6b7280;
  --uiux2-faint: #9299a8;
  --uiux2-green: #258a4b;
  --uiux2-green-bg: #eaf6ee;
}

.uiux2-section-wrap { display: none; }
body.uiux2-enabled .uiux2-section-wrap { display: block; position: relative; padding: 12px 12px 8px; }
body.uiux2-enabled .mode-switcher { display: none !important; }

body.uiux2-enabled .uiux2-section-label {
  margin: 0 0 6px 3px;
  color: var(--uiux2-faint);
  font-size: 10px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
body.uiux2-enabled .uiux2-section-selector {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid var(--uiux2-border);
  border-radius: 11px;
  background: var(--uiux2-surface);
  color: var(--uiux2-text);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(25,35,55,.03);
  transition: border-color .14s ease, box-shadow .14s ease, background .14s ease;
}
body.uiux2-enabled .uiux2-section-selector:hover,
body.uiux2-enabled .uiux2-section-selector[aria-expanded="true"] {
  border-color: #cbd4e3;
  box-shadow: 0 5px 16px rgba(31,49,82,.07);
}
body.uiux2-enabled .uiux2-section-selector-icon,
body.uiux2-enabled .uiux2-section-option-icon {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  flex: 0 0 29px;
  border-radius: 8px;
  color: var(--uiux2-accent);
  background: var(--uiux2-accent-soft);
}
body.uiux2-enabled .uiux2-section-selector-icon svg,
body.uiux2-enabled .uiux2-section-option-icon svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 1.7; }
body.uiux2-enabled .uiux2-section-selector-copy { min-width: 0; flex: 1; }
body.uiux2-enabled .uiux2-section-selector-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; font-weight: 800; }
body.uiux2-enabled .uiux2-section-selector-sub { display: block; margin-top: 1px; color: var(--uiux2-faint); font-size: 9.5px; font-weight: 600; }
body.uiux2-enabled .uiux2-section-chevron { color: var(--uiux2-faint); font-size: 16px; line-height: 1; transition: transform .14s ease; }
body.uiux2-enabled .uiux2-section-selector[aria-expanded="true"] .uiux2-section-chevron { transform: rotate(180deg); }
body.uiux2-enabled .uiux2-section-menu {
  position: absolute;
  z-index: 160;
  left: 12px;
  right: 12px;
  top: 73px;
  display: none;
  padding: 6px;
  border: 1px solid var(--uiux2-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 38px rgba(26,40,68,.16);
}
body.uiux2-enabled .uiux2-section-menu.is-open { display: block; }
body.uiux2-enabled .uiux2-section-option {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #465064;
  padding: 6px 8px;
  text-align: left;
  cursor: pointer;
}
body.uiux2-enabled .uiux2-section-option:hover { background: #f6f8fc; }
body.uiux2-enabled .uiux2-section-option.is-active { color: var(--uiux2-accent); background: var(--uiux2-accent-soft); }
body.uiux2-enabled .uiux2-section-option-name { min-width: 0; flex: 1; font-size: 12px; font-weight: 750; }
body.uiux2-enabled .uiux2-section-option-check { width: 16px; text-align: center; color: var(--uiux2-accent); font-weight: 900; }

/* More space for useful sidebar content after replacing five mode buttons with one selector. */
body.uiux2-enabled .sidebar-actions { padding-top: 2px; }
body.uiux2-enabled .sidebar-section { min-height: 0; }
body.uiux2-enabled .history-item.uiux2-history-duplicate { display: none !important; }
body.uiux2-enabled .uiux2-history-run-count {
  display: inline-flex;
  margin-left: 5px;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--uiux2-accent-soft);
  color: var(--uiux2-accent);
  font-size: 9px;
  font-weight: 800;
  vertical-align: 1px;
}

/* The summary already contains the only needed “Изменить поиск” action. */
body.uiux2-enabled #results-toolbar-edit-btn { display: none !important; }
body.uiux2-enabled .results-search-summary {
  border-color: #dce5f5;
  box-shadow: 0 2px 10px rgba(29,45,78,.035);
}
body.uiux2-enabled .results-edit-search-btn { border-radius: 8px; }

/* Compact view: comparison first, details/contacts in the right panel. */
body.uiux2-enabled.results-view-table .results-table col:nth-child(3),
body.uiux2-enabled.results-view-table .results-table col:nth-child(5),
body.uiux2-enabled.results-view-table .results-table col:nth-child(6),
body.uiux2-enabled.results-view-table .results-table col:nth-child(7),
body.uiux2-enabled.results-view-table .results-table th:nth-child(3),
body.uiux2-enabled.results-view-table .results-table th:nth-child(5),
body.uiux2-enabled.results-view-table .results-table th:nth-child(6),
body.uiux2-enabled.results-view-table .results-table th:nth-child(7),
body.uiux2-enabled.results-view-table .results-table td:nth-child(3),
body.uiux2-enabled.results-view-table .results-table td:nth-child(5),
body.uiux2-enabled.results-view-table .results-table td:nth-child(6),
body.uiux2-enabled.results-view-table .results-table td:nth-child(7) { display: none !important; }
body.uiux2-enabled.results-view-table .results-table { min-width: 880px !important; }
body.uiux2-enabled.results-view-table .results-table-x-scroll-inner { min-width: 880px; }
body.uiux2-enabled.results-view-table .results-table th,
body.uiux2-enabled.results-view-table .results-table td { padding-top: 8px; padding-bottom: 8px; }
body.uiux2-enabled.results-view-table .results-table tbody tr.selected {
  background: #f3f7ff;
  box-shadow: inset 3px 0 0 var(--uiux2-accent);
}
body.uiux2-enabled.results-view-table .results-table tbody tr:hover { background: #f8faff; }
body.uiux2-enabled.results-view-table .address-cell {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Existing right panel becomes a quick working preview, not a replica of FSA. */
body.uiux2-enabled #right-panel { background: #f7f9fc; }
body.uiux2-enabled #selected-panel {
  border-radius: 12px;
  border-color: var(--uiux2-border);
  box-shadow: 0 1px 3px rgba(28,40,64,.035);
}
body.uiux2-enabled #selected-panel .panel-title {
  color: var(--uiux2-faint);
  font-size: 9.5px;
  font-weight: 850;
  letter-spacing: .075em;
  text-transform: uppercase;
}
body.uiux2-enabled #selected-panel .selected-lab-name { color: var(--uiux2-text); line-height: 1.38; }
body.uiux2-enabled #selected-panel .selected-lab-loc { color: var(--uiux2-muted); line-height: 1.45; }
body.uiux2-enabled #selected-panel .compact-detail-section { border-top-color: var(--uiux2-border-soft); }
body.uiux2-enabled #selected-panel .detail-label { color: #616a7b; font-size: 10px; font-weight: 850; letter-spacing: .035em; text-transform: uppercase; }
body.uiux2-enabled #selected-panel .found-item { color: #374151; }
body.uiux2-enabled #selected-panel .priority-detail-card.required { background: #f3f7ff; border-color: #dce7fb; }
body.uiux2-enabled #selected-panel .priority-detail-card.required strong { color: var(--uiux2-accent); }

body.uiux2-enabled .uiux2-contact-source {
  margin-top: 7px;
  color: var(--uiux2-faint);
  font-size: 9.5px;
  line-height: 1.35;
}
body.uiux2-enabled .uiux2-contact-source.is-verified { color: var(--uiux2-green); font-weight: 750; }
body.uiux2-enabled .uiux2-fsa-action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 34px;
  margin-top: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--uiux2-accent);
  color: #fff !important;
  text-decoration: none !important;
  font-size: 10.5px;
  font-weight: 800;
  transition: background .14s ease;
}
body.uiux2-enabled .uiux2-fsa-action:hover { background: var(--uiux2-accent-hover); }
body.uiux2-enabled .uiux2-preview-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 3px 0 8px;
  padding: 5px 8px;
  border: 1px solid #dce5f5;
  border-radius: 7px;
  background: #fff;
  color: var(--uiux2-accent);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}
body.uiux2-enabled .uiux2-preview-list.is-collapsed .preview-row:nth-child(n+4) { display: none; }
body.uiux2-enabled .uiux2-preview-list:not(.is-collapsed) .preview-row { display: block; }

/* Keep the user's successful auto-collapse flow untouched. */
body.uiux2-enabled.search-results-focus .identity-area,
body.uiux2-enabled.search-results-focus .conditions-area,
body.uiux2-enabled.search-results-focus .nch-er-filter-area,
body.uiux2-enabled.search-results-focus .compact-action-bar { transition: opacity .12s ease; }

@media (max-width: 1180px) {
  body.uiux2-enabled.results-view-table .results-table { min-width: 760px !important; }
  body.uiux2-enabled.results-view-table .results-table-x-scroll-inner { min-width: 760px; }
}
@media (max-width: 900px) {
  /* Mobile keeps the existing mobile navigation; do not force a desktop dropdown. */
  body.uiux2-enabled .uiux2-section-wrap { padding-left: 10px; padding-right: 10px; }
}
