/**
 * Snapchat Video Splitter & Studio Stylesheet
 * Location: css/views/video-splitter.css
 */

/* Navigation tabs */
.nav-tabs-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  width: 100%;
  max-width: 100%;
  justify-content: center;
}

.nav-tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  font-weight: 600;
  font-size: 0.8125rem;
  border-radius: 9999px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  color: #9ca3af;
  background: rgba(31, 41, 55, 0.7);
  border: 1px solid rgba(75, 85, 99, 0.5);
  max-width: 100%;
  white-space: nowrap;
}

@media (min-width: 640px) {
  .nav-tab-btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    gap: 0.5rem;
  }
}

.nav-tab-btn:hover {
  color: #ffffff;
  background: rgba(55, 65, 81, 0.9);
}

.nav-tab-btn.active {
  color: #000000;
  background: #fffc00;
  border-color: #fffc00;
  box-shadow: 0 0 16px rgba(255, 252, 0, 0.35);
  font-weight: 700;
}

/* Mobile Swipe Indicator Dots */
.mobile-swipe-indicators {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  margin-top: 0.5rem;
}

.swipe-dot {
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: #4b5563;
  transition: all 0.2s ease;
}

.swipe-dot.active {
  width: 18px;
  background: #fffc00;
  box-shadow: 0 0 8px rgba(255, 252, 0, 0.4);
}

@media (min-width: 1024px) {
  .mobile-swipe-indicators {
    display: none;
  }
}

/* ==============================================================
   SWIPE CAROUSEL SYSTEM: Smooth swipe on mobile, preserved desktop
   ============================================================== */
.views-swipe-container {
  width: 100%;
  max-width: 100%;
  position: relative;
}

@media (max-width: 1023px) {
  .views-swipe-container {
    overflow: hidden;
    touch-action: pan-y pinch-zoom;
  }

  .views-swipe-track {
    display: flex;
    width: 200%;
    transition: transform 0.32s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
  }

  .views-swipe-track.active-tab-0 {
    transform: translateX(0%);
  }

  .views-swipe-track.active-tab-1 {
    transform: translateX(-50%);
  }

  .swipe-slide {
    width: 50%;
    min-width: 50%;
    box-sizing: border-box;
    flex-shrink: 0;
    padding: 0 0.25rem;
  }
}

/* Desktop layout preserved exactly as before */
@media (min-width: 1024px) {
  .views-swipe-container {
    overflow: visible;
  }

  .views-swipe-track {
    display: block;
    width: 100%;
    transform: none !important;
    transition: none !important;
  }

  .swipe-slide {
    width: 100%;
    display: block;
  }

  .views-swipe-track.active-tab-0 #swipe-slide-0 {
    display: block !important;
  }
  .views-swipe-track.active-tab-0 #swipe-slide-1 {
    display: none !important;
  }

  .views-swipe-track.active-tab-1 #swipe-slide-0 {
    display: none !important;
  }
  .views-swipe-track.active-tab-1 #swipe-slide-1 {
    display: block !important;
  }
}

/* Dropzone Styling */
.snap-dropzone-box {
  background: radial-gradient(circle at 50% 0%, rgba(31, 41, 55, 0.8), rgba(17, 24, 39, 0.95));
  border: 2px dashed rgba(255, 252, 0, 0.35);
  border-radius: 1rem;
  padding: 2rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
}

@media (min-width: 640px) {
  .snap-dropzone-box {
    padding: 3rem 1.5rem;
  }
}

.snap-dropzone-box:hover {
  border-color: #fffc00;
  background: radial-gradient(circle at 50% 0%, rgba(31, 41, 55, 1), rgba(17, 24, 39, 1));
  box-shadow: 0 0 25px rgba(255, 252, 0, 0.15);
}

.snap-dropzone-box.drag-active {
  border-color: #fffc00;
  background: rgba(255, 252, 0, 0.05);
  box-shadow: 0 0 30px rgba(255, 252, 0, 0.3);
  transform: scale(1.01);
}

/* Preset Chips */
.snap-preset-chip {
  cursor: pointer;
  user-select: none;
  max-width: 100%;
}

.snap-preset-chip.active {
  background: #fffc00 !important;
  color: #000000 !important;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(255, 252, 0, 0.3);
}

/* Responsive Tile Grid - Never exceeds phone width */
.snap-clips-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  width: 100%;
  max-width: 100%;
}

@media (min-width: 440px) {
  .snap-clips-grid {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 1.15rem;
  }
}

@media (min-width: 768px) {
  .snap-clips-grid {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1.25rem;
  }
}

/* Clip Tile Cards */
.snap-clip-card {
  width: 100%;
  max-width: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
}

.snap-clip-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.6), 0 0 15px rgba(255, 252, 0, 0.15);
}

/* Progress bar animation */
.snap-progress-gradient {
  background: linear-gradient(90deg, #fffc00, #ffe600, #facc15);
  box-shadow: 0 0 12px rgba(255, 252, 0, 0.5);
  transition: width 0.25s ease-out;
}

/* Custom switch */
.snap-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.snap-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.snap-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #4b5563;
  transition: .2s;
  border-radius: 24px;
}

.snap-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .2s;
  border-radius: 50%;
}

input:checked + .snap-slider {
  background-color: #fffc00;
}

input:checked + .snap-slider:before {
  transform: translateX(20px);
  background-color: #000000;
}
