body.nimbus-page-routes .routes-page-host > .sidebar {
  display: none;
}

body.nimbus-page-routes .routes-hierarchy-page {
  background-color: var(--color-app-background);
}

body.nimbus-page-routes .routes-list {
  background-color: var(--color-app-background);
}

body.nimbus-page-routes #workList.routes-page-work-list {
  width: 100%;
  height: 100%;
  padding: 0;
  background-color: var(--color-app-background);
}

body.nimbus-page-routes .routes-list #workList {
  overflow-x: hidden;
  overflow-y: auto;
}

body.nimbus-page-routes #workList:has(> .routes-list-empty) {
  display: flex;
  flex-direction: column;
}

.routes-list-empty {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px;
  box-sizing: border-box;
  color: var(--color-text-muted);
  font-size: 24px;
  line-height: normal;
  text-align: center;
}

body.nimbus-page-routes .route-toolbar {
  display: none;
}

.route-item-original {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content 203px;
  align-items: stretch;
  width: calc(100% - 25px);
  height: 70px;
  margin: 20px 5px 20px 20px;
  box-sizing: border-box;
  border: 1px solid rgb(230, 234, 238);
  border-radius: 4px;
  background-color: var(--color-surface);
  cursor: pointer;
  transition: border-color 120ms ease-out, background-color 120ms ease-out;
}

.route-item-original:hover {
  border-color: var(--color-surface);
  box-shadow: 0 2px 10px rgba(45, 44, 51, 0.35);
}

.route-item-original.active {
  border-color: rgba(66, 133, 244, 0.7);
}

.route-item-original.selection-mode {
  grid-template-columns: 56px minmax(0, 1fr) max-content 203px;
}

.route-item-original.selection-mode:hover {
  border-color: rgb(230, 234, 238);
}

.route-item-original.selection-mode .route-item-original-actions {
  opacity: 0.45;
  pointer-events: none;
}

.route-item-original.selection-mode .route-item-original-toggle,
.route-item-original.selection-mode .route-item-original-btn {
  cursor: default;
}

.route-item-original.selection-mode .route-item-original-description {
  display: none;
}

.route-item-original.selected-for-bulk {
  border-color: rgb(230, 234, 238);
  background-color: var(--color-surface);
  box-shadow: 0 2px 8px rgba(45, 44, 51, 0.16);
}

.route-selection-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  justify-self: center;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  border: var(--border-width) solid var(--color-border-muted);
  border-radius: 4px;
  background: var(--color-surface);
  color: #fff;
  cursor: pointer;
  appearance: none;
}

.route-selection-check:hover,
.route-selection-check:focus-visible {
  border-color: rgb(50, 167, 84);
  outline: 0;
}

.route-selection-check.checked {
  border-color: rgb(50, 167, 84);
  background: rgb(50, 167, 84);
}

.route-selection-check-icon {
  display: none;
  width: 8px;
  height: 5px;
  margin-top: -2px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}

.route-selection-check.checked .route-selection-check-icon {
  display: block;
}

.route-item-original-left {
  display: flex;
  align-items: center;
  min-width: 0;
  height: 70px;
  padding: 16px 0;
  overflow: hidden;
  box-sizing: border-box;
}

.route-item-original.selection-mode .route-item-original-left {
  padding-left: 0;
}

.route-item-original-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  margin: 0 18px 0 20px;
  border-radius: 50%;
  background-color: rgb(103, 121, 168);
  color: #fff;
}

.route-item-original-icon-glyph {
  display: block;
  width: 18px;
  height: 18px;
  background-color: currentColor;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
}

.route-transport-icon-bus {
  background-color: rgb(50, 167, 84);
}

.route-transport-icon-bus .route-item-original-icon-glyph {
  mask-image: url("/nimbus-icons/transport-bus.svg");
}

.route-transport-icon-trolleybus {
  background-color: rgb(127, 101, 241);
}

.route-transport-icon-trolleybus .route-item-original-icon-glyph {
  mask-image: url("/nimbus-icons/transport-trolleybus.svg");
}

.route-transport-icon-tram {
  background-color: rgb(240, 98, 146);
}

.route-transport-icon-tram .route-item-original-icon-glyph {
  mask-image: url("/nimbus-icons/transport-tram.svg");
}

.route-transport-icon-route_taxi {
  background-color: rgb(255, 170, 0);
}

.route-transport-icon-route_taxi .route-item-original-icon-glyph {
  mask-image: url("/nimbus-icons/transport-route-taxi.svg");
}

.route-transport-icon-no_type {
  background-color: rgb(103, 121, 168);
}

.route-transport-icon-no_type .route-item-original-icon-glyph {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  mask-image: none;
}

.route-item-original-code {
  min-width: 0;
  flex-shrink: 0;
  padding: 3px 7px;
  border: 1px solid rgba(153, 157, 168, 0.4);
  border-radius: 4px;
  color: rgb(45, 44, 51);
  font-size: 24px;
  font-weight: 400;
  line-height: normal;
  white-space: nowrap;
}

