@media (max-width: 576px) { /* Bootstrap 'sm' */
  .cdr-table thead {
    display: none;
  }

  .cdr-table,
  .cdr-table tbody,
  .cdr-table tr,
  .cdr-table td {
    display: block;
    width: 100%;
  }

  .cdr-table tr {
    border: 1px solid var(--bs-border-color);
    border-radius: .75rem;
    padding: .5rem .75rem;
    margin-bottom: .75rem;
    background: var(--bs-body-bg);
  }

  .table-hover.cdr-table > tbody > tr:hover > * {
      --bs-table-bg-state: initial;
  }

  .cdr-table td {
    padding: .2rem 0;
    border: 0;
  }

  .cdr-table td::before {
    content: attr(data-label);
    display: inline-block;
    min-width: 7.5rem;
    margin-right: .5rem;
    font-weight: 600;
    color: var(--bs-secondary-color);
  }

  /* чтобы длинный linkedid не раздувал */
  .cdr-table td[data-label="LinkedID"] a {
    word-break: break-all;
  }
}

.tooltip-custom {
  position: relative;
  display: inline-block;
  border-bottom: 1px dotted black; /* Add dots under the hoverable text */
  font-size: 0.7rem;
}

/* Tooltip text */
.tooltiptext-custom {
  visibility: hidden; /* Hidden by default */
  font-size: 1rem;
  width: max-content;
  max-width: min(350px, 90vw);
  background-color: var(--bs-info-bg-subtle);
  padding: 5px;
  border-radius: 6px;
  border: 1px dotted black;
  position: absolute;
  z-index: 1; /* Ensure tooltip is displayed above content */
  top: -2rem;
}

/* Show the tooltip text on hover */
.tooltip-custom:hover .tooltiptext-custom {
  visibility: visible;
}

/* New-routing summaries keep the operational decision in one row and place
 * secondary technical data in an expandable detail row. */

.route-summary-table .route-summary-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: .25rem;
}

.route-summary-table .route-summary-actions form {
  margin: 0;
}

/* Bootstrap's .table-responsive clips dropdowns because it uses overflow-x:
 * auto.  These operational summary tables have a compact mobile card layout,
 * so their menus can safely escape the wrapper on wider screens. */
.route-summary-table-wrap {
  overflow: visible;
}

.route-summary-table-wrap .dropdown-menu {
  z-index: 1080;
}

@media (max-width: 576px) {
  .route-summary-table .route-summary-actions {
    justify-content: flex-start;
    margin-top: .35rem;
  }
}
