/* SPDX-License-Identifier: MIT
 * SPDX-FileCopyrightText: 2026 Fundación MxOS <contacto@mx-os.mx>
 * Lightbox y Zoom para diagramas SVG
 */
.evalinux-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.evalinux-lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(6, 9, 18, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 1;
}

/* Barra de Herramientas Superior */
.lightbox-toolbar {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 8px 18px;
  border-radius: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(56, 189, 248, 0.15);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.lightbox-title {
  margin: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  color: #94a3b8;
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  text-transform: none !important;
}

.lightbox-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lightbox-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f1f5f9;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.18s ease;
  outline: none;
}

.lightbox-btn:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
  color: #38bdf8;
  transform: scale(1.08);
}

.lightbox-btn:active {
  transform: scale(0.95);
}

.lightbox-btn.lightbox-close {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  margin-left: 8px;
}

.lightbox-btn.lightbox-close:hover {
  background: rgba(239, 68, 68, 0.35);
  border-color: #ef4444;
  color: #ffffff;
}

.lightbox-zoom-level {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #38bdf8;
  min-width: 52px;
  text-align: center;
  font-weight: 600;
}

/* Área de Visualización (Viewport) */
.lightbox-viewport {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  cursor: grab;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.lightbox-viewport.dragging {
  cursor: grabbing !important;
}

/* Stage que se transforma (Scale & Translate) */
.lightbox-stage {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  will-change: transform;
}

.lightbox-stage svg,
.lightbox-stage img,
.lightbox-stage .lightbox-img {
  display: block !important;
  max-width: none !important;
  max-height: none !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: none;
  filter: drop-shadow(0 15px 40px rgba(0, 0, 0, 0.8));
}

/* Barra de Instrucciones Inferior */
.lightbox-hint {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: #64748b;
  background: rgba(15, 23, 42, 0.7);
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  letter-spacing: 0.5px;
  pointer-events: none;
}

.lightbox-hint code {
  font-family: 'JetBrains Mono', monospace;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  padding: 1px 5px;
  border-radius: 3px;
}