.route-item-original-title {
  min-width: 0;
  max-width: 60%;
  margin-left: 20px;
  overflow: hidden;
  color: rgb(45, 44, 51);
  font-size: 24px;
  font-weight: 400;
  line-height: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-item-original-description {
  max-width: 130px;
  margin-left: 20px;
  margin-top: 3px;
  padding: 3px 6px;
  border-radius: 2px;
  background-color: rgb(153, 157, 168);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: normal;
  opacity: 0.8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-item-original-meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  height: 70px;
  padding-left: 10px;
  overflow: hidden;
  color: rgb(153, 157, 168);
  font-size: 12px;
  line-height: normal;
}

.route-item-original-meta-row {
  display: block;
  min-width: 0;
  white-space: nowrap;
}

.route-item-original-meta-row:not(:last-child) {
  margin-bottom: 3px;
}

.route-item-original-meta-row strong {
  color: inherit;
  font-weight: 400;
}

.route-item-original-actions {
  display: flex;
  align-items: flex-start;
  height: 70px;
  padding-right: 10px;
  box-sizing: border-box;
}

.route-item-original-switcher-wrap {
  display: block;
  flex: 0 0 80px;
  height: 70px;
  padding: 23px 22px;
  box-sizing: border-box;
}

.route-item-original-toggle {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  width: 36px;
  height: 16px;
  padding: 0;
  border: 1px solid rgb(239, 243, 246);
  border-radius: 20px;
  box-sizing: border-box;
  background-color: rgb(239, 243, 246);
  line-height: 20px;
  cursor: pointer;
}

.route-item-original-toggle span {
  position: absolute;
  top: -5px;
  left: -4px;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background-color: var(--color-surface);
  box-shadow: 0 2px 10px rgba(45, 44, 51, 0.35);
  transition: transform 120ms ease-out, background-color 120ms ease-out;
}

.route-item-original-toggle.on span {
  background-color: rgb(50, 167, 84);
  transform: translateX(19px);
}

.route-item-original-separator {
  flex: 0 0 1px;
  width: 1px;
  height: 70px;
  margin-right: 20px;
  background-color: rgb(230, 234, 238);
}

.route-item-original-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  margin: 17px 10px 0 0;
  padding: 7px;
  box-sizing: border-box;
  border: 1px solid rgba(153, 157, 168, 0.4);
  border-radius: 4px;
  background: transparent;
  color: rgba(153, 157, 168, 0.7);
  cursor: pointer;
}

.route-item-original-btn:hover,
.route-item-original-btn:focus-visible {
  border-color: rgba(153, 157, 168, 0.75);
  color: rgb(103, 121, 168);
}

.route-item-original-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.routes-selection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  flex-shrink: 0;
  padding: 5px 20px 5px 40px;
  box-sizing: border-box;
  border-bottom: 1px solid rgb(230, 234, 238);
  background-color: rgb(248, 250, 252);
}

.routes-selection-select-all {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-text-secondary);
  font: inherit;
  cursor: pointer;
}

.routes-selection-controls {
  display: flex;
  align-items: stretch;
  padding-right: 8px;
}

.routes-selection-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: auto;
  margin: 0 12px 0 0;
  padding: 0 7px;
  box-sizing: border-box;
  border: 0;
  background: transparent;
  color: rgba(153, 157, 168, 0.4);
}

.routes-selection-control svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.routes-selection-control-switch {
  position: relative;
  display: inline-block;
  flex: 0 0 80px;
  width: 80px;
  margin-right: 22px;
  padding: 5px 22px;
  font: inherit;
}

.routes-selection-switch-track {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  width: 36px;
  height: 16px;
  border: 1px solid rgb(239, 243, 246);
  border-radius: 20px;
  box-sizing: border-box;
  background-color: rgb(239, 243, 246);
  line-height: 20px;
}

.routes-selection-switch-track::after {
  position: absolute;
  top: -5px;
  left: -4px;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background-color: var(--color-surface);
  box-shadow: 0 2px 10px rgba(45, 44, 51, 0.35);
  content: "";
  transition: transform 120ms ease-out, background-color 120ms ease-out;
}

.routes-selection-control-switch.is-on .routes-selection-switch-track::after {
  background-color: rgb(50, 167, 84);
  transform: translateX(19px);
}

.routes-selection-control-switch:disabled .routes-selection-switch-track {
  opacity: 0.5;
}

.routes-selection-bar.has-selection .routes-selection-control {
  color: rgba(153, 157, 168, 0.7);
}

.routes-selection-control:not(:disabled) {
  color: rgba(153, 157, 168, 0.8);
  cursor: pointer;
}

.routes-selection-control:not(:disabled):hover,
.routes-selection-control:not(:disabled):focus-visible {
  color: rgb(103, 121, 168);
}

@media (max-width: 1500px) {
  .route-item-original {
    grid-template-columns: minmax(0, 1fr) 118px 190px;
  }

  .route-item-original.selection-mode {
    grid-template-columns: 52px minmax(0, 1fr) 118px 190px;
  }

  .route-item-original-description {
    display: none;
  }

  .route-item-original-switcher-wrap {
    flex-basis: 67px;
    padding-inline: 15.5px;
  }
}

