/* =============================================
   MOBILE IMPROVEMENTS — mobile.css
   ============================================= */

/* ---- BOTTOM NAV (Mobile only) ---- */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 8px 0 env(safe-area-inset-bottom, 8px);
  z-index: 999;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
}
.mobile-nav-items {
  display: flex;
  justify-content: space-around;
  align-items: center;
}
.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 12px;
  text-decoration: none;
  color: var(--gray);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 8px;
  transition: color var(--transition);
  min-width: 56px;
}
.mobile-nav-item.active { color: var(--gold); }
.mobile-nav-item:hover  { color: var(--navy); }
.mobile-nav-icon { font-size: 1.3rem; }

/* ---- SHOW BOTTOM NAV ON MOBILE ---- */
@media (max-width: 768px) {
  .mobile-bottom-nav { display: block; }

  /* Add padding so content doesn't hide behind bottom nav */
  body { padding-bottom: 72px; }
  .dashboard-body { padding-bottom: 0; }

  /* Bigger touch targets */
  .btn-primary, .btn-ghost, .btn-outline {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Better search bar on mobile */
  .search-bar {
    border-radius: 10px;
  }
  .search-field input {
    font-size: 16px; /* Prevents zoom on iOS */
  }

  /* Stack hero stats */
  .hero-stats {
    width: 100%;
    max-width: 340px;
  }

  /* Full width cards on mobile */
  .jobs-grid {
    grid-template-columns: 1fr;
  }

  /* Better job cards on mobile */
  .job-card { padding: 18px; }
  .job-list-card {
    grid-template-columns: 40px 1fr;
    gap: 10px;
  }
  .job-list-right {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    border-top: 1px solid var(--border);
    padding-top: 10px;
    margin-top: 4px;
  }

  /* Better forms on mobile */
  .form-row { grid-template-columns: 1fr; }

  /* Auth cards */
  .auth-card { padding: 24px 18px; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }

  /* Page banners */
  .page-banner { padding: 90px 20px 40px; }
  .about-hero, .emp-hero, .contact-hero { padding: 90px 20px 50px; }

  /* Navbar better on mobile */
  .nav-container { padding: 0 16px; }
}

/* ---- PULL TO REFRESH INDICATOR ---- */
.ptr-indicator {
  display: none;
  position: fixed;
  top: 68px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  color: var(--gold);
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 600;
  z-index: 200;
  box-shadow: var(--shadow);
}
.ptr-indicator.show { display: block; }

/* ---- TOAST NOTIFICATIONS ---- */
.toast-container {
  position: fixed;
  bottom: 88px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
}
.toast {
  background: var(--navy);
  color: var(--white);
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 300px;
  animation: slideInRight 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
  border-left: 3px solid var(--gold);
}
.toast.success { border-left-color: #10b981; }
.toast.error   { border-left-color: #ef4444; }

@keyframes slideInRight {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0);   opacity: 1; }
}
@keyframes fadeOut {
  from { opacity: 1; }
  to   { opacity: 0; transform: translateX(120%); }
}

/* ---- FLOATING APPLY BUTTON (Mobile Job Detail) ---- */
.floating-apply {
  display: none;
  position: fixed;
  bottom: 100px;
  left: 16px;
  right: 16px;
  z-index: 10000;
  pointer-events: auto;
}

@media (min-width: 1200px) {
  .floating-apply {
    display: none !important;
  }
}

@media (max-width: 1199px) {
  /* Hide sidebar apply card on mobile/tablet — floating button replaces it */
  .job-detail-sidebar .apply-card {
    display: none;
  }

  /* Make sure modal appears above floating button */
  .modal-overlay {
    z-index: 10001 !important;
  }
}

/* ---- SWIPE CARDS (Touch-friendly job browsing) ---- */
.swipe-hint {
  display: none;
  text-align: center;
  color: var(--gray);
  font-size: 0.78rem;
  padding: 8px;
}
@media (max-width: 600px) {
  .swipe-hint { display: block; }
}

/* ---- BETTER INPUTS ON MOBILE ---- */
@media (max-width: 600px) {
  input, select, textarea {
    font-size: 16px !important; /* Prevents iOS zoom */
  }
}

/* ---- DASHBOARD MOBILE ---- */
@media (max-width: 768px) {
  .dash-stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .dash-stat-card  { padding: 14px; }
  .dash-stat-num   { font-size: 1.5rem; }
  .dash-section    { padding: 16px 12px; }
  .dash-two-col    { grid-template-columns: 1fr; }
  .dash-topbar     { padding: 0 16px; }
}
