/* Add after reference-interiors.css. Local QA fixes; no global overflow hiding. */
@media(max-width:620px) {
 .reference-app .delivery-routes-list { flex-direction:column; max-height:320px; overflow:auto; }
 .reference-app .delivery-route { min-width:0; max-width:none; width:100%; }
}

/* The claims filter is a full-width workspace tool, not a narrow title accessory. */
html .ref-module.ref-view-support :is(.ref-folio-edition,.ref-glass-titlebar,.ref-console-titlebar,.ref-logistics-titlebar){
 display:grid;grid-template-columns:minmax(0,1fr);align-items:start;gap:18px;
}
html .ref-module.ref-view-support .ref-period-controls{
 display:block;min-width:0;width:100%;max-width:100%;
}
html .ref-module.ref-view-support .support-toolbar{
 display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr) auto;
 align-items:end;gap:12px;width:100%;max-width:100%;min-width:0;margin:0;padding:14px;
 background:var(--ri-panel);border:1px solid var(--ri-line);border-radius:var(--ri-radius);box-shadow:none;
}
html .ref-module.ref-view-support .support-toolbar .field{
 display:grid;grid-template-columns:minmax(0,1fr);gap:7px;width:100%;min-width:0;max-width:100%;margin:0;
}
html .ref-module.ref-view-support .support-toolbar .field>span{
 color:var(--ri-text);font-size:14px;line-height:1.4;overflow-wrap:anywhere;
}
html .ref-module.ref-view-support .support-toolbar :is(input,select){
 width:100%;min-width:0;max-width:100%;min-height:44px;font-size:16px;
 background:var(--ri-panel);color:var(--ri-text);
}
html .ref-module.ref-view-support .support-toolbar select{text-overflow:ellipsis;}
html .ref-module.ref-view-support .support-toolbar>.button{
 min-width:0;min-height:44px;width:auto;max-width:100%;margin:0;white-space:normal;
}

/* Use available panel width instead of a fixed390px card floor. */
html .ref-module.ref-view-support .support-case-grid{
 display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr));gap:16px;
 width:100%;max-width:100%;min-width:0;
}
html .ref-module.ref-view-support .support-case-card{
 min-width:0;max-width:100%;margin:0;gap:14px;
}
html .ref-module.ref-view-support .support-case-head{
 display:flex;flex-wrap:wrap;gap:12px;align-items:flex-start;
}
html .ref-module.ref-view-support .support-case-head>div{flex:1 1 145px;min-width:0;}
html .ref-module.ref-view-support .support-case-head :is(h3,p){overflow-wrap:anywhere;}
html .ref-module.ref-view-support .support-status{
 flex:0 1 auto;max-width:100%;white-space:normal;overflow-wrap:anywhere;
 font-size:14px;line-height:1.4;
}
html .ref-module.ref-view-support .support-case-facts{
 display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,150px),1fr));gap:10px;
}
html .ref-module.ref-view-support .support-case-facts>span{
 min-width:0;background:var(--ri-soft);color:var(--ri-text);
}
html .ref-module.ref-view-support .support-case-facts strong{
 color:var(--ri-text);font-size:14px;line-height:1.5;overflow-wrap:anywhere;
}
html .ref-module.ref-view-support .support-case-facts :is(small,b){
 color:var(--ri-muted);font-size:12px;line-height:1.5;overflow-wrap:anywhere;
}
html .ref-module.ref-view-support .support-case-excerpt{font-size:14px;line-height:1.6;}
html .ref-module.ref-view-support .support-case-card>footer{
 display:flex;flex-wrap:wrap;gap:12px;align-items:center;border-color:var(--ri-line);
}
html .ref-module.ref-view-support .support-case-card>footer>span{
 flex:1 1 150px;min-width:0;font-size:12px;line-height:1.5;overflow-wrap:anywhere;
}
html .ref-module.ref-view-support .support-case-card>footer>.button{
 flex:0 1 auto;min-height:44px;max-width:100%;
}

/* Keep every notices destination discoverable, including clients and history. */
html .ref-module.ref-view-notices .ref-module-tabs{
 display:flex;flex-wrap:wrap;gap:6px;width:100%;min-width:0;max-width:100%;overflow:visible;
}
html .ref-module.ref-view-notices .ref-module-tabs>button{
 flex:1 1 130px;min-width:0;max-width:100%;min-height:44px;padding:9px 12px;
 white-space:normal;overflow-wrap:break-word;line-height:1.4;
}

/* Delivery status filters wrap inside their panel at desktop as well as mobile. */
html .ref-module.ref-view-deliveries .delivery-stops-panel{container:ref-delivery-stops / inline-size;}
html .ref-module.ref-view-deliveries :is(.delivery-status-tabs,.delivery-filters){
 display:flex;flex-wrap:wrap;gap:7px;width:100%;min-width:0;max-width:100%;overflow:visible;
}
html .ref-module.ref-view-deliveries :is(.delivery-status-tabs,.delivery-filters)>button{
 flex:0 1 auto;width:auto;min-width:0;max-width:100%;min-height:40px;
 white-space:normal;overflow-wrap:break-word;line-height:1.4;font-size:14px;
}

@container ref-module (max-width:790px){
 html .ref-module.ref-view-support .support-toolbar{
  grid-template-columns:repeat(2,minmax(0,1fr));
 }
 html .ref-module.ref-view-support .support-toolbar>.button{grid-column:1/-1;width:100%;}
 html .ref-module.ref-view-notices .ref-module-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));}
 html .ref-module.ref-view-notices .ref-module-tabs>button{width:100%;}
}
@container ref-module (max-width:520px){
 html .ref-module.ref-view-support .support-toolbar{grid-template-columns:minmax(0,1fr);padding:12px;}
 html .ref-module.ref-view-support .support-case-grid{grid-template-columns:minmax(0,1fr);}
 html .ref-module.ref-view-support .support-case-card{padding:15px;}
 html .ref-module.ref-view-support .support-case-facts{grid-template-columns:minmax(0,1fr);}
 html .ref-module.ref-view-support .support-case-card>footer>.button{flex:1 0 100%;width:100%;}
 html .ref-module.ref-view-notices .ref-module-tabs>button{padding:9px 7px;}
 html .ref-module.ref-view-deliveries :is(.delivery-status-tabs,.delivery-filters){
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
 }
 html .ref-module.ref-view-deliveries :is(.delivery-status-tabs,.delivery-filters)>button{width:100%;min-height:44px;}
}
@container ref-delivery-stops (max-width:440px){
 html .ref-module.ref-view-deliveries :is(.delivery-status-tabs,.delivery-filters){
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
 }
 html .ref-module.ref-view-deliveries :is(.delivery-status-tabs,.delivery-filters)>button{width:100%;min-height:44px;}
}