/* Route create flow owner: modal step and route configuration screen. */
.route-create-overlay {
  position: fixed;
  z-index: 850;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  box-sizing: border-box;
  background: rgba(31, 31, 38, 0.66);
}

.route-create-modal {
  display: grid;
  grid-template-rows: 60px minmax(0, 1fr) 60px;
  width: min(870px, calc(100vw - 80px));
  height: min(570px, calc(100vh - 120px));
  overflow: hidden;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.route-create-modal-header {
  display: flex;
  align-items: center;
  padding: 0 20px;
  background: #4d86e8;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.route-create-modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 0;
}

.route-create-column {
  display: grid;
  grid-template-rows: 36px minmax(0, 1fr);
  min-width: 0;
  border-right: 1px solid rgba(153, 157, 168, 0.28);
}

.route-create-column:last-child { border-right: 0; }

.route-create-column-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(153, 157, 168, 0.25);
  color: rgba(45, 44, 51, 0.62);
  font-size: 13px;
}

.route-create-search { position: relative; width: 150px; }
.route-create-search input {
  width: 100%; height: 30px; padding: 0 28px 0 8px;
  border: 0; outline: 0; background: transparent; color: #2d2c33;
}
.route-create-search span::before {
  position: absolute; top: 8px; right: 6px; width: 11px; height: 11px;
  border: 2px solid rgba(153,157,168,.65); border-radius: 50%; content: "";
}
.route-create-search span::after {
  position: absolute; top: 19px; right: 4px; width: 7px; height: 2px;
  background: rgba(153,157,168,.65); content: ""; transform: rotate(45deg);
}

.route-create-stop-list { min-height: 0; overflow-y: auto; }
.route-create-stop-row {
  min-height: 78px;
  border: 0;
  border-bottom: 1px solid rgba(153,157,168,.25);
  background: #fff;
  color: #2d2c33;
}
.route-create-stop-add {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 8px 16px; text-align: left; cursor: pointer;
}
.route-create-stop-add:hover { background: rgba(66,133,244,.06); }
.route-create-stop-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.route-create-stop-text strong { overflow: hidden; font-size: 15px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.route-create-stop-text small { overflow: hidden; color: rgba(45,44,51,.62); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.route-create-stop-id { color: rgba(153,157,168,.82); font-size: 12px; }
.route-create-stop-arrow { color: #4285f4; font-size: 20px; opacity: 0; }
.route-create-stop-add:hover .route-create-stop-arrow { opacity: 1; }
.route-create-selected-stop {
  display: grid; grid-template-columns: 28px 26px minmax(0,1fr) auto;
  align-items: center; padding: 0 10px 0 8px;
}
.route-create-order-line { position: relative; align-self: stretch; display: flex; justify-content: center; }
.route-create-order-line::before { position: absolute; top: 0; bottom: 0; border-left: 2px dotted rgba(153,157,168,.5); content: ""; }
.route-create-order-line.is-first::before { top: 50%; }
.route-create-order-line.is-last::before { bottom: 50%; }
.route-create-order-dot { z-index: 1; align-self: center; width: 10px; height: 10px; border: 1px solid rgba(153,157,168,.75); border-radius: 50%; background: #fff; }
.route-create-stop-index { color: rgba(45,44,51,.7); font-size: 13px; }
.route-create-selected-actions { display: flex; gap: 2px; opacity: 0; }
.route-create-selected-stop:hover .route-create-selected-actions { opacity: 1; }
.route-create-selected-actions button { width: 24px; height: 24px; border: 0; background: transparent; color: rgba(153,157,168,.85); cursor: pointer; }
.route-create-selected-actions button:disabled { opacity: .25; cursor: default; }
.route-create-selected-empty, .route-create-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; height: 100%; padding: 28px; box-sizing: border-box; color: rgba(45,44,51,.5); text-align: center; }
.route-create-selected-empty strong { font-size: 14px; font-weight: 400; }
.route-create-selected-empty span { max-width: 240px; font-size: 13px; }

.route-create-modal-footer {
  display: flex; align-items: center; gap: 10px; padding: 0 16px;
  border-top: 1px solid rgba(153,157,168,.25); background: #fff;
}
.route-create-transport-picker { display: flex; gap: 10px; }
.route-create-transport {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(153,157,168,.75); color: #fff; cursor: pointer;
}
.route-create-transport.is-active { background: #32a754; }
.route-create-ring-option { display: inline-flex; align-items: center; gap: 7px; margin-left: 8px; color: rgba(45,44,51,.72); font-size: 13px; }
.route-create-ring-option input { width: 16px; height: 16px; }
.route-create-help { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border: 1px solid rgba(153,157,168,.55); border-radius: 50%; color: rgba(153,157,168,.8); font-size: 11px; }
.route-create-footer-spacer { flex: 1 1 auto; }
.route-create-modal-footer .ui-button { min-width: 104px; }

body.routes-create-screen #filters,
body.routes-detail-screen #filters { display: none; }
