/* Page editor-specific behavior and focus states */
.faithora-dashboard [data-faithora-screen="notes"] .faithora-notes-title-row.is-title-editing { display:block!important; visibility:visible!important; opacity:1!important; }
.faithora-dashboard [data-faithora-screen="notes"] .faithora-notes-title:focus { border:0!important; box-shadow:none!important; }
.faithora-dashboard [data-faithora-screen="notes"] .faithora-notes-content h1,
.faithora-dashboard [data-faithora-screen="notes"] .faithora-notes-content h2,
.faithora-dashboard [data-faithora-screen="notes"] .faithora-notes-content h3 { line-height:1.3; letter-spacing:-.025em; }
.faithora-dashboard [data-faithora-screen="notes"] .faithora-notes-content a { color:#b95125; text-decoration-thickness:1px; text-underline-offset:3px; }
.faithora-dashboard [data-faithora-screen="notes"] [data-notes-save-status] { font-size:11px; font-weight:650; }

/* v1.9.8: keyboard-adjacent quick formatting controls for long notes. */
.faithora-dashboard [data-faithora-screen="notes"] .faithora-notes-keyboard-toolbar{position:sticky;top:0;z-index:35;display:flex;align-items:center;gap:6px;width:100%;box-sizing:border-box;padding:7px 8px;margin:0 0 8px;border:1px solid var(--faithora-border,#dfe5e2);border-radius:12px;background:var(--faithora-card,#fff);box-shadow:0 3px 12px rgba(0,0,0,.07);overflow-x:auto;}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-notes-keyboard-toolbar[hidden]{display:none!important}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-notes-keyboard-toolbar button{flex:0 0 38px;width:38px;height:36px;border:0;border-radius:8px;background:var(--faithora-bg,#f4f7f5);color:var(--faithora-text,#202a26);font-size:16px;font-weight:800}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-notes-keyboard-toolbar .faithora-notes-quick-more{margin-left:auto;background:var(--faithora-accent-soft,#e5f4eb);color:var(--faithora-accent,#27845b);font-size:22px}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-notes-content details{margin:10px 0;padding:10px 12px;border:1px solid var(--faithora-border,#dfe5e2);border-radius:10px;background:var(--faithora-bg,#f8faf8)}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-notes-content summary{font-weight:800;cursor:pointer}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-notes-content .faithora-note-callout{margin:10px 0;padding:12px 14px;border-left:4px solid var(--faithora-accent,#27845b);border-radius:8px;background:var(--faithora-accent-soft,#e5f4eb)}

.faithora-dashboard [data-faithora-screen="notes"] .faithora-notes-topbar{position:sticky;top:0;z-index:34;background:var(--faithora-card,#fff)}

/* v1.9.9: Notion-style expandable keyboard formatting sheet. */
.faithora-dashboard [data-faithora-screen="notes"] .faithora-notes-keyboard-toolbar{gap:6px;margin:0!important;border-radius:12px 12px 0 0!important;box-shadow:0 -3px 12px rgba(0,0,0,.07)!important;z-index:10001!important;overflow-x:auto;overflow-y:hidden;border-bottom:0!important}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-notes-keyboard-toolbar.is-expanded{border-radius:12px 12px 0 0!important}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-note-tools-popover{position:fixed!important;left:0!important;right:auto!important;top:auto!important;bottom:calc(var(--faithora-keyboard-toolbar-bottom, 0px) + 44px)!important;width:100%!important;max-width:none!important;max-height:min(62dvh,520px)!important;z-index:10000!important;border-radius:16px 16px 0 0!important;display:flex!important;flex-direction:column!important;overflow:hidden!important}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-note-tools-popover[hidden]{display:none!important}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-note-tools-scroll{overflow-y:auto!important;max-height:none!important;min-height:0!important;overscroll-behavior:contain!important;-webkit-overflow-scrolling:touch!important}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-note-tools-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-note-tools-grid button{min-width:0!important;min-height:62px!important;justify-content:center!important;flex-direction:column!important;gap:5px!important;text-align:center!important;padding:8px 4px!important}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-notes-keyboard-toolbar button{margin:0!important}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-notes-topbar-actions [data-note-tools-trigger]{display:none!important}
@media(max-width:520px){.faithora-dashboard [data-faithora-screen="notes"] .faithora-note-tools-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}.faithora-dashboard [data-faithora-screen="notes"] .faithora-note-tools-popover{max-height:65dvh!important}}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-notes-editor .faithora-note-tools-popover{position:fixed!important;left:0!important;right:auto!important;top:auto!important;bottom:50px!important;width:100vw!important;max-width:100vw!important;max-height:min(62dvh,520px)!important;border-radius:16px 16px 0 0!important}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-notes-editor .faithora-note-tools-scroll{max-height:none!important;min-height:0!important}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-notes-editor .faithora-note-tools-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-notes-editor .faithora-note-tools-grid button{min-width:0!important;min-height:62px!important;justify-content:center!important;flex-direction:column!important;gap:5px!important;text-align:center!important;padding:8px 4px!important}


/* v1.9.10: edge-to-edge Notion-like keyboard toolbar and in-place tool sheet. */
.faithora-dashboard [data-faithora-screen="notes"] .faithora-notes-keyboard-toolbar{left:0!important;right:0!important;width:100vw!important;max-width:100vw!important;margin:0!important;padding:6px max(8px,env(safe-area-inset-right)) 6px max(8px,env(safe-area-inset-left))!important;border-left:0!important;border-right:0!important;border-radius:0!important;box-shadow:0 -2px 10px rgba(0,0,0,.08)!important;gap:6px!important;scrollbar-width:none!important;}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-notes-keyboard-toolbar::-webkit-scrollbar{display:none!important}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-notes-keyboard-toolbar>button{flex:0 0 38px!important;min-width:38px!important;border-radius:7px!important}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-notes-keyboard-toolbar .faithora-notes-quick-more{flex:0 0 38px!important;margin:0!important;order:-1!important}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-notes-keyboard-toolbar.is-expanded{position:fixed!important;left:0!important;right:0!important;bottom:0!important;width:100vw!important;max-width:100vw!important;display:flex!important;flex-wrap:wrap!important;align-content:flex-start!important;gap:0!important;padding:0!important;overflow:visible!important;border-radius:0!important;background:var(--faithora-card,#fff)!important;z-index:10002!important;}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-notes-keyboard-toolbar.is-expanded>button{flex:0 0 38px!important;margin:6px 0 6px 6px!important}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-notes-keyboard-toolbar.is-expanded .faithora-note-tools-popover{position:static!important;inset:auto!important;order:2!important;display:flex!important;flex:0 0 100%!important;width:100%!important;max-width:100%!important;max-height:calc(65dvh - 52px)!important;margin:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;overflow:hidden!important;background:var(--faithora-card,#fff)!important;}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-notes-keyboard-toolbar.is-expanded .faithora-note-tools-heading{display:none!important}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-notes-keyboard-toolbar.is-expanded .faithora-note-tools-scroll{width:100%!important;overflow-y:auto!important;max-height:calc(65dvh - 52px)!important;padding:8px 12px calc(12px + env(safe-area-inset-bottom))!important;-webkit-overflow-scrolling:touch!important;}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-notes-keyboard-toolbar.is-expanded .faithora-note-tools-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-notes-keyboard-toolbar.is-expanded .faithora-note-tools-grid button{min-height:58px!important}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-notes-keyboard-toolbar.is-expanded [data-note-quick-more]{position:relative!important;z-index:2!important}


/* v1.9.11: full horizontally scrollable keyboard tools, fixed-height expansion, and page actions sheet. */
.faithora-dashboard [data-faithora-screen="notes"] .faithora-notes-keyboard-toolbar{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important;white-space:nowrap!important;scrollbar-width:none!important;}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-notes-keyboard-toolbar.is-expanded{position:fixed!important;left:0!important;right:0!important;bottom:var(--faithora-keyboard-toolbar-bottom,0px)!important;top:auto!important;width:100vw!important;height:44px!important;min-height:44px!important;max-height:44px!important;flex-wrap:nowrap!important;align-items:center!important;overflow-x:auto!important;overflow-y:visible!important;padding:4px 8px!important;}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-notes-keyboard-toolbar.is-expanded>button{flex:0 0 34px!important;width:34px!important;min-width:34px!important;height:34px!important;margin:0 3px!important;}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-notes-keyboard-toolbar.is-expanded .faithora-note-tools-popover{position:absolute!important;left:0!important;right:0!important;top:auto!important;bottom:44px!important;width:100vw!important;max-width:100vw!important;max-height:min(45dvh,360px)!important;flex:0 0 auto!important;border-radius:14px 14px 0 0!important;}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-notes-keyboard-toolbar.is-expanded .faithora-note-tools-scroll{max-height:min(45dvh,360px)!important;padding-bottom:8px!important;}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-notes-content details{background:transparent!important;border:0!important;border-radius:0!important;padding:2px 0!important;margin:6px 0!important;}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-notes-content details>summary{background:transparent!important;font-weight:800!important;font-size:1.02em!important;cursor:pointer;}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-notes-content details>summary::marker{color:currentColor!important;}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-notes-topbar{margin-top:0!important;padding-top:2px!important;min-height:42px!important;}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-editing-sheet[hidden]{display:none!important;}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-editing-sheet{position:fixed!important;z-index:13000!important;left:0!important;right:0!important;bottom:0!important;width:100vw!important;height:90dvh!important;max-height:90dvh!important;box-sizing:border-box!important;background:var(--faithora-card,#fff)!important;color:var(--faithora-text,#202a26)!important;border-radius:20px 20px 0 0!important;box-shadow:0 -12px 36px rgba(0,0,0,.22)!important;padding:8px 16px calc(18px + env(safe-area-inset-bottom))!important;overflow-y:auto!important;}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-editing-sheet-grabber{width:38px;height:4px;border-radius:5px;background:#b8c1bc;margin:0 auto 12px;}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-editing-sheet>header{display:flex;align-items:center;justify-content:space-between;min-height:42px;border-bottom:1px solid var(--faithora-line,#e2e7e4);margin-bottom:8px;}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-editing-sheet>header strong{font-size:17px;font-weight:800;}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-editing-sheet>header button{border:0;border-radius:50%;width:34px;height:34px;font-size:24px;background:var(--faithora-bg,#f4f7f5);color:inherit;}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-editing-sheet-actions{display:flex;flex-direction:column;gap:3px;}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-editing-sheet-actions button{display:flex;align-items:center;gap:14px;text-align:left;width:100%;min-height:48px;padding:8px 10px;border:0;border-radius:10px;background:transparent;color:inherit;font-size:14px;}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-editing-sheet-actions button:active{background:var(--faithora-bg,#f4f7f5);}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-editing-sheet-actions button span{width:24px;text-align:center;font-size:19px;color:var(--faithora-accent,#27845b);}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-editing-sheet-actions button b{font-weight:650;}
.faithora-dashboard [data-faithora-screen="notes"] [data-note-sheet-status]{font-size:12px;color:var(--faithora-accent-dark,#27845b);}


/* v1.9.13 mobile fixes: keep the toolbar at the keyboard's top edge while tools replace the keyboard area. */
.faithora-dashboard [data-faithora-screen="notes"] .faithora-notes-keyboard-toolbar.is-expanded{position:fixed!important;left:0!important;right:0!important;bottom:var(--faithora-keyboard-toolbar-bottom,0px)!important;top:auto!important;width:100vw!important;height:44px!important;min-height:44px!important;max-height:44px!important;z-index:10002!important;overflow-x:auto!important;overflow-y:visible!important;background:var(--faithora-card,#fff)!important;border-top:1px solid var(--faithora-line,#e2e7e4)!important;}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-notes-keyboard-toolbar.is-expanded .faithora-note-tools-popover{position:fixed!important;left:0!important;right:0!important;top:auto!important;bottom:0!important;width:100vw!important;max-width:100vw!important;height:calc(var(--faithora-keyboard-toolbar-bottom,280px) - 44px)!important;max-height:calc(var(--faithora-keyboard-toolbar-bottom,280px) - 44px)!important;min-height:0!important;display:flex!important;flex-direction:column!important;flex:0 0 auto!important;border-radius:14px 14px 0 0!important;overflow:hidden!important;z-index:10001!important;}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-notes-keyboard-toolbar.is-expanded .faithora-note-tools-scroll{flex:1 1 auto!important;min-height:0!important;max-height:none!important;overflow-y:auto!important;padding:8px 12px calc(8px + env(safe-area-inset-bottom))!important;}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-editing-sheet{z-index:13000!important;left:0!important;right:0!important;bottom:0!important;width:100vw!important;height:auto!important;max-height:78dvh!important;min-height:0!important;border-radius:20px 20px 0 0!important;padding:8px 16px calc(18px + env(safe-area-inset-bottom))!important;}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-note-page-icon-display{flex:0 0 38px!important;width:38px!important;height:38px!important;border:1px solid var(--faithora-line,#e2e7e4)!important;border-radius:10px!important;background:var(--faithora-bg,#f4f7f5)!important;color:var(--faithora-text,#202a26)!important;font-size:22px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;margin-right:8px!important;}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-note-page-icon-display.is-empty{font-size:18px!important;color:var(--faithora-muted,#87918b)!important;}


/* v1.9.14: preserve the normal toolbar dimensions and dock the tools sheet directly beneath it. */
.faithora-dashboard [data-faithora-screen="notes"] .faithora-notes-keyboard-toolbar.is-expanded{
  box-sizing:border-box!important;
  height:auto!important;min-height:0!important;max-height:none!important;
  padding:6px max(8px,env(safe-area-inset-right)) 6px max(8px,env(safe-area-inset-left))!important;
  align-items:center!important;
  overflow-x:auto!important;overflow-y:visible!important;
}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-notes-keyboard-toolbar.is-expanded>button{
  flex:0 0 38px!important;width:38px!important;min-width:38px!important;height:36px!important;min-height:36px!important;max-height:36px!important;
  margin:0 3px!important;
}
.faithora-dashboard [data-faithora-screen="notes"] .faithora-notes-keyboard-toolbar.is-expanded .faithora-note-tools-popover{
  bottom:0!important;height:var(--faithora-keyboard-toolbar-bottom,280px)!important;
  max-height:var(--faithora-keyboard-toolbar-bottom,280px)!important;
  min-height:0!important;
  border-radius:14px 14px 0 0!important;
}
