/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* ========================================
   iOS Style Rolling DateTime Picker
   ======================================== */

.datetime-picker-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 0;
  height: 12rem;
  overflow: hidden;
  border-radius: 0.75rem;
  background: #18181b;
  border: 1px solid #3f3f46;
  padding: 0;
}

.picker-highlight {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2.75rem;
  transform: translateY(-50%);
  border-radius: 0;
  pointer-events: none;
  z-index: 10;
  background: rgba(168, 85, 247, 0.15);
  border-top: 1px solid rgba(168, 85, 247, 0.3);
  border-bottom: 1px solid rgba(168, 85, 247, 0.3);
}

.picker-column {
  flex: 1;
  overflow-y: scroll;
  scroll-snap-type: none;
  padding: 5.5rem 0;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.picker-column::-webkit-scrollbar {
  display: none;
}

.picker-item {
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  transition: all 150ms;
  font-size: 16px;
  color: #e4e4e7;
}

.picker-item.selected {
  font-weight: 700;
  font-size: 18px;
  color: #a855f7;
}

/* 스페이서: 터치 스크롤이 끝에서 막히지 않도록 여유 공간 확보 */
.picker-spacer {
  height: 2.75rem;
  flex-shrink: 0;
}

/* Fade effect at top and bottom */
.datetime-picker-wrapper::before,
.datetime-picker-wrapper::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 4rem;
  pointer-events: none;
  z-index: 20;
}

.datetime-picker-wrapper::before {
  top: 0;
  background: linear-gradient(to bottom, #18181b, transparent);
}

.datetime-picker-wrapper::after {
  bottom: 0;
  background: linear-gradient(to top, #18181b, transparent);
}

/* Compact version for smaller screens */
.datetime-picker-wrapper.datetime-picker-compact {
  height: 9.375rem;
}

.datetime-picker-wrapper.datetime-picker-compact .picker-column {
  padding: 3.3125rem 0;
}

/* Picker bounce effect when reaching boundary */
.picker-bounce {
  animation: picker-bounce-shake 0.2s ease-out;
}

@keyframes picker-bounce-shake {
  0%, 100% { transform: translateY(0); }
  25% { transform: translateY(-3px); }
  50% { transform: translateY(3px); }
  75% { transform: translateY(-2px); }
}

/* ========================================
   Credit Insufficient Button Warning
   ======================================== */

.credit-insufficient {
  background: linear-gradient(to right, #ef4444, #dc2626) !important;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3) !important;
  animation: pulse-warning 2s ease-in-out infinite;
}

.credit-insufficient:hover {
  background: linear-gradient(to right, #f87171, #ef4444) !important;
}

@keyframes pulse-warning {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.85;
  }
}

/* ========================================
   Mobile Touch Scroll Optimization
   모바일에서 스크롤 끝에 도달해도 터치가 막히지 않도록
   ======================================== */

/* 가로 스크롤 컨테이너 */
.overflow-x-auto,
.snap-x {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: auto;
  overscroll-behavior-y: contain;
}

/* 세로 스크롤 컨테이너 */
.overflow-y-auto,
.snap-y {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto;
}

/* 스크롤바 숨기기 유틸리티 */
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}
