/* Omniventas V62.5 - global desktop/mobile form and Select2 normalization. */
body.ov-responsive .row > [class*="col-"]{min-width:0}
body.ov-responsive .form-group{min-width:0}
body.ov-responsive .form-control{box-sizing:border-box}
body.ov-responsive .select2-container{display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important}
body.ov-responsive .select2-container .select2-choice{width:100%!important;min-height:38px;height:38px;line-height:36px;box-sizing:border-box;border-radius:7px}
body.ov-responsive .select2-container .select2-choice .select2-chosen{line-height:36px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.ov-responsive .select2-container-multi{height:auto!important;min-height:38px!important}
body.ov-responsive .select2-container-multi .select2-choices{display:flex!important;flex-wrap:wrap!important;align-items:center!important;align-content:center!important;gap:4px!important;width:100%!important;min-height:38px!important;height:auto!important;max-height:none!important;margin:0!important;padding:3px 6px!important;overflow:hidden!important;box-sizing:border-box!important;border-radius:7px!important;background-image:none!important}
body.ov-responsive .select2-container-multi .select2-choices li{float:none!important;margin:0!important;max-width:100%!important}
body.ov-responsive .select2-container-multi .select2-choices .select2-search-choice{display:flex!important;align-items:center!important;max-width:100%!important;min-height:27px!important;margin:0!important;padding:5px 8px 5px 22px!important;line-height:16px!important;box-sizing:border-box!important;white-space:normal!important}
body.ov-responsive .select2-container-multi .select2-choices .select2-search-choice>div,
body.ov-responsive .select2-container-multi .select2-choices .select2-search-choice .select2-chosen{max-width:100%!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
body.ov-responsive .select2-container-multi .select2-choices .select2-search-field{display:block!important;flex:1 1 120px!important;min-width:80px!important;max-width:100%!important;height:30px!important}
body.ov-responsive .select2-container-multi .select2-choices .select2-search-field input{width:100%!important;max-width:100%!important;height:30px!important;min-height:30px!important;margin:0!important;padding:4px 3px!important;box-sizing:border-box!important}
body.ov-responsive .select2-drop{max-width:calc(100vw - 16px)!important;box-sizing:border-box!important}
body.ov-responsive .select2-results{max-height:min(300px,45vh)!important}
body.ov-responsive .select2-search input{box-sizing:border-box!important;max-width:100%!important}

/* Keep labels/controls aligned without forcing legacy forms into oversized boxes. */
body.ov-responsive .form-horizontal .form-group .select2-container,
body.ov-responsive .form-inline .select2-container{vertical-align:middle}
body.ov-responsive label{max-width:100%}
body.ov-responsive .input-group{min-width:0}
body.ov-responsive .input-group .form-control{min-width:0}

/* Table readability: never break headers or values letter-by-letter. */
body.ov-responsive table.table th,
body.ov-responsive table.table td{word-break:normal!important;overflow-wrap:normal!important}
body.ov-responsive table.table th{white-space:normal;vertical-align:middle}
body.ov-responsive .table-responsive{overscroll-behavior-x:contain}

/* Generic action areas remain usable on narrow screens. */
@media(max-width:767px){
 body.ov-responsive .select2-container .select2-choice{min-height:44px;height:44px;line-height:42px}
 body.ov-responsive .select2-container .select2-choice .select2-chosen{line-height:42px}
 body.ov-responsive .select2-container-multi{min-height:44px!important;height:auto!important}
 body.ov-responsive .select2-container-multi .select2-choices{min-height:44px!important;padding:5px 7px!important;align-items:center!important}
 body.ov-responsive .select2-container-multi .select2-choices .select2-search-choice{min-height:30px!important;padding-top:6px!important;padding-bottom:6px!important}
 body.ov-responsive .select2-container-multi .select2-choices .select2-search-field{height:32px!important}
 body.ov-responsive .select2-container-multi .select2-choices .select2-search-field input{height:32px!important;min-height:32px!important;font-size:16px!important}
 body.ov-responsive .select2-drop{left:8px!important;right:8px!important;width:auto!important;max-width:none!important}
 body.ov-responsive .main-content .row>[class*="col-xs-"],
 body.ov-responsive .main-content .row>[class*="col-sm-"]{min-width:0}
 body.ov-responsive .modal-footer{display:flex;flex-wrap:wrap;gap:7px}
 body.ov-responsive .modal-footer .btn{margin:0!important;flex:1 1 120px}
}

/* Purchase Planner: old Select2 v3 needs explicit height reset. */
.purchase-planner .planner-multi + .select2-container,
.purchase-planner .field .select2-container{width:100%!important;height:auto!important;min-height:38px!important}
.purchase-planner .field .select2-container-multi .select2-choices{min-height:38px!important;height:auto!important;max-height:none!important;position:relative!important}
@media(max-width:767px){
 .purchase-planner .field .select2-container,
 .purchase-planner .field .select2-container-multi,
 .purchase-planner .field .select2-container-multi .select2-choices{min-height:44px!important;height:auto!important}
 .purchase-planner .filter-section{overflow:visible!important}
 .purchase-planner .filter-grid{align-items:stretch!important}
 .purchase-planner .field{width:100%!important;min-width:0!important}
}
