/* ============================================================
   Good Way Express — Mobile Optimized CSS
   File: logistics_project/static/mobile.css
   Is file ko base.html mein add karo:
   <link rel="stylesheet" href="/static/mobile.css">
   ============================================================ */
/* ── PWA Install Button ─────────────────────────────────── */
#pwa-install-btn {
  display: none;
  position: fixed;
  bottom: 80px;
  right: 16px;
  background: #FF6B00;
  color: white;
  border: none;
  border-radius: 50px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255,107,0,0.4);
  z-index: 9999;
  align-items: center;
  gap: 8px;
  font-family: "Segoe UI", sans-serif;
  animation: pulse 2s infinite;
}
#pwa-install-btn i { font-size: 18px; }
@keyframes pulse {
  0%,100% { box-shadow: 0 4px 15px rgba(255,107,0,0.4); }
  50%      { box-shadow: 0 4px 25px rgba(255,107,0,0.7); }
}

/* ── Mobile Bottom Navigation ───────────────────────────── */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1a1a2e;
  border-top: 2px solid #FF6B00;
  z-index: 1000;
  height: 60px;
}
.mobile-bottom-nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  height: 100%;
}
.mobile-bottom-nav li {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.mobile-bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #aaa;
  text-decoration: none;
  font-size: 10px;
  gap: 3px;
  width: 100%;
  padding: 6px 0;
  transition: color 0.2s;
}
.mobile-bottom-nav a.active,
.mobile-bottom-nav a:hover { color: #FF6B00; }
.mobile-bottom-nav i { font-size: 20px; }

/* ── Mobile Header Fix ──────────────────────────────────── */
@media (max-width: 768px) {
  /* Show bottom nav on mobile */
  .mobile-bottom-nav { display: block; }

  /* Add padding so content not hidden behind bottom nav */
  body { padding-bottom: 65px !important; }

  /* Smaller header on mobile */
  header { height: auto !important; min-height: 50px; }
  .top-bar { padding: 5px 10px !important; flex-wrap: wrap; gap: 5px; }

  /* Full width containers */
  .container {
    padding: 8px !important;
    height: auto !important;
    overflow-y: auto;
  }

  /* Tables — horizontal scroll on mobile */
  .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 600px; }

  /* Forms — full width inputs */
  input, select, textarea, button {
    width: 100% !important;
    font-size: 16px !important; /* Prevents iOS zoom */
    margin-bottom: 8px;
  }

  /* Cards layout */
  .card, .stat-card {
    margin-bottom: 12px;
    border-radius: 10px;
  }

  /* Grid — single column on mobile */
  .grid, [class*="col-"] {
    grid-template-columns: 1fr !important;
    width: 100% !important;
  }

  /* Buttons — bigger touch targets */
  .btn, button[type="submit"] {
    min-height: 44px;
    font-size: 15px !important;
    border-radius: 8px;
  }

  /* Hide desktop sidebar/extra elements */
  .desktop-only { display: none !important; }

  /* Font size adjustments */
  h1 { font-size: 1.4rem !important; }
  h2 { font-size: 1.2rem !important; }
  h3 { font-size: 1rem !important; }

  /* Amount display — make it prominent */
  .amount, .grand-total {
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    color: #FF6B00 !important;
  }

  /* Status badges */
  .badge, .status {
    font-size: 11px !important;
    padding: 3px 8px !important;
    border-radius: 20px !important;
  }

  /* Search bar — sticky on mobile */
  .search-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: white;
    padding: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  }

  /* LR Card style for mobile list */
  .lr-card {
    background: white;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-left: 4px solid #FF6B00;
  }
  .lr-card .lr-number { font-weight: 700; color: #1a1a2e; font-size: 15px; }
  .lr-card .lr-meta   { font-size: 12px; color: #666; margin-top: 4px; }
  .lr-card .lr-amount { font-size: 16px; font-weight: 700; color: #FF6B00; float: right; }
}

/* ── Splash Screen ──────────────────────────────────────── */
#pwa-splash {
  position: fixed;
  inset: 0;
  background: #1a1a2e;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity 0.5s;
}
#pwa-splash img   { width: 120px; border-radius: 20px; margin-bottom: 20px; }
#pwa-splash h1    { color: #FF6B00; font-size: 24px; font-weight: 700; }
#pwa-splash p     { color: #aaa; font-size: 13px; margin-top: 8px; }
#pwa-splash.hidden { opacity: 0; pointer-events: none; }
