/* app.css - Redesigned for modern mobile-first delivery app style (inspired by Uber/DoorDash, but unique) */

:root {
  --primary-black: #0A0A0A;
  --primary-white: #FFFFFF;
  --accent-green: #00C853;     /* Vibrant success green, unique accent for delivery theme */
  --accent-blue: #1E88E5;      /* Secondary blue for links/actions */
  --gray-100: #F5F5F5;
  --gray-200: #EEEEEE;
  --gray-300: #E0E0E0;
  --gray-500: #757575;
  --gray-700: #424242;
  --text-primary: #0A0A0A;
  --text-secondary: #616161;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: var(--primary-white);
  color: var(--text-primary);
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
  margin: 0;
  padding: 0;
  padding-bottom: env(safe-area-inset-bottom); /* For mobile notch */
}

@media (max-width: 768px) {
  .navbar.cb-navbar {
        display: none !important;
    }
}
/* Top Navigation Bar - Uber-style clean, with blur on mobile */
.cb-nav {
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-300) !important;
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-brand {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--primary-black) !important;
}

.nav-link {
  color: var(--gray-700) !important;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 1rem !important;
}

.nav-link.active {
  color: var(--accent-blue) !important;
  font-weight: 700;
}

/* Primary Buttons - Bold black with green accent option */
.btn-primary-cb {
  background: var(--primary-black);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 28px;
  font-weight: 700;
  font-size: 1.1rem;
  transition: all 0.2s ease;
}

