/* ==========================================================================
   WheelsOnDemand - Luxury Car Rental System
   Handcrafted Design System & Editorial Stylesheet
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --font-primary: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Space Grotesk', sans-serif;
  
  --color-slate-950: #0b0f19;
  --color-slate-900: #0f172a;
  --color-slate-800: #1e293b;
  --color-slate-700: #334155;
  --color-slate-600: #475569;
  --color-slate-500: #64748b;
  --color-slate-400: #94a3b8;
  --color-slate-300: #cbd5e1;
  --color-slate-200: #e2e8f0;
  --color-slate-100: #f1f5f9;
  --color-slate-50: #f8fafc;
  
  --color-brand-primary: #0f172a;
  --color-brand-accent: #c28e2b;
  --color-brand-accent-hover: #a1731f;
  --color-whatsapp: #25d366;
  --color-whatsapp-hover: #20bd5a;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  --shadow-subtle: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.03);
  --shadow-card: 0 4px 20px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-hover: 0 20px 35px -8px rgba(15, 23, 42, 0.12), 0 10px 15px -3px rgba(15, 23, 42, 0.05);
  --shadow-modal: 0 25px 60px -15px rgba(15, 23, 42, 0.35);
}

body {
  font-family: var(--font-primary);
  background-color: #030712;
  color: #f3f4f6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

h1, h2, h3, h4, .font-display {
  letter-spacing: -0.025em;
}

/* Glass & Header Accents */
.glass-nav {
  background: rgba(11, 15, 25, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(31, 41, 55, 0.7);
}

.glass-nav-dark {
  background: rgba(11, 15, 25, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(31, 41, 55, 0.7);
}

/* Car Card Styling */
.car-card {
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid #1f2937;
  background: #0b0f19;
  color: #f3f4f6;
}

.car-card:hover {
  transform: translateY(-4px);
  border-color: #c28e2b;
  box-shadow: 0 20px 35px -8px rgba(0, 0, 0, 0.6), 0 0 20px rgba(194, 142, 43, 0.15);
}

.car-card-img-wrap {
  position: relative;
  overflow: hidden;
  background-color: #030712;
  aspect-ratio: 16 / 10;
}

.car-card-img-wrap img {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.car-card:hover .car-card-img-wrap img {
  transform: scale(1.04);
}

/* Custom Badges */
.badge-available {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.badge-blocked {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.badge-maintenance {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.3);
}

.badge-category {
  background: rgba(11, 15, 25, 0.85);
  color: #f3f4f6;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* WhatsApp Button */
.btn-whatsapp {
  background-color: #25d366;
  color: #ffffff;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
  background-color: #20bd5a;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
  transform: translateY(-1px);
}

.btn-whatsapp:active {
  transform: translateY(0);
}

/* Luxury Primary Button */
.btn-luxury {
  background-color: #c28e2b;
  color: #030712;
  font-weight: bold;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-luxury:hover {
  background-color: #d4af37;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(194, 142, 43, 0.3);
}

.btn-luxury:active {
  transform: translateY(0);
}

/* Floating Search Widget */
.search-widget {
  background: #0b0f19;
  border: 1px solid #1f2937;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  border-radius: var(--radius-xl);
}

/* Modal Transitions */
.modal-overlay {
  background-color: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: opacity 0.25s ease;
}

.modal-content {
  box-shadow: var(--shadow-modal);
  animation: modalSlideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Admin Drawer & Panels */
.admin-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-subtle);
}

.admin-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  font-weight: 600;
  padding: 0.75rem 1rem;
  background-color: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.admin-table td {
  padding: 1rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.admin-table tr:hover td {
  background-color: #f8fafc;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: #030712;
}
::-webkit-scrollbar-thumb {
  background: #1f2937;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #374151;
}

/* Hero gradient subtle overlay */
.hero-gradient {
  background: radial-gradient(circle at 50% 0%, rgba(194, 142, 43, 0.08) 0%, transparent 70%);
}

/* Flatpickr custom styling to match luxury UI */
.flatpickr-calendar {
  background: #0b0f19 !important;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7) !important;
  border: 1px solid #1f2937 !important;
  border-radius: 12px !important;
  font-family: var(--font-primary) !important;
  color: #f3f4f6 !important;
}

.flatpickr-calendar .flatpickr-months {
  background: #0b0f19 !important;
  color: #f3f4f6 !important;
}

.flatpickr-calendar .flatpickr-current-month,
.flatpickr-calendar .flatpickr-current-month input.cur-year,
.flatpickr-calendar span.flatpickr-weekday {
  color: #f3f4f6 !important;
}

.flatpickr-day {
  color: #d1d5db !important;
}

.flatpickr-day:hover {
  background: #1f2937 !important;
  border-color: #374151 !important;
}

.flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange {
  background: #c28e2b !important;
  border-color: #c28e2b !important;
  color: #030712 !important;
  font-weight: bold !important;
}

.flatpickr-day.inRange {
  box-shadow: -5px 0 0 #1f2937, 5px 0 0 #1f2937 !important;
  background: #1f2937 !important;
  border-color: #1f2937 !important;
  color: #f3f4f6 !important;
}

.flatpickr-day.flatpickr-disabled, .flatpickr-day.flatpickr-disabled:hover {
  color: #4b5563 !important;
  text-decoration: line-through !important;
  background: transparent !important;
}

/* Smooth Tab Underlines */
.tab-link.active {
  color: #c28e2b;
  border-bottom-color: #c28e2b;
}

/* ==========================================================================
   Loading Skeletons & Shimmer Animation
   ========================================================================== */
.skeleton {
  background: linear-gradient(90deg, #111827 25%, #1f2937 50%, #111827 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.6s infinite ease-in-out;
  border-radius: var(--radius-md);
}

.skeleton-dark {
  background: linear-gradient(90deg, #0b0f19 25%, #1f2937 50%, #0b0f19 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.6s infinite ease-in-out;
  border-radius: var(--radius-md);
}

@keyframes skeletonShimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton-card {
  background: #0b0f19;
  border: 1px solid #1f2937;
  border-radius: 1rem;
  overflow: hidden;
}

select option {
  background-color: #0b0f19;
  color: #f3f4f6;
}
}

/* ==========================================================================
   Toast Notification System
   ========================================================================== */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
  width: calc(100vw - 32px);
  pointer-events: none;
}

.toast-item {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #f8fafc;
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 14px;
  box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
  animation: toastSlideIn 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast-item.toast-leave {
  animation: toastSlideOut 0.25s ease forwards;
}

.toast-icon-wrap {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-success .toast-icon-wrap {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
}
.toast-error .toast-icon-wrap {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}
.toast-warning .toast-icon-wrap {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}
.toast-info .toast-icon-wrap {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #d4af37, #f59e0b);
  width: 100%;
  animation: toastProgress linear forwards;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastSlideOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(12px) scale(0.95);
  }
}

@keyframes toastProgress {
  from { width: 100%; }
  to { width: 0%; }
}

/* ==========================================================================
   Cookie Consent Banner & Preferences Modal
   ========================================================================== */
#cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99990;
  background: rgba(11, 15, 25, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(212, 175, 55, 0.35);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
  animation: bannerSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* ==========================================================================
   Reduced Motion Support (Accessibility - WCAG 2.2)
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .skeleton, .skeleton-dark {
    animation: none !important;
    background: #e2e8f0 !important;
  }

  .car-card:hover {
    transform: none !important;
  }

  .car-card:hover .car-card-img-wrap img {
    transform: none !important;
  }

  .modal-content, .toast-item, #cookie-consent-banner {
    animation: none !important;
    transform: none !important;
  }

  .toast-progress {
    display: none !important;
  }
}
