/* Bimehkar MP166 — customer/public mobile-first polish. */
html,body{max-width:100%;overflow-x:hidden}
body.customer-page,body.customer-page *{box-sizing:border-box}
body.customer-page :is(main,.container,.customer-content,.customer-panel-shell,.customer-panel-main,.customer-card,.customer-form-card,.bk360-workspace,.bk360-panel,.bk360-panel-body){min-width:0;max-width:100%}
body.customer-page :is(h1,h2,h3,h4,p,strong,span,a,td,th,label){overflow-wrap:anywhere}
body.customer-page :is(.customer-table-wrap,.tp-table-wrap,.table-wrapper,.table-responsive,.bk166-table-scroll){max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;overscroll-behavior-inline:contain}

/* Verified MP165 overflow fix: customer case used content width + horizontal padding without border-box. */
body.customer-page .bk360-customer-case-page{box-sizing:border-box!important;width:100%!important;max-width:1180px!important;min-width:0!important}
body.customer-page :is(.bk360-customer-hero,.bk360-workspace,.bk360-panel,.bk360-panel-body,.bk360-thread,.bk360-reply){min-width:0!important;max-width:100%!important}
body.customer-page .bk360-msg{overflow-wrap:anywhere}
body.customer-page .bk360-attachments a{max-width:100%;overflow-wrap:anywhere}

@media (max-width:820px){
  body.customer-page .customer-nav{width:min(100% - 20px,1180px)!important;min-width:0!important}
  body.customer-page .customer-account{margin-inline-start:auto!important;min-width:0!important}
  body.customer-page .customer-panel-shell{grid-template-columns:minmax(0,1fr)!important;gap:12px!important}
  body.customer-page .customer-panel-sidebar{max-width:100%!important;min-width:0!important}
  body.customer-page .customer-content{padding-bottom:calc(28px + env(safe-area-inset-bottom))!important}
  body.customer-page :is(.modal-overlay,.customer-modal,.tp-modal){padding:10px!important}
  body.customer-page :is(.modal-box,.customer-modal-box,.tp-modal-box){width:100%!important;max-width:calc(100vw - 20px)!important;max-height:calc(100dvh - 20px)!important;overflow:auto!important}
}

@media (max-width:600px){
  body.customer-page .customer-nav{min-height:62px!important;gap:8px!important}
  body.customer-page .customer-nav .brand img{width:116px!important;max-width:32vw!important}
  body.customer-page .customer-account{gap:5px!important}
  body.customer-page .customer-account>a{min-height:42px!important;padding:0 10px!important;font-size:11.5px!important}
  body.customer-page :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea,.form-control){
    width:100%!important;max-width:100%!important;min-height:44px!important;font-size:16px!important;border-radius:10px!important
  }
  body.customer-page textarea{line-height:1.8!important}
  body.customer-page :is(button,.btn,a.btn,[role="button"]){min-height:44px}
  body.customer-page :is(.btn,.btn-sm){white-space:normal!important;line-height:1.4!important;padding:9px 12px!important}
  body.customer-page :is(.customer-welcome,.customer-page-head,.customer-card,.customer-form-card,.bk360-case-header,.bk360-panel-head,.bk360-panel-body){padding:14px!important}
  body.customer-page :is(.customer-stats,.customer-action-grid,.customer-form-grid,.bk360-profile,.bk360-form-grid,.bk360-metrics,.bk360-360grid,.bk360-workspace){grid-template-columns:minmax(0,1fr)!important}
  body.customer-page .bk360-customer-case-page{margin:12px auto!important;padding:0 10px!important}
  body.customer-page .bk360-workspace{display:block!important}
  body.customer-page .bk360-workspace>aside{display:block!important;width:100%!important;margin-top:12px!important}
  body.customer-page .bk360-case-header{border-radius:14px!important;margin-bottom:10px!important}
  body.customer-page .bk360-case-header h1{font-size:20px!important;line-height:1.6!important}
  body.customer-page .bk360-customer-id{gap:6px!important;font-size:11.5px!important}
  body.customer-page .bk360-thread{padding:10px!important;margin:10px 0!important;max-height:none!important}
  body.customer-page .bk360-msg{max-width:96%!important;padding:10px 11px!important}
  body.customer-page .bk360-msg-head{gap:8px!important;align-items:flex-start!important;flex-wrap:wrap!important}
  body.customer-page .bk360-msg p{font-size:13.5px!important;line-height:1.9!important}
  body.customer-page .bk360-reply .btn{width:100%!important;justify-content:center!important}
  body.customer-page :is(.customer-table-wrap,.tp-table-wrap){touch-action:pan-x pan-y}
  body.customer-page :is(.customer-table,.tp-table){min-width:640px!important}
}

