/* ============================================
   COMMENTS — lead thread + @mentions
   ============================================ */

/* The thread reuses the .log-entry shell from the activity column (see leads.css), so
   only what is specific to a comment lives here: the author label, and a body that
   wraps long text. No panel background and no bold name — it should read as one more
   row in the activity, not a separate widget. */

.comment-entry {
  border-left: 3px solid var(--border-light, var(--border));
}

.comment-edited {
  color: var(--text-light);
  font-size: 11px;
  font-style: italic;
}

/* A call's .log-entry-content is optional notes under an outcome, so it earns a divider.
   A comment's body IS the entry, so drop the rule and just keep the spacing. */
.comment-entry .log-entry-content {
  margin-top: 4px;
  padding-top: 0;
  border-top: none;
}

.comment-body {
  line-height: 1.5;
  color: var(--text);
  word-break: break-word;
  overflow-wrap: anywhere;
}

.comment-mention {
  background: #dbeafe;
  color: #1e40af;
  border-radius: 4px;
  padding: 0 3px;
  font-weight: 600;
}

/* ---- Composer ---- */

/* Composer sits above the thread, Trello-style, so the box is the first thing you reach.
   No send button — Enter posts, Shift/Alt+Enter breaks the line. */
.comment-composer {
  position: relative;
  margin-bottom: 12px;
}

.comment-input,
.comment-edit-input {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
}

.comment-input:focus,
.comment-edit-input:focus {
  outline: none;
  border-color: var(--primary);
}

.comment-edit-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

/* ---- @ autocomplete ---- */

/* Opens downwards: with the composer at the top of the section there is room below it,
   and upwards would push the menu out over the section header. */
.comment-mention-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 20;
  max-height: 190px;
  overflow-y: auto;
  background: var(--bg, #fff);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.comment-mention-menu.open {
  display: block;
}

.comment-mention-option {
  display: flex;
  align-items: baseline;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-size: 13px;
}

.comment-mention-option:hover {
  background: #eff6ff;
}

.comment-mention-option span {
  color: var(--text-light);
  font-size: 11px;
}

/* ============================================
   NOTIFICATIONS — header bell
   ============================================ */

.notification-bell-wrap {
  position: relative;
  display: inline-flex;
}

.notification-badge {
  position: absolute;
  top: -2px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  pointer-events: none;
}

.notification-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 200;
  width: 320px;
  max-height: 380px;
  overflow-y: auto;
  background: var(--bg, #fff);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
}

.notification-menu.open {
  display: block;
}

.notification-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-light);
}

.notification-item {
  display: block;
  width: 100%;
  padding: 9px 12px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  text-align: left;
  cursor: pointer;
}

.notification-item:hover {
  background: #f3f4f6;
}

.notification-item.unread {
  background: #eff6ff;
}

.notification-item.unread:hover {
  background: #dbeafe;
}

.notification-item-head {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 12px;
  color: var(--text);
}

.notification-time {
  margin-left: auto;
  color: var(--text-light);
  font-size: 11px;
}

.notification-item-body {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-light);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.notification-empty {
  padding: 16px 12px;
  text-align: center;
  font-size: 12px;
  color: var(--text-light);
}
