/* STEMRankings overrides on top of CSRankings' Bootstrap + extra CSS. */

/* Division header rows in the area menu */
#area-menu .division-head-row th {
  border-top: 2px solid #eee;
  padding-top: 8px;
  font-size: 15px;
  font-weight: 700;
}
#area-menu td { padding: 2px 6px; }
#area-menu label { font-weight: normal; margin: 0; }

/* Year controls */
.year-controls label { margin: 0 4px; color: #333; font-weight: normal; }
.year-controls select { padding: 2px 4px; }

/* Region select visible (CSRankings hides it behind a custom dropdown we don't use) */
#regions { padding: 3px 6px; }

/* Area indicators row */
.area-indicators { display: inline-flex; flex-wrap: wrap; gap: 4px; vertical-align: middle; }
.area-indicator {
  display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: 11px; font-weight: 600; cursor: pointer; user-select: none;
}
.area-indicator:hover { opacity: 0.85; }

/* Ranking table flag + rank cell */
#ranking .rank-cell { text-align: right; color: #777; padding-right: 8px; }
#ranking img.flag { vertical-align: baseline; border: 1px solid #eee; }
.hovertip { cursor: pointer; color: #337ab7; }
.orcid-link {
  font-size: 10px; border: 1px solid #a6ce39; color: #a6ce39;
  border-radius: 3px; padding: 0 3px; text-decoration: none;
}

.loading, .no-areas-selected { padding: 40px 10px; color: #777; }
.no-areas-message strong { color: #333; }

.stem-footer {
  margin: 30px 0 20px; padding-top: 14px; border-top: 1px solid #eee;
  color: #999; font-size: 12px; text-align: center;
}

/* Keep the two-column layout from collapsing weirdly on wide screens */
#area-selection-panel .table-fit { margin: 0 auto; }

/* ------------------------------------------------------------------
   Override CSRankings' 3-rows-per-institution zebra/collapse rules.
   Our markup emits ONE <tr> per institution (+ optional faculty row),
   so the nth-child(3n) font-size:0 collapse would hide real rows and
   leave stray flag-only bands. Reset those, then stripe by class.
   ------------------------------------------------------------------ */
#success table.table-fit > tbody > tr > td {
  padding: 4px 8px !important;
  line-height: 1.4 !important;
  font-size: inherit !important;
  background-color: transparent;
}
#success table.table-fit > tbody > tr.inst-row.stripe > td {
  background-color: #f5f5f5;
}
#success table.table-fit > tbody > tr.inst-row:hover > td {
  background-color: #e3f2fd;
}
/* Faculty expansion row: no zebra, tight padding */
#success table.table-fit > tbody > tr.faculty-container > td {
  padding: 0 8px 6px !important;
  background-color: #fff;
}

