/* Keep route controls aligned and route names readable at every screen size. */
#main :is(.native-table-scroll[aria-label="Outbound routes table"], .native-table-scroll:has(a[href^="/admin/outbound-routes/"][href$="/edit/"])) .native-table {
  table-layout: auto;
  min-width: 980px;
}
#main :is(.native-table-scroll[aria-label="Outbound routes table"], .native-table-scroll:has(a[href^="/admin/outbound-routes/"][href$="/edit/"])) td {
  padding: 14px 16px;
  vertical-align: middle;
}
#main :is(.native-table-scroll[aria-label="Outbound routes table"], .native-table-scroll:has(a[href^="/admin/outbound-routes/"][href$="/edit/"])) th button {
  padding: 12px 16px;
}
#main :is(.native-table-scroll[aria-label="Outbound routes table"], .native-table-scroll:has(a[href^="/admin/outbound-routes/"][href$="/edit/"])) td:first-child,
#main :is(.native-table-scroll[aria-label="Outbound routes table"], .native-table-scroll:has(a[href^="/admin/outbound-routes/"][href$="/edit/"])) td:nth-child(3) {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.5;
}
#main :is(.native-table-scroll[aria-label="Outbound routes table"], .native-table-scroll:has(a[href^="/admin/outbound-routes/"][href$="/edit/"])) td:first-child { min-width: 170px; }
#main :is(.native-table-scroll[aria-label="Outbound routes table"], .native-table-scroll:has(a[href^="/admin/outbound-routes/"][href$="/edit/"])) td:nth-child(3) { min-width: 190px; }
#main :is(.native-table-scroll[aria-label="Outbound routes table"], .native-table-scroll:has(a[href^="/admin/outbound-routes/"][href$="/edit/"])) td:nth-child(2) {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
}
#main :is(.native-table-scroll[aria-label="Outbound routes table"], .native-table-scroll:has(a[href^="/admin/outbound-routes/"][href$="/edit/"])) th:last-child,
#main :is(.native-table-scroll[aria-label="Outbound routes table"], .native-table-scroll:has(a[href^="/admin/outbound-routes/"][href$="/edit/"])) td:last-child { width: 244px; }
#main :is(.native-table-scroll[aria-label="Outbound routes table"], .native-table-scroll:has(a[href^="/admin/outbound-routes/"][href$="/edit/"])) .native-row-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  align-items: center;
}
#main :is(.native-table-scroll[aria-label="Outbound routes table"], .native-table-scroll:has(a[href^="/admin/outbound-routes/"][href$="/edit/"])) .native-row-actions > :is(a, button) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  height: 36px;
  min-height: 36px;
  margin: 0;
  padding: 0 9px;
  border: 1px solid var(--border, #e5e7ed);
  border-radius: 7px;
  background: var(--surface, #fff);
  font-size: 12px;
  line-height: 1;
  text-decoration: none;
}
#main :is(.native-table-scroll[aria-label="Outbound routes table"], .native-table-scroll:has(a[href^="/admin/outbound-routes/"][href$="/edit/"])) .native-row-actions > .icon-button {
  width: 36px;
  padding: 0;
}
#main :is(.native-table-scroll[aria-label="Outbound routes table"], .native-table-scroll:has(a[href^="/admin/outbound-routes/"][href$="/edit/"])) .native-row-actions > :is(a, button):hover:not(:disabled) {
  border-color: #c7b4e6;
  background: #f8f5fc;
}
#main :is(.native-table-scroll[aria-label="Outbound routes table"], .native-table-scroll:has(a[href^="/admin/outbound-routes/"][href$="/edit/"])) .native-row-actions > button:disabled {
  opacity: .4;
  cursor: not-allowed;
}
@media (max-width: 760px) {
  #main :is(.native-table-scroll[aria-label="Outbound routes table"], .native-table-scroll:has(a[href^="/admin/outbound-routes/"][href$="/edit/"])) { overflow: visible; }
  #main :is(.native-table-scroll[aria-label="Outbound routes table"], .native-table-scroll:has(a[href^="/admin/outbound-routes/"][href$="/edit/"])) .native-table,
  #main :is(.native-table-scroll[aria-label="Outbound routes table"], .native-table-scroll:has(a[href^="/admin/outbound-routes/"][href$="/edit/"])) tbody {
    display: block;
    min-width: 0;
    width: 100%;
    white-space: normal;
  }
  #main :is(.native-table-scroll[aria-label="Outbound routes table"], .native-table-scroll:has(a[href^="/admin/outbound-routes/"][href$="/edit/"])) thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  #main :is(.native-table-scroll[aria-label="Outbound routes table"], .native-table-scroll:has(a[href^="/admin/outbound-routes/"][href$="/edit/"])) tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 20px;
    padding: 18px 16px;
  }
  #main :is(.native-table-scroll[aria-label="Outbound routes table"], .native-table-scroll:has(a[href^="/admin/outbound-routes/"][href$="/edit/"])) tbody tr + tr {
    border-top: 1px solid var(--border, #e5e7ed);
  }
  #main :is(.native-table-scroll[aria-label="Outbound routes table"], .native-table-scroll:has(a[href^="/admin/outbound-routes/"][href$="/edit/"])) td {
    display: block;
    min-width: 0 !important;
    width: auto !important;
    border: 0;
    padding: 0;
    overflow-wrap: anywhere;
  }
  #main :is(.native-table-scroll[aria-label="Outbound routes table"], .native-table-scroll:has(a[href^="/admin/outbound-routes/"][href$="/edit/"])) td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 5px;
    color: var(--muted, #737d8e);
    font: 11px/1.4 var(--font, sans-serif);
  }
  #main :is(.native-table-scroll[aria-label="Outbound routes table"], .native-table-scroll:has(a[href^="/admin/outbound-routes/"][href$="/edit/"])) td:first-child,
  #main :is(.native-table-scroll[aria-label="Outbound routes table"], .native-table-scroll:has(a[href^="/admin/outbound-routes/"][href$="/edit/"])) td:nth-child(3),
  #main :is(.native-table-scroll[aria-label="Outbound routes table"], .native-table-scroll:has(a[href^="/admin/outbound-routes/"][href$="/edit/"])) td:last-child { grid-column: 1 / -1; }
  #main :is(.native-table-scroll[aria-label="Outbound routes table"], .native-table-scroll:has(a[href^="/admin/outbound-routes/"][href$="/edit/"])) .native-row-actions { gap: 6px; }
  #main :is(.native-table-scroll[aria-label="Outbound routes table"], .native-table-scroll:has(a[href^="/admin/outbound-routes/"][href$="/edit/"])) .native-row-actions > :is(a, button) {
    height: 44px;
    min-height: 44px;
  }
  #main :is(.native-table-scroll[aria-label="Outbound routes table"], .native-table-scroll:has(a[href^="/admin/outbound-routes/"][href$="/edit/"])) .native-row-actions > .icon-button { width: 44px; }
}