@media (max-width:390px){
  body.customer-page .customer-nav{width:min(100% - 14px,1180px)!important}
  body.customer-page .customer-nav .brand img{width:104px!important}
  body.customer-page .customer-account>a{padding-inline:8px!important}
  body.customer-page .bk360-customer-case-page{padding-inline:7px!important}
  body.customer-page .bk360-msg{max-width:100%!important}
}

@media (prefers-reduced-motion:reduce){
  body.customer-page *,body.customer-page *::before,body.customer-page *::after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}
}

@media (max-width:390px){
  body.customer-page .bk360-panel-head{display:block!important;width:100%!important;min-width:0!important}
  body.customer-page .bk360-panel-head>*{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important}
  body.customer-page .bk360-panel-head :is(h2,h3,small){max-width:100%!important;overflow-wrap:anywhere!important;word-break:normal}
}

/* Public claim/support and treatment portal: same phone touch/readability baseline. */
body.bk47-public-page,body.bk123-treatment-portal{max-width:100%;overflow-x:hidden}
body.bk47-public-page *,body.bk123-treatment-portal *{box-sizing:border-box}
body.bk47-public-page :is(main,.container,section,article,form),body.bk123-treatment-portal :is(.tp-shell,.tp-card,.tp-grid,.tp-head,.tp-brand,.tp-user){min-width:0;max-width:100%}
body.bk47-public-page :is(.table-wrapper,.table-responsive,.table-wrap),body.bk123-treatment-portal .tp-table-wrap{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;overscroll-behavior-inline:contain}
@media(max-width:600px){
 body.bk47-public-page :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea,.form-control),
 body.bk123-treatment-portal :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea){min-height:44px!important;font-size:16px!important;max-width:100%!important}
 body.bk47-public-page :is(button,.btn,a.btn,[role="button"]),body.bk123-treatment-portal :is(button,.tp-btn,a.tp-btn){min-height:44px}
 body.bk47-public-page :is(.grid,.form-grid,.claim-grid,.bk47-grid){grid-template-columns:minmax(0,1fr)!important}
 body.bk47-public-page :is(h1,h2,h3,p,a,label),body.bk123-treatment-portal :is(h1,h2,h3,p,a,label,strong,span){overflow-wrap:anywhere}
 body.bk123-treatment-portal .tp-head{align-items:center!important;flex-wrap:wrap!important}
 body.bk123-treatment-portal .tp-user{margin-inline-start:auto;min-width:0}
 body.bk123-treatment-portal .tp-card{border-radius:12px;padding:12px!important}
 body.bk123-treatment-portal .tp-grid{grid-template-columns:minmax(0,1fr)!important}
 body.bk123-treatment-portal .tp-field.wide,body.bk123-treatment-portal .tp-field.full{grid-column:auto!important}
 body.bk123-treatment-portal .tp-drop{min-height:96px;display:grid;place-items:center}
 body.bk123-treatment-portal .tp-actions{display:grid!important;grid-template-columns:1fr!important}
 body.bk123-treatment-portal .tp-table{min-width:720px!important}
}
