/* Quick Annotations — highlight and feedback layer */

/* Hover outline in annotation mode */
#qa-hover-outline {
  position: absolute;
  z-index: 999990;
  border: 2px solid rgba(74, 58, 255, 0.6);
  background: rgba(74, 58, 255, 0.05);
  border-radius: 3px;
  pointer-events: none;
  display: none;
  transition: all 0.1s ease;
}

/* Annotation mode cursor */
.qa-mode-active,
.qa-mode-active * {
  cursor: crosshair !important;
}

/* Persistent highlights */
.qa-highlight {
  position: absolute;
  z-index: 999989;
  background: rgba(74, 58, 255, 0.08);
  border: 1.5px solid rgba(74, 58, 255, 0.3);
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.qa-highlight:hover {
  background: rgba(74, 58, 255, 0.15);
  border-color: rgba(74, 58, 255, 0.6);
}

/* Number badge on highlight */
.qa-highlight-badge {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 20px;
  height: 20px;
  background: #4a3aff;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  font-family: -apple-system, system-ui, sans-serif;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* Popover */
#qa-popover {
  position: absolute;
  z-index: 999995;
  width: 300px;
  background: #111;
  border: 1px solid #333;
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  font-family: -apple-system, system-ui, sans-serif;
  display: none;
}

.qa-popover-excerpt {
  font-size: 12px;
  color: #8b7fff;
  font-style: italic;
  margin-bottom: 10px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qa-popover-name {
  width: 100%;
  box-sizing: border-box;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 6px;
  padding: 7px 10px;
  color: #e0e0e0;
  font-family: inherit;
  font-size: 12px;
  outline: none;
  margin-bottom: 8px;
}
.qa-popover-name:focus { border-color: #4a3aff; }
.qa-popover-name::placeholder { color: #555; }

.qa-popover-input {
  width: 100%;
  box-sizing: border-box;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 6px;
  padding: 8px 10px;
  color: #e0e0e0;
  font-family: inherit;
  font-size: 13px;
  resize: vertical;
  min-height: 50px;
  outline: none;
}
.qa-popover-input:focus { border-color: #4a3aff; }
.qa-popover-input::placeholder { color: #555; }

.qa-popover-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.qa-popover-cancel {
  background: none;
  border: 1px solid #333;
  border-radius: 6px;
  padding: 5px 12px;
  color: #888;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}
.qa-popover-cancel:hover { color: #ccc; border-color: #555; }

.qa-popover-submit {
  background: #4a3aff;
  border: none;
  border-radius: 6px;
  padding: 5px 14px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.qa-popover-submit:hover { background: #5b4cff; }

/* Detail view in popover */
.qa-detail-comment {
  margin-bottom: 4px;
}
.qa-detail-author {
  font-size: 13px;
  font-weight: 600;
  color: #e0e0e0;
  margin-bottom: 4px;
}
.qa-detail-body {
  font-size: 13px;
  color: #ccc;
  line-height: 1.5;
  margin-bottom: 6px;
}
.qa-detail-time {
  font-size: 11px;
  color: #555;
}
.qa-guest-tag {
  font-size: 10px;
  color: #666;
  background: rgba(255,255,255,0.06);
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 4px;
  font-weight: 400;
}
