/* V5.18 — expandable, never narrower-than-default Mail columns. */
.app-shell.mail-shell-mode:has(.comms-mail-active) .mail-app,
.app-shell.mail-shell-mode:has(.comms-mail-active) .mail-app.mail-expanded,
.app-shell.mail-shell-mode .v512-mail-app,
.app-shell.mail-shell-mode .v512-mail-app.mail-expanded {
  grid-template-columns:
    calc(clamp(128px, 10%, 160px) + var(--v518-folder-extra, 0px))
    calc(clamp(205px, 16%, 265px) + var(--v518-list-extra, 0px))
    minmax(0,1fr) !important;
  position: relative !important;
}
/* The two handles follow their track boundaries, including fullscreen. */
.app-shell.mail-shell-mode .v512-mail-app .v518-resizer{
  position: absolute;top:0;bottom:0;width:9px;z-index:7;cursor:col-resize;
  touch-action:none;background:transparent;transform:translateX(-50%);
  outline-offset:-2px;
}
.app-shell.mail-shell-mode .v512-mail-app .v518-resizer:hover,
.app-shell.mail-shell-mode .v512-mail-app .v518-resizer:focus-visible{
  background:rgba(218,172,102,.3);outline:1px solid #dab878;
}
.app-shell.mail-shell-mode .v512-mail-app .v518-folders-resizer{
  left:calc(clamp(128px, 10%, 160px) + var(--v518-folder-extra, 0px));
}
.app-shell.mail-shell-mode .v512-mail-app .v518-messages-resizer{
  left:calc(clamp(128px, 10%, 160px) + var(--v518-folder-extra, 0px) + clamp(205px,16%,265px) + var(--v518-list-extra, 0px));
}
/* Message rows: use every available pixel except the avatar, not the older
   fixed/min-content clipped width. Readable two-line subject and preview. */
.app-shell.mail-shell-mode .v512-mail-app .mail-list-item{
  display:flex!important;width:100%!important;min-width:0!important;
  max-width:100%!important;align-items:flex-start!important;
  gap:6px!important;padding:9px 5px!important;
}
.app-shell.mail-shell-mode .v512-mail-app .mail-list-item>.v512-item-content{
  display:flex!important;flex:1 1 0%!important;width:0!important;
  min-width:0!important;max-width:none!important;overflow:hidden!important;
  flex-direction:column!important;gap:3px!important;
}
.app-shell.mail-shell-mode .v512-mail-app .v512-item-top{
  width:100%!important;min-width:0!important;display:flex!important;
  gap:5px!important;justify-content:space-between!important;
}
.app-shell.mail-shell-mode .v512-mail-app .v512-item-top b{
  flex:1 1 0!important;min-width:0!important;max-width:none!important;
  text-overflow:ellipsis!important;overflow:hidden!important;white-space:nowrap!important;
}
.app-shell.mail-shell-mode .v512-mail-app .v512-item-top time{
  flex:0 0 auto!important;font-size:9px!important;
}
.app-shell.mail-shell-mode .v512-mail-app .v512-item-content strong,
.app-shell.mail-shell-mode .v512-mail-app .v512-item-content small{
  display:-webkit-box!important;-webkit-box-orient:vertical!important;
  -webkit-line-clamp:2!important;line-clamp:2!important;
  width:100%!important;min-width:0!important;max-width:100%!important;
  white-space:normal!important;overflow:hidden!important;
  overflow-wrap:anywhere!important;text-overflow:ellipsis!important;
  line-height:1.26!important;margin:0!important;
}
.app-shell.mail-shell-mode .v512-mail-app .v512-item-icons{
  flex:0 0 auto!important;font-size:9px!important;max-width:12px!important;
}
@media(max-width:1040px){
  .app-shell.mail-shell-mode:has(.comms-mail-active) .mail-app,
  .app-shell.mail-shell-mode .v512-mail-app{
    grid-template-columns:
      calc(128px + var(--v518-folder-extra, 0px))
      calc(205px + var(--v518-list-extra, 0px)) minmax(0,1fr)!important;
  }
  .app-shell.mail-shell-mode .v512-mail-app .v518-folders-resizer{left:calc(128px + var(--v518-folder-extra, 0px));}
  .app-shell.mail-shell-mode .v512-mail-app .v518-messages-resizer{left:calc(333px + var(--v518-folder-extra, 0px) + var(--v518-list-extra, 0px));}
}
