/* Hab mobile (≤575.98px) only. Desktop layout must stay visually unchanged. v=20261117b3 */
@media (max-width: 575.98px) {
  /* Homepage price table: reflow instead of clipping long prices and £119 badges */
  #prices .price-table-wrap.table-responsive,
  .price-table-wrap.table-responsive {
    overflow: visible !important;
  }
  #prices .price-table,
  .price-table {
    width: 100%;
  }
  #prices .price-table thead,
  .price-table thead {
    display: none;
  }
  #prices .price-table,
  #prices .price-table tbody,
  #prices .price-table tr,
  #prices .price-table td,
  .price-table,
  .price-table tbody,
  .price-table tr,
  .price-table td {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }
  #prices .price-table tbody tr,
  .price-table tbody tr {
    padding: 0.75rem 0.9rem;
    border-bottom: 1px solid #e8eef3;
  }
  #prices .price-table tbody tr.is-disabled,
  .price-table tbody tr.is-disabled {
    display: block;
  }
  #prices .price-table tbody td,
  .price-table tbody td {
    padding: 0.15rem 0;
    border: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    text-align: left !important;
  }
  #prices .price-table tbody td:first-child,
  .price-table tbody td:first-child {
    font-weight: 700;
    color: #0b3d63;
    padding-top: 0;
  }
  #prices .price-table tbody td.text-end,
  .price-table tbody td.text-end,
  #prices .price-table tbody td:last-child,
  .price-table tbody td:last-child {
    font-size: 0.95rem;
    padding-bottom: 0;
  }
  #prices .price-table .badge,
  .price-table .badge {
    display: inline-block;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.3;
    margin: 0.35rem 0 0;
    font-weight: 700;
    text-align: left;
  }

  /* Long service titles on tiles and services rows */
  #prices .svc-tile h3,
  #prices .svc-tile .h6,
  .price-row-title {
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
    line-height: 1.3;
    hyphens: auto;
  }

  /* Services page rows: stack title, price and button; fix overlapping Trailer row */
  .price-row,
  .price-row.has-book,
  .price-row.is-disabled {
    display: flex !important;
    flex-direction: column;
    align-items: stretch !important;
    gap: 0.55rem !important;
  }
  .price-row-link,
  .price-row.is-disabled .price-row-link {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    min-width: 0;
    width: 100%;
  }
  .price-row-main,
  .price-row-price {
    grid-area: auto !important;
    width: 100%;
    min-width: 0;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }
  .price-row .btn,
  .price-row .btn.disabled,
  .price-row span.btn {
    grid-area: auto !important;
    width: 100%;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: static;
    margin: 0;
  }
  .price-row.is-disabled {
    opacity: 1;
    background: #f3f5f7;
  }
  .price-row.is-disabled .price-row-title,
  .price-row.is-disabled .price-row-note,
  .price-row.is-disabled .price-row-price {
    opacity: 0.7;
  }

  /* Booking calendar & slots — Albyn-sized tap targets, Hab colours */
  html body #hb .hb-cal {
    padding: 8px;
  }
  html body #hb .hb-cal-g {
    gap: 4px;
  }
  html body #hb .hb-cal-nav,
  html body #hb .hb-cal-today {
    min-width: 48px;
    min-height: 44px;
  }
  html body #hb .hb-cal-d,
  html body #hb .hb-cal-pad {
    min-height: 48px;
    min-width: 0;
    padding: 2px 0;
  }
  html body #hb .hb-cal-d .n {
    font-size: 0.95rem;
  }
  html body #hb .hb-cal-d small {
    font-size: 0.55rem;
    padding: 0 2px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  html body #hb .hb-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 8px;
  }
  html body #hb .hb-slots button {
    min-height: 48px;
    min-width: 0;
    width: 100%;
    font-size: 0.98rem;
    font-weight: 700;
  }
  html body #hb .hb-agree {
    min-height: 48px;
    padding: 0.7rem 0.8rem;
  }
  html body #hb .hb-agree input {
    width: 24px;
    height: 24px;
  }
  html body #hb .hb-veh-details {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  html body #hb .hb-veh-plate { max-width: none; }
  html body #hb .hb-mot-ask {
    margin-top: 0;
    min-height: 48px;
  }
  html body #hb .hb-mot-ask input {
    width: 24px;
    height: 24px;
  }
  html body #hb .hb-next,
  html body #hb .hb-back,
  html body #hb .hb-ghost,
  html body #hb .hb-btn-gold {
    min-height: 48px;
  }
}
