/*
 * PracticeHub — Emails Page Contrast Fix
 * Generated: 2026-04-11
 *
 * Problem summary (WCAG AA requires 4.5:1 for normal text, 3:1 for large/bold):
 *
 *  --dk-ink3 (#5a5a56) on --dk-surface (#222422) = 2.26:1  ❌ FAIL (used for from, preview, date, metadata)
 *  --lt-ink3 (#888880) on --lt-bg    (#ECEAE4)   = 2.97:1  ❌ FAIL (used for sidebar labels, counts)
 *  --dk-border rgba(255,255,255,0.07) ≈ invisible ❌ cards bleed into background
 *
 *  --dk-ink2 (#9a9a94) on --dk-surface (#222422)  = 5.53:1  ✅ PASS (subject line — already fine)
 *  --dk-ink  (#f0f0ec) on --dk-surface (#222422)  = 13.68:1 ✅ PASS (unread subject — fine)
 *
 * Fix strategy: scope overrides to .email-layout so nothing else in the app is affected.
 * We lift the two failing ink values just enough to hit 4.5:1, and boost border visibility.
 * No structural changes — drop this file in and link it after style.css, or paste the
 * <style> block into emails.html above the closing </head>.
 */

/* ── Scoped contrast overrides for the emails page ── */
.email-layout {

  /* Lift the dim ink values to WCAG AA passing levels */
  --email-ink-dim:    #8c8c86;   /* was dk-ink3 #5a5a56 (2.26:1) → now 4.62:1 on dk-surface */
  --email-ink-mid:    #b8b8b2;   /* was dk-ink2 #9a9a94 (already passing but lifted for comfort) */
  --email-border-vis: rgba(255,255,255,0.13); /* was 0.07 — still subtle but visible */
  --email-border-hover: rgba(255,255,255,0.22);

}

/* Sidebar — light zone: lift section labels and counts */
.groups-header-title,
.sidebar-section {
  color: #686862; /* was lt-ink3 #888880 (2.97:1) → 4.66:1 on lt-bg #ECEAE4 */
}

.group-count,
.group-date {
  color: #686862;
}

/* Sidebar group names — already use lt-ink which is fine, but active state was faint */
.group-item .group-meta .group-count {
  color: #686862;
}

/* ── Email list rows ── */

/* From line and preview — the two most-complained-about lines */
.email-from,
.email-preview {
  color: var(--email-ink-dim, #8c8c86);
}

/* Date / age stamps */
.email-date,
.open-item-age,
.thread-count {
  color: var(--email-ink-dim, #8c8c86);
}

/* Badge / attach text */
.badge-attach {
  color: var(--email-ink-dim, #8c8c86);
}

/* Card borders — make the separation between cards legible */
.email-row,
.thread-row,
.open-item,
.person-row,
.summary-card {
  border-color: var(--email-border-vis, rgba(255,255,255,0.13));
}

.email-row:hover,
.thread-row:hover {
  border-color: var(--email-border-hover, rgba(255,255,255,0.22));
}

/* Thread inner messages */
.thread-messages,
.thread-msg {
  border-color: var(--email-border-vis, rgba(255,255,255,0.13));
}

/* Summary card headings (dk-ink3 in the original) */
.summary-card h3 {
  color: var(--email-ink-dim, #8c8c86);
}

.summary-md {
  color: var(--email-ink-mid, #b8b8b2);
}

.summary-gen {
  color: var(--email-ink-dim, #8c8c86);
  border-top-color: var(--email-border-vis, rgba(255,255,255,0.13));
}

/* Open items */
.open-item-text {
  color: var(--email-ink-mid, #b8b8b2);
}

/* People tab */
.person-email,
.person-count {
  color: var(--email-ink-dim, #8c8c86);
}

/* Keywords */
.keyword-pill {
  color: var(--email-ink-mid, #b8b8b2);
  border-color: var(--email-border-vis, rgba(255,255,255,0.13));
}

/* Modal field labels */
.modal-box .field label {
  color: var(--email-ink-dim, #8c8c86);
}

/* Detail panel meta */
.detail-meta {
  color: var(--email-ink-dim, #8c8c86);
}

/* Tab bar inactive labels */
.email-tab {
  color: var(--email-ink-dim, #8c8c86);
}

.email-tab:hover {
  color: #d0d0ca;
}

/* Dir filter inactive pills */
.dir-pill {
  color: var(--email-ink-dim, #8c8c86);
  border-color: var(--email-border-vis, rgba(255,255,255,0.13));
}

/* View toggle inactive */
.vt-btn {
  color: var(--email-ink-dim, #8c8c86);
}

/* Empty state */
.empty-state,
.no-group {
  color: var(--email-ink-dim, #8c8c86);
}

/* ── Subject line: ensure unread is clearly distinct from read ── */

/* Read subject */
.email-subject {
  color: #c8c8c2; /* lifted from dk-ink2 for legibility */
}

/* Unread subject gets full brightness — already handled by .unread but reinforce */
.email-row.unread .email-subject {
  color: #f0f0ec;
  font-weight: 700;
}

/* Dir labels (IN/OUT arrows) */
.dir-in .dir-label  { color: #4ade80; } /* brighter green */
.dir-out .dir-label { color: #7ab8f8; } /* brighter blue */
