/* PhotoSwipe Custom Styles for Inchcape */

/* Zoom overlay indicator for images */
.vehicle-frame-link {
  position: relative;
  display: block;
  cursor: zoom-in;
}

.zoom-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 26, 65, 0.8);
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  backdrop-filter: blur(4px);
}

.vehicle-frame-link:hover .zoom-overlay {
  opacity: 1;
}

.vehicle-frame-link:hover .vehicle-frame {
  opacity: 0.9;
}

/* PhotoSwipe UI customization */
.pswp__button {
  background-color: rgba(0, 26, 65, 0.5) !important;
  backdrop-filter: blur(4px);
}

.pswp__button:hover {
  background-color: rgba(0, 26, 65, 0.8) !important;
}

/* Video Thumbnail Styles */
.video-thumbnail-wrapper {
  position: relative;
  cursor: pointer;
  display: block;
  border-radius: 12px;
  overflow: hidden;
}

.video-thumbnail-wrapper::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
  pointer-events: none;
}

.video-thumbnail-wrapper:hover::before {
  opacity: 1;
}

.video-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70px;
  height: 70px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 2;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.video-thumbnail-wrapper:hover .video-play-overlay {
  background-color: #ffffff;
  transform: translate(-50%, -50%) scale(1.1);
}

.video-play-overlay svg {
  width: 32px;
  height: 32px;
  fill: #001a41;
  margin-left: 4px;
}

/* Video Modal */
#video-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

#video-modal.active {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.video-modal-content {
  position: relative;
  width: 90%;
  max-width: 1400px;
  max-height: 90vh;
}

.video-modal-close {
  position: absolute;
  top: -50px;
  right: 0;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  color: #ffffff;
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  padding: 0;
}

.video-modal-close svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

.video-modal-close:hover {
  background: rgba(255, 255, 255, 0.9);
  color: #001a41;
  transform: rotate(90deg);
}

#modal-video-player {
  width: 100%;
  height: auto;
  max-height: 90vh;
  background: #000;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* Better mobile touch targets */
@media (max-width: 768px) {
  .zoom-overlay {
    width: 50px;
    height: 50px;
  }

  .video-play-overlay {
    width: 60px;
    height: 60px;
  }

  .video-play-overlay svg {
    width: 28px;
    height: 28px;
  }

  .video-modal-content {
    width: 95%;
  }

  .video-modal-close {
    top: -45px;
    width: 40px;
    height: 40px;
    font-size: 24px;
  }
}
