/* V9.10.6 – per-browser text size. The app's CSS is px-based, so the whole UI (text, tables, modals, Joey drawer, on-screen
   invoices) is scaled with CSS zoom on <body>; <html data-text-size> is set before first paint by the inline script in <head>.
   Printing always uses 100% (server-generated PDFs are not affected at all). */
html[data-text-size="s"] body{zoom:.93;min-height:calc(100vh / .93)}
html[data-text-size="l"] body{zoom:1.143;min-height:calc(100vh / 1.143)}
html[data-text-size="xl"] body{zoom:1.286;min-height:calc(100vh / 1.286)}
/* the top bar (logo, main nav, Joey / Settings / account) keeps its normal size so it never overlaps; everything below scales */
html[data-text-size="s"] #appHeader{zoom:calc(1 / .93)}
html[data-text-size="l"] #appHeader{zoom:calc(1 / 1.143)}
html[data-text-size="xl"] #appHeader{zoom:calc(1 / 1.286)}
/* vh/vw-capped dialogs: divide the cap by the zoom so they still fit the window */
html[data-text-size="s"]{--tz:.93}html[data-text-size="l"]{--tz:1.143}html[data-text-size="xl"]{--tz:1.286}
html[data-text-size] .modal{max-height:calc(94vh / var(--tz));width:min(720px,calc(96vw / var(--tz)))}
html[data-text-size] .v971-modal{width:min(860px,calc(96vw / var(--tz)))}
html[data-text-size] .mini-dialog{max-height:calc(90vh / var(--tz))}
html[data-text-size] .i3-dlg-box{max-height:calc(88vh / var(--tz));width:calc(94vw / var(--tz))}
html[data-text-size] .overlay{padding:calc(18px / var(--tz))}
@media print{html[data-text-size] body{zoom:1 !important;min-height:0}}
.textsize-seg{display:inline-flex;gap:4px;margin-top:6px}
.textsize-seg button{min-width:38px;padding:4px 8px;border:1px solid var(--line-gold,rgba(200,162,74,.5));background:transparent;color:inherit;border-radius:6px;cursor:pointer;font-weight:700;line-height:1}
.textsize-seg button[data-text-size="s"]{font-size:11px}.textsize-seg button[data-text-size="m"]{font-size:13px}
.textsize-seg button[data-text-size="l"]{font-size:15px}.textsize-seg button[data-text-size="xl"]{font-size:17px}
.textsize-seg button.active{background:var(--gold,#c8a24a);color:#111;border-color:var(--gold,#c8a24a)}
.textsize-row{display:block;margin-top:8px}
.textsize-row>small{display:block;opacity:.75}
.textsize-panel{margin-top:18px}
