/**
 * SwipeHint – Reusable Swipe Hint Component CSS
 * Pill tối với nút ‹ › và icon bàn tay ở giữa.
 */

/* ----------------------------------------------------------------
   .sh-pill – Pill container, ẩn mặc định
   ---------------------------------------------------------------- */
.sh-pill {
  position: absolute;
  top: 38%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  user-select: none;

  /* Layout: icon + nút */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;

  /* Visual: pill tối + frosted glass */
  background: rgba(35, 35, 35, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 999px;
  padding: 10px 28px;

  /* Ẩn mặc định */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.4s ease,
    visibility 0.4s ease;
}

/* ----------------------------------------------------------------
   State: sh-visible
   ---------------------------------------------------------------- */
.sh-visible .sh-pill {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.sh-visible .sh-icon {
  animation: sh-hand-slide 0.85s ease-in-out 3;
}

/* ----------------------------------------------------------------
   State: sh-hidden
   ---------------------------------------------------------------- */
.sh-hidden .sh-pill {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.5s ease,
    visibility 0.5s ease;
}

.sh-hidden .sh-icon {
  animation: none;
}

/* ----------------------------------------------------------------
   Prev / Next buttons
   ---------------------------------------------------------------- */
.sh-prev,
.sh-next {
  background: transparent !important;
  border: none !important;
  outline: none !important;
  padding: 2px !important;
  margin: 0 !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.88);
  transition: opacity 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}

.sh-prev:hover,
.sh-next:hover {
  opacity: 0.65;
  transform: scale(1.15);
}

/* ----------------------------------------------------------------
   Center icon
   ---------------------------------------------------------------- */
.sh-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  flex-shrink: 0;
}

/* ----------------------------------------------------------------
   Animation: chỉ icon bàn tay trượt qua lại gợi ý swipe
   ---------------------------------------------------------------- */
@keyframes sh-hand-slide {
  0%   { transform: translateX(0); }
  25%  { transform: translateX(-10px); }
  75%  { transform: translateX(10px); }
  100% { transform: translateX(0); }
}

/* ----------------------------------------------------------------
   Desktop: luôn ẩn khi ở giao diện Grid (>= 1024px)
   ---------------------------------------------------------------- */
@media (min-width: 1024px) {
  .sh-pill {
    display: none !important;
  }
}
