/* Leadership Team view — uses the SAME DOM classes as person-view for
   todos (.todo-toolbar/.todo-group/.todo-item) and prep (.prep-doc-content),
   so the visual format is identical to a direct-report's page. This file
   only adds team-specific extras (feed list, context tab, sidebar icon). */

.leadership-view { padding: 24px 32px; height: 100%; overflow-y: auto; }
.leadership-view.hidden { display: none; }

/* show() hides the notes LIST, but the notes section's own header and tabs are
   separate siblings it never touched, so 114px of "Notes / Ask your meetings
   anything / Home · All Notes" sat above this page announcing the wrong
   screen. Hiding them from CSS (rather than adding more calls to show()) also
   wins the race against meetings-web's async notes load, which re-activates
   its chrome right after we hide it. The .topbar stays — that's real app
   chrome, not the notes section. */
.main:has(#leadership-view:not(.hidden)) #list-view,
.main:has(#leadership-view:not(.hidden)) #notes-section-header,
.main:has(#leadership-view:not(.hidden)) #notes-section-tabs { display: none !important; }

.leadership-view .person-header,
.leadership-view .person-tabs,
.leadership-view .person-panels {
  max-width: 1100px;
}

/* Past meetings feed (Meetings tab + Prep Archive tab) */
.lt-feed-only {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px;
}
.lt-col-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.lt-col-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.lt-feed-item {
  display: block;
  padding: 10px 12px;
  border-radius: 4px;
  margin-bottom: 6px;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
}
.lt-feed-item:hover { background: var(--row-hover); border-color: var(--border); }
.lt-feed-item .lt-date { font-size: 11px; color: var(--text-muted); font-weight: 600; }
.lt-feed-item .lt-title { font-size: 14px; font-weight: 500; margin: 2px 0; }
.lt-feed-item .lt-meta { font-size: 11px; }

/* Context tab textarea */
.lt-context-wrap {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px;
}
.lt-context-ta {
  width: 100%;
  min-height: 360px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  font-size: 13.5px;
  line-height: 1.6;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 12px;
  resize: vertical;
  outline: none;
  background: var(--bg);
  color: var(--text);
}
.lt-context-ta:focus { border-color: var(--accent); }

/* Sidebar entry icon */
.leadership-link .ltm-icon { display: inline-block; margin-right: 6px; }

/* ----- Weekly Huddle Tracker grid ----- */
.lt-week-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.lt-week-nav button { padding: 2px 8px; font-size: 12px; }
.lt-tracker-wrap {
  overflow-x: auto;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.lt-tracker-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.lt-tracker-table th,
.lt-tracker-table td {
  border: 1px solid var(--border-soft);
  padding: 8px 6px;
  vertical-align: top;
  text-align: left;
}
.lt-tracker-table th {
  background: var(--bg-raised);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  /* nowrap made "Experience Share (Fri)" set the column's minimum width and
     pushed the table past its pane. Two-line headers are fine. */
  white-space: normal;
  line-height: 1.25;
}
.lt-tracker-table th .small { text-transform: none; letter-spacing: 0; }
.lt-tracker-leader {
  background: var(--bg);
  color: var(--text);
  width: 92px;
  white-space: nowrap;
}
.lt-tracker-cell {
  width: 100%;
  /* 5 prose columns at 160px + a 120px leader column needed 920px, and the
     content pane is ~818px on Brian's window — so "Experience Share (Fri)"
     was scrolled out of sight with nothing on screen saying so. At 118px the
     grid fits the pane it actually lives in. */
  min-width: 118px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font: inherit;
  resize: vertical;
  padding: 4px 6px;
  border-radius: 3px;
  outline: none;
  /* Grow to fit the text instead of trapping it in a 9-cell scrollbar maze.
     JS sets the height from scrollHeight; this is the floor. */
  min-height: 62px;
  overflow-y: hidden;
}
.lt-tracker-cell:focus {
  background: var(--bg);
  border-color: var(--accent);
}

.btn-sm { padding: 2px 8px; font-size: 11px; }

/* ----- Suggestion preview modal ----- */
.lt-modal {
  position: fixed; inset: 0;
  z-index: 9000;
  display: flex; align-items: center; justify-content: center;
}
.lt-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.45);
}
.lt-modal-card {
  position: relative;
  background: var(--bg-alt);
  color: var(--text);
  width: min(90vw, 900px);
  max-height: 86vh;
  display: flex; flex-direction: column;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
  overflow: hidden;
}
.lt-modal-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-soft);
}
.lt-modal-head h3 { margin: 0 0 4px 0; font-size: 16px; }
.lt-modal-body {
  padding: 14px 18px;
  overflow-y: auto;
  flex: 1;
}
.lt-modal-leader {
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 14px;
  padding: 8px 12px 12px;
}
.lt-modal-leader legend { padding: 0 6px; font-size: 13px; }
.lt-modal-tbl { width: 100%; border-collapse: collapse; }
.lt-modal-tbl td { padding: 6px 4px; vertical-align: top; }
.lt-modal-fieldname {
  width: 130px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  padding-top: 10px !important;
}
.lt-modal-cell {
  width: 100%;
  font: inherit;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 3px;
  padding: 6px 8px;
  resize: vertical;
  outline: none;
}
.lt-modal-cell:focus { border-color: var(--accent); background: var(--bg); }
.lt-modal-ta {
  width: 100%; font-family: ui-monospace, Menlo, monospace; font-size: 11px;
  border: 1px solid var(--border); border-radius: 4px; padding: 8px;
  background: var(--bg); color: var(--text);
}
.lt-modal-apply-cell {
  width: 70px;
  text-align: center;
  padding-top: 10px !important;
}
.lt-modal-apply { font-size: 11px; color: var(--text-muted); }
.lt-modal-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid var(--border-soft);
  background: var(--bg);
}

