/* Selection Feedback Toolbar – Apple-inspired frosted glass look */
#selection-feedback-toolbar {
  position: absolute;
  z-index: 1000;

  /* Hidden by default (animatable) */
  opacity: 0;
  transform: translateY(10px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.25, 1, 0.5, 1), transform 0.2s cubic-bezier(0.25, 1, 0.5, 1);

  /* Frosted glass aesthetics */
  background-color: rgba(245, 245, 247, 0.75);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);

  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.08);

  padding: 8px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

#selection-feedback-toolbar.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Label */
#selection-feedback-toolbar .sfb-label {
  font-size: 14px;
  font-weight: 500;
  color: #555;
  padding: 0 6px;
  margin: 0;
}

/* Buttons container */
#selection-feedback-toolbar .sfb-buttons-container {
  display: flex;
  gap: 4px;
  border-left: 1px solid rgba(0, 0, 0, 0.1);
  padding-left: 10px;
}

/* Buttons */
#selection-feedback-toolbar .sfb-btn {
  appearance: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  cursor: pointer;
  background-color: transparent;
  color: #333;
  transition: background-color 0.15s ease, transform 0.1s ease, opacity 0.2s ease;
}
#selection-feedback-toolbar .sfb-btn:hover,
#selection-feedback-toolbar .sfb-btn:focus {
  outline: none;
  background-color: rgba(0, 0, 0, 0.06);
}
#selection-feedback-toolbar .sfb-btn:active {
  transform: scale(0.94);
  background-color: rgba(0, 0, 0, 0.09);
}
#selection-feedback-toolbar .sfb-btn.sfb-sent {
  opacity: 0.4;
  pointer-events: none;
}

#selection-feedback-toolbar .sfb-btn svg {
  width: 20px;
  height: 20px;
  display: block;
  pointer-events: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* Subtle selection tint within article */
.gh-content ::selection { background: rgba(24,165,88,0.22); color: inherit; text-shadow: none; }

/* Premium highlight via CSS Custom Highlight API */
::highlight(sfb-current-selection) {
  background: rgba(24,165,88,0.18);
  outline: 2px solid rgba(24,165,88,0.5);
  outline-offset: 1px;
  border-radius: 4px;
}
  