/* ==========================================================================
   OmniBus - Transit & Bus Ticket Booking Design System
   ========================================================================== */

@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 {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --secondary: #0ea5e9;
  --accent: #f97316;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --dark: #0f172a;
  --gray-bg: #f8fafc;
  --card-border: #e2e8f0;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: #1e293b;
  background-color: #f8fafc;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .font-heading {
  font-family: 'Space Grotesk', sans-serif;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Brand Gradient */
.bg-brand-gradient {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #0284c7 100%);
}
.text-brand-gradient {
  background: linear-gradient(135deg, #1d4ed8 0%, #0284c7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Glassmorphism */
.glass-panel {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.glass-dark {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Pulse animation for live status */
@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 0.4; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

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

/* ==========================================================================
   Bus Seat Map Layouts
   ========================================================================== */

.bus-container {
  background: #f1f5f9;
  border: 2px solid #cbd5e1;
  border-radius: 1.5rem;
  padding: 1.5rem;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.04);
}

.bus-front-wheel {
  position: absolute;
  top: 15px;
  right: -8px;
  width: 14px;
  height: 48px;
  background: #334155;
  border-radius: 4px;
}
.bus-front-wheel-left {
  position: absolute;
  top: 15px;
  left: -8px;
  width: 14px;
  height: 48px;
  background: #334155;
  border-radius: 4px;
}

.bus-rear-wheel {
  position: absolute;
  bottom: 30px;
  right: -8px;
  width: 14px;
  height: 60px;
  background: #334155;
  border-radius: 4px;
}
.bus-rear-wheel-left {
  position: absolute;
  bottom: 30px;
  left: -8px;
  width: 14px;
  height: 60px;
  background: #334155;
  border-radius: 4px;
}

/* Bus Seat Elements */
.bus-seat {
  position: relative;
  width: 38px;
  height: 42px;
  border-radius: 6px 6px 4px 4px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  user-select: none;
}

.bus-seat:before {
  content: '';
  position: absolute;
  top: -4px;
  width: 70%;
  height: 5px;
  background: inherit;
  border-radius: 3px 3px 0 0;
  border: 1.5px solid inherit;
  border-bottom: none;
}

/* Seat States */
.bus-seat.available:hover {
  border-color: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.15);
}

.bus-seat.selected {
  background-color: #2563eb !important;
  color: #ffffff !important;
  border-color: #1d4ed8 !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
  transform: scale(1.05);
}

.bus-seat.booked {
  background-color: #e2e8f0;
  color: #94a3b8;
  border-color: #cbd5e1;
  cursor: not-allowed;
  opacity: 0.7;
}

.bus-seat.ladies {
  background-color: #fdf2f8;
  border-color: #f472b6;
  color: #db2777;
}
.bus-seat.ladies:hover {
  border-color: #ec4899;
  box-shadow: 0 4px 10px rgba(236, 72, 153, 0.2);
}

/* Sleeper Berths */
.bus-sleeper {
  width: 44px;
  height: 80px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 6px 2px;
  font-size: 0.72rem;
  font-weight: 700;
  transition: all 0.2s ease;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  user-select: none;
}

.bus-sleeper .pillow {
  width: 80%;
  height: 12px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
}

.bus-sleeper.available:hover {
  border-color: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.15);
}

.bus-sleeper.selected {
  background-color: #2563eb !important;
  color: #ffffff !important;
  border-color: #1d4ed8 !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}
.bus-sleeper.selected .pillow {
  background-color: #1d4ed8;
  border-color: #3b82f6;
}

.bus-sleeper.booked {
  background-color: #e2e8f0;
  color: #94a3b8;
  border-color: #cbd5e1;
  cursor: not-allowed;
  opacity: 0.7;
}

.bus-sleeper.ladies {
  background-color: #fdf2f8;
  border-color: #f472b6;
  color: #db2777;
}
.bus-sleeper.ladies .pillow {
  background: #fce7f3;
  border-color: #f472b6;
}

/* ==========================================================================
   Perforated Ticket Styles
   ========================================================================== */

.ticket-card {
  position: relative;
  background: #ffffff;
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
}

.ticket-divider {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 24px;
}

.ticket-divider:before {
  content: '';
  position: absolute;
  left: -12px;
  width: 24px;
  height: 24px;
  background: #f8fafc;
  border-radius: 50%;
  box-shadow: inset -2px 0 3px rgba(0, 0, 0, 0.06);
  border-right: 1px solid #e2e8f0;
}

.ticket-divider:after {
  content: '';
  position: absolute;
  right: -12px;
  width: 24px;
  height: 24px;
  background: #f8fafc;
  border-radius: 50%;
  box-shadow: inset 2px 0 3px rgba(0, 0, 0, 0.06);
  border-left: 1px solid #e2e8f0;
}

.ticket-line {
  width: 100%;
  border-top: 2px dashed #cbd5e1;
}

/* Barcode styling */
.barcode {
  height: 48px;
  background: repeating-linear-gradient(
    90deg,
    #0f172a,
    #0f172a 2px,
    transparent 2px,
    transparent 4px,
    #0f172a 4px,
    #0f172a 7px,
    transparent 7px,
    transparent 9px,
    #0f172a 9px,
    #0f172a 12px,
    transparent 12px,
    transparent 15px
  );
}

/* ==========================================================================
   Timeline / Route Milestones
   ========================================================================== */

.route-timeline-item {
  position: relative;
  padding-left: 2rem;
  padding-bottom: 2rem;
}

.route-timeline-item:last-child {
  padding-bottom: 0;
}

.route-timeline-item:before {
  content: '';
  position: absolute;
  left: 9px;
  top: 16px;
  bottom: 0;
  width: 2px;
  background-color: #e2e8f0;
}

.route-timeline-item.active-line:before {
  background-color: #2563eb;
}

.route-timeline-item:last-child:before {
  display: none;
}

.route-timeline-dot {
  position: absolute;
  left: 0;
  top: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 2px #cbd5e1;
  background-color: #ffffff;
}

.route-timeline-dot.completed {
  background-color: #10b981;
  box-shadow: 0 0 0 2px #10b981;
}

.route-timeline-dot.active {
  background-color: #2563eb;
  box-shadow: 0 0 0 2px #2563eb;
  animation: pulse-ring 1.8s infinite;
}

.route-timeline-dot.upcoming {
  background-color: #94a3b8;
  box-shadow: 0 0 0 2px #cbd5e1;
}

/* Map radar styling */
.radar-circle {
  width: 350px;
  height: 350px;
  border-radius: 50%;
  position: relative;
  border: 1px solid rgba(37, 99, 235, 0.2);
  background: radial-gradient(circle, rgba(37,99,235,0.06) 0%, rgba(37,99,235,0.01) 70%, transparent 100%);
}

.radar-circle:before, .radar-circle:after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px dashed rgba(37, 99, 235, 0.25);
}
.radar-circle:before {
  width: 70%;
  height: 70%;
}
.radar-circle:after {
  width: 40%;
  height: 40%;
}

/* Stepper Bar */
.step-item {
  position: relative;
  flex: 1;
  text-align: center;
}
.step-item:not(:last-child):after {
  content: '';
  position: absolute;
  top: 18px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: #e2e8f0;
  z-index: 1;
}
.step-item.completed:not(:last-child):after {
  background: #2563eb;
}
.step-item.active:not(:last-child):after {
  background: linear-gradient(to right, #2563eb, #e2e8f0);
}

/* Modern Hover Effects */
.hover-lift {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hover-lift:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 25px -5px rgba(0, 0, 0, 0.08);
}
