/* Provider schedule editor (Views/Shared/_ModalProviderSchedule.cshtml, ProviderScheduleEditor.js).
   Approved look: Docs/mockups/2026-11-26_provider-flexible-schedule.html. All classes are prefixed psch-. */

:root {
    --psch-office: #2563EB;
    --psch-office-bg: #DBEAFE;
    --psch-office-text: #1E40AF;
    --psch-virtual: #16A34A;
    --psch-virtual-bg: #DCFCE7;
    --psch-virtual-text: #166534;
    --psch-both: #0D9488;
    --psch-both-bg: #CCFBF1;
    --psch-both-text: #115E59;
}

/* Stacking: schedule modal over the provider modal, day editor over the schedule modal.
   ProviderScheduleEditor raises each new backdrop to sit just under its modal. */
#providerScheduleModal { z-index: 1065; }
#providerScheduleDayModal { z-index: 1075; }
#providerScheduleModal .psch-dialog { max-width: min(1500px, 96vw); }
#providerScheduleDayModal .psch-day-dialog { max-width: 920px; }
.psch-body { background: #F8FAFC; }

.psch-ann { font-size: .78rem; color: #6B7280; }
.psch-num {
    display: inline-flex; width: 24px; height: 24px; border-radius: 50%;
    background: var(--primary-light, #EEF2FF); color: var(--primary-dark, #4338CA);
    font-weight: 600; font-size: .8rem; align-items: center; justify-content: center; margin-right: .5rem;
}
.psch-tz-note { font-size: .82rem; color: #4B5563; }

/* Provider modal summary */
.psch-summary { border: 1px solid #E0E7FF; background: #FAFAFF; border-radius: 10px; }
.psch-summary .psch-row-label { width: 110px; flex-shrink: 0; font-weight: 600; color: #4B5563; }
.psch-unsaved-badge { background: #FEF3C7; color: #92400E; border: 1px solid #FCD34D; font-weight: 600; }

/* Weekly pattern */
.psch-day-row { border-bottom: 1px solid #F1F5F9; padding: .75rem 0; }
.psch-day-row:last-child { border-bottom: 0; }
.psch-day-name { width: 110px; flex-shrink: 0; font-weight: 600; padding-top: .45rem; }
.psch-day-off { color: #9CA3AF; padding-top: .45rem; }
.psch-block-row { background: #FAFAFF; border: 1px solid #E0E7FF; border-radius: 8px; padding: .5rem .6rem; margin-bottom: .5rem; }
.psch-block-row.is-invalid { border-color: #DC3545; background: #FFF5F5; }
.psch-block-row .psch-time { width: 120px; }
.psch-block-row .psch-loc { width: 165px; }
.psch-vt .btn { min-width: 72px; }
.psch-vt-office { color: var(--psch-office); border-color: var(--psch-office); }
.psch-vt-virtual { color: var(--psch-virtual); border-color: var(--psch-virtual); }
.psch-vt-both { color: var(--psch-both); border-color: var(--psch-both); }
.btn-check:checked + .psch-vt-office { background: var(--psch-office); border-color: var(--psch-office); color: #fff; }
.btn-check:checked + .psch-vt-virtual { background: var(--psch-virtual); border-color: var(--psch-virtual); color: #fff; }
.btn-check:checked + .psch-vt-both { background: var(--psch-both); border-color: var(--psch-both); color: #fff; }
.psch-add-block { color: var(--primary-color, #6366F1); }

/* Month calendar */
.psch-cal-wrap { position: relative; }
.psch-cal-loading { position: absolute; inset: 0; background: rgba(255,255,255,.6); display: flex; align-items: center; justify-content: center; }
.psch-cal { display: grid; grid-template-columns: repeat(7, 1fr); border-top: 1px solid #E5E7EB; border-left: 1px solid #E5E7EB; }
.psch-cal-head { background: #F9FAFB; font-weight: 600; text-align: center; padding: .4rem; border-right: 1px solid #E5E7EB; border-bottom: 1px solid #E5E7EB; font-size: .8rem; color: #4B5563; }
.psch-cell { min-height: 98px; border: 0; border-right: 1px solid #E5E7EB; border-bottom: 1px solid #E5E7EB; padding: .3rem; cursor: pointer; background: #fff; position: relative; text-align: left; display: block; width: 100%; min-width: 0; font: inherit; color: inherit; vertical-align: top; }
.psch-cell:hover, .psch-cell:focus-visible { background: var(--primary-light, #EEF2FF); outline: none; }
.psch-cell.is-empty { background: #FAFAFA; cursor: default; }
.psch-cell.is-past { background: #FAFAFA; cursor: default; opacity: .7; }
.psch-cell.is-today .psch-dnum { color: var(--primary-color, #6366F1); }
.psch-cell.is-blocked { background: repeating-linear-gradient(45deg, #F3F4F6, #F3F4F6 6px, #E5E7EB 6px, #E5E7EB 12px); }
.psch-dnum { font-weight: 600; font-size: .85rem; }
.psch-flag { position: absolute; top: 4px; right: 6px; font-size: .7rem; color: var(--primary-dark, #4338CA); }
.psch-flag-icon { font-size: .7rem; color: var(--primary-dark, #4338CA); }
.psch-chip { display: block; font-size: .72rem; border-radius: 4px; padding: 1px 5px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.psch-chip-office { background: var(--psch-office-bg); color: var(--psch-office-text); border-left: 3px solid var(--psch-office); }
.psch-chip-virtual { background: var(--psch-virtual-bg); color: var(--psch-virtual-text); border-left: 3px solid var(--psch-virtual); }
.psch-chip-both { background: var(--psch-both-bg); color: var(--psch-both-text); border-left: 3px solid var(--psch-both); }
.psch-chip-blocked { background: #E5E7EB; color: #374151; border-left: 3px solid #6B7280; }
.psch-chip-timeoff { background: #F3F4F6; color: #4B5563; border-left: 3px solid #9CA3AF; }
.psch-legend-item { margin-right: 1rem; white-space: nowrap; font-size: .8rem; display: inline-block; }
.psch-sw { display: inline-block; width: 22px; height: 12px; border-radius: 3px; vertical-align: middle; margin-right: 4px; }
.psch-sw-blocked { background: repeating-linear-gradient(45deg, #F3F4F6, #F3F4F6 3px, #D1D5DB 3px, #D1D5DB 6px); }

/* Patient preview */
.psch-preview-card { position: sticky; top: 0; }
.psch-preview-frame { border: 1px solid #E5E7EB; border-radius: 10px; background: #fff; }
.psch-mini-title { font-weight: 600; font-size: .85rem; text-align: center; }
.psch-mini-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.psch-mini-cal .psch-mh { font-size: .7rem; color: #6B7280; font-weight: 600; }
.psch-mini-cal .psch-md { padding: 6px 0; border-radius: 6px; font-size: .8rem; color: #9CA3AF; border: 0; background: transparent; }
.psch-mini-cal .psch-md.is-ok { background: var(--primary-light, #EEF2FF); color: var(--primary-dark, #4338CA); font-weight: 600; cursor: pointer; }
.psch-mini-cal .psch-md.is-sel { background: var(--primary-color, #6366F1); color: #fff; }
.psch-slot-label { font-size: .78rem; font-weight: 600; margin: .5rem 0 .35rem; }
.psch-slot-label.is-office { color: var(--psch-office-text); }
.psch-slot-label.is-virtual { color: var(--psch-virtual-text); }
.psch-slot-label.is-both { color: var(--psch-both-text); }
.psch-slot { min-width: 92px; margin: 0 6px 6px 0; }
.psch-pick { border: 1px solid #99F6E4; background: #F0FDFA; border-radius: 8px; }

/* Day editor */
.psch-repeat-box { border: 1px dashed #FCD34D; background: #FFFBEB; border-radius: 8px; }
.psch-repeat-months { width: auto; }
