/* MCPL Member Details panel: compact stationary upper section + scrolling lower region.
   Presentation only. Text sizes, colours, wording, control sizes and the lower
   cards' own sizes/styling are unchanged; only spacing and the upper layout are tightened. */
#drawer.mcpld{display:flex;flex-direction:column;overflow:hidden!important;padding:0!important}

/* ---------- Upper section (stationary) ---------- */
#drawer.mcpld>.mcpld-head{
 flex:none;position:relative;z-index:2;background:inherit;
 padding:10px 22px 10px;
 border-bottom:1px solid #d9e7f2;          /* subtle separator only */
}
#drawer.mcpld>.mcpld-head>.close{line-height:1;padding:4px 6px;min-width:36px;min-height:34px;margin:-2px -6px 0 0}
#drawer.mcpld>.mcpld-head>h2{margin:2px 0 6px!important;line-height:1.2}
#drawer.mcpld>.mcpld-head>#memberIdentity h3{margin:0 0 2px;line-height:1.25}
#drawer.mcpld>.mcpld-head>#memberIdentity p{margin:0;line-height:1.4}
/* Follow-up Status and Call Date side by side inside their card */
#drawer.mcpld>.mcpld-head>#followupCard{
 display:grid;grid-template-columns:1fr 1fr;column-gap:12px;align-items:end;
 padding:10px 14px!important;margin:8px 0!important;
}
#drawer.mcpld>.mcpld-head>#followupCard>h3{grid-column:1;grid-row:1;margin:0 0 6px!important;line-height:1.2}
#drawer.mcpld>.mcpld-head>#followupCard>#editStatus{grid-column:1;grid-row:2;width:100%;min-width:0}
#drawer.mcpld>.mcpld-head>#followupCard>label{grid-column:2;grid-row:1/span 2;margin:0!important;min-width:0}
#drawer.mcpld>.mcpld-head>#followupCard>label>b{display:block;margin-bottom:6px;font-size:16.38px;line-height:1.2}
#drawer.mcpld>.mcpld-head>#followupCard>label>input{width:100%;min-width:0}
/* progress steps: same dots, labels and line; less padding around them */
#drawer.mcpld>.mcpld-head>.follow-progress{margin:0!important;padding:10px 8px!important}
#drawer.mcpld>.mcpld-head>.follow-progress .step-dot{margin-bottom:4px}

/* ---------- Lower region (scrolls) ---------- */
#drawer.mcpld>.mcpld-body{
 flex:1 1 auto;min-height:0;position:relative;z-index:1;
 overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;
 padding:0 22px 22px;outline:none;
}
/* the first visible card starts right under the separator (its own size/styling unchanged) */
#drawer.mcpld>.mcpld-body>.mcpld-first{margin-top:10px!important}
#drawer.mcpld>.mcpld-body:focus-visible{box-shadow:inset 0 0 0 2px #0b82ea55}

/* Fallback when the screen is too short for a usable lower region:
   the whole panel scrolls as one piece, nothing is pinned or hidden. */
#drawer.mcpld.mcpld-single{display:block;overflow-y:auto!important}
#drawer.mcpld.mcpld-single>.mcpld-head{border-bottom:0;padding-bottom:0}
#drawer.mcpld.mcpld-single>.mcpld-body{overflow:visible}

/* ---------- Adapt to the available height ---------- */
@media(max-width:800px){
 #drawer.mcpld>.mcpld-head{padding:8px 16px 8px}
 #drawer.mcpld>.mcpld-body{padding:0 16px 16px}
 #drawer.mcpld>.mcpld-head>#followupCard{column-gap:10px;padding:10px 12px!important}
}
@media(max-width:800px),(max-height:780px){
 #drawer.mcpld>.mcpld-head>h2{margin:0 0 4px!important}
 #drawer.mcpld>.mcpld-head>#followupCard{margin:6px 0!important}
 #drawer.mcpld>.mcpld-head>.follow-progress{padding:8px 6px!important}
}
/* very narrow phones: keep both fields comfortable by stacking them again */
@media(max-width:340px){
 #drawer.mcpld>.mcpld-head>#followupCard{grid-template-columns:1fr}
 #drawer.mcpld>.mcpld-head>#followupCard>label{grid-column:1;grid-row:auto;margin-top:8px!important}
}
