/* Shared Deep Looking popup, lightbox and tooltip styles (index.html, stage.html) */
.popup {
  position: fixed;
  font-family: 'Georgia', serif;
  background: rgba(26, 26, 46, 0.97);
  border: 1px solid #c4a35a;
  border-radius: 10px;
  padding: 16px;
  color: #e0e0e0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 100;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
}
.popup.visible { opacity: 1; }
.popup.pinned {
  pointer-events: auto;
  overflow: hidden;
  max-height: 33vh;
  min-width: 280px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  cursor: grab;
  display: flex;
  flex-direction: column;
}
.popup-content {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.popup-resize {
  position: absolute;
  width: 12px;
  height: 12px;
  z-index: 10;
  touch-action: none;
}
.popup-resize.nw { top: 0; left: 0; cursor: nw-resize; }
.popup-resize.ne { top: 0; right: 0; cursor: ne-resize; }
.popup-resize.sw { bottom: 0; left: 0; cursor: sw-resize; }
.popup-resize.se { bottom: 0; right: 0; cursor: se-resize; }
.popup.pinned .lens-tabs {
  cursor: grab;
  touch-action: none;
}
.popup.dragging .lens-tabs {
  cursor: grabbing;
}
.popup-close {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 1.3rem;
  color: #999;
  cursor: pointer;
  display: none;
  line-height: 1;
}
.popup-close:hover { color: #fff; }
.popup-close:focus { outline: none; }
.popup.pinned .popup-close { display: block; }
.popup .poem-title a {
  color: #c4a35a;
  text-decoration: none;
}
.popup .poem-title a:hover {
  text-decoration: underline;
}
.popup .lens-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(196,163,90,0.3);
}
.popup .lens-tab {
  padding: 5px 12px;
  font-size: 0.75rem;
  font-family: 'Georgia', serif;
  color: #888;
  cursor: pointer;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  background: none;
  transition: color 0.2s, background 0.2s;
  text-transform: capitalize;
  white-space: nowrap;
}
.popup .lens-tab:focus { outline: none; }
.popup .lens-tab:hover {
  color: #c4a35a;
}
.popup .lens-tab.active {
  color: #c4a35a;
  background: rgba(196,163,90,0.1);
  border-color: rgba(196,163,90,0.3);
}
.popup.pinned .poem-title,
.popup.pinned .poem-poet,
.popup.pinned .poem-text,
.popup.pinned .poem-image,
.popup.pinned .poem-video {
  cursor: default;
}
.popup .poem-title {
  font-size: 1rem;
  font-weight: 600;
  color: #c4a35a;
  margin-bottom: 2px;
}
.popup .poem-poet {
  font-size: 0.8rem;
  color: #999;
  margin-bottom: 10px;
  font-style: italic;
}
.popup .poem-image, .popup .poem-video {
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  border-radius: 6px;
  margin-bottom: 10px;
}
.popup .poem-text a.text-link {
  color: #c4a35a;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-word;
}
.popup .poem-text a.text-link:hover {
  color: #e0c27a;
}
.popup.drop-over {
  outline: 2px dashed #c4a35a;
  outline-offset: -6px;
}
.image-lightbox {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  cursor: none;
}
.image-lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 0 40px rgba(0,0,0,0.8);
}
.popup .poem-text {
  font-size: 0.85rem;
  line-height: 1.5;
  color: #d0d0d0;
  white-space: pre-line;
}
.segment-tooltip {
  position: fixed;
  background: rgba(26, 26, 46, 0.9);
  border: 1px solid rgba(196,163,90,0.5);
  border-radius: 4px;
  padding: 3px 8px;
  color: #c4a35a;
  font-size: 0.75rem;
  pointer-events: none;
  z-index: 90;
  white-space: nowrap;
}