/* Custom animations and transitions - GPU accelerated */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translate3d(50px, 0, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes slideOutLeft {
  from {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }

  to {
    opacity: 0;
    transform: translate3d(-50px, 0, 0);
  }
}

.slide-enter {
  animation: slideInRight 0.3s ease-out forwards;
  will-change: transform, opacity;
}

.slide-exit {
  animation: slideOutLeft 0.3s ease-out forwards;
  will-change: transform, opacity;
}

/* Progress Bar Styling */
.progress-bar-fill {
  transition: width 0.3s ease-in-out;
  background: linear-gradient(90deg, #1c58e0, #3b82f6);
}

/* Custom Button Hover Effects - GPU accelerated */
.btn-primary {
  transition: transform 0.15s ease, opacity 0.15s ease;
  will-change: transform;
}

.btn-primary:hover {
  transform: translate3d(0, -2px, 0) scale(1.02);
  opacity: 0.95;
}

/* Card Styling - GPU accelerated */
.option-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
  will-change: transform;
}

.option-card:hover {
  transform: translate3d(0, -2px, 0);
  box-shadow: 0 10px 25px rgba(28, 88, 224, 0.15);
}

.option-card.selected {
  border-color: #1c58e0;
  background-color: rgba(28, 88, 224, 0.05);
  box-shadow: 0 0 0 2px #1c58e0;
}

/* Input Styling */
.form-input {
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus {
  outline: none;
  border-color: #1c58e0;
  box-shadow: 0 0 0 3px rgba(28, 88, 224, 0.1);
}

/* Checkbox Styling */
.custom-checkbox {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #cbd5e1;
  border-radius: 0;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.custom-checkbox:checked {
  background-color: #1c58e0;
  border-color: #1c58e0;
}

.custom-checkbox:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 14px;
  font-weight: bold;
}

/* Loading Spinner */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.spinner {
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

/* Responsive Image Grid */
.image-option img {
  max-width: 100%;
  height: auto;
  border-radius: 0;
}

/* Fade transitions */
.fade-in {
  animation: fadeIn 0.3s ease-in forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* --- Global Overrides for White Background --- */
body {
  background-color: #ffffff;
  color: #1e293b;
}

/* --- Liquid Glass System --- */
.glass-liquid {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.08),
    inset 0 0 20px rgba(255, 255, 255, 0.5);
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-liquid::before {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 200%;
  height: 100%;
  background: linear-gradient(115deg,
      transparent 40%,
      rgba(255, 255, 255, 0.1) 45%,
      rgba(255, 255, 255, 0.2) 50%,
      rgba(255, 255, 255, 0.1) 55%,
      transparent 60%);
  transform: skewX(-20deg) translateX(-150%);
  transition: transform 0.0s;
  pointer-events: none;
}

.glass-liquid:hover::before {
  transform: skewX(-20deg) translateX(150%);
  transition: transform 0.7s ease-in-out;
}

/* Branded Borders & Selection States */
.border-liquid-blue:hover,
.selected-blue {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.1), inset 0 0 10px rgba(59, 130, 246, 0.02) !important;
}

.selected-blue {
  background: linear-gradient(160deg, rgba(59, 130, 246, 0.05) 0%, rgba(255, 255, 255, 0.7) 100%) !important;
}

.border-liquid-purple:hover,
.selected-purple {
  border-color: #9d5ac7 !important;
  box-shadow: 0 0 20px rgba(157, 90, 199, 0.1), inset 0 0 10px rgba(157, 90, 199, 0.02) !important;
}

.selected-purple {
  background: linear-gradient(160deg, rgba(157, 90, 199, 0.05) 0%, rgba(255, 255, 255, 0.7) 100%) !important;
}

.border-liquid-red:hover,
.selected-red {
  border-color: #e82127 !important;
  box-shadow: 0 0 20px rgba(232, 33, 39, 0.1), inset 0 0 10px rgba(232, 33, 39, 0.02) !important;
}

.selected-red {
  background: linear-gradient(160deg, rgba(232, 33, 39, 0.05) 0%, rgba(255, 255, 255, 0.7) 100%) !important;
}

.border-liquid-green:hover,
.selected-green {
  border-color: #7be60f !important;
  box-shadow: 0 0 20px rgba(123, 230, 15, 0.1), inset 0 0 10px rgba(123, 230, 15, 0.02) !important;
}

.selected-green {
  background: linear-gradient(160deg, rgba(123, 230, 15, 0.05) 0%, rgba(255, 255, 255, 0.7) 100%) !important;
}

/* Override existing option-card if necessary */
.option-card {
  border-radius: 1rem;
}

/* Animation for success */
@keyframes checkmark {
  0% {
    transform: scale(0);
    opacity: 0;
  }

  50% {
    transform: scale(1.2);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.success-checkmark {
  animation: checkmark 0.5s ease-out forwards;
}

/* Larger Slider Thumb */
.slider-lg::-webkit-slider-thumb {
  appearance: none;
  width: 28px;
  height: 28px;
  background: #7be60f;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(123, 230, 15, 0.5);
  transition: transform 0.1s ease;
  margin-top: -8px;
  /* Corrects alignment */
}

.slider-lg::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.slider-lg::-moz-range-thumb {
  width: 28px;
  height: 28px;
  background: #7be60f;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(123, 230, 15, 0.5);
  border: none;
  transition: transform 0.1s ease;
}

.slider-lg::-moz-range-thumb:hover {
  transform: scale(1.2);
}

/* Ensure track alignment for custom thumb */
.slider-lg::-webkit-slider-runnable-track {
  height: 12px;
  border-radius: 6px;
  background: #e2e8f0;
}

.slider-lg::-moz-range-track {
  height: 12px;
  border-radius: 6px;
  background: #e2e8f0;
}

/* Remove default focus outline for cleaner look since we have custom rings */
.slider-lg:focus {
  outline: none;
}

/* Shimmer Animation for 'Le + Vendu' tag */
@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.animate-shimmer {
  background: linear-gradient(90deg, #3b82f6 0%, #4f8df7 25%, #60a5fa 50%, #4f8df7 75%, #3b82f6 100%);
  background-size: 200% 100%;
  animation: shimmer 4s infinite linear;
}