/* 12INBOX — Inbox. Theme-aware: Bootstrap classes + --bs-* tokens only. */
.inbox-v2 { min-height: calc(100vh - 140px); }
/* Layout: the panes box has the height; the JS sets the grid (columns, widths, areas). */
.inbox-v2-panes { height: calc(100vh - 190px); min-height: 420px; }
.inbox-v2-panes > .inbox-v2-col { min-height: 0; min-width: 0; height: 100%; }
.inbox-v2-panes .card { display: flex; flex-direction: column; min-height: 0; }
.inbox-v2-dot { font-size: .5rem; }
.inbox-v2-body { width: 100%; min-height: 120px; background: var(--bs-body-bg); }
.inbox-v2-lbl { width: 5.5rem; }
#inboxV2Read { overflow: hidden; }
#inboxV2List .list-group-item.active small,
#inboxV2List .list-group-item.active i { color: inherit !important; }
@media (max-width: 991.98px) {
  .inbox-v2-panes { height: auto; min-height: 0; }
  .inbox-v2-panes > .inbox-v2-col { height: auto; min-height: 0; margin-bottom: .5rem; }
  .inbox-v2-panes > [data-pane="folders"] .card { max-height: 75vh; }
  #inboxV2List { max-height: none; }
  #inboxV2Read .inbox-v2-body { min-height: 70vh; }
}
/* The app-wide systemEZI-style.css gives every .form-control margin-bottom:10px, which
   stretches input groups (labels taller than their boxes) and drops selects out of line. */
.inbox-v2 .form-control, .inbox-v2 .form-select,
.inbox-v2-form .form-control, .inbox-v2-form .form-select { margin-bottom: 0; }
/* Folder tree (accounts as top-level branches). Theme tokens only. */
.inbox-v2-tree .inbox-v2-chev { width: 1.4rem; flex: 0 0 1.4rem; text-align: center; line-height: 1; }
.inbox-v2-tree .inbox-v2-chev i { font-size: .7rem; }
.inbox-v2-tree .inbox-v2-node { border-radius: var(--bs-border-radius-sm); min-height: 1.85rem; }
.inbox-v2-tree .inbox-v2-node:not(.text-bg-primary):hover { background-color: var(--bs-tertiary-bg); }
.inbox-v2-tree .inbox-v2-acc { margin-top: .4rem; border-bottom: 1px solid var(--bs-border-color); border-radius: 0; }
.inbox-v2-tree .inbox-v2-acc:first-child { margin-top: 0; }
.inbox-v2-tree .btn:focus-visible { box-shadow: inset 0 0 0 2px var(--bs-primary); }
/* Account colours, pinned folders, Unread everywhere */
.inbox-v2-panes [data-pane="list"] > .card,
.inbox-v2-panes [data-pane="read"] > .card { border-left: 4px solid var(--inbox-acc, var(--bs-border-color)); }
.inbox-v2-tree .inbox-v2-star { opacity: 0; transition: opacity .15s; }
.inbox-v2-tree .inbox-v2-node:hover .inbox-v2-star,
.inbox-v2-tree .inbox-v2-star:focus-visible,
.inbox-v2-tree .inbox-v2-star.is-on { opacity: 1; }
@media (hover: none) { .inbox-v2-tree .inbox-v2-star { opacity: .6; } }
.inbox-v2-tree .inbox-v2-acclbl { font-size: .75em; max-width: 40%; }
.inbox-v2-swatch { width: 1.6rem; height: 1.6rem; border: 2px solid var(--bs-body-bg); box-shadow: 0 0 0 1px var(--bs-border-color); }
.inbox-v2-swatch.is-on { box-shadow: 0 0 0 2px var(--bs-body-bg), 0 0 0 4px var(--bs-emphasis-color); }
/* Sticky account headings (Bill, option 1): headings above the scroll position stick to the top of
   the folder panel, those below stick to the bottom (top/bottom set per heading in the JS), so
   every account is always one click away. Opaque, or the folders would show through. */
