/* AquaFlow V34.2.26 — Delivery header action row
   Keep “Giao hàng · Đơn cần giao · Giao nhanh” on one horizontal row.
   This intentionally overrides legacy staff/mobile width:100% + flex-wrap rules. */

#deliveries .delivery-page-head,
body.staff-mode #deliveries .delivery-page-head,
body[data-role="staff"] #deliveries .delivery-page-head,
body.management-mode #deliveries .delivery-page-head {
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:8px!important;
  width:100%!important;
  min-width:0!important;
  min-height:58px!important;
  margin:0 0 9px!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}

#deliveries .delivery-page-head>div:first-child,
body.staff-mode #deliveries .delivery-page-head>div:first-child,
body[data-role="staff"] #deliveries .delivery-page-head>div:first-child{
  min-width:0!important;
  width:auto!important;
}

#deliveries .delivery-page-head h2{
  margin:0!important;
  white-space:nowrap!important;
}

#deliveries .delivery-head-actions,
body.staff-mode #deliveries .delivery-head-actions,
body[data-role="staff"] #deliveries .delivery-head-actions,
body.management-mode #deliveries .delivery-head-actions {
  display:flex!important;
  flex-flow:row nowrap!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:6px!important;
  width:auto!important;
  min-width:0!important;
  max-width:none!important;
  flex:0 0 auto!important;
}

#deliveries .delivery-head-actions .btn,
body.staff-mode #deliveries .delivery-head-actions .btn,
body[data-role="staff"] #deliveries .delivery-head-actions .btn,
body.management-mode #deliveries .delivery-head-actions .btn {
  width:auto!important;
  max-width:none!important;
  min-height:42px!important;
  height:42px!important;
  flex:0 0 auto!important;
  margin:0!important;
  white-space:nowrap!important;
}

#deliveries .delivery-head-actions .btn.secondary,
body.staff-mode #deliveries .delivery-head-actions .btn.secondary,
body[data-role="staff"] #deliveries .delivery-head-actions .btn.secondary {
  min-width:108px!important;
  padding:0 10px!important;
}

#deliveries .delivery-head-actions .delivery-create-button,
body.staff-mode #deliveries .delivery-head-actions .delivery-create-button,
body[data-role="staff"] #deliveries .delivery-head-actions .delivery-create-button {
  min-width:122px!important;
  padding:0 11px!important;
}

@media(max-width:760px){
  #deliveries .delivery-page-head,
  body.staff-mode #deliveries .delivery-page-head,
  body[data-role="staff"] #deliveries .delivery-page-head,
  body.management-mode #deliveries .delivery-page-head{
    grid-template-columns:minmax(105px,.9fr) auto!important;
    gap:6px!important;
    min-height:54px!important;
  }

  #deliveries .delivery-page-head>div:first-child>small,
  #deliveries .delivery-page-head .staff-page-note{display:none!important}

  #deliveries .delivery-page-head h2{
    font-size:27px!important;
    line-height:1!important;
    letter-spacing:-.04em!important;
  }

  #deliveries .delivery-head-actions,
  body.staff-mode #deliveries .delivery-head-actions,
  body[data-role="staff"] #deliveries .delivery-head-actions{
    gap:5px!important;
  }

  #deliveries .delivery-head-actions .btn,
  body.staff-mode #deliveries .delivery-head-actions .btn,
  body[data-role="staff"] #deliveries .delivery-head-actions .btn{
    min-height:42px!important;
    height:42px!important;
    border-radius:11px!important;
    font-size:11.5px!important;
    line-height:1!important;
  }

  #deliveries .delivery-head-actions .btn.secondary,
  body.staff-mode #deliveries .delivery-head-actions .btn.secondary,
  body[data-role="staff"] #deliveries .delivery-head-actions .btn.secondary{
    min-width:104px!important;
    padding:0 8px!important;
  }

  #deliveries .delivery-head-actions .delivery-create-button,
  body.staff-mode #deliveries .delivery-head-actions .delivery-create-button,
  body[data-role="staff"] #deliveries .delivery-head-actions .delivery-create-button{
    min-width:118px!important;
    padding:0 9px!important;
  }
}

@media(max-width:390px){
  #deliveries .delivery-page-head,
  body.staff-mode #deliveries .delivery-page-head,
  body[data-role="staff"] #deliveries .delivery-page-head{
    grid-template-columns:minmax(96px,.8fr) auto!important;
    gap:4px!important;
  }
  #deliveries .delivery-page-head h2{font-size:24px!important}
  #deliveries .delivery-head-actions{gap:4px!important}
  #deliveries .delivery-head-actions .btn.secondary,
  body.staff-mode #deliveries .delivery-head-actions .btn.secondary,
  body[data-role="staff"] #deliveries .delivery-head-actions .btn.secondary{
    min-width:96px!important;
    padding:0 6px!important;
    font-size:10.7px!important;
  }
  #deliveries .delivery-head-actions .delivery-create-button,
  body.staff-mode #deliveries .delivery-head-actions .delivery-create-button,
  body[data-role="staff"] #deliveries .delivery-head-actions .delivery-create-button{
    min-width:108px!important;
    padding:0 7px!important;
    font-size:10.7px!important;
  }
}

@media(max-width:350px){
  #deliveries .delivery-page-head h2{font-size:22px!important}
  #deliveries .delivery-head-actions .btn.secondary{min-width:90px!important;font-size:10px!important}
  #deliveries .delivery-head-actions .delivery-create-button{min-width:102px!important;font-size:10px!important}
}
