/* HayOrder v1.1.47 – real mobile footer + compact timeline fix.
   This is the final override layer and deliberately neutralizes legacy flex/min-size rules. */

/* Mobile/end-device footer layout: 1 full row + 2 equal buttons below. */
@media (max-width:1180px){
  body #orders-ajax-root.ho-orders-147 .ho124-detail .ho68-modal-footer{
    padding:12px 12px max(12px,env(safe-area-inset-bottom))!important;
  }
  body #orders-ajax-root.ho-orders-147 .ho124-detail .ho68-footer-buttons{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
    grid-template-areas:
      "primary primary"
      "cancel print"!important;
    grid-auto-flow:row!important;
    align-items:stretch!important;
    justify-items:stretch!important;
    gap:8px!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    margin:0!important;
  }
  body #orders-ajax-root.ho-orders-147 .ho124-detail .ho68-footer-buttons>.ho68-primary-form{
    grid-area:primary!important;
  }
  body #orders-ajax-root.ho-orders-147 .ho124-detail .ho68-footer-buttons>.ho68-cancel-form{
    grid-area:cancel!important;
  }
  body #orders-ajax-root.ho-orders-147 .ho124-detail .ho68-footer-buttons>.ho68-print-button{
    grid-area:print!important;
  }
  body #orders-ajax-root.ho-orders-147 .ho124-detail .ho68-footer-buttons>form,
  body #orders-ajax-root.ho-orders-147 .ho124-detail .ho68-footer-buttons>.ho68-print-button{
    display:block!important;
    flex:none!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    margin:0!important;
    justify-self:stretch!important;
  }
  body #orders-ajax-root.ho-orders-147 .ho124-detail .ho68-footer-buttons>form>button,
  body #orders-ajax-root.ho-orders-147 .ho124-detail .ho68-footer-buttons>.ho68-print-button{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    margin:0!important;
  }
}

/* Phone timeline: compact 2-column cards with clean content alignment. */
@media (max-width:760px){
  body #orders-ajax-root.ho-orders-147 .ho124-detail .ho55-history-section{
    padding:12px!important;
  }
  body #orders-ajax-root.ho-orders-147 .ho124-detail .ho55-section-heading{
    align-items:flex-start!important;
    gap:6px!important;
    margin-bottom:10px!important;
  }
  body #orders-ajax-root.ho-orders-147 .ho124-detail .ho55-section-heading h3{
    margin-top:4px!important;
    font-size:22px!important;
    line-height:1.08!important;
    font-weight:700!important;
    letter-spacing:-.025em!important;
  }
  body #orders-ajax-root.ho-orders-147 .ho124-detail .ho55-section-heading small{
    font-size:10.5px!important;
    line-height:1.25!important;
  }
  body #orders-ajax-root.ho-orders-147 .ho124-detail .ho55-timeline-frame{
    padding:0!important;
    overflow:visible!important;
  }
  body #orders-ajax-root.ho-orders-147 .ho124-detail .ho55-timeline-frame .ho54-timeline,
  body #orders-ajax-root.ho-orders-147 .ho124-detail .ho55-timeline-frame .ho54-timeline.has-cancellation,
  body #orders-ajax-root.ho-orders-147 .ho124-detail .ho55-timeline-frame .ho136-timeline-grid,
  body #orders-ajax-root.ho-orders-147 .ho124-detail .ho55-timeline-frame .ho136-timeline-grid.has-cancellation{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:7px!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    padding:0!important;
    margin:0!important;
    overflow:visible!important;
  }
  body #orders-ajax-root.ho-orders-147 .ho124-detail .ho55-timeline-frame .ho-timeline-event{
    display:grid!important;
    grid-template-columns:12px minmax(0,1fr)!important;
    align-items:start!important;
    align-content:center!important;
    column-gap:8px!important;
    row-gap:0!important;
    flex:none!important;
    flex-basis:auto!important;
    width:auto!important;
    min-width:0!important;
    max-width:none!important;
    min-height:68px!important;
    height:auto!important;
    padding:9px 10px!important;
    margin:0!important;
    border-radius:13px!important;
  }
  body #orders-ajax-root.ho-orders-147 .ho124-detail .ho55-timeline-frame .ho-timeline-event:before,
  body #orders-ajax-root.ho-orders-147 .ho124-detail .ho55-timeline-frame .ho-timeline-event:after{
    display:none!important;
    content:none!important;
  }
  body #orders-ajax-root.ho-orders-147 .ho124-detail .ho55-timeline-frame .ho-timeline-dot{
    width:11px!important;
    height:11px!important;
    min-width:11px!important;
    margin:2px 0 0!important;
  }
  body #orders-ajax-root.ho-orders-147 .ho124-detail .ho55-timeline-frame .ho-timeline-event>div{
    display:grid!important;
    grid-template-rows:auto auto!important;
    align-content:start!important;
    gap:3px!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
  }
  body #orders-ajax-root.ho-orders-147 .ho124-detail .ho55-timeline-frame .ho-timeline-event strong{
    display:block!important;
    margin:0!important;
    font-size:12.5px!important;
    line-height:1.2!important;
    font-weight:700!important;
    letter-spacing:-.012em!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    overflow-wrap:normal!important;
  }
  body #orders-ajax-root.ho-orders-147 .ho124-detail .ho55-timeline-frame .ho-timeline-event small{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    margin:0!important;
    font-size:9px!important;
    line-height:1.2!important;
    font-weight:500!important;
    letter-spacing:-.02em!important;
    white-space:nowrap!important;
    word-break:normal!important;
    overflow-wrap:normal!important;
    overflow:hidden!important;
    text-overflow:clip!important;
    font-variant-numeric:tabular-nums!important;
  }
}

/* Very small phones: still 2 columns, slightly tighter typography. */
@media (max-width:430px){
  body #orders-ajax-root.ho-orders-147 .ho124-detail .ho55-timeline-frame .ho54-timeline,
  body #orders-ajax-root.ho-orders-147 .ho124-detail .ho55-timeline-frame .ho54-timeline.has-cancellation,
  body #orders-ajax-root.ho-orders-147 .ho124-detail .ho55-timeline-frame .ho136-timeline-grid,
  body #orders-ajax-root.ho-orders-147 .ho124-detail .ho55-timeline-frame .ho136-timeline-grid.has-cancellation{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:6px!important;
  }
  body #orders-ajax-root.ho-orders-147 .ho124-detail .ho55-timeline-frame .ho-timeline-event{
    min-height:64px!important;
    padding:8px 8px!important;
    grid-template-columns:10px minmax(0,1fr)!important;
    column-gap:7px!important;
  }
  body #orders-ajax-root.ho-orders-147 .ho124-detail .ho55-timeline-frame .ho-timeline-dot{
    width:10px!important;
    height:10px!important;
    min-width:10px!important;
  }
  body #orders-ajax-root.ho-orders-147 .ho124-detail .ho55-timeline-frame .ho-timeline-event strong{
    font-size:11.5px!important;
  }
  body #orders-ajax-root.ho-orders-147 .ho124-detail .ho55-timeline-frame .ho-timeline-event small{
    font-size:8.4px!important;
    letter-spacing:-.03em!important;
  }
}
