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

:root {
  --primary: #E30022;
  --primary-hover: #B3001B;
  --secondary: #0B0F19;
  --dark: #0B0F19;
  --light: #F9FAFB;
  --gray: #6B7280;
  --bg-gradient: linear-gradient(135deg, #F3F4F6 0%, #FFFFFF 100%);
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.3);
  --glass-shadow: 0 8px 32px 0 rgba(11, 15, 25, 0.07);
}

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg-gradient);
  color: var(--dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* Reserve space for the fixed bottom navbar on mobile */
  padding-bottom: 80px;
}

/* Remove bottom padding on desktop — no bottom nav shown */
@media (min-width: 992px) {
  body {
    padding-bottom: 0;
  }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Glassmorphism Utilities */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 1.5rem;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.1);
}

/* Buttons */
.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
  border-radius: 50rem;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px 0 rgba(227, 0, 34, 0.39);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgba(227, 0, 34, 0.39);
}

.btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary);
  border-radius: 50rem;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
}

.btn-outline-primary:hover {
  background-color: var(--primary);
  color: white;
  transform: translateY(-2px);
}

/* Forms */
.form-control, .form-select {
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid #E5E7EB;
  background-color: #F9FAFB;
  transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(227, 0, 34, 0.1);
  background-color: #FFFFFF;
}

label {
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #374151;
}

/* Navbar */
.navbar {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
}

.navbar-brand img {
  height: 40px;
  object-fit: contain;
}

.navbar-brand span {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--dark);
  margin-left: 0.5rem;
}

/* Hero Section */
.hero-section {
  padding: 6rem 0;
  position: relative;
  overflow: hidden;
}

.hero-shape {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, var(--primary) 0%, rgba(227, 0, 34, 0) 70%);
  opacity: 0.1;
  z-index: -1;
}

.shape-1 {
  width: 600px;
  height: 600px;
  top: -100px;
  right: -150px;
}

.shape-2 {
  width: 400px;
  height: 400px;
  bottom: -50px;
  left: -100px;
}

/* Utilities */
.text-primary-accent {
  color: var(--primary);
}

/* Custom Progress Bar for multi-step form */
.step-progress {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2rem;
  position: relative;
}

.step-progress::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: #E5E7EB;
  z-index: 1;
}

.step-item {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: #E5E7EB;
  color: var(--gray);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  z-index: 2;
  transition: all 0.3s ease;
}

.step-item.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 0 0 4px rgba(227, 0, 34, 0.2);
}

.step-item.completed {
  background: var(--secondary);
  color: white;
}

/* Animations */
.fade-in-up {
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  transform: translateY(20px);
}

.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Multi-step logic */
.step-content {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}

.step-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Dashboard Status Badges */
.badge-status-pending { background-color: #FEF3C7; color: #D97706; padding: 0.35rem 0.65rem; border-radius: 50rem; font-weight: 500; font-size: 0.85rem;}
.badge-status-confirmed { background-color: #D1FAE5; color: #059669; padding: 0.35rem 0.65rem; border-radius: 50rem; font-weight: 500; font-size: 0.85rem;}
.badge-status-completed { background-color: #DBEAFE; color: #2563EB; padding: 0.35rem 0.65rem; border-radius: 50rem; font-weight: 500; font-size: 0.85rem;}

/* Main container fix for sticky footer if needed */
main {
  flex: 1;
}

/* Footer */
footer {
  background: var(--dark);
  color: white;
  padding: 3rem 0;
}

/* Mechanic Selection Cards */
.mechanic-card {
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
}

.mechanic-card:hover {
  border-color: #E5E7EB;
  transform: translateY(-3px);
}

.mechanic-card.selected {
  border-color: var(--primary);
  background-color: rgba(227, 0, 34, 0.03);
  box-shadow: 0 4px 15px rgba(227, 0, 34, 0.15);
}

.avatar-lg {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.star-rating {
  color: #F59E0B;
  font-size: 0.9rem;
}

/* Responsive Grid for Mechanics */
.mechanics-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

@media (min-width: 576px) {
  .mechanics-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* App Bottom Navbar */
.app-bottom-nav {
  height: 65px;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}

.nav-btn.active i {
  color: var(--primary);
}

.nav-btn.active span {
  color: var(--primary);
  font-weight: 700;
}

.nav-btn i {
  transition: transform 0.2s ease;
}

.nav-btn:active i {
  transform: scale(0.9);
}

/* Leaflet Map overrides */
.leaflet-container {
  background-color: var(--light) !important;
  font-family: 'Outfit', sans-serif !important;
}

.custom-mechanic-marker {
  animation: pulse-marker 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

@keyframes pulse-marker {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(227, 0, 34, 0.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(227, 0, 34, 0);
  }
}