.inbox-v2-tree { position: relative; --inbox-head-h: 2.15rem; }
/* Also the account's colour: a stripe + a light tint over an OPAQUE card background. */
.inbox-v2-tree .inbox-v2-acc[data-acc-head] {
  border-left: 4px solid var(--inbox-acc-c);
  position: sticky; z-index: 3; height: var(--inbox-head-h); min-height: var(--inbox-head-h); margin-top: 0;
  background: linear-gradient(color-mix(in srgb, var(--inbox-acc-c) 18%, transparent), color-mix(in srgb, var(--inbox-acc-c) 18%, transparent)),
              var(--bs-card-bg, var(--bs-body-bg));
}
.inbox-v2-tree .inbox-v2-acc[data-acc-head]:hover {
  background: linear-gradient(color-mix(in srgb, var(--inbox-acc-c) 28%, transparent), color-mix(in srgb, var(--inbox-acc-c) 28%, transparent)),
              var(--bs-card-bg, var(--bs-body-bg));
}
/* The theme keeps a little card-body padding even with py-0; any gap under a stuck heading lets
   folder names peek through, so the folder panel has none top or bottom. */
#inboxV2Folders { padding-top: 0 !important; padding-bottom: 0 !important; }
/* Unread everywhere + Favourites: fixed above the scrolling accounts; scrolls itself only if long. */
.inbox-v2-pinned { flex: 0 0 auto; max-height: 35%; padding-top: .25rem; padding-bottom: .25rem; }
.inbox-v2-pinned:empty { display: none; }
.inbox-v2-pinned .inbox-v2-acc { margin-top: .25rem; }
/* Drag handles between the panes. A thin line in the theme's primary colour on hover/drag/focus. */
.inbox-v2-split { position: relative; cursor: col-resize; touch-action: none; user-select: none; }
.inbox-v2-split::after { content: ''; position: absolute; top: 0; bottom: 0; left: 3px; width: 2px; border-radius: 1px; background: transparent; transition: background-color .15s; }
.inbox-v2-split:hover::after, .inbox-v2-split.is-drag::after, .inbox-v2-split:focus-visible::after { background: var(--bs-primary); }
.inbox-v2-split:focus-visible { outline: none; }
.inbox-v2-split.is-row { cursor: row-resize; }
.inbox-v2-split.is-row::after { top: 3px; bottom: auto; left: 0; right: 0; width: auto; height: 2px; }
/* Back to the list: only where one pane shows at a time (phone, or reading pane Off). */
.inbox-v2-back { display: none; }
.inbox-v2[data-single="1"] .inbox-v2-back { display: inline-block; }
/* While a pane is being resized: no text selection, and the email iframe can't catch the pointer. */
.inbox-v2.is-resizing { user-select: none; cursor: col-resize; }
.inbox-v2.is-resizing iframe { pointer-events: none; }
/* A narrow folder panel truncates names rather than scrolling sideways. */
#inboxV2Pinned, #inboxV2Folders { overflow-x: hidden; }
.inbox-v2-tree .inbox-v2-node > .btn.flex-grow-1 { min-width: 0; }
.inbox-v2-tree .badge { flex: 0 0 auto; }
/* Folder panel hidden: the Folders button slides it over the list. */
.inbox-v2-panes { position: relative; }
.inbox-v2-panes > .inbox-v2-overlay { position: absolute; top: 0; left: 0; bottom: 0; z-index: 20; height: 100%; max-width: 90%; box-shadow: var(--bs-box-shadow-lg); }
.inbox-v2-folderbtn { max-width: 45%; }
/* Pop-up window: the reading-pane card lives inside the popup while it is open. */
.inbox-v2-pophost { height: 75vh; display: flex; }
.inbox-v2-pophost > #inboxV2Read { flex: 1 1 auto; min-width: 0; height: 100%; }
/* Ticked rows and drag-to-folder */
/* A tint of the theme's primary, not --bs-primary-bg-subtle: Bootswatch dark themes leave that light,
   which turned a ticked row pale with pale text (seen in 'darkly', 2026-11-17). */
