/*
 * Showroom Component Styles
 * Vertical slideshow viewer for media files
 */

/* Overlay */
.showroom-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  color: #fff;
}

/* Container */
.showroom-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: none;
}

/* Top Bar */
.showroom-top-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, transparent 100%);
}

/* Index Display */
.showroom-index {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.9);
  min-width: 80px;
}

/* Controls - NextJS Style */
.showroom-controls {
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  font-size: 13px;
}

/* Timer */
.showroom-timer {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.9);
  min-width: 50px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  padding: 0 4px;
}

/* Separator */
.showroom-separator {
  width: 1px;
  height: 16px;
  background: rgba(255,255,255,0.3);
  margin: 0 6px;
}

/* Buttons */
.showroom-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  transition: background 0.15s;
  padding: 4px;
}

.showroom-btn:hover {
  background: rgba(255,255,255,0.1);
}

.showroom-btn.active {
  color: #3b82f6;
}

.showroom-btn.inactive {
  opacity: 0.4;
}

/* Dropdown Arrow */
.dropdown-arrow {
  font-size: 10px;
  opacity: 0.7;
  margin-left: 2px;
}

.showroom-btn-text {
  width: auto;
  height: 28px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 2px;
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
}

/* Close Button */
.showroom-close-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.showroom-close-btn:hover {
  background: rgba(255,255,255,0.2);
  transform: scale(1.1);
}

/* Dropdown Menus */
.showroom-delay-control,
.showroom-speed-control,
.showroom-volume-control {
  position: relative;
  display: flex;
  align-items: center;
}

.showroom-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  padding: 4px;
  min-width: 60px;
  z-index: 20;
}

.showroom-menu button {
  display: block;
  width: 100%;
  padding: 6px 12px;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: #fff;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}

.showroom-menu button:hover {
  background: rgba(255,255,255,0.1);
}

.showroom-menu button.selected {
  font-weight: 600;
}

/* Volume Slider Menu */
.showroom-volume-menu {
  padding: 12px 16px;
  min-width: 160px;
}

.showroom-volume-slider {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255,255,255,0.3);
  border-radius: 3px;
  cursor: pointer;
}

.showroom-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.showroom-volume-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Slides Wrapper */
.showroom-slides-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  will-change: transform;
}

/* Slide */
.showroom-slide {
  position: absolute;
  left: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 70px 20px 100px;
  box-sizing: border-box;
  transition: opacity 0.3s;
}
/* Note: top position is set dynamically by JavaScript */

/* Media Elements */
.showroom-media {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.showroom-video {
  background: #000;
}

.showroom-image {
  background: transparent;
  cursor: zoom-in;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  will-change: transform;
}

.showroom-image.zoomed {
  cursor: grab;
}

.showroom-image.dragging {
  cursor: grabbing;
}

/* Slide Info - Hidden by default */
.showroom-slide-info {
  display: none;
}

/* Indicators (Right Side) */
.showroom-indicators {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 10;
}

.showroom-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
}

.showroom-indicator:hover {
  background: rgba(255,255,255,0.6);
  transform: scale(1.2);
}

.showroom-indicator.active {
  background: #fff;
  transform: scale(1.3);
}

.showroom-indicator.video {
  border: 2px solid rgba(59, 130, 246, 0.6);
}

.showroom-indicator.video.active {
  background: #3b82f6;
  border-color: #3b82f6;
}

/* Keyboard Hints */
.showroom-keyboard-hint {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 24px;
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  transition: opacity 0.3s;
  z-index: 10;
}

/* Zoom hint for desktop */
.showroom-keyboard-hint::after {
  content: '• 더블클릭 줌';
}

/* Hide on mobile */
@media (max-width: 768px) {
  .showroom-keyboard-hint {
    display: flex;
    font-size: 11px;
    padding: 8px 14px;
    gap: 8px;
  }

  .showroom-keyboard-hint::after {
    content: '• 더블탭 줌';
  }

  .showroom-controls {
    padding: 4px 8px;
    gap: 2px;
  }

  .showroom-btn {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .showroom-btn-text {
    padding: 0 8px;
    font-size: 12px;
  }

  .showroom-indicators {
    right: 8px;
    gap: 6px;
  }

  .showroom-indicator {
    width: 8px;
    height: 8px;
  }
}

/* Video Controls Override */
.showroom-video::-webkit-media-controls {
  display: flex !important;
}

/* Loading State */
.showroom-slide.loading::after {
  content: '';
  position: absolute;
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255,255,255,0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: showroom-spin 0.8s linear infinite;
}

@keyframes showroom-spin {
  to { transform: rotate(360deg); }
}

/* Error State */
.showroom-slide.error::after {
  content: '미디어를 불러올 수 없습니다';
  position: absolute;
  font-size: 14px;
  color: rgba(255,255,255,0.6);
}
