/* Client-only phone layout. Desktop and staff schedule rules stay unchanged. */
@media (max-width: 760px) {
  body.is-client-workspace .schedule-search > header,
  body.is-client-workspace .schedule-search form {
    padding: 14px;
  }

  body.is-client-workspace .schedule-search > header h2 {
    font-size: 18px;
  }

  body.is-client-workspace .schedule-search form {
    gap: 14px;
  }

  body.is-client-workspace .schedule-form-heading {
    gap: 4px;
  }

  body.is-client-workspace .schedule-fields {
    grid-template-areas: "pol" "swap" "pod" "period";
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 0;
    border: 0;
    background: transparent;
  }

  body.is-client-workspace .schedule-fields label span {
    font-size: 12px;
    letter-spacing: 0;
    text-transform: none;
  }

  body.is-client-workspace .schedule-fields #schedulePol,
  body.is-client-workspace .schedule-fields #schedulePod,
  body.is-client-workspace .schedule-fields #scheduleMonth {
    width: 100%;
    min-width: 0;
    height: 48px;
    min-height: 48px;
    font-size: 16px;
  }

  body.is-client-workspace .schedule-fields > .swap-ports {
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    justify-self: center;
  }

  body.is-client-workspace .schedule-port-listbox {
    max-height: min(260px, 40vh);
    overscroll-behavior: contain;
  }

  body.is-client-workspace .schedule-port-option {
    min-height: 44px;
    padding: 11px;
    font-size: 14px;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  body.is-client-workspace .schedule-search .route-type-toggle {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    overflow: visible;
  }

  body.is-client-workspace .schedule-search .route-type-toggle button {
    min-width: 0;
    min-height: 48px;
    padding: 8px 4px;
    font-size: 12px;
    line-height: 1.3;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  body.is-client-workspace .schedule-search-footer {
    gap: 12px;
    padding-top: 12px;
  }

  body.is-client-workspace .schedule-search-footer p {
    font-size: 13px;
    line-height: 1.45;
  }

  body.is-client-workspace .schedule-search-footer button {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    font-size: 16px;
  }

  body.is-client-workspace #scheduleResults {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    margin-top: 14px;
  }

  body.is-client-workspace #scheduleResults .route-card {
    min-width: 0;
    margin-bottom: 0;
  }

  body.is-client-workspace #scheduleResults .route-card > header {
    padding: 12px;
  }

  body.is-client-workspace #scheduleResults .route-card > header > div {
    display: grid;
    gap: 7px;
    min-width: 0;
  }

  body.is-client-workspace #scheduleResults .route-transit {
    margin-left: 0;
    line-height: 1.4;
  }

  body.is-client-workspace #scheduleResults .route-chain {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    padding: 14px 12px;
  }

  body.is-client-workspace #scheduleResults .route-point {
    display: grid;
    grid-template-columns: 28px 12px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-width: 0;
  }

  body.is-client-workspace #scheduleResults .route-point i {
    width: 12px;
    height: 12px;
  }

  body.is-client-workspace #scheduleResults .route-point span {
    max-width: none;
    font-size: 13px;
    line-height: 1.4;
    text-align: left;
    overflow-wrap: anywhere;
  }

  body.is-client-workspace #scheduleResults .route-line {
    width: 2px;
    height: 12px;
    margin-left: 41px;
  }

  body.is-client-workspace #scheduleResults .leg-block {
    padding: 14px 12px;
  }

  body.is-client-workspace #scheduleResults .leg-block h4 {
    font-size: 15px;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }

  body.is-client-workspace #scheduleResults .leg-window {
    font-size: 12px;
    line-height: 1.4;
  }

  body.is-client-workspace #scheduleResults .leg-table {
    display: grid;
    gap: 12px;
    border: 0;
    border-radius: 0;
    overflow: visible;
  }

  body.is-client-workspace #scheduleResults .leg-row:not(.leg-head) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    font-size: 14px;
  }

  body.is-client-workspace #scheduleResults .leg-row.leg-head {
    display: none;
  }

  body.is-client-workspace #scheduleResults .leg-row > .leg-sailing {
    grid-column: 1 / -1;
    gap: 7px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
  }

  body.is-client-workspace #scheduleResults .leg-sailing-title {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 7px;
    white-space: normal;
  }

  body.is-client-workspace #scheduleResults .leg-sailing-title strong,
  body.is-client-workspace #scheduleResults .leg-sailing-title small {
    flex: 0 1 auto;
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
  }

  body.is-client-workspace #scheduleResults .leg-sailing-title strong {
    font-size: 15px;
  }

  body.is-client-workspace #scheduleResults .leg-sailing-title small {
    font-size: 13px;
  }

  body.is-client-workspace #scheduleResults .leg-sailing > .capacity-badge {
    display: inline-flex;
    font-size: 11px;
    white-space: normal;
  }

  /* Override legacy nth-child hiding for both dates and the selection action. */
  body.is-client-workspace #scheduleResults .leg-row > span[data-label] {
    display: grid;
    gap: 4px;
    min-width: 0;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  body.is-client-workspace #scheduleResults .leg-row > span[data-label]::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
  }

  body.is-client-workspace #scheduleResults .leg-row > .leg-action {
    display: flex;
    grid-column: 1 / -1;
    min-width: 0;
    padding-top: 2px;
  }

  body.is-client-workspace #scheduleResults .leg-action button {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 10px 14px;
    font-size: 15px;
  }
}
