/* Custom Styles for MotorRadar SA — One-Stop South African Car Search */

html { 
  scroll-behavior: smooth; 
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Glassmorphism Styles */
.glass-header {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

/* Custom Select styling with SVG arrow */
.custom-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1.25em 1.25em;
  padding-right: 2.25rem;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* Range Slider Styling */
.custom-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: #334155;
  border-radius: 9999px;
  outline: none;
}
.custom-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #06b6d4;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.5);
  border: 2px solid #0f172a;
}
.custom-range::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  background: #22d3ee;
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.8);
}
.custom-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #06b6d4;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  border: 2px solid #0f172a;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.5);
}
.custom-range::-moz-range-thumb:hover {
  transform: scale(1.15);
  background: #22d3ee;
}

/* Hide scrollbar for tabs but allow scrolling */
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.8; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.04); }
}

.result-card {
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.sticky-tray-anim {
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Modal styling */
.modal-backdrop {
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* Heart favorite button pulse */
.heart-active {
  fill: #f43f5e;
  color: #f43f5e !important;
  transform: scale(1.15);
  transition: all 0.15s ease;
}

/* Quick tag active state */
.quick-tag-active {
  background-color: #06b6d4 !important;
  color: #0f172a !important;
  border-color: #06b6d4 !important;
  box-shadow: 0 4px 16px rgba(6, 182, 212, 0.35);
  font-weight: 800 !important;
}

/* Table zebra striping in comparison */
.comparison-table tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.03);
}

/* Mobile Safe Bottom Navigation Padding */
@media (max-width: 768px) {
  body {
    padding-bottom: 72px;
  }
}

/* Interactive Photo Gallery & Swipe Carousel */
.gallery-nav-btn {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: white;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
  cursor: pointer;
  pointer-events: auto !important;
}
.gallery-nav-btn * {
  pointer-events: none !important;
}
.gallery-nav-btn:hover {
  background: rgba(15, 23, 42, 0.98);
  border-color: rgba(6, 182, 212, 0.9);
  color: #22d3ee;
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.5);
}
.gallery-nav-btn:active {
  background: rgba(6, 182, 212, 0.25);
}

.gallery-dot {
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.4);
  transition: all 0.25s ease;
}
.gallery-dot.active {
  width: 16px;
  background: #06b6d4;
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.8);
}

.gallery-thumb {
  transition: all 0.2s ease;
  cursor: pointer;
  border: 2px solid transparent;
}
.gallery-thumb:hover {
  transform: translateY(-2px);
  border-color: rgba(6, 182, 212, 0.4);
}
.gallery-thumb.active {
  border-color: #06b6d4;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
  transform: scale(1.04);
}

/* Sleek Dark Scrollbar for Modal and Desktop */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #090d16;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
  border: 2px solid #090d16;
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}
* {
  scrollbar-color: #1e293b #090d16;
  scrollbar-width: thin;
}

