/* Shared Patients / Tasks scheduler. Colors and control geometry follow the
   patient workspace and Tasks controls; only the form body scrolls. */
#patient-schedule-modal { padding:16px; font:14px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif; color:#1f2937; }
#patient-schedule-modal .schedule-dialog { width:720px; max-width:100%; max-height:calc(100dvh - 32px); min-height:0; display:grid; grid-template-rows:auto minmax(0,1fr) auto; background:#fff; border:1px solid #e5e7eb; border-radius:8px; box-shadow:0 24px 64px #0003; overflow:hidden; }
#patient-schedule-modal .schedule-header { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; padding:16px 24px; border-bottom:1px solid #e5e7eb; }
#patient-schedule-modal .schedule-header h3 { margin:0; font-size:16px; line-height:24px; font-weight:600; color:#111827; }
#patient-schedule-modal .schedule-header p { margin:4px 0 0; color:#6b7280; font-size:13px; }
#patient-schedule-modal .schedule-header strong { color:#374151; font-weight:500; margin-left:6px; }
#patient-schedule-modal button { font:inherit; cursor:pointer; }
#patient-schedule-modal button:disabled { opacity:.5; cursor:not-allowed; }
#patient-schedule-modal .schedule-close { border:0; background:transparent; padding:2px 6px; font-size:24px; line-height:24px; color:#6b7280; border-radius:4px; }
#patient-schedule-modal .schedule-close:hover { background:#f3f4f6; color:#111827; }
#patient-schedule-modal .schedule-body { margin:0; padding:0; border:0; min-width:0; min-height:0; overflow-y:auto; overscroll-behavior:contain; }
#patient-schedule-modal .schedule-section { padding:20px 24px; border-bottom:1px solid #e5e7eb; }
#patient-schedule-modal .schedule-section:last-child { border-bottom:0; }
#patient-schedule-modal .schedule-section h4 { margin:0 0 14px; font-size:14px; font-weight:600; color:#111827; }
#patient-schedule-modal .schedule-settings-grid { display:grid; grid-template-columns:minmax(0,1fr); gap:12px; }
#patient-schedule-modal .schedule-field { min-width:0; }
#patient-schedule-modal .schedule-field>label { display:block; margin-bottom:6px; font-size:13px; font-weight:500; color:#374151; }
#patient-schedule-modal .schedule-optional { color:#6b7280; font-weight:400; }
#patient-schedule-modal :is(select,input[type=date],textarea) { width:100%; border:1px solid #d1d5db; border-radius:6px; background:#fff; padding:8px 10px; font:inherit; color:#374151; }
#patient-schedule-modal textarea { resize:vertical; min-height:68px; }
#patient-schedule-modal :is(input,select,textarea,button):focus-visible { outline:3px solid #c7d2fe; outline-offset:2px; }
#patient-schedule-modal .schedule-segments { display:flex; gap:3px; padding:3px; background:#f3f4f6; border:1px solid #e5e7eb; border-radius:6px; }
#patient-schedule-modal .schedule-segments button { flex:1; border:1px solid transparent; background:transparent; color:#4b5563; padding:5px 12px; border-radius:4px; font-size:13px; font-weight:500; }
#patient-schedule-modal .schedule-segments button[aria-pressed=true] { background:#fff; border-color:#d1d5db; color:#4338ca; box-shadow:0 1px 2px #00000008; }
#patient-schedule-modal #schedule-clinician-wrap-pm:not(.hidden) { margin-top:8px; }
#patient-schedule-modal:has(#schedule-kind-npv-pm[aria-pressed=true]) #schedule-clinician-wrap-pm { margin-top:0; }
#patient-schedule-modal .schedule-quick-dates { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:16px; }
#patient-schedule-modal .quick-date-btn { flex:1; min-width:76px; padding:7px 10px; background:#fff; color:#374151; border:1px solid #d1d5db; border-radius:6px; font-size:13px; }
#patient-schedule-modal .quick-date-btn span { color:inherit; font-weight:500; }
#patient-schedule-modal .quick-date-btn span.text-xs { display:block; font-size:12px; font-weight:400; opacity:.8; }
#patient-schedule-modal .quick-date-btn.bg-indigo-600 { background:#eef2ff; border-color:#a5b4fc; color:#4338ca; }
#patient-schedule-modal .schedule-time-grid { display:grid; grid-template-columns:190px minmax(0,1fr); gap:24px; }
#patient-schedule-modal #schedule-slots-pm button[data-at] { font-size:13px; padding:6px 10px; border-width:1px; border-radius:6px; }
#patient-schedule-modal #schedule-slots-pm button[data-at].bg-indigo-100 { color:#4338ca; background:#eef2ff; border-color:#818cf8; }
#patient-schedule-modal #schedule-slots-pm>div:first-child { margin-bottom:8px; }
#patient-schedule-modal #schedule-slots-pm select { width:auto; max-width:180px; font-size:12px; padding:3px 6px; }
#patient-schedule-modal #schedule-slots-pm>div:nth-child(2) { max-height:160px; overflow-y:auto; padding:3px; margin:-3px; }
#patient-schedule-modal .schedule-npv-options { display:grid; gap:12px; margin-bottom:16px; }
#patient-schedule-modal .schedule-npv-options>div:first-child { max-width:240px; }
#patient-schedule-modal .schedule-check { display:flex; align-items:flex-start; gap:9px; color:#374151; font-size:13px; cursor:pointer; }
#patient-schedule-modal .schedule-check input { margin-top:3px; accent-color:#4f46e5; width:15px; height:15px; flex-shrink:0; }
#patient-schedule-modal .schedule-reminder { margin-top:14px; }
#patient-schedule-modal .schedule-footer { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:14px 24px; border-top:1px solid #e5e7eb; background:#f9fafb; }
#patient-schedule-modal .schedule-summary { display:flex; flex-direction:column; font-size:12px; color:#6b7280; }
#patient-schedule-modal .schedule-summary strong { font-size:13px; font-weight:500; color:#374151; }
#patient-schedule-modal .schedule-footer-actions { display:flex; gap:8px; margin-left:auto; flex-shrink:0; }
#patient-schedule-modal .schedule-footer-actions button { padding:8px 14px; border-radius:6px; font-size:14px; font-weight:500; white-space:nowrap; }
#patient-schedule-modal .schedule-secondary { border:1px solid #d1d5db; background:#fff; color:#374151; }
#patient-schedule-modal .schedule-primary { border:1px solid #4f46e5; background:#4f46e5; color:#fff; }
#patient-schedule-modal .schedule-secondary:hover { background:#f3f4f6; }
#patient-schedule-modal .schedule-primary:hover { background:#4338ca; border-color:#4338ca; }
#patient-schedule-modal .hidden { display:none; }
@media(max-width:600px) {
    #patient-schedule-modal { padding:10px; }
    #patient-schedule-modal .schedule-dialog { max-height:calc(100dvh - 20px); }
    #patient-schedule-modal :is(.schedule-header,.schedule-section) { padding:16px; }
    #patient-schedule-modal .schedule-settings-grid,#patient-schedule-modal .schedule-time-grid { grid-template-columns:1fr; gap:16px; }
    #patient-schedule-modal .schedule-footer { padding:12px 16px; flex-wrap:wrap; gap:10px; }
    #patient-schedule-modal .schedule-footer-actions { margin-left:auto; }
    #patient-schedule-modal .schedule-quick-dates { gap:6px; }
}