@media (max-width: 760px) {
#main :is(.native-table-scroll[aria-label="Outbound routes table"], .native-table-scroll:has(a[href^="/admin/outbound-routes/"][href$="/edit/"])) td:nth-child(1)::before { content: "Route"; }
#main :is(.native-table-scroll[aria-label="Outbound routes table"], .native-table-scroll:has(a[href^="/admin/outbound-routes/"][href$="/edit/"])) td:nth-child(2)::before { content: "Pattern"; }
#main :is(.native-table-scroll[aria-label="Outbound routes table"], .native-table-scroll:has(a[href^="/admin/outbound-routes/"][href$="/edit/"])) td:nth-child(3)::before { content: "Phone connection"; }
#main :is(.native-table-scroll[aria-label="Outbound routes table"], .native-table-scroll:has(a[href^="/admin/outbound-routes/"][href$="/edit/"])) td:nth-child(4)::before { content: "Priority"; }
#main :is(.native-table-scroll[aria-label="Outbound routes table"], .native-table-scroll:has(a[href^="/admin/outbound-routes/"][href$="/edit/"])) td:nth-child(5)::before { content: "Prepend"; }
#main :is(.native-table-scroll[aria-label="Outbound routes table"], .native-table-scroll:has(a[href^="/admin/outbound-routes/"][href$="/edit/"])) td:nth-child(6)::before { content: "Strip digits"; }
#main :is(.native-table-scroll[aria-label="Outbound routes table"], .native-table-scroll:has(a[href^="/admin/outbound-routes/"][href$="/edit/"])) td:nth-child(7)::before { content: "PBX"; }
#main :is(.native-table-scroll[aria-label="Outbound routes table"], .native-table-scroll:has(a[href^="/admin/outbound-routes/"][href$="/edit/"])) td:nth-child(8)::before { content: "Actions"; }
}
