/* VEHM 5.25: One authoritative three-column geometry for reading and composing.
   The legacy :has() Mail layout was overriding the newer widths while the resize
   handles used the new values, causing a splitter to float inside the reader. */
.app-shell.mail-shell-mode:has(.comms-mail-active) .v512-mail-app,
.app-shell.mail-shell-mode:has(.comms-mail-active) .v512-mail-app.mail-expanded,
.app-shell.mail-shell-mode .v512-mail-app,
.app-shell.mail-shell-mode .v512-mail-app.mail-expanded,
.app-shell.mail-shell-mode .v512-mail-app:fullscreen {
  --v525-folder-base:clamp(205px,13%,238px);
  --v525-list-base:clamp(360px,23.5%,420px);
  grid-template-columns:
    calc(var(--v525-folder-base) + var(--v518-folder-extra,0px))
    calc(var(--v525-list-base) + var(--v518-list-extra,0px))
    minmax(0,1fr)!important;
  column-gap:0!important;
  min-width:0;
}
/* Every splitter uses the exact same tracks as the grid itself. */
.app-shell.mail-shell-mode:has(.comms-mail-active) .v512-mail-app .v518-folders-resizer,
.app-shell.mail-shell-mode .v512-mail-app .v518-folders-resizer {
  left:calc(var(--v525-folder-base) + var(--v518-folder-extra,0px))!important;
}
.app-shell.mail-shell-mode:has(.comms-mail-active) .v512-mail-app .v518-messages-resizer,
.app-shell.mail-shell-mode .v512-mail-app .v518-messages-resizer {
  left:calc(var(--v525-folder-base) + var(--v518-folder-extra,0px) + var(--v525-list-base) + var(--v518-list-extra,0px))!important;
}
.app-shell.mail-shell-mode .v512-mail-app .mail-folders,
.app-shell.mail-shell-mode .v512-mail-app .mail-list,
.app-shell.mail-shell-mode .v512-mail-app .mail-reading{
  min-width:0!important;box-sizing:border-box!important;
}
/* One vertical sequence of emails: sender, subject, and preview share a full
   message column; compose/read switching never changes the message list width. */
.app-shell.mail-shell-mode .v512-mail-app #mail-scroll-list{
  display:flex!important;flex-direction:column!important;align-items:stretch!important;
  overflow-x:hidden!important;min-width:0!important;
}
.app-shell.mail-shell-mode .v512-mail-app #mail-scroll-list>.mail-list-item{
  box-sizing:border-box!important;flex:0 0 auto!important;
  display:flex!important;align-items:flex-start!important;
  width:100%!important;min-width:0!important;max-width:100%!important;
  padding:11px 10px!important;gap:9px!important;
}
.app-shell.mail-shell-mode .v512-mail-app #mail-scroll-list>.mail-list-item>.v512-item-content{
  display:flex!important;flex-direction:column!important;flex:1 1 0!important;
  width:0!important;min-width:0!important;max-width:100%!important;overflow:hidden!important;
}
.app-shell.mail-shell-mode .v512-mail-app .v512-item-top,
.app-shell.mail-shell-mode .v512-mail-app .v512-item-content strong,
.app-shell.mail-shell-mode .v512-mail-app .v512-item-content small {min-width:0!important;max-width:100%!important;}
/* Mail's existing minimum reader width wins below this point: permit horizontal
   scrolling instead of squeezing the list to illegibility on very small screens. */
@media(max-width:1000px){
 .app-shell.mail-shell-mode:has(.comms-mail-active) .v512-mail-app,
 .app-shell.mail-shell-mode .v512-mail-app{min-width:915px!important;}
}