/* Team-member to-do search (top of the Leadership view) — type a name, see
   that person's to-dos without clicking into each one in the sidebar. */
.lt-teamsearch-wrap { max-width: 1100px; margin: 4px 0 16px; position: relative; }
/* Magnifier as a mask icon (was a 🔍 emoji in the placeholder). */
.lt-teamsearch-wrap::before {
  content: ""; position: absolute; left: 14px; top: 13px; width: 16px; height: 16px;
  background: var(--text-muted); pointer-events: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") center / contain no-repeat;
}
.lt-teamsearch {
  width: 100%; box-sizing: border-box; font-size: 14px;
  padding: 11px 14px 11px 40px; border: 1px solid var(--border);
  border-radius: 9px; background: var(--bg-alt); color: var(--text);
}
.lt-teamsearch::placeholder { color: var(--text-muted); }
.lt-teamsearch:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.lt-teamsearch-results { margin-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.lt-ts-empty { padding: 12px 4px; color: var(--text-muted); font-size: 13px; }
.lt-ts-person {
  border: 1px solid var(--border); border-radius: 8px;
  padding: 12px 14px; background: var(--bg-alt);
}
.lt-ts-phead {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; margin-bottom: 8px;
}
.lt-ts-name { font-size: 15px; font-weight: 700; color: var(--text); }
.lt-ts-count { font-size: 11px; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.lt-ts-list { list-style: none; margin: 0; padding: 0; }
.lt-ts-todo { padding: 12px 0; border-top: 1px solid var(--border-soft); }
.lt-ts-todo:first-child { border-top: none; }
.lt-ts-crow { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.lt-ts-main { min-width: 0; flex: 1 1 auto; }
.lt-ts-title { font-size: 13.5px; font-weight: 700; color: var(--text); }
.lt-ts-ctx { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; line-height: 1.4; }
.lt-ts-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 7px; }
.lt-ts-chip { font-size: 10.5px; font-weight: 600; color: var(--text-muted); background: var(--bg-raised); padding: 2px 7px; border-radius: 5px; }
.lt-ts-proj {
  text-transform: uppercase; font-size: 9.5px; font-weight: 700; letter-spacing: .05em;
  background: var(--accent-soft); color: var(--dm-link); padding: 2px 6px; border-radius: 4px;
}
.lt-ts-open {
  flex: none; align-self: flex-start; font-size: 12px; font-weight: 700; color: var(--dm-link);
  text-decoration: none; white-space: nowrap; border: 1px solid var(--border);
  border-radius: 7px; padding: 5px 10px;
}
.lt-ts-open:hover { background: var(--accent-soft); }
.lt-ts-nolink { flex: none; font-size: 11px; color: var(--text-muted); align-self: center; }
.lt-ts-more { margin-top: 8px; }
.lt-ts-more summary {
  cursor: pointer; font-size: 11.5px; font-weight: 700; color: var(--dm-link); list-style: none;
  display: inline-flex; align-items: center; gap: 5px;
}
.lt-ts-more summary::-webkit-details-marker { display: none; }
.lt-ts-more summary::before { content: "▸"; font-size: 10px; }
.lt-ts-more[open] summary::before { content: "▾"; }
.lt-ts-morebody {
  margin-top: 6px; font-size: 12.5px; color: var(--text-muted); background: var(--bg-raised);
  border-radius: 7px; padding: 9px 11px; line-height: 1.5;
}
.lt-ts-none { font-size: 13px; color: var(--text-muted); padding: 4px 0; }