#inboxV2List .inbox-v2-row.is-checked:not(.active) { background-color: rgba(var(--bs-primary-rgb), .16); }
#inboxV2List .inbox-v2-row { cursor: pointer; }
#inboxV2List .inbox-v2-row:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: -2px; }
.inbox-v2-tree .inbox-v2-node.inbox-v2-drop { outline: 2px dashed var(--bs-primary); outline-offset: -2px; background-color: rgba(var(--bs-primary-rgb), .16); }
.inbox-v2-movemenu { max-height: 60vh; overflow-y: auto; }
/* The signature block in compose is just content; nothing to style. */
/* Address fields (Tagify): fill the input group; dropdown above the compose modal. */
.inbox-v2-form .input-group > .tagify { flex: 1 1 auto; width: 1%; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; border-radius: 0; }
.tagify__dropdown.inbox-v2-dd { z-index: 20000 !important; }
/* Tick boxes: Bootstrap's default border (--bs-border-color) is too faint on white and on dark
   themes alike (Bill). Use the secondary TEXT colour, which every theme keeps readable. */
.inbox-v2 .inbox-v2-chk, #inboxV2Bulk .form-check-input {
  width: 1.15em; height: 1.15em; border: 1.5px solid var(--bs-secondary-color); cursor: pointer;
}
.inbox-v2 .inbox-v2-chk:checked, #inboxV2Bulk .form-check-input:checked { border-color: var(--bs-primary); }
/* Outline buttons must stay readable on every theme. Bootswatch dark themes draw
   btn-outline-secondary as dark grey on dark grey and btn-outline-primary as dark blue on dark,
   so Inbox's buttons take their text from the theme's own body colour instead. */
.inbox-v2 .btn-outline-secondary, .inbox-v2-form .btn-outline-secondary, #inboxV2Read .btn-outline-secondary,
.inbox-v2-pophost .btn-outline-secondary {
  --bs-btn-color: var(--bs-body-color); --bs-btn-border-color: var(--bs-secondary-color);
  --bs-btn-hover-color: var(--bs-body-color); --bs-btn-hover-bg: var(--bs-tertiary-bg); --bs-btn-hover-border-color: var(--bs-secondary-color);
  --bs-btn-active-color: var(--bs-body-color); --bs-btn-active-bg: var(--bs-secondary-bg); --bs-btn-active-border-color: var(--bs-secondary-color);
}
html[data-wezi-dark="1"] .inbox-v2 .btn-outline-primary, html[data-wezi-dark="1"] .inbox-v2-form .btn-outline-primary,
html[data-wezi-dark="1"] #inboxV2Read .btn-outline-primary {
  --bs-btn-color: var(--bs-body-color); --bs-btn-hover-color: #fff;
}
/* Conversation strip above the open email: scrolls itself if long. */
#inboxV2Read .inbox-v2-conv { max-height: 32%; overflow-y: auto; flex: 0 0 auto; }
/* Phone: the list header wraps. Buttons (Folders · where you are, Unread, Refresh) on the first
   row, search + scope on a full-width row of their own, so the search box isn't squeezed to "Se". */
@media (max-width: 991.98px) {
  .inbox-v2 [data-pane="list"] > .card > .card-header:not(#inboxV2Bulk) { flex-wrap: wrap; }
  .inbox-v2 #inboxV2SearchForm { order: 5; flex: 1 1 100%; }
  .inbox-v2 .inbox-v2-folderbtn { flex: 1 1 auto; max-width: none; text-align: left; }
  .inbox-v2 #inboxV2Scope { max-width: 42%; }
}
