/* App.css - Common UI Styles */

/* --- Gallery / Lightbox Styles --- */
.gallery-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.gallery-modal.minimized {
  width: 320px;
  height: 180px;
  top: auto;
  left: auto;
  bottom: 20px;
  right: 20px;
  border-radius: 12px;
  overflow: hidden;
  background-color: #1e1e1e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.gallery-modal.minimized .gallery-thumbnails,
.gallery-modal.minimized .gallery-toolbar {
  display: none;
}

.gallery-modal.visible {
  opacity: 1;
  visibility: visible;
}

/* Toolbar */
.gallery-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  color: white;
  z-index: 10;
}

.gallery-counter {
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0.8;
}

.gallery-actions button {
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: 0.5rem;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.gallery-actions button:hover {
  opacity: 1;
}

/* Main Visibility Area */
.gallery-main {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-main .swiper {
  width: 100%;
  height: 100%;
}

.gallery-main .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.gallery-image-wrapper {
  transition: transform 0.3s ease;
  cursor: zoom-in;
}

.gallery-image-wrapper.zoomed {
  cursor: zoom-out;
  cursor: grab;
}

.gallery-image-wrapper.zoomed:active {
  cursor: grabbing;
}

.gallery-image-wrapper img {
  max-width: 100%;
  max-height: 100vh;
  object-fit: contain;
  user-select: none;
}

.gallery-modal.minimized .gallery-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Thumbnails */
.gallery-thumbnails {
  height: 100px;
  padding: 10px 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
}

.gallery-thumbnails .swiper {
  height: 100%;
  padding: 0 20px;
}

.gallery-thumbnails .swiper-slide {
  width: 120px;
  height: 100%;
  opacity: 0.4;
  cursor: pointer;
  transition: opacity 0.2s;
  border-radius: 4px;
  overflow: hidden;
  border: 2px solid transparent;
}

.gallery-thumbnails .swiper-slide-thumb-active {
  opacity: 1;
  border-color: #3b82f6;
}

.gallery-thumbnails img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Navigation Buttons */
.gallery-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 10;
}

.gallery-nav-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.gallery-prev {
  left: 20px;
}
.gallery-next {
  right: 20px;
}

@media (max-width: 768px) {
  .gallery-thumbnails {
    display: none;
  }
}
