/* Shared sizing rules: reflow at narrow widths without page zoom or clipping. */
@layer mv-responsive-foundation {
  body.mv-app-bg{margin:0}
  body{font-size:clamp(.875rem,calc(.82rem + .15vw),1rem)!important;line-height:1.5}
  :where(.mv-page,.container,.container-fluid,.card,.card-body,.modal-body,.modal-content,.mv-standard-card){min-width:0;box-sizing:border-box}
  :where(.row,.d-flex,.d-grid)>*{min-width:0}
  :where(.form-control,.form-select,.mv-search-select){min-width:0;max-width:100%;box-sizing:border-box}
  :where(.form-control,.form-select,.mv-search-select-button){font-size:clamp(.875rem,calc(.82rem + .15vw),1rem)!important;line-height:1.4}
  :where(.mv-page-title,.mv-page-head h1){font-size:clamp(1.3rem,calc(1rem + 1vw),2rem)!important;line-height:1.2!important;overflow-wrap:break-word}
  :where(.card-title,.modal-title){font-size:clamp(1rem,calc(.9rem + .4vw),1.25rem)!important;line-height:1.3!important;overflow-wrap:break-word}
  :where(.mv-page-subtitle,.form-text,.card-text,p){overflow-wrap:break-word;word-break:normal}
  :where(.mv-page-subtitle,.form-text,.card-text){font-size:clamp(.8125rem,calc(.76rem + .15vw),.9375rem)!important;line-height:1.45}
  :where(.btn){font-size:clamp(.8125rem,calc(.76rem + .15vw),.9375rem)!important;white-space:normal;line-height:1.35}
  :where(.form-label){font-size:clamp(.8125rem,calc(.76rem + .15vw),.9375rem)!important}
  .table-responsive{min-width:0;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}
  @media(max-width:767px){
    :where(main h1,.container h1){font-size:clamp(1.25rem,calc(1rem + 1.2vw),1.65rem)!important;line-height:1.25!important;overflow-wrap:break-word}
    :where(main h2,.container h2){font-size:clamp(1.1rem,calc(1rem + .6vw),1.4rem)!important;line-height:1.3!important;overflow-wrap:break-word}
    :where(main h3,.container h3){font-size:clamp(1rem,calc(.95rem + .4vw),1.2rem)!important;line-height:1.3!important;overflow-wrap:break-word}
    :where(.mv-page-head){gap:12px;flex-wrap:wrap}
    :where(.mv-page-head>*,.toolbar-actions){max-width:100%}
    :where(.modal-footer){flex-wrap:wrap;gap:8px}
    /* 16px equivalent avoids automatic iOS zoom when focusing form fields. */
    :where(input.form-control,select.form-select,textarea.form-control,.mv-search-select-button){font-size:1rem!important}
  }
  body.market-page .market-sidebar{font-size:.875rem!important;min-width:0!important}
  body.market-page .market-sidebar .filter-card{padding:12px!important;container-type:inline-size}
  body.market-page .market-sidebar .filter-title{font-size:.875rem!important;line-height:1.3!important}
  body.market-page .filter-inputs{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)!important;gap:6px!important}
  body.market-page .filter-inputs input{width:100%!important;min-width:0!important;min-height:36px!important;padding:6px 7px!important;font-size:.875rem!important;box-sizing:border-box!important}
  body.market-page .filter-card .radio-line{display:grid!important;grid-template-columns:14px minmax(0,1fr) auto!important;gap:7px!important;align-items:start!important;font-size:.8125rem!important;line-height:1.45!important;white-space:normal!important;padding:7px 0!important;margin:5px 0!important}
  body.market-page .filter-card .radio-dot{width:14px!important;height:14px!important;min-width:14px!important;margin-top:3px!important;box-sizing:border-box!important}
  body.market-page .price-range-text{min-width:0!important;overflow-wrap:normal!important;word-break:normal!important}
  body.market-page .price-range-value{white-space:nowrap!important}
  body.market-page .filter-card .muted-count{font-size:.6875rem!important;white-space:nowrap!important;padding-top:2px!important}
  @media(max-width:767px){body.market-page .filter-inputs input{font-size:1rem!important}}
  @media(min-width:992px){body.market-page .market-layout:not(.no-sidebar){grid-template-columns:clamp(210px,18vw,250px) minmax(0,1fr)!important}}
  @container(max-width:170px){
    body.market-page .filter-card .radio-line{grid-template-columns:14px minmax(0,1fr)!important;row-gap:1px!important}
    body.market-page .filter-card .muted-count{grid-column:2;padding-top:0!important}
  }
}

