/* swipe-gestures.css — Touch swipe gesture feedback styles */

/* Swipe target styles */
[data-swipe-left],
[data-swipe-right],
[data-swipe-up],
[data-swipe-down] {
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

/* Active/drag state feedback */
[data-swipe-left]:active,
[data-swipe-right]:active,
[data-swipe-up]:active,
[data-swipe-down]:active {
  opacity: 0.8;
  transition: opacity 0.1s ease;
}

/* Swipe hint indicator */
.swipe-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: Inter, sans-serif;
  font-size: 11px;
  color: #8e7164;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 10px;
  border: 1px solid #8e7164;
  border-radius: 12px;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.swipe-hint:hover {
  opacity: 1;
}

.swipe-hint-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
}

/* Swipe direction indicators */
.swipe-hint-left::after {
  content: '←';
}

.swipe-hint-right::after {
  content: '→';
}

.swipe-hint-up::after {
  content: '↑';
}

.swipe-hint-down::after {
  content: '↓';
}

/* Swipe feedback animation */
@keyframes swipe-feedback {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

[data-swipe-left].swiped,
[data-swipe-right].swiped,
[data-swipe-up].swiped,
[data-swipe-down].swiped {
  animation: swipe-feedback 0.3s ease;
}

/* Carousel/slider styles (common swipe use case) */
.swipe-carousel {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.swipe-carousel-inner {
  display: flex;
  transition: transform 0.3s ease;
}

.swipe-carousel-item {
  flex: 0 0 100%;
  width: 100%;
}

/* Carousel indicators */
.swipe-carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 16px 0;
}

.swipe-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c4c7c7;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.swipe-carousel-dot.active {
  background: #FF6600;
  width: 24px;
  border-radius: 4px;
}

.swipe-carousel-dot:focus-visible {
  outline: 2px solid #FF6600;
  outline-offset: 2px;
}

/* Swipe container touch feedback */
.swipe-container {
  position: relative;
  overflow: hidden;
}

.swipe-container::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    135deg,
    rgba(255, 102, 0, 0) 0%,
    rgba(255, 102, 0, 0.05) 50%,
    rgba(255, 102, 0, 0) 100%
  );
  opacity: 0;
  transition: opacity 0.2s ease;
}

.swipe-container.active::after {
  opacity: 1;
}

/* Mobile optimizations */
@media (max-width: 600px) {
  [data-swipe-left],
  [data-swipe-right],
  [data-swipe-up],
  [data-swipe-down] {
    cursor: grab;
  }

  [data-swipe-left]:active,
  [data-swipe-right]:active,
  [data-swipe-up]:active,
  [data-swipe-down]:active {
    cursor: grabbing;
  }

  .swipe-hint {
    font-size: 10px;
    padding: 5px 8px;
  }

  .swipe-carousel-dot {
    width: 6px;
    height: 6px;
  }

  .swipe-carousel-dot.active {
    width: 20px;
  }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .swipe-carousel-inner,
  .swipe-carousel-dot,
  .swipe-hint,
  [data-swipe-left],
  [data-swipe-right],
  [data-swipe-up],
  [data-swipe-down] {
    transition: none;
  }

  [data-swipe-left].swiped,
  [data-swipe-right].swiped,
  [data-swipe-up].swiped,
  [data-swipe-down].swiped {
    animation: none;
  }
}
