/* ==========================================================================
   Food Image Lightbox & Zoom Modal Styles
   ========================================================================== */

.lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  user-select: none;
}

.lightbox-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #ffffff;
  z-index: 2010;
  background: linear-gradient(180deg, rgba(0,0,0,0.6) 0%, transparent 100%);
}

.lightbox-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
}

.lightbox-counter {
  font-size: 0.88rem;
  color: #94a3b8;
  margin-left: 0.75rem;
}

.lightbox-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lightbox-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: background 0.2s ease, transform 0.2s ease;
}

.lightbox-btn:hover {
  background: var(--primary);
  transform: scale(1.05);
}

.lightbox-main-container {
  position: relative;
  width: 100%;
  height: calc(100% - 160px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 4rem;
  overflow: hidden;
}

.lightbox-img-wrapper {
  max-width: 90vw;
  max-height: 75vh;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
  cursor: zoom-in;
}

.lightbox-img-wrapper.zoomed {
  cursor: zoom-out;
  transform: scale(1.8);
}

.lightbox-img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  transition: opacity 0.2s ease;
}

.lightbox-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: background 0.2s ease;
  z-index: 2010;
}

.lightbox-nav-arrow:hover {
  background: var(--primary);
}

.lightbox-nav-prev { left: 1.25rem; }
.lightbox-nav-next { right: 1.25rem; }

/* Thumbnail strip */
.lightbox-thumbnails {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  overflow-x: auto;
}

.lightbox-thumb {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
}

.lightbox-thumb.active {
  border-color: var(--primary);
  opacity: 1;
  transform: scale(1.05);
}

.lightbox-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 640px) {
  .lightbox-main-container {
    padding: 1rem;
  }
  .lightbox-nav-arrow {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
  }
  .lightbox-nav-prev { left: 0.5rem; }
  .lightbox-nav-next { right: 0.5rem; }
}