@layer mv-responsive-foundation {
 :is(.mv-person-dialog,.mv-person-video-dialog,.shop-location-dialog){max-width:calc(100vw - 24px)!important;max-height:90dvh;overflow:auto;box-sizing:border-box}
 :is(.mv-person-fields,.mv-person-gallery,.shop-capture-controls)>*{min-width:0;overflow-wrap:anywhere}
 :is(.mv-person-video-dialog,.shop-location-dialog) button{min-height:44px}
 @media(prefers-reduced-motion:reduce){:is(.order-expand,.mv-person-video-thumb,.shop-capture-controls button){transition:none!important;animation:none!important;scroll-behavior:auto!important}}
}

/* Shared profile headings and action groups wrap without widening the viewport. */
@layer mv-responsive-foundation {
 :where(.seller-hero-inner,.store-hero,.profile-header,.mv-page-head)>*{min-width:0;max-width:100%}
 :where(.seller-meta,.profile-meta,.toolbar-actions){flex-wrap:wrap;gap:8px}
 :where(.seller-meta>*,.profile-meta>*,.mv-page-head h1){overflow-wrap:anywhere}
 @media(max-width:600px){:where(.store-hero,.profile-header,.mv-page-head){flex-wrap:wrap}:where(.toolbar-actions,.seller-hero-actions) .btn{min-height:44px}}
}
/* Compact page headings: keep actions beside the title, including on phones. */
@layer mv-responsive-foundation {
 :where(.mv-page-head){display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:space-between!important;flex-wrap:wrap!important;text-align:left!important;gap:12px!important}
 :where(.mv-page-head)>:first-child{min-width:min(100%,240px);flex:1 0 240px;text-align:left!important}
 :where(.mv-page-head)>:is(a,button){flex:0 1 auto!important;width:auto!important;max-width:48%;min-height:44px;white-space:normal!important;overflow-wrap:anywhere;position:relative;z-index:1}
 :where(.mv-page-head)>:is(.d-flex,.toolbar-actions,.mv-head-actions):not(:first-child){display:flex!important;flex-flow:row wrap!important;justify-content:flex-end!important;gap:8px!important;min-width:0;max-width:55%}
 :where(.mv-page-head) :is(h1,h2,p){text-align:left!important;overflow-wrap:anywhere}
 :where(.mv-page-head) .btn{margin-top:0!important;max-width:100%;white-space:normal!important}
 @media(max-width:600px){
  :where(.mv-page-head){padding:14px!important;gap:10px!important}
  :where(.mv-page-head)>:is(a,button){font-size:.8125rem!important;padding:8px 10px!important}
  :where(.actions,.toolbar-actions,.mv-head-actions){display:flex;flex-direction:row;flex-wrap:wrap;gap:8px}
  :where(.actions,.toolbar-actions,.mv-head-actions)>:is(.btn,button,a){flex:1 1 calc(50% - 8px);width:auto!important;min-width:0;max-width:100%;min-height:44px;white-space:normal!important;overflow-wrap:anywhere}
  :where(.form-control,.form-select,input,select,textarea){max-width:100%;box-sizing:border-box}
 }
}
@layer mv-responsive-foundation {
 :where(.mv-page-head)>:is(.d-flex,.toolbar-actions,.mv-head-actions):not(:first-child)>:is(a,button,.btn){flex:1 1 0;min-width:0;width:auto!important;white-space:normal!important;overflow-wrap:anywhere}
}

/* Preserve readable headings when export/action groups need a second row. */
@layer mv-responsive-foundation {
 :where(.mv-page-head)>:first-child{max-width:100%;flex-basis:min(100%,260px)!important}
 :where(.mv-page-head)>:is(.export-buttons,.actions,.d-flex,.toolbar-actions,.mv-head-actions):not(:first-child){display:flex!important;flex:0 1 auto!important;flex-wrap:wrap!important;gap:8px!important;max-width:100%!important;width:auto!important;min-width:0!important}
 :where(.mv-page-head)>:is(.export-buttons,.actions,.d-flex,.toolbar-actions,.mv-head-actions)>.btn{flex:0 1 auto!important;min-width:44px;max-width:100%}
 :where(.mv-page-head) :is(h1,h2,p){word-break:normal!important;overflow-wrap:break-word!important}
 :where(dialog){box-sizing:border-box;max-width:calc(100vw - 24px)!important;max-height:calc(100dvh - 24px)!important;overflow:auto}
 :where(dialog) :is(input,select,textarea,img,video){max-width:100%;box-sizing:border-box}
 :where(.modal-dialog){box-sizing:border-box;max-width:calc(100vw - 24px)!important;margin-inline:auto!important}
 :where(.modal-content){max-height:calc(100dvh - 32px)!important;min-width:0;overflow:hidden}
 :where(.modal-body){min-height:0;overflow-y:auto!important;overscroll-behavior:contain;overflow-wrap:break-word}
 :where(.modal-header,.modal-footer){flex-shrink:0;flex-wrap:wrap;gap:8px}
 @media(max-width:600px){:where(.mv-page-head)>:first-child{flex-basis:100%!important;min-width:0!important}:where(.modal-dialog){margin-block:12px!important}:where(.modal-content){max-height:calc(100dvh - 24px)!important}}
}
