/* Notes: equal columns with independent vertical scroll and even outer margins. */
#view:has(.fc-notes-workspace){display:flex;flex-direction:column;min-height:0;height:100%;}
#view:has(.fc-notes-workspace) .module-toolbar{flex:0 0 auto;}
.fc-notes-workspace.workspace{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;flex:1 1 0;min-height:0;overflow:hidden;padding-bottom:12px;align-items:stretch;}
.fc-notes-workspace .notes-pane.card{min-height:0;min-width:0;height:100%;box-sizing:border-box;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;}
.fc-notes-workspace .notes-list{display:flex;flex-direction:column;gap:7px;}
.fc-notes-workspace .notes-entry{display:flex;flex-direction:column;align-items:flex-start;gap:4px;text-align:left;width:100%;background:#fff;color:inherit;border-top:1px solid #e2e9f1;border-right:1px solid #e2e9f1;border-bottom:1px solid #e2e9f1;border-radius:8px;padding:12px;cursor:pointer;}
.fc-notes-workspace .notes-entry.selected{background:#eaf1ff;}
.fc-notes-workspace .notes-entry small{color:#5d6f84;}
.fc-notes-workspace .notes-editor{display:flex;flex-direction:column;gap:14px;}
.fc-notes-workspace .notes-editor label{display:flex;flex-direction:column;gap:6px;font-weight:600;}
.fc-notes-workspace .notes-editor textarea{min-height:240px;resize:vertical;font-weight:400;white-space:pre-wrap;}
.fc-notes-workspace .notes-editor-actions{display:flex;gap:8px;flex-wrap:wrap;}
@media(max-width:700px){.fc-notes-workspace.workspace{grid-template-columns:minmax(0,1fr);overflow-y:auto}.fc-notes-workspace .notes-pane.card{min-height:220px;max-height:50vh}}

/* Match the side gutters and extend both panels to the bottom of the viewport. */
#view:has(.fc-notes-workspace){height:calc(100dvh - 86px);max-height:calc(100dvh - 86px);overflow:hidden;}
#view:has(.fc-notes-workspace) .fc-notes-workspace{padding-left:12px;padding-right:12px;padding-bottom:12px;}
@media(max-width:700px){#view:has(.fc-notes-workspace){height:calc(100dvh - 86px);max-height:calc(100dvh - 86px)}}

/* Prevent the outer content area from scrolling in Notes. */
.main>.content:has(.fc-notes-workspace){overflow:hidden;padding-bottom:16px;display:flex;flex-direction:column;}
.main>.content:has(.fc-notes-workspace)>#view{height:100%;max-height:100%;min-height:0;flex:1 1 0;overflow:hidden;}
#view:has(.fc-notes-workspace) .fc-notes-workspace{padding:0;min-height:0;}
#view:has(.fc-notes-workspace) .notes-pane{overflow-y:auto;}
#view:has(.fc-notes-workspace) .notes-editor-actions{position:sticky;bottom:0;background:white;padding:12px 0;z-index:1;}
#view:has(.fc-notes-workspace) .notes-entry:has(strong){flex-shrink:0;}

/* Compact title/type/color controls */
.fc-notes-workspace .notes-title-row>label{display:grid;grid-template-columns:64px minmax(0,1fr);align-items:center;gap:12px;}
.fc-notes-workspace .notes-meta-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(150px,0.6fr);gap:20px;align-items:center;}
.fc-notes-workspace .notes-meta-row>label{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:12px;}
.fc-notes-workspace .notes-meta-row input[type=color]{height:38px;min-width:55px;width:100%;padding:3px;cursor:pointer;}
@media(max-width:700px){.fc-notes-workspace .notes-meta-row{grid-template-columns:minmax(0,1fr);gap:12px;}}

/* Consistent 10px inner gutters and always-visible note actions. */
#view .fc-notes-workspace .notes-pane.card{padding:10px!important;}
#view .fc-notes-workspace .notes-list{padding:0;margin:0;}
#view .fc-notes-workspace .notes-detail{padding:0;margin:0;}
#view .fc-notes-workspace .notes-editor{gap:10px;}
#view .fc-notes-workspace .notes-content-label{display:block;font-size:0;line-height:0;}
#view .fc-notes-workspace .notes-content-label textarea{display:block;width:100%;font-size:14px;line-height:1.5;}
#view .fc-notes-workspace .notes-editor-actions{position:sticky;bottom:0;display:flex;gap:10px;background:#fff;padding:10px 0 0;z-index:2;}
/* Align title and type inputs; compact color selector. */
#view .fc-notes-workspace .notes-title-row>label{grid-template-columns:64px minmax(0,1fr);column-gap:12px;}
#view .fc-notes-workspace .notes-meta-row{grid-template-columns:minmax(0,1fr) minmax(0,0.6fr);column-gap:20px;}
#view .fc-notes-workspace .notes-meta-row>label:first-child{grid-template-columns:64px minmax(0,1fr);column-gap:12px;}
#view .fc-notes-workspace .notes-title-row input,#view .fc-notes-workspace .notes-meta-row select{min-width:0;width:100%;box-sizing:border-box;}
#view .fc-notes-workspace .notes-meta-row label:last-child{display:flex;flex-direction:row;align-items:center;gap:12px;}
#view .fc-notes-workspace .notes-meta-row input[type=color]{flex:0 1 66.6667%;width:66.6667%;min-width:0;height:38px;box-sizing:border-box;border:1px solid #dce4ed;border-radius:9px;padding:3px;background:#fff;}
@media(max-width:700px){#view .fc-notes-workspace .notes-meta-row{grid-template-columns:minmax(0,1fr);}}
/* Exact 10px vertical spacing between title, type and note body. */
#view .fc-notes-workspace .notes-editor{display:flex;flex-direction:column;gap:10px!important;}
#view .fc-notes-workspace .notes-title-row,#view .fc-notes-workspace .notes-meta-row,#view .fc-notes-workspace .notes-content-label{margin:0!important;padding:0!important;}
#view .fc-notes-workspace .notes-title-row>label,#view .fc-notes-workspace .notes-meta-row>label{margin:0!important;}
#view .fc-notes-workspace .notes-content-label textarea{margin:0!important;}

/* Uniform note editor spacing and system-note controls. */
#view .fc-notes-workspace .notes-editor .field{margin:0!important;}
#view .fc-notes-workspace .notes-editor .notes-title-row>label,#view .fc-notes-workspace .notes-editor .notes-meta-row>label{gap:10px!important;}
#view .fc-notes-workspace .notes-editor .notes-title-row>label,#view .fc-notes-workspace .notes-editor .notes-meta-row>label:first-child{display:grid;grid-template-columns:80px minmax(0,1fr);align-items:center;}
#view .fc-notes-workspace .notes-editor .notes-meta-row>label:last-child{display:flex;flex-direction:row;align-items:center;}
#view .fc-notes-workspace .notes-editor.notes-system .notes-meta-row{display:none!important;}

.fc-notes-workspace .notes-entry-heading{display:flex;width:100%;align-items:center;justify-content:space-between;gap:10px;}
.fc-notes-workspace .notes-shared-indicator{font-size:12px;font-weight:600;color:#536b90;white-space:nowrap;}
.fc-notes-workspace .notes-share-picker{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:0;padding:10px 0;}
.fc-notes-workspace .notes-share-picker select.field{width:min(320px,100%);margin:0!important;}

/* Multi-recipient sharing selector: name and checkbox columns. */
#view .fc-notes-workspace .notes-share-picker{display:flex;flex-direction:column;align-items:stretch;gap:10px;border:1px solid #dce4ed;border-radius:9px;padding:10px;}
#view .fc-notes-workspace .notes-share-heading,#view .fc-notes-workspace .notes-share-row{display:grid;grid-template-columns:minmax(0,1fr) 80px;align-items:center;gap:10px;padding:8px 10px;}
#view .fc-notes-workspace .notes-share-heading{border-bottom:1px solid #dce4ed;}
#view .fc-notes-workspace .notes-share-rows{max-height:260px;overflow-y:auto;}
#view .fc-notes-workspace .notes-share-row{font-weight:400;cursor:pointer;border-bottom:1px solid #eef1f5;}
#view .fc-notes-workspace .notes-share-row input{justify-self:center;width:17px;height:17px;cursor:pointer;}
#view .fc-notes-workspace .notes-share-picker>[data-confirm-share]{align-self:flex-end;}
