/* Keep print details below the status, including in narrow resized columns. */
#ordersTable td[data-column="status"] {
  white-space: normal;
  overflow-wrap: anywhere;
  text-overflow: clip;
}

#ordersTable td[data-column="status"] .status {
  max-width: 100%;
  white-space: normal;
}

#ordersTable td[data-column="status"] small {
  display: block;
  margin-top: 4px;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

/* Catalogs, mappings and registry are application pages controlled by the top tabs. */
.mapping-section-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border, #d9e1ec);
}

.mapping-section-tab {
  max-width: 100%;
  min-width: 0;
  white-space: normal;
  text-align: center;
  overflow-wrap: anywhere;
}

.mapping-section-tab.active {
  background: var(--primary, #2563eb);
  border-color: var(--primary, #2563eb);
  color: #fff;
}

.mapping-section-tab[aria-current="page"] {
  cursor: default;
}

header {
  z-index: 100;
}

.workspace-dialog[open] {
  position: fixed;
  inset: 94px 0 0 0;
  width: 100vw;
  max-width: none;
  height: calc(100vh - 94px);
  max-height: none;
  box-sizing: border-box;
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 10px 14px 12px;
  background: #f2f5f9;
  z-index: 50;
}

.workspace-dialog::backdrop {
  background: transparent;
}

.workspace-dialog > .settings-form {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  gap: 10px;
}

.workspace-dialog .dialog-title {
  flex: 0 0 auto;
}

.workspace-dialog .dialog-title > button {
  display: none;
}

.workspace-dialog .registry-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
}

#mappingsDialog .registry-table-wrap table {
  min-width: 1640px;
  table-layout: fixed;
}

#mappingsDialog .registry-table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 3;
}

#mappingsDialog .registry-table-wrap thead .filter-row th {
  top: 35px;
  z-index: 2;
}

#mappingsDialog .registry-table-wrap th:nth-child(1) { width: 105px; }
#mappingsDialog .registry-table-wrap th:nth-child(2) { width: 145px; }
#mappingsDialog .registry-table-wrap th:nth-child(3) { width: 120px; }
#mappingsDialog .registry-table-wrap th:nth-child(4) { width: 235px; }
#mappingsDialog .registry-table-wrap th:nth-child(5) { width: 165px; }
#mappingsDialog .registry-table-wrap th:nth-child(6) { width: 110px; }
#mappingsDialog .registry-table-wrap th:nth-child(7) { width: 85px; }
#mappingsDialog .registry-table-wrap th:nth-child(8) { width: 125px; }
#mappingsDialog .registry-table-wrap th:nth-child(9) { width: 135px; }
#mappingsDialog .registry-table-wrap th:nth-child(10) { width: 235px; }
#mappingsDialog .registry-table-wrap th:nth-child(11) { width: 165px; }

.workspace-dialog .filter-row input {
  min-width: 90px;
  width: 100%;
  box-sizing: border-box;
  padding: 6px 7px;
  border-radius: 6px;
}

.mapping-problem-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}

.catalog-full-sync-status {
  display: grid;
  gap: 7px;
  margin: 0;
}

.catalog-full-sync-status[hidden] {
  display: none;
}

.catalog-full-sync-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.catalog-full-sync-status progress {
  width: 100%;
  height: 10px;
}

.server-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 0 2px;
}

.server-pagination button,
.server-pagination select {
  min-height: 32px;
}

.registry-global-search {
  width: 100%;
}

.registry-global-search input {
  box-sizing: border-box;
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid #cfd8e6;
  border-radius: 9px;
  background: #fff;
}

.history-kiz-value {
  display: grid;
  min-width: 180px;
  gap: 6px;
  align-items: start;
}

.history-kiz-value code {
  overflow-wrap: anywhere;
  white-space: normal;
}

.history-kiz-value button {
  justify-self: start;
  min-height: 28px;
  padding: 5px 8px;
  font-size: 12px;
}

.catalog-dialog .catalog-server-table {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
}

.catalog-dialog .catalog-history-section {
  display: none;
}

/* Mapping and catalog pages scroll as a whole, including their wide tables. */
#mappingsDialog[open],
#catalogDialog[open] {
  overflow: auto;
  overscroll-behavior: contain;
}

#mappingsDialog > .settings-form,
#catalogDialog > .settings-form {
  height: auto;
  min-height: 100%;
}

#mappingsDialog .registry-table-wrap,
#catalogDialog .registry-table-wrap {
  flex: none;
  min-height: auto;
  max-height: none;
  overflow: visible;
}

#mappingsDialog .ozon-mapping-view:not([hidden]),
#catalogDialog .catalog-server-table {
  flex: none;
  min-height: auto;
}

#catalogDialog .catalog-toolbar {
  flex-wrap: wrap;
}

@media (max-width: 1200px) {
  .workspace-dialog[open] {
    inset-block-start: 128px;
    height: calc(100vh - 128px);
  }
}
