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

/* Color Variables - Shadcn UI Inspired */
:root {
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  
  --background: 0 0% 100%;
  --foreground: 224 71.4% 4.1%;
  --card: 0 0% 100%;
  --card-foreground: 224 71.4% 4.1%;
  --popover: 0 0% 100%;
  --popover-foreground: 224 71.4% 4.1%;
  
  /* MOBILHUB Navy Blue & Orange Colors */
  --primary: 220 70% 16%;
  --primary-foreground: 210 20% 98%;
  
  --secondary: 215 15% 96%;
  --secondary-foreground: 220 70% 16%;
  --muted: 215 15% 96%;
  --muted-foreground: 215 10% 46%;
  
  --accent: 22 100% 50%;
  --accent-foreground: 0 0% 100%;
  
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 210 20% 98%;
  --border: 215 15% 90%;
  --input: 215 15% 90%;
  --ring: 22 100% 50%;
  --radius: 0.75rem;

  --success: 142.1 76.2% 36.3%;
  --success-foreground: 355.7 100% 97.3%;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.dark {
  --background: 220 40% 8%;
  --foreground: 210 20% 98%;
  --card: 220 40% 11%;
  --card-foreground: 210 20% 98%;
  --popover: 220 40% 11%;
  --popover-foreground: 210 20% 98%;
  
  --primary: 22 100% 50%;
  --primary-foreground: 220 40% 8%;
  
  --secondary: 220 30% 18%;
  --secondary-foreground: 210 20% 98%;
  --muted: 220 30% 18%;
  --muted-foreground: 215 15% 65%;
  --accent: 22 100% 50%;
  --accent-foreground: 210 20% 98%;
  
  --destructive: 0 62.8% 30.6%;
  --destructive-foreground: 210 20% 98%;
  --border: 220 30% 18%;
  --input: 220 30% 18%;
  --ring: 22 100% 50%;
}

* {
  font-family: var(--font-sans);
  scrollbar-width: thin;
  scrollbar-color: hsl(var(--muted-foreground) / 0.3) transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.2s ease, box-shadow 0.2s ease;
}

body {
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: hsl(var(--muted-foreground) / 0.3);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: hsl(var(--muted-foreground) / 0.5);
}

/* Keyframe Animations */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.5; }
  50% { transform: scale(1.05); opacity: 0.8; }
  100% { transform: scale(0.95); opacity: 0.5; }
}

@keyframes slide-in-right {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@keyframes slide-out-right {
  from { transform: translateX(0); }
  to { transform: translateX(100%); }
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in-down {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes checkmark {
  0% { stroke-dashoffset: 50; }
  100% { stroke-dashoffset: 0; }
}

/* Animation Utilities */
.animate-float {
  animation: float 4s ease-in-out infinite;
}

.animate-pulse-ring {
  animation: pulse-ring 2s infinite ease-in-out;
}

.animate-fade-in-up {
  animation: fade-in-up 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-fade-in-down {
  animation: fade-in-down 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-scale-up {
  animation: scale-up 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.checkmark-svg path {
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  animation: checkmark 0.6s 0.2s ease-in-out forwards;
}

/* Page View Transition Manager */
.page-view {
  display: none;
  opacity: 0;
}
.page-view.active {
  display: block;
  animation: fade-in-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Glassmorphism Styles */
.glass {
  background-color: hsl(var(--background) / 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.glass-card {
  background-color: hsl(var(--card) / 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid hsl(var(--border) / 0.5);
}

/* Input Styles - Shadcn Inspired */
.shad-input {
  background-color: transparent;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  outline: none;
}
.shad-input:focus {
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 2px hsl(var(--ring) / 0.15);
}

/* Card Hover effect */
.hover-card-trigger {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}
.hover-card-trigger:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

/* Custom Calendar Grid styling */
.calendar-day-btn {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.875rem;
}
.calendar-day-btn:hover:not(.disabled):not(.selected) {
  background-color: hsl(var(--accent));
}
.calendar-day-btn.selected {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  font-weight: 600;
}
.calendar-day-btn.disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.calendar-day-btn.range-in {
  background-color: hsl(var(--primary) / 0.1);
  border-radius: 0;
}
.calendar-day-btn.range-start {
  border-top-left-radius: var(--radius);
  border-bottom-left-radius: var(--radius);
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}
.calendar-day-btn.range-end {
  border-top-right-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

/* Auto Suggest Dropdown styling */
.suggestions-list {
  max-height: 250px;
  overflow-y: auto;
}
.suggestion-item {
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.suggestion-item:hover {
  background-color: hsl(var(--accent));
}

/* Carousel Testimonials */
.carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Loading Spinners */
.spinner {
  border: 3px solid hsl(var(--muted));
  border-top-color: hsl(var(--primary));
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Tabs line transitions */
.tab-trigger {
  position: relative;
}
.tab-trigger.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: hsl(var(--primary));
  border-radius: 9999px;
}

/* Accordion height animation support */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
  opacity: 0;
}
.accordion-item.active .accordion-content {
  max-height: 200px;
  opacity: 1;
}

/* Toast container */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.toast {
  animation: slide-in-right 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  box-shadow: var(--shadow-lg);
  border: 1px solid hsl(var(--border));
}
.toast.hide {
  animation: slide-out-right 0.3s ease forwards;
}

/* Stepper checkout */
.step-dot.active {
  background-color: hsl(var(--primary));
  box-shadow: 0 0 0 4px hsl(var(--primary) / 0.15);
}
.step-dot.completed {
  background-color: hsl(var(--success));
}
.step-line.completed {
  background-color: hsl(var(--success));
}