#patient-schedule-modal .schedule-details-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:12px; }
#patient-schedule-modal .schedule-details-heading h4 { margin:0; }
#patient-schedule-modal .schedule-details-heading .schedule-check { align-items:center; margin:0; white-space:nowrap; }
#patient-schedule-modal .schedule-details-heading .schedule-check input { margin:0; }

/* Compact scheduler: one contact, one date/time row, optional details folded. */
#patient-schedule-modal .schedule-compact{width:590px}
#patient-schedule-modal .schedule-compact .schedule-header{padding:18px 22px}
#patient-schedule-modal .schedule-compact .schedule-header p{display:flex;gap:4px;align-items:baseline;flex-wrap:wrap}
#patient-schedule-modal .schedule-compact .schedule-header strong{margin-left:0}
#patient-schedule-modal .schedule-text-link{border:0;background:none;color:#554599;font-size:12px;padding:0;margin-left:6px}
#patient-schedule-modal .schedule-compact-body{padding:20px 22px}
#patient-schedule-modal .schedule-date-time{display:grid;grid-template-columns:1fr 1fr;gap:16px}
#patient-schedule-modal .schedule-contact{margin:0 0 20px;padding:0;border:0;background:none}
#patient-schedule-modal .schedule-contact .pcp-field{display:block;font-size:12px;margin:0 0 5px}
#patient-schedule-modal .schedule-contact .pcp-field select{margin-top:6px}
#patient-schedule-modal .schedule-contact :is(.pcp-help,.schedule-hint){font-size:11px;margin:4px 0 0;color:#667085}
#patient-schedule-modal .schedule-compact :is(select,input[type=date],input[type=time]){min-height:38px;font-size:13px}
#patient-schedule-modal .schedule-field>label{font-size:12px}
#patient-schedule-modal .schedule-hint,.schedule-hint{font-size:12px;color:#667085;line-height:1.5;margin:6px 0 0}
#patient-schedule-modal #schedule-manual-time-pm{margin-top:12px}
#patient-schedule-modal .schedule-timezone{display:flex;align-items:center;gap:6px;font-size:11px;color:#667085;margin-top:9px}
#patient-schedule-modal .schedule-timezone select{width:auto;min-height:0;font-size:11px;padding:2px 4px;border:0;background:transparent;color:#554599;max-width:230px}
#patient-schedule-modal .schedule-preference-hint{font-size:11px;line-height:1.5;color:#667085;margin-top:7px}
#patient-schedule-modal .schedule-preference-hint button{font-size:11px;color:#554599;border:0;background:none;padding:0;margin-left:8px}
#patient-schedule-modal .schedule-quiet-options{margin-top:22px;border-top:1px solid #edf0f4;padding-top:13px}
#patient-schedule-modal .schedule-quiet-options summary{display:flex;align-items:center;gap:10px;cursor:pointer;list-style:none;font-size:13px;color:#475467}
#patient-schedule-modal .schedule-quiet-options summary::-webkit-details-marker{display:none}
#patient-schedule-modal .schedule-quiet-options summary small{font-size:11px;color:#98a2b3}
#patient-schedule-modal .schedule-quiet-options summary>span:last-child{margin-left:auto;color:#98a2b3}
#patient-schedule-modal .schedule-options-body{padding-top:16px}
#patient-schedule-modal .schedule-options-body>.schedule-field{margin:16px 0}
#patient-schedule-modal .schedule-options-body .schedule-check{align-items:center;font-size:13px}
#patient-schedule-modal .schedule-npv-options{margin-top:14px}
#patient-schedule-modal .schedule-footer{padding:14px 22px}
#patient-schedule-modal .schedule-error{font-size:12px;color:#b42318;margin:12px 0 0}
#patient-schedule-modal [hidden]{display:none!important}
.schedule-staff-picker{position:fixed;inset:auto;margin:0;width:330px;max-width:calc(100vw - 16px);max-height:min(440px,70dvh);overflow:auto;padding:6px;background:white;border:1px solid #dce1ea;border-radius:8px;box-shadow:0 12px 28px #24304c26;color:#344054;z-index:var(--z-modal-child,10000);font:13px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.schedule-staff-picker button{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;border:0;border-radius:5px;padding:9px 10px;background:white;text-align:left;color:#344054;cursor:pointer;font:inherit}
.schedule-staff-picker button:hover,.schedule-staff-picker button[aria-current=true]{background:#f5f3ff}
.schedule-staff-picker button:disabled{opacity:.45;cursor:not-allowed}
.schedule-staff-picker button strong{display:block;font-size:13px;font-weight:500}
.schedule-staff-picker button small{display:block;font-size:11px;color:#667085}
.schedule-staff-picker input{width:100%;border:1px solid #dce1ea;border-radius:5px;padding:8px 10px;font:inherit;margin:4px 0 7px}
.schedule-picker-heading{font-size:11px;font-weight:600;color:#667085;margin:6px 10px}
.schedule-staff-picker :focus-visible{outline:3px solid #c7d2fe;outline-offset:1px}
@media(max-width:600px){#patient-schedule-modal .schedule-compact-body{padding:16px}#patient-schedule-modal .schedule-date-time{gap:10px}#patient-schedule-modal #schedule-duration-pm{display:none}#patient-schedule-modal .schedule-footer-actions{width:100%;justify-content:flex-end}}

.schedule-staff-modal{width:min(460px,94vw)}.schedule-staff-modal>.po-dialog-body{padding:12px 16px}.schedule-staff-modal .schedule-staff-modal-content{position:static;width:100%;max-width:none;max-height:60dvh;border:0;border-radius:0;box-shadow:none;padding:0;margin:0}
