/* Keep navigation reachable in short windows and on touch screens. */
body.mini-navbar .navbar-static-side {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    height: 100vh;
    height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #a7b1c2 #293846;
}
body.mini-navbar .navbar-static-side::-webkit-scrollbar { width: 7px; }
body.mini-navbar .navbar-static-side::-webkit-scrollbar-thumb { background: #a7b1c2; border-radius: 4px; }
body.mini-navbar .navbar-static-side::-webkit-scrollbar-track { background: #293846; }
body.mini-navbar .navbar-static-side .sidebar-collapse { min-height: 0; }
body.mini-navbar #page-wrapper { min-height: 100vh; }

/* Order tables scroll independently, without moving the page header. */
.order-page { min-width: 0; }
.order-table-scroll { width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.order-table-scroll:focus-visible { outline: 2px solid #1ab394; outline-offset: 2px; }
@media (max-width: 1199px) {
  .order-summary, .order-summary > tbody, .order-summary > tbody > tr,
  .order-summary > tbody > tr > td { display: block; width: 100%; }
  .order-summary > tbody > tr > td { padding-bottom: 12px; }
  .order-summary table { min-width: 0 !important; width: 100%; table-layout: fixed; }
  .order-summary table td { overflow-wrap: anywhere; vertical-align: top; padding: 3px 5px 3px 0; }
  .order-summary input { max-width: 100%; width: 100% !important; box-sizing: border-box; }
}
@media (max-width: 767px) {
  body.mini-navbar .navbar-static-side { width: 70px; }
  body.mini-navbar #page-wrapper { margin-left: 70px; padding: 0 10px; min-width: 0; }
  .order-page > .row { margin-left: -10px; margin-right: -10px; }
  .order-page > .row > .col-lg-12 { padding-left: 10px; padding-right: 10px; }
  .order-page .ibox-content { padding: 12px 10px; }
  .order-page h1 { font-size: 22px; line-height: 1.35; overflow-wrap: anywhere; }
  .orders-list-page h1 a { display: inline-block; font-size: 15px; margin: 3px 0; }
  .orders-list-page .form-inline { display: flex; flex-wrap: wrap; gap: 8px; }
  .orders-list-page .form-inline .form-group { flex: 1 1 120px; min-width: 0; margin: 0; }
  .orders-list-page .form-inline .form-control { width: 100%; min-width: 0; }
  .order-page input, .order-page select, .order-page textarea { max-width: 100%; }
  .order-page input[type=file] { width: 100%; }
  .orders-list-page .ibox-content > span { display: inline-block; padding: 5px !important; }
  .order-table-scroll > table { min-width: 760px; }
  .order-detail-page .order-table-scroll > table.table-bordered { min-width: 1000px; }
  .order-summary table td:first-child { width: 43%; }
  .order-summary table td { font-size: 13px !important; }
  .order-page .btn { white-space: normal; }
}

/* Show the complete delivery address without horizontal input scrolling. */
.order-address-row label { font-weight: normal; }
.order-summary #order_address {
  display: block; width: 250px; max-width: 100%; min-height: 66px;
  box-sizing: border-box; padding: 5px; line-height: 1.45;
  white-space: pre-wrap; overflow-wrap: anywhere; resize: vertical;
}
@media (max-width: 1199px) {
  .order-summary .order-address-row > td,
  .order-summary .order-address-row > td:first-child { width: 100%; }
  .order-summary #order_address { width: 100%; }
}
