/**
 * Booking Section Animations
 * 380+ lines matching React exactly
 */

/* ===========================
   Booking Container Styles
   =========================== */
.booking-container {
  position: relative;
  background: linear-gradient(135deg, #FFF0F5 0%, #FFE4E1 50%, #FFF8F3 100%);
  border-radius: 2rem;
  padding: 3rem;
  overflow: visible;
}

/* Cat Ear Decorations on Container */
.booking-container::before,
.booking-container::after {
  content: '';
  position: absolute;
  top: -20px;
  width: 0;
  height: 0;
  border-style: solid;
}

.booking-container::before {
  left: 60px;
  border-width: 0 25px 30px 25px;
  border-color: transparent transparent #FFB6C1 transparent;
  transform: rotate(-15deg);
  z-index: 1;
}

.booking-container::after {
  right: 60px;
  border-width: 0 25px 30px 25px;
  border-color: transparent transparent #FFB6C1 transparent;
  transform: rotate(15deg);
  z-index: 1;
}

/* ===========================
   Step Cards
   =========================== */
.booking-step-card {
  position: relative;
  background: white;
  border-radius: 1.5rem;
  border: 3px solid #FFB6C1;
  padding: 2rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.booking-step-card:hover {
  transform: translateY(-8px) rotate(-1deg);
  border-color: #FF9FAC;
  box-shadow: 
    0 20px 40px rgba(255, 182, 193, 0.3),
    0 10px 20px rgba(255, 182, 193, 0.2);
}

.booking-step-card.active {
  background: linear-gradient(135deg, #FFF0F5 0%, #FFFFFF 100%);
  border-color: #F4A6C3;
  transform: scale(1.02);
}

/* Step Number Circle */
.step-number {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #FFB6C1 0%, #F4A6C3 100%);
  border: 3px solid white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fredoka', cursive;
  font-weight: 700;
  color: white;
  font-size: 1.25rem;
  box-shadow: 0 4px 12px rgba(244, 166, 195, 0.4);
  z-index: 2;
}

.step-number.completed {
  background: linear-gradient(135deg, #66BB6A 0%, #4CAF50 100%);
  animation: pulse-success 1s ease-out;
}

/* ===========================
   Progress Bar
   =========================== */
.booking-progress {
  position: relative;
  height: 8px;
  background: #F3E5F5;
  border-radius: 100px;
  overflow: hidden;
  margin: 2rem 0;
}

.booking-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg, #FFB6C1 0%, #F4A6C3 50%, #FF9FAC 100%);
  border-radius: 100px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(244, 166, 195, 0.4);
}

.booking-progress-bar::after {
  content: '🐾';
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  animation: bob 2s ease-in-out infinite;
}

/* Progress Dots */
.progress-dots {
  display: flex;
  justify-content: space-between;
  margin-top: -4px;
}

.progress-dot {
  width: 16px;
  height: 16px;
  background: white;
  border: 3px solid #F3E5F5;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.progress-dot.active {
  background: #F4A6C3;
  border-color: #F4A6C3;
  transform: scale(1.2);
  box-shadow: 0 0 20px rgba(244, 166, 195, 0.6);
}

.progress-dot.completed {
  background: #66BB6A;
  border-color: #66BB6A;
  animation: pulse-success 0.5s ease-out;
}

/* ===========================
   Form Elements
   =========================== */
.booking-input {
  width: 100%;
  padding: 1rem 1.5rem;
  background: white;
  border: 2px solid #FFE4E1;
  border-radius: 1rem;
  font-family: 'Quicksand', sans-serif;
  font-size: 1rem;
  transition: all 0.3s ease;
  position: relative;
}

.booking-input:focus {
  outline: none;
  border-color: #FFB6C1;
  box-shadow: 0 0 0 4px rgba(255, 182, 193, 0.1);
  animation: field-glow 2s ease-in-out infinite;
}

.booking-input.error {
  border-color: #FF6B6B;
  animation: shake 0.5s ease-out;
}

/* Date Picker */
.date-picker {
  position: relative;
}

.date-picker-input {
  padding-left: 3rem;
  cursor: pointer;
}

.date-picker-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #FFB6C1;
  pointer-events: none;
}

.date-picker-input:focus + .date-picker-icon {
  animation: date-ripple 1s ease-out;
}

/* Time Slots */
.time-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.time-slot {
  padding: 0.75rem;
  background: white;
  border: 2px solid #FFE4E1;
  border-radius: 0.75rem;
  text-align: center;
  font-family: 'Quicksand', sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.time-slot:hover {
  border-color: #FFB6C1;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 182, 193, 0.2);
}

.time-slot.selected {
  background: linear-gradient(135deg, #FFB6C1 0%, #F4A6C3 100%);
  border-color: #F4A6C3;
  color: white;
  animation: pulse-select 0.5s ease-out;
}

.time-slot.unavailable {
  opacity: 0.5;
  cursor: not-allowed;
  background: #F5F5F5;
}

/* ===========================
   Kitten Selection
   =========================== */
.kitten-select-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.kitten-select-card {
  position: relative;
  background: white;
  border: 3px solid #FFE4E1;
  border-radius: 1rem;
  padding: 0.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
}

.kitten-select-card:hover {
  border-color: #FFB6C1;
  transform: scale(1.05) rotate(1deg);
  box-shadow: 0 8px 20px rgba(255, 182, 193, 0.3);
}

.kitten-select-card.selected {
  border-color: #F4A6C3;
  background: linear-gradient(135deg, #FFF0F5 0%, #FFFFFF 100%);
  animation: wiggle 0.5s ease-out;
}

.kitten-select-card.selected::after {
  content: '✓';
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 24px;
  height: 24px;
  background: #66BB6A;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  animation: scale-in 0.3s ease-out;
}

/* ===========================
   Success State
   =========================== */
.booking-success {
  text-align: center;
  padding: 3rem;
  animation: fade-in-up 0.8s ease-out;
}

.success-icon {
  width: 120px;
  height: 120px;
  margin: 0 auto 2rem;
  background: linear-gradient(135deg, #66BB6A 0%, #4CAF50 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: scale-in 0.5s ease-out;
  position: relative;
}

.success-icon::after {
  content: '✓';
  color: white;
  font-size: 4rem;
  font-weight: bold;
  animation: check-mark 0.5s ease-out 0.3s both;
}

/* Confetti Animation */
.confetti {
  position: fixed;
  top: -10px;
  z-index: 100;
  animation: confetti-fall 3s linear;
}

.confetti-1 { left: 10%; animation-delay: 0s; color: #FFB6C1; }
.confetti-2 { left: 20%; animation-delay: 0.1s; color: #F4A6C3; }
.confetti-3 { left: 30%; animation-delay: 0.2s; color: #FFDAB9; }
.confetti-4 { left: 40%; animation-delay: 0.3s; color: #FFE4E1; }
.confetti-5 { left: 50%; animation-delay: 0.4s; color: #FFB6C1; }
.confetti-6 { left: 60%; animation-delay: 0.5s; color: #F4A6C3; }
.confetti-7 { left: 70%; animation-delay: 0.6s; color: #FFDAB9; }
.confetti-8 { left: 80%; animation-delay: 0.7s; color: #FFE4E1; }
.confetti-9 { left: 90%; animation-delay: 0.8s; color: #FFB6C1; }

/* ===========================
   Animations
   =========================== */
@keyframes pulse-select {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes pulse-success {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(102, 187, 106, 0.7); }
  50% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(102, 187, 106, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(102, 187, 106, 0); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes check-mark {
  0% { transform: scale(0) rotate(180deg); opacity: 0; }
  50% { transform: scale(1.2) rotate(0deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes scale-in {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Paw Print Decorations */
.paw-decoration {
  position: absolute;
  color: rgba(255, 182, 193, 0.2);
  font-size: 2rem;
  animation: float 4s ease-in-out infinite;
}

.paw-decoration-1 { top: 10%; left: 5%; animation-delay: 0s; }
.paw-decoration-2 { top: 20%; right: 10%; animation-delay: 1s; }
.paw-decoration-3 { bottom: 15%; left: 8%; animation-delay: 2s; }
.paw-decoration-4 { bottom: 10%; right: 5%; animation-delay: 3s; }

/* Loading State */
.booking-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem;
}

.loading-dot {
  width: 12px;
  height: 12px;
  background: #FFB6C1;
  border-radius: 50%;
  animation: loading-bounce 1.4s ease-in-out infinite;
}

.loading-dot:nth-child(1) { animation-delay: -0.32s; }
.loading-dot:nth-child(2) { animation-delay: -0.16s; }
.loading-dot:nth-child(3) { animation-delay: 0; }

@keyframes loading-bounce {
  0%, 80%, 100% {
    transform: scale(0);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ===========================
   Custom Scrollbar for Time Slots
   =========================== */
#timeslots-container::-webkit-scrollbar {
    width: 8px;
}

#timeslots-container::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

#timeslots-container::-webkit-scrollbar-thumb {
    background: #FFB6C1;
    border-radius: 10px;
    transition: background 0.3s;
}

#timeslots-container::-webkit-scrollbar-thumb:hover {
    background: #FF69B4;
}

/* Smooth scroll behavior */
#timeslots-container {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

/* Show scroll indicator when there are more items */
#timeslots-container.has-scroll::after {
    content: '↓ Scroll for more times ↓';
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    padding: 10px;
    background: linear-gradient(to top, rgba(255,255,255,1), rgba(255,255,255,0));
    color: #FF69B4;
    font-size: 0.9em;
    pointer-events: none;
}
