/* recursos/css/lightbox.css
 * SPDX-License-Identifier: MIT
 * SPDX-FileCopyrightText: 2026 RiLi Platform S. de R.L. de C.V. <contacto@rili.mx>
 * Lightbox y Zoom para diagramas SVG y arquitectura de plataforma RiLi
 */

.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(37, 99, 235, 0.35);
  padding: 8px 18px;
  border-radius: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(37, 99, 235, 0.2);
  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(37, 99, 235, 0.25);
  border-color: #38bdf8;
  color: #38bdf8;
  transform: scale(1.08);
}

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

.lightbox-btn.active {
  background: #2563eb;
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.5);
}

.lightbox-zoom-level {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #94a3b8;
  min-width: 48px;
  text-align: center;
}

/* Escenario y Contenedor del SVG */
.lightbox-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 5;
  overflow: hidden;
  cursor: grab;
}

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

.lightbox-stage {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  transition: transform 0.05s linear;
  will-change: transform;
  display: block;
}

.lightbox-stage img,
.lightbox-stage svg {
  max-width: none;
  max-height: none;
  display: block;
  pointer-events: none;
}

/* Pista de uso inferior */
.lightbox-hint {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #64748b;
  background: rgba(11, 15, 25, 0.7);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

/* Modo Proyector (Tema Claro) */
body.theme-light .lightbox-backdrop {
  background: rgba(248, 250, 252, 0.98);
}

body.theme-light .lightbox-toolbar {
  background: rgba(255, 255, 255, 0.95);
  border-color: #cbd5e1;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

body.theme-light .lightbox-title {
  color: #1e293b;
  border-right-color: #e2e8f0;
}

body.theme-light .lightbox-btn {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

body.theme-light .lightbox-btn:hover {
  background: rgba(37, 99, 235, 0.15);
  border-color: #2563eb;
  color: #2563eb;
}

body.theme-light .lightbox-zoom-level {
  color: #475569;
}

body.theme-light .lightbox-hint {
  background: rgba(255, 255, 255, 0.85);
  color: #475569;
  border-color: #cbd5e1;
}

body.theme-light .lightbox-stage img,
body.theme-light .lightbox-stage svg {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}
