/* ─────────────────────────────────────────────────────────────────────
   lightbox.css — Full-screen model viewer modal
───────────────────────────────────────────────────────────────────── */

.lightbox {
  position:        fixed;
  inset:           0;
  z-index:         1000;
  display:         flex;
  align-items:     center;
  justify-content: center;
}
.lightbox[hidden] { display: none; }

.lightbox.is-open { animation: lb-fade 0.2s var(--ease) both; }
@keyframes lb-fade { from { opacity: 0; } to { opacity: 1; } }

.lightbox__backdrop {
  position:                absolute;
  inset:                   0;
  background:              rgba(0, 0, 0, 0.88);
  backdrop-filter:         blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lightbox__inner {
  position:   relative;
  z-index:    1;
  width:      100vw;
  height:     100dvh;
  background: var(--bg-card);
  display:    flex;
  flex-direction: column;
  overflow:   hidden;
  animation:  lb-slide 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  box-shadow: 0 0 80px rgba(179, 141, 255, 0.18), inset 0 0 0 1px rgba(179, 141, 255, 0.1);
}
@keyframes lb-slide {
  from { transform: translateY(20px) scale(0.97); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

.lightbox__header {
  display:     flex;
  align-items: center;
  gap:         1rem;
  padding:     1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background:  linear-gradient(135deg, rgba(46, 42, 88, 0.95) 0%, var(--bg-card) 65%);
}

.lightbox__meta { flex: 1; }

.lightbox__tag {
  font-size:      0.72rem;
  font-weight:    600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color:          var(--accent);
}

.lightbox__title {
  font-size:   1.25rem;
  font-weight: 700;
  margin-top:  0.15rem;
}

.lightbox__close {
  background:      none;
  border:          1.5px solid var(--border);
  color:           var(--text-muted);
  font-size:       1.4rem;
  line-height:     1;
  width:           36px;
  height:          36px;
  border-radius:   var(--radius-sm);
  cursor:          pointer;
  flex-shrink:     0;
  display:         flex;
  align-items:     center;
  justify-content: center;
  transition:      all var(--t);
}
.lightbox__close:hover { border-color: var(--accent); color: var(--accent); }

/* Body: sidebar + viewer side by side */
.lightbox__body {
  display:    flex;
  flex:       1;
  min-height: 0;
}


/* ─── SIDEBAR ────────────────────────────────────────────────────────── */
.lightbox__sidebar {
  width:          300px;
  flex-shrink:    0;
  overflow-y:     auto;
  padding:        1.75rem 1.5rem;
  border-right:   1px solid var(--border);
  background:     linear-gradient(180deg, rgba(46, 42, 88, 0.65) 0%, var(--bg-card) 100%);
  display:        flex;
  flex-direction: column;
  gap:            1.75rem;
}
.lightbox__sidebar[hidden] { display: none; }

.lightbox__sidebar::-webkit-scrollbar       { width: 4px; }
.lightbox__sidebar::-webkit-scrollbar-track { background: transparent; }
.lightbox__sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.lb-notes__heading {
  font-size:      0.68rem;
  font-weight:    600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color:          var(--accent);
  margin-bottom:  0.9rem;
}

.lb-notes__text {
  display:        flex;
  flex-direction: column;
  gap:            0.75rem;
  font-size:      0.875rem;
  line-height:    1.75;
  color:          var(--text-muted);
}

.lb-meta-list {
  display:        flex;
  flex-direction: column;
  gap:            1rem;
  padding-top:    1.5rem;
  border-top:     1px solid var(--border);
  margin:         0;
}

.lb-meta-row {
  display:        flex;
  flex-direction: column;
  gap:            0.2rem;
}

.lb-meta-row__label {
  font-size:      0.68rem;
  font-weight:    600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color:          var(--text-muted);
  opacity:        0.55;
}

.lb-meta-row__value {
  font-size:   0.82rem;
  font-family: var(--font-mono);
  color:       var(--text-muted);
  margin:      0;
}


/* ─── VIEWER + TRI COUNT ─────────────────────────────────────────────── */
.lightbox__viewer {
  flex:       1;
  min-height: 0;
  background: var(--bg-elevated);
}

.lightbox__tris {
  font-family:   var(--font-mono);
  font-size:     0.72rem;
  color:         var(--text-muted);
  border:        1px solid var(--border);
  border-radius: 999px;
  padding:       0.25rem 0.7rem;
  white-space:   nowrap;
  margin-left:   auto;
  margin-right:  0.75rem;
  min-width:     60px;
  text-align:    center;
}


/* ─── RESPONSIVE ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .lightbox__body    { flex-direction: column; }
  .lightbox__sidebar {
    width:      100%;
    max-height: 220px;
    border-right: none;
    border-top: 1px solid var(--border);
  }
}