.btn-primary-cb:hover {
  background: var(--gray-700);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-accent-green {
  background: var(--accent-green);
  color: white;
}

.btn-accent-green:hover {
  background: #00B34A;
}

.btn-outline-cb {
  border: 1.5px solid var(--gray-300);
  color: var(--text-primary);
  background: var(--primary-white);
  border-radius: var(--radius-md);
  /*padding: 14px 28px;*/
  font-weight: 600;
  font-size: 1.1rem;
}

.btn-outline-cb:hover {
  background: var(--gray-100);
  border-color: var(--gray-500);
}

/* Hero & Cards - Clean, spacious, mobile-optimized */
.cb-hero {
  background: linear-gradient(135deg, #F8F8F8 0%, #FFFFFF 100%);
  border-radius: var(--radius-lg);
  padding: 3rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.cb-card {
  background: var(--primary-white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

/* Process Steps */
.process-step {
  display: flex;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.process-number {
  background: var(--primary-black);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-right: 1rem;
}

/* Badges */
.badge-direct {
  background: var(--primary-white);
  color: var(--primary-black);
  border: 1px solid var(--gray-300);
  font-weight: 600;
}

/* Text Utilities */
.display-5-custom {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.2;
}

.lead-custom {
  font-size: 1.2rem;
  color: var(--text-secondary);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .cb-hero {
    padding: 2.5rem 1rem;
    border-radius: var(--radius-md);
  }

  .display-5-custom {
    font-size: 2.4rem;
  }

  .btn-primary-cb, .btn-outline-cb {
    width: 100%;
    /*margin-bottom: 1rem;*/
  }

  .process-step {
    margin-bottom: 2.5rem;
  }
}

@media (max-width: 576px) {
  .navbar-brand {
    font-size: 1.6rem;
  }

  .cb-nav .container {
    padding: 0 1rem;
  }
}

/* Add to app.css */

/* Tracking Map */
#tracking-map {
  /*border-radius: var(--radius-lg);*/
  overflow: hidden;
}

/* Status Banner */
.status-banner {
  background: var(--primary-white);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-md);
}

/* Larger status badge on tracking page */
.job-status.large {
  font-size: 1rem;
  padding: 12px 24px;
}

/* Pulsing animation for driver marker */
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(30, 136, 229, 0.7); }
  70% { box-shadow: 0 0 0 20px rgba(30, 136, 229, 0); }
  100% { box-shadow: 0 0 0 0 rgba(30, 136, 229, 0); }
}

/* Custom marker styling */
.custom-marker {
  background: transparent;
  border: none;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  #tracking-map {
    height: 400px;
  }
  
  .status-banner {
    margin-top: -60px;
    padding: 1.5rem;
  }
  
  .status-banner .h4 {
    font-size: 1.4rem;
  }
}

/* Add to app.css - Clean & Modern List Style */

.list-group-item-action {
  transition: all 0.2s ease;
}

.list-group-item-action:active,
.list-group-item-action:hover {
  background-color: var(--gray-100) !important;
  transform: scale(0.99);
}

/* Floating FAB */
.bg-accent-green {
  background-color: var(--accent-green) !important;
}

/* Mobile perfection */
@media (max-width: 768px) {
  .container {
    /*padding-left: 1rem;
    padding-right: 1rem;*/
  }
  
  .display-5 {
    font-size: 2.5rem;
  }
  
  .lead {
    font-size: 1.1rem;
  }
  
  .list-group-item {
    padding: 1.5rem;
  }
  
  h5 {
    font-size: 1.3rem;
  }
  
  .job-status {
    font-size: 0.9rem;
  }
  
  .gap-3 {
    gap: 1rem !important;
  }
}
/* Modern App-Like Job Cards */
.job-card {
    background: var(--primary-white);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 24px;
    padding: 20px;
    margin-bottom: 16px;
    text-decoration: none !important;
    display: block;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.job-card:active {
    transform: scale(0.97);
    background-color: var(--gray-100);
}

/* The Route Visualization */
.route-container {
    display: flex;
    flex-direction: column;
    position: relative;
    padding-left: 24px;
    margin: 15px 0;
}

.route-line {
    position: absolute;
    left: 7px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    border-left: 2px dashed var(--gray-300);
}

.route-point {
    position: relative;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.route-point:last-child { margin-bottom: 0; }

.route-point::before {
    content: '';
    position: absolute;
    left: -21px;
    top: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gray-300);
}

.route-point.pickup::before { background: var(--accent-blue); }
.route-point.dropoff::before { background: var(--accent-green); }

/* Status Badges Overhaul */
.status-pill {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 12px;
    border-radius: 100px;
    font-weight: 800;
}

.status-pending { background: #FFF9C4; color: #F57F17; }
.status-in-progress { background: #E3F2FD; color: #1976D2; }
.status-delivered { background: #E8F5E9; color: #2E7D32; }
.status-cancelled { background: #FFEBEE; color: #C62828; }
.status-completed{
    background: #dcfce7; /* green-100 */
    color: #166534;      /* green-800 */
}

.status-pickup-in-transit{
    background: #e0f2fe; /* sky-100 */
    color: #075985;      /* sky-800 */
}

.status-picked-up{
    background: #fef9c3; /* yellow-100 */
    color: #854d0e;      /* yellow-800 */
}

.status-dropoff-in-transit{
    background: #2297ff; /* your blue */
    color: #ffffff;
}

.status-payment-pending{
    background: #ffedd5; /* orange-100 */
    color: #9a3412;      /* orange-800 */
}

.status-open {
    background: #ef961e;
    color: #ffffff;
}

/* Metadata Bar */
.job-meta {
    display: flex;
    gap: 12px;
    border-top: 1px solid var(--gray-100);
    padding-top: 15px;
    margin-top: 10px;
}

.meta-item {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.star-rating {
    transition: transform 0.1s ease, color 0.2s ease;
    user-select: none;
    color: #e0e0e0; /* Default Gray */
}

.star-rating:hover {
    transform: scale(1.2);
}

.star-rating.active {
    color: #ffc107 !important; /* Uber/Google Yellow */
    text-shadow: 0 0 10px rgba(255, 193, 7, 0.3);
}

#reviewComment {
    border-radius: 12px;
    border: 1px solid #eee;
    padding: 12px;
    font-size: 0.95rem;
}

#reviewComment:focus {
    border-color: #2f7cff;
    box-shadow: 0 0 0 3px rgba(47, 124, 255, 0.1);
}

/*-------------------------------------------------------------------------------------------------------------------*/
/* Badge */
.nav-badge{
  position:absolute;
  top:-6px;
  right:-10px;
  background:#ff3b30;
  color:#fff;
  font-size:10px;
  padding:4px 6px;
  border-radius:999px;
  border:2px solid #fff;
  line-height:1;
  z-index:10;
}

/* Nav wrapper */
.magic-nav{
  display:none;
  position:fixed;
  left:0;
  bottom:0;
  width:100%;
  background:#fff;
  box-shadow:0 -5px 15px rgba(0,0,0,.10);
  z-index:1050;

  /* important for bubble overflow */
  overflow:visible;

  /* safe area */
  padding-bottom: env(safe-area-inset-bottom, 0px);

  /* base height */
  height: calc(70px + env(safe-area-inset-bottom, 0px));
}

/* UL */
.magic-nav ul{
  display:flex;
  width:100%;
  margin:0;
  padding:0;
  position:relative;
  overflow:visible;
}

/* LI */
.magic-nav ul li{
  position:relative;
  list-style:none;
  flex:1;                 /* ✅ no % math */
  height:70px;
  overflow:visible;
}

/* Link */
.magic-nav ul li a{
  height:70px;
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  -webkit-tap-highlight-color:transparent;
  position:relative;
}

/* Icon */
.magic-nav ul li a .icon{
  position:relative;
  width:48px;
  height:48px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:1.45em;
  color: var(--gray-500);
  transition: transform .22s ease, color .22s ease;
  z-index:2;
}

/* Text */
.magic-nav ul li a .text{
  position:absolute;
  bottom:8px;
  font-size:.72em;
  letter-spacing:.04em;
  font-weight:600;
  color: var(--primary-black);
  opacity:0;
  transform: translateY(6px);
  transition: opacity .22s ease, transform .22s ease;
}

/* ✅ ACTIVE: lift icon */
.magic-nav ul li.active a .icon{
  transform: translateY(-22px);
  color: var(--primary-white);
}

/* ✅ ACTIVE: show text */
.magic-nav ul li.active a .text{
  opacity:1;
  transform: translateY(0);
}

/* ✅ THE FIX: bubble attached to the ACTIVE ICON */
.magic-nav ul li.active a .icon::before{
  content:"";
  position:absolute;
  width:70px;
  height:70px;
  border-radius:50%;
  background: #0d6efd;
  border:6px solid #f5f5f5;

  /* perfectly centered behind icon */
  top:50%;
  left:50%;
  transform: translate(-50%, -50%);

  z-index:-1;
}

/* ✅ Hide the old indicator system completely (it causes the wonkiness) */
.magic-nav .indicator{
  display:none !important;
}

/* ✅ Badge when active (optional polish) */
.magic-nav ul li.active a .nav-badge{
  border-color: var(--primary-black);
}

/* Show only on mobile app pages */
@media (max-width: 991px){
  body.is-app-page .magic-nav{ display:flex; }
  body.is-app-page{ padding-bottom: 90px; }
}