/* Accounts */
.account-bar { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin:6px 0 10px; font-size:14px; }
.account-bar input { padding:4px 8px; border:1px solid #ccc; border-radius:4px; min-width:220px; }
.account-bar button { padding:4px 10px; border:1px solid #337ab7; background:#337ab7; color:#fff; border-radius:4px; cursor:pointer; }
.account-bar #signout-btn { background:#fff; color:#337ab7; }
.acct-msg { color:#555; }
.my-list { border:1px solid #bce8f1; background:#f7fbfd; border-radius:4px; padding:8px 14px; margin-bottom:10px; text-align:left; }
.my-list ul { margin:0; padding-left:18px; }
.link-btn { border:none; background:none; color:#a94442; cursor:pointer; font-size:12px; }
.save-star { border:none; background:none; cursor:pointer; font-size:15px; color:#999; padding:0 4px; line-height:1; }
.save-star.on { color:#e0a800; }
.hint { color:#666; font-size:12px; }
.docs { margin:6px 0; }
.doc-form { display:grid; grid-template-columns: 160px 1fr; gap:6px; margin:8px 0; }
.doc-form textarea, .doc-form button, .doc-form .acct-msg { grid-column: 1 / -1; }
.doc-form button, .profile-sum button { padding:4px 10px; border:1px solid #337ab7; background:#337ab7; color:#fff; border-radius:4px; cursor:pointer; justify-self:start; }
.profile-sum button[disabled] { opacity:.5; cursor:default; }
.profile-sum pre, .draft pre { white-space:pre-wrap; background:#fff; border:1px solid #ddd; padding:8px; font-family:inherit; font-size:13px; }
.draft { margin:6px 0 10px; }
.err { color:#a94442; }
.credits { font-weight:600; color:#2b6e2b; }

/* Finder */
.finder { margin: 8px 0 14px; text-align:left; }
.find-row { display:flex; gap:6px; margin-top:4px; flex-wrap:wrap; }
.find-row input { flex:1; min-width:240px; padding:6px 10px; border:1px solid #bbb; border-radius:4px; font-size:15px; }
.find-row select { padding:5px; }
.find-row button { padding:6px 16px; border:1px solid #337ab7; background:#337ab7; color:#fff; border-radius:4px; cursor:pointer; }
.prof-card { border:1px solid #e3e3e3; border-radius:6px; padding:8px 12px; margin:8px 0; background:#fff; }
.prof-card ul { margin:4px 0 0 18px; padding:0; font-size:13px; }
.pc-inst { color:#555; margin-left:6px; }
.pc-active { font-size:11px; color:#2b6e2b; border:1px solid #bfe0bf; border-radius:10px; padding:0 6px; margin-left:6px; }

/* Tracker */
.pipeline { display:flex; gap:6px; flex-wrap:wrap; margin:4px 0 8px; }
.pill { font-size:12px; border-radius:10px; padding:1px 8px; background:#eee; }
.st-sent { background:#e3efff; } .st-replied, .st-meeting { background:#dff3df; } .st-declined, .st-no_reply { background:#f6e1e1; } .st-drafted { background:#fff3d6; }
.due { background:#fff8e1; border:1px solid #f0d58a; border-radius:4px; padding:4px 8px; margin-bottom:8px; font-size:13px; }
.tracker { width:100%; font-size:13px; border-collapse:collapse; }
.tracker th { text-align:left; font-weight:600; border-bottom:1px solid #ddd; padding:4px; }
.tracker td { padding:4px; vertical-align:top; }
.tracker input[type=email] { width:100%; }
.tracker .note { width:100%; font-size:12px; border:1px solid #eee; padding:3px 6px; }
.note-row td { border-bottom:1px solid #eee; padding-bottom:8px; }
.acts { white-space:nowrap; }
.draft-btn { padding:3px 10px; border:1px solid #337ab7; background:#fff; color:#337ab7; border-radius:4px; cursor:pointer; font-size:12px; }
.draft-btn:hover { background:#337ab7; color:#fff; }
.notice { background:#fff8e1; border:1px solid #f0d58a; border-radius:4px; padding:8px 12px; margin-bottom:10px; font-size:14px; }

/* Professor panel actions */
.pp-actions { display:flex; gap:8px; flex-wrap:wrap; margin:6px 0 12px; }
.pp-actions button { padding:6px 12px; border-radius:4px; cursor:pointer; font-size:14px; line-height:1.2; }
.pp-actions .pp-save { border:1px solid #c9a227; background:#fff; color:#8a6d1a; }
.pp-actions .pp-save.on { background:#fff3d6; color:#8a6d1a; }
.pp-actions .pp-draft { border:1px solid #337ab7; background:#337ab7; color:#fff; }
.pp-actions button:focus-visible, .draft-btn:focus-visible { outline:2px solid #1d4f80; outline-offset:2px; }

/* Professor panel */
.prof-panel { position:fixed; top:0; right:0; height:100vh; width:min(460px, 100vw); background:#fff; box-shadow:-4px 0 18px rgba(0,0,0,.15);
  padding:18px 20px; overflow-y:auto; transform:translateX(105%); transition:transform .2s ease; z-index:1000; text-align:left; font-size:14px; }
.prof-panel.open { transform:none; }
.pp-close { position:absolute; top:10px; right:12px; border:none; background:none; font-size:18px; cursor:pointer; color:#777; }
.prof-panel h3 { margin:4px 30px 2px 0; }
.pp-inst { color:#555; margin-bottom:8px; }
.pp-stats { display:flex; gap:12px; flex-wrap:wrap; font-size:13px; margin-bottom:8px; align-items:center; }
.pp-warn { font-size:11px; color:#8a6d1a; border:1px solid #f0d58a; border-radius:10px; padding:0 6px; }
.pp-topics { display:flex; flex-wrap:wrap; gap:4px; margin-bottom:6px; }
.pp-papers li, .pp-collab li { margin-bottom:6px; }
.pp-papers small, .pp-collab small { display:block; color:#777; }
.pp-links { margin-top:10px; font-size:13px; }
@media (prefers-reduced-motion: reduce) { .prof-panel { transition:none; } }
