#appointment-dialog{inset:0 0 0 auto;margin:0;width:min(590px,100vw);max-width:100vw;height:100dvh;max-height:100dvh;border-radius:0;overflow:visible;color:#0d073b}
#appointment-dialog .dialog-shell{height:100%;max-height:none;background:white}
#appointment-dialog .dialog-shell>header{min-height:104px;padding:26px 24px;flex-shrink:0;border-color:#dedde3}
#appointment-dialog h2{font-size:22px;font-weight:600;overflow-wrap:anywhere}
#appointment-dialog .eyebrow{font-size:13px;font-weight:400;letter-spacing:0;text-transform:none;color:#77717f;margin-bottom:7px}
#appointment-dialog .dialog-body{flex:1;min-height:0;padding:0 24px 24px;overflow:auto}
#appointment-dialog .dialog-body section{padding:22px 0;border-bottom:1px solid #ecebf0}
#appointment-dialog h3{font-size:15px;font-weight:600;margin:0 0 15px}
#appointment-dialog .appointment-time{display:grid;gap:5px;padding:20px 0;border-bottom:1px solid #ecebf0;font-size:14px}
#appointment-dialog .appointment-time span{color:#787281}
#appointment-dialog .appointment-person{display:flex;gap:12px;align-items:center}
#appointment-dialog .appointment-person>div{display:grid;gap:7px;flex:1;min-width:0;overflow-wrap:anywhere}
#appointment-dialog .appointment-person .tag{justify-self:start}
#appointment-dialog .appointment-avatar{display:grid;place-items:center;flex:0 0 36px;height:36px;border-radius:50%;background:#fff0ea;color:#a64323;font-weight:600}
#appointment-dialog .appointment-invoice{display:flex;justify-content:space-between;gap:12px;padding:14px;background:#faf9fb;border-radius:4px;margin-top:16px;font-size:13px}
#appointment-dialog .appointment-invoice>div{display:grid;gap:5px;min-width:0;overflow-wrap:anywhere}
#appointment-dialog .appointment-invoice>div:last-child{text-align:right;flex-shrink:0}
#appointment-dialog .appointment-invoice span{color:#787281}
#appointment-dialog .appointment-person+p{margin-top:14px}
#appointment-dialog .appointment-client+.appointment-client{border-top:1px solid #ecebf0;margin-top:20px;padding-top:20px}
#appointment-dialog .appointment-client>.muted{margin-top:14px}
#appointment-dialog .appointment-service{display:flex;justify-content:space-between;gap:20px;margin-bottom:12px;font-size:14px}
#appointment-dialog .appointment-service>div{display:grid;gap:8px;overflow-wrap:anywhere;min-width:0}
#appointment-dialog .appointment-service span{font-size:13px;color:#787281}
#appointment-dialog .appointment-service-total{border-top:1px solid #ecebf0;padding-top:14px;margin-top:18px;align-items:center}
#appointment-dialog .appointment-service-total>span{margin-left:auto;white-space:nowrap}
#appointment-dialog .appointment-service>strong{flex-shrink:0}
#appointment-dialog .appointment-prose{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.5;margin:0}
#appointment-dialog .appointment-links{display:flex;gap:10px;padding-top:22px}
#appointment-dialog .dialog-shell>footer{flex-wrap:wrap;flex-shrink:0;padding:18px 24px;border-color:#dedde3;min-height:0;position:static}
#appointment-dialog .dialog-shell>footer:empty{display:none}
#appointment-dialog [data-close-dialog]{position:absolute;left:-76px;top:24px;width:56px;height:56px;border-radius:50%;background:#fff;font-size:30px;color:#77717f;border:1px solid #dedde3;box-shadow:0 4px 9px #0002}
@media(max-width:700px){#appointment-dialog [data-close-dialog]{position:static;flex:0 0 40px;width:40px;height:40px;box-shadow:none}#appointment-dialog .dialog-shell>header{min-height:90px;padding:20px}#appointment-dialog .dialog-body{padding-inline:20px}#appointment-dialog .dialog-shell>footer{padding:14px 20px}#appointment-dialog .dialog-shell>footer button{flex:1 1 42%}}

/* Book appointment panel (calendar-booking-panel.mjs): same right-side drawer
   shell as #appointment-dialog above, so the two match at the calendar. */
#booking-dialog{inset:0 0 0 auto;margin:0;width:min(480px,100vw);max-width:100vw;height:100dvh;max-height:100dvh;border-radius:0;overflow:visible;color:#0d073b}
#booking-dialog .dialog-shell{height:100%;max-height:none;background:#fff}
#booking-dialog .dialog-shell>header{min-height:80px;padding:20px 24px;flex-shrink:0;border-color:#dedde3}
#booking-dialog h2{font-size:20px;font-weight:600;overflow-wrap:anywhere}
#booking-dialog .eyebrow{font-size:13px;font-weight:400;letter-spacing:0;text-transform:none;color:#77717f;margin-bottom:5px}
#booking-dialog .dialog-body{flex:1;min-height:0;padding:20px 24px;overflow:auto;gap:16px}
#booking-dialog .booking-datetime{display:grid;grid-template-columns:1fr;gap:6px;align-items:end}
#booking-dialog .booking-datetime span[data-booking-end]{grid-column:1;margin-top:-2px}
#booking-dialog .booking-field{display:grid;gap:5px}
#booking-dialog .booking-field>span{color:#787281;font-size:13px}
#booking-dialog .booking-field-row{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:13px;color:#787281}
#booking-dialog .booking-static-chip{display:inline-flex;align-items:center;height:32px;padding:0 12px;border-radius:16px;background:#f4f2f6;color:#0d073b;font-size:13px;font-weight:600}
#booking-dialog .booking-client-chip{display:flex;align-items:center;gap:10px;padding:8px 10px;border:1px solid var(--line,#dedde3);border-radius:7px}
#booking-dialog .booking-client-chip strong{flex:1;min-width:0;overflow-wrap:anywhere;font-weight:600}
#booking-dialog .booking-avatar{display:grid;place-items:center;flex:0 0 32px;height:32px;border-radius:50%;background:#fff0ea;color:#a64323;font-weight:600;font-size:13px}
#booking-dialog .patient-picker-results{position:static;margin-top:6px;box-shadow:none;border-color:var(--line,#dedde3)}
#booking-dialog .booking-new-client-row{display:block;width:100%;padding:10px 11px;border:0;border-top:1px solid var(--line,#dedde3);background:#fff;text-align:left;color:#b7411b;font-weight:600;cursor:pointer}
#booking-dialog .booking-new-client-row:hover,#booking-dialog .booking-new-client-row:focus-visible{background:#fff0e9}
#booking-dialog .booking-new-client{display:grid;gap:12px;padding:12px;border:1px solid var(--line,#dedde3);border-radius:7px;background:#faf9fb}
#booking-dialog .booking-new-client-actions{display:flex;justify-content:flex-end;gap:8px}
#booking-dialog .dialog-shell>footer{flex-direction:column;align-items:stretch;gap:12px;flex-shrink:0;padding:16px 24px;border-color:#dedde3;position:sticky;bottom:0;background:#fff}
#booking-dialog .booking-total{display:flex;justify-content:space-between;align-items:center;font-size:14px}
#booking-dialog .booking-total span{color:#787281}
#booking-dialog .booking-actions{display:flex;justify-content:flex-end;gap:8px}
@media(max-width:700px){#booking-dialog{width:100vw}#booking-dialog .dialog-shell>header{padding:16px 18px}#booking-dialog .dialog-body{padding:16px 18px}#booking-dialog .booking-datetime{grid-template-columns:1fr}#booking-dialog .booking-datetime span[data-booking-end]{grid-column:1}#booking-dialog .dialog-shell>footer{padding:12px 18px}#booking-dialog .booking-actions button{flex:1}}
#appointment-dialog .appointment-tags{display:flex;flex-wrap:wrap;gap:6px}
#appointment-dialog .appointment-tags .tag{text-transform:none}
#appointment-dialog .appointment-sign{justify-self:start;min-height:40px}

/* Create invoice / Create note (View invoice / Open note once they exist): the last block of the drawer body, under the
   Total row, stacked full width (Carepatron). A group appointment repeats the pair on each attendee card instead. */
#appointment-dialog .appointment-actions{display:grid;gap:10px;margin-top:18px}
#appointment-dialog .appointment-actions button{width:100%;min-height:48px;justify-content:center}
#appointment-dialog .dialog-body .appointment-checkout{border-bottom:0;padding:20px 0 4px}
#appointment-dialog .appointment-checkout .appointment-service-total{margin:0 0 18px;padding:0;border-top:0}
#appointment-dialog .appointment-checkout .appointment-actions{margin-top:0}
#appointment-dialog .appointment-invoice-status{font-weight:600;color:#0d073b}

/* Attendance lives with the visit's status, wherever the appointment is opened. */
.appointment-attendance{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:10px;font-size:14px}
.appointment-attendance .attendance-label{font-weight:600;color:var(--ink)}
.appointment-attendance .attendance-note{color:var(--muted,#6f6c7a);font-size:13px}
.appointment-attendance .attendance-action{min-height:36px;padding:6px 12px;font-size:14px}
.client-name-link{color:inherit;text-decoration:underline;text-decoration-color:#aaa;text-underline-offset:3px}
.client-name-link:hover{color:#a23a18}
.client-name-link:focus-visible{outline:2px solid #a23a18;outline-offset:3px}

/* One client identity in the title; appointment status and tools stay together below. */
#appointment-dialog .appointment-attendance-section .appointment-attendance{margin-top:0}
#appointment-dialog .appointment-utilities{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:14px}
#appointment-dialog .appointment-person{margin-bottom:12px}
#appointment-dialog .appointment-person strong{min-width:0;overflow-wrap:anywhere}
