/* ===================================
   Portfolio Lightbox Modal Styles
   Whistol Website
   =================================== */

.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox-modal.active {
  display: flex;
  opacity: 1;
}

/* Backdrop */
.lightbox-modal__backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1;
}

/* Content Container */
.lightbox-modal__content {
  position: relative;
  z-index: 2;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: lightboxZoomIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes lightboxZoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Close Button */
.lightbox-modal__close {
  position: absolute;
  top: -50px;
  right: 0;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: var(--text-white);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-in-out);
  z-index: 3;
}

.lightbox-modal__close:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: rotate(90deg);
}

.lightbox-modal__close svg {
  width: 24px;
  height: 24px;
}

/* Image Wrapper */
.lightbox-modal__image-wrapper {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-2xl);
  max-width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

/* Image */
.lightbox-modal__image {
  width: 100%;
  height: auto;
  max-height: calc(90vh - 80px);
  object-fit: contain;
  display: block;
}

/* Title */
.lightbox-modal__title {
  padding: var(--spacing-6);
  text-align: center;
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--text-dark);
  background: var(--bg-white);
  margin: 0;
  border-top: 1px solid var(--border-light);
}

/* Prevent Body Scroll */
body.lightbox-open {
  overflow: hidden;
}

/* Responsive */
@media (max-width: 768px) {
  .lightbox-modal__content {
    max-width: 95vw;
    max-height: 95vh;
  }

  .lightbox-modal__close {
    top: -45px;
    right: 5px;
    width: 40px;
    height: 40px;
  }

  .lightbox-modal__close svg {
    width: 20px;
    height: 20px;
  }

  .lightbox-modal__title {
    font-size: var(--text-xl);
    padding: var(--spacing-4);
  }

  .lightbox-modal__image {
    max-height: calc(95vh - 60px);
  }
}
