/* Front desk fixes, round 2 (fd2.js). Prefix fd2-, except the sheet rule below, which is every sheet's. */

/* R3: every sheet fits the window. Taller than the window, it scrolls inside itself, with its title on top and its main
   button at the bottom always in view (the insurance sheet's Save was 860 px down a 768 px laptop screen, centred with
   a transform, so neither end could be reached). Phones already scroll their bottom sheets (app.css). */
@media (min-width:701px){
  .sheet:not(.pal):not(.perio){max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);overflow-y:auto;overscroll-behavior:contain}
}
.sheet:not(.pal) > .ih:first-child{position:sticky;top:-20px;z-index:3;background:#fff;margin-top:-20px;padding-top:20px;padding-bottom:4px}
.sheet:not(.pal) > .go2:last-child,.sheet:not(.pal) > .two:last-child{position:sticky;bottom:-20px;z-index:3;box-shadow:0 20px 0 #fff,0 -10px 14px 2px #fff}
.sheet:not(.pal) > .two:last-child{background:#fff;padding-top:6px}

/* the patient's part (R4) */
.fd2-ins{color:var(--ink2)}
.fd2-none{color:var(--ink3)}
.fd2-owe{color:#b25b00}
.pname .fd2-powe{overflow:visible;text-overflow:clip;white-space:nowrap;font-size:var(--fs-12_5);margin-top:1px}
.fd2-paysins{margin-top:-8px;font-size:var(--fs-12_5);color:var(--ink2);padding:0 2px}
.fd2-paysins b{color:#b25b00;font-weight:600}

/* the sidebar's "Not confirmed", a button on any day, and its list (R12) */
.fd2-deskbtn{width:100%;text-align:start;font:inherit;border:0;background:none;cursor:pointer;color:inherit}
.fd2-deskbtn:disabled{cursor:default}
.fd2-deskbtn:not(:disabled):hover .n{text-decoration:underline}
.fd2-ucl{display:flex;flex-direction:column;gap:2px}
.fd2-ucrow{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:9px 2px;border-bottom:1px solid var(--line,#ececf0)}
.fd2-ucrow:last-child{border-bottom:0}
.fd2-ucdone{opacity:.65}
.fd2-ok{color:#1d8a3c;font-weight:600;font-size:var(--fs-12_5)}

/* a reason asked in Sinn's own sheet (R10) */
.fd2-ask{gap:12px}
.go2.fd2-danger{background:#b3261e}

/* Close the day while patients are still here (R14) */
.fd2-still{background:#fff4e0}
.fd2-stillon{outline:2px solid #f0b357}
.go2.fd2-warnbtn{background:#b25b00}

/* the insurer's plans already used here (R11) */
.fd2-plans{display:flex;flex-direction:column;gap:6px}
.fd2-plan{display:flex;flex-direction:column;align-items:flex-start;gap:2px;text-align:start;padding:8px 12px;border-radius:10px;border:1px solid var(--line,#e3e3e8);background:#fff;font:inherit;cursor:pointer}
.fd2-plan small{color:var(--ink2)}
.fd2-plan[aria-pressed="true"]{border-color:var(--acc);background:var(--accb)}

/* booking takes the planned work (R5); un-cancel into a taken time (think-14 #3); the pay sheet's insurer warning */
.fd2-takes{background:var(--accb)}
.fd2-clash,.fd2-inswarn{background:#fff4e0}

/* hours for a period (M4) */
.fd2-per{padding:4px 14px}
.fd2-perrow{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid var(--line,#ececf0)}
.fd2-perrow:last-child{border-bottom:0}
.fd2-perpast{opacity:.6}
.fd2-sug{background:#f7faff;margin:0 -14px;padding:10px 14px}
.fd2-midn{font-size:var(--fs-11);color:#8a4a00;margin-inline-start:2px;white-space:nowrap}
.fd2-persheet .hrow{grid-template-columns:78px 70px 1fr 1fr;gap:8px;padding:8px 10px}
.fd2-persheet .sess{flex-wrap:nowrap;gap:4px}
.fd2-persheet .sess .fx-vis{width:62px;padding:0 4px}
.fd2-persheet .sess .x.sm{flex:none}

/* family booking (think-11) */
.fd2-famlink{align-self:flex-start;display:inline-flex;gap:6px;align-items:center;margin-top:6px}
.fd2-famrows{display:flex;flex-direction:column;border:1px solid var(--line,#e3e3e8);border-radius:12px;overflow:hidden}
.fd2-famrow{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr) minmax(0,1.1fr);gap:10px;align-items:center;padding:10px 12px;border-bottom:1px solid var(--line,#ececf0)}
.fd2-famrow:last-child{border-bottom:0}
.fd2-famrow.fd2-off{background:#fafafb}
.fd2-famrow.fd2-off .fd2-famwho b{color:var(--ink3)}
.fd2-famrow.fd2-conf{background:#fff4e0}
.fd2-famwho{display:flex;gap:10px;align-items:flex-start;cursor:pointer;min-width:0}
.fd2-famwho input{width:18px;height:18px;margin-top:2px;flex:none}
.fd2-famsel{width:100%;min-width:0;height:34px;border-radius:9px;border:1px solid var(--line,#e3e3e8);background:#f6f6f7;font:inherit;font-size:var(--fs-13);padding:0 8px}
.fd2-famwhen{display:flex;flex-direction:column;gap:2px;min-width:0}
.fd2-chg{color:var(--acc);font-size:var(--fs-11)}
.fd2-famwarn{grid-column:1/-1;color:#8a4a00;font-size:var(--fs-12_5)}
.fd2-famopts button{display:flex;flex-direction:column;align-items:flex-start;gap:1px;border-radius:12px;height:auto;padding:7px 12px}
.fd2-famopts small{color:var(--ink2);font-size:var(--fs-11_5)}
.fd2-famopts button[aria-pressed="true"]{background:var(--accb);color:var(--acc);border-color:var(--acc);box-shadow:0 0 0 1px var(--acc) inset}
.fd2-famopts button[aria-pressed="true"] small{color:#3d74c4}
.go2.fd2-famgo{height:auto;min-height:48px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:8px 14px}
.go2.fd2-famgo small{font-weight:500;font-size:var(--fs-12);opacity:.9}
@media (max-width:700px){.fd2-famrow{grid-template-columns:1fr 1fr}.fd2-famwho{grid-column:1/-1}}
