/*
 * GOLPOOGRO - Text Annotation & Highlight Pen Stylesheet
 * Interactive selection highlight overlays, dynamic floating toolbars, and colored markup lines
 */

/* Custom highlight pen styles with soft, light-adaptive transparencies */
.hl-item {
  border-radius: 2px;
  position: relative;
  transition: background-color 0.2s;
  cursor: pointer;
}

.hl-gold {
  background-color: rgba(245, 158, 11, 0.25);
  border-bottom: 2px solid rgba(245, 158, 11, 0.45);
}

.hl-emerald {
  background-color: rgba(16, 185, 129, 0.25);
  border-bottom: 2px solid rgba(16, 185, 129, 0.45);
}

.hl-sapphire {
  background-color: rgba(59, 130, 246, 0.25);
  border-bottom: 2px solid rgba(59, 130, 246, 0.45);
}

.hl-coral {
  background-color: rgba(244, 63, 94, 0.25);
  border-bottom: 2px solid rgba(244, 63, 94, 0.45);
}

.hl-underline {
  background-color: transparent;
  border-bottom: 2px dashed #9f501a;
}

/* Interactive custom context popup menu whenever user highlights text inside pages */
.annotation-popup-menu {
  position: absolute;
  z-index: 500;
  background: #18181b;
  border: 1px solid rgba(197, 160, 89, 0.35);
  border-radius: 99px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5), 0 0 15px rgba(197, 160, 89, 0.1);
  animation: popupScaleUp 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: auto;
}

@keyframes popupScaleUp {
  0% { opacity: 0; transform: scale(0.8) translateY(10px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* Color dot selectors inside popup menu */
.annotation-color-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.2s, border-color 0.2s;
}

.annotation-color-dot:hover {
  transform: scale(1.25);
}

.annotation-color-dot.active {
  border-color: #fff;
  transform: scale(1.1);
}

.dot-gold { background-color: #f59e0b; }
.dot-emerald { background-color: #10b981; }
.dot-sapphire { background-color: #3b82f6; }
.dot-coral { background-color: #f43f5e; }
.dot-underline { 
  background-color: transparent;
  border: 2px dashed var(--reader-gold-accent) !important;
}

/* Separate actions divider */
.annotation-menu-divider {
  width: 1px;
  height: 20px;
  background-color: rgba(255,255,255,0.15);
  margin: 0 4px;
}

/* Context menu click triggers */
.annotation-btn-action {
  background: none;
  border: none;
  color: #a1a1aa;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  transition: color 0.2s;
}

.annotation-btn-action:hover {
  color: var(--reader-gold-accent);
}

.annotation-btn-action.btn-delete-hl:hover {
  color: var(--accent-crimson);
}

/* Sticky margin indicator for note attached to text */
.margin-note-peg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: var(--reader-gold-accent);
  color: #000;
  border-radius: 50%;
  font-size: 0.65rem;
  margin-left: 4px;
  cursor: pointer;
  vertical-align: middle;
  transition: transform 0.2s;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.margin-note-peg:hover {
  transform: scale(1.2) rotate(-5deg);
}
