/* Mockup Carousel Styles */

.preview-carousel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* Fixed-size viewport — prevents layout shift between sticker and mockup */
.carousel-viewport {
  position: relative;
  width: 280px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 12px;
  background: var(--color-bg-light, #f8f8f8);
  cursor: pointer;
}

@media (min-width: 800px) {
  .carousel-viewport {
    width: 350px;
    height: 350px;
  }
}

/* Arrow buttons */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: white;
  border: 1px solid var(--color-border-light, #e0e0e0);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: box-shadow 0.2s, border-color 0.2s;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.carousel-arrow svg {
  width: 18px;
  height: 18px;
  stroke: var(--color-text, #333);
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.carousel-arrow:hover,
.carousel-arrow:focus {
  transform: translateY(-50%);
  border-color: var(--color-primary, #6c5ce7);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  background: white;
}

.carousel-arrow-left {
  left: 4px;
}

.carousel-arrow-right {
  right: 4px;
}

@media (min-width: 800px) {
  .carousel-arrow {
    width: 40px;
    height: 40px;
  }

  .carousel-arrow svg {
    width: 20px;
    height: 20px;
  }

  .carousel-arrow-left {
    left: 6px;
  }

  .carousel-arrow-right {
    right: 6px;
  }
}

/* Dot indicators */
.carousel-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 0.6em;
}

button.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-border, #ccc);
  transition: background 0.2s, transform 0.2s;
  cursor: pointer;
  border: none;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.carousel-dot.active {
  background: var(--color-primary, #6c5ce7);
  transform: scale(1.25);
}

/* Loading spinner overlay */
.carousel-loading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  z-index: 5;
}

.spinner-small {
  width: 28px;
  height: 28px;
  border: 3px solid var(--color-border, #ccc);
  border-top: 3px solid var(--color-primary, #6c5ce7);
  border-radius: 50%;
  animation: carousel-spin 0.7s linear infinite;
}

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

/* Mockup image style - override sticker filter when showing mockup */
.results-image.mockup-view {
  filter: none;
  -webkit-filter: none;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  border-radius: 8px;
}
