/* EZ2Hire Mobile App Styles */

/* PWA Install Banner */
.pwa-install-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  background: linear-gradient(135deg, #6f42c1, #e83e8c);
  color: white;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  z-index: 1000;
  transform: translateY(100px);
  transition: transform 0.3s ease;
}

.pwa-install-banner.show {
  transform: translateY(0);
}

.pwa-install-banner .banner-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pwa-install-banner .banner-text {
  flex: 1;
}

.pwa-install-banner .banner-title {
  font-weight: 600;
  margin-bottom: 5px;
}

.pwa-install-banner .banner-subtitle {
  font-size: 0.9rem;
  opacity: 0.9;
}

.pwa-install-banner .install-btn {
  background: white;
  color: #6f42c1;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  margin-left: 15px;
}

.pwa-install-banner .close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  padding: 5px;
  margin-left: 10px;
}

/* Mobile Navigation Enhancements */
@media (max-width: 768px) {
  /* Show navbar only for non-authenticated users */
  body:not(.authenticated) .navbar {
    display: block !important;
  }
  
  /* Hide navbar for authenticated users to prevent duplication */
  body.authenticated .navbar {
    display: none !important;
  }
  
  /* Hide entire topbar on mobile devices */
  .topbar {
    display: none !important;
  }
  
  /* Adjust main content - remove topbar padding on mobile */
  .main-content {
    padding-top: 0px;
  }
  
  /* Adjust content area padding */
  .content-area {
    padding: 15px;
  }
  
  /* Full-screen mobile layout */
  .container-fluid {
    padding: 0;
  }
  
  /* Mobile-first sidebar */
  .sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background: white;
    z-index: 1050;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
  }
  
  .sidebar.show {
    left: 0;
  }
  
  /* Mobile overlay */
  .mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
  }
  
  .mobile-overlay.show {
    opacity: 1;
    visibility: visible;
  }
  
  /* Mobile header */
  .mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: white;
    border-bottom: 1px solid #e9ecef;
    position: sticky;
    top: 0;
    z-index: 1000;
  }
  
  .mobile-menu-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #6c757d;
    padding: 5px;
  }
  
  .mobile-logo {
    height: 32px;
  }
  
  .mobile-user-menu {
    position: relative;
  }
  
  /* Mobile content */
  .mobile-content {
    padding: 20px;
    margin-top: 60px;
  }
  
  /* Mobile cards */
  .card {
    margin-bottom: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }
  
  /* Mobile buttons */
  .btn {
    min-height: 44px;
    padding: 12px 20px;
    font-size: 16px;
    border-radius: 8px;
  }
  
  /* Mobile forms */
  .form-control {
    min-height: 44px;
    font-size: 16px;
    border-radius: 8px;
  }
  
  /* Mobile tables */
  .table-responsive {
    border-radius: 8px;
    overflow: hidden;
  }
  
  /* App-like bottom navigation */
  .bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e9ecef;
    padding: 10px 0;
    z-index: 1000;
    display: flex;
    justify-content: space-around;
  }
  
  .bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #6c757d;
    font-size: 12px;
    padding: 5px;
    min-width: 60px;
  }
  
  .bottom-nav-item.active {
    color: #6f42c1;
  }
  
  .bottom-nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
  }
  
  /* Safe area for phones with notches */
  .safe-area-top {
    padding-top: env(safe-area-inset-top);
  }
  
  .safe-area-bottom {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* iOS Safari specific fixes */
@supports (-webkit-appearance: none) {
  .mobile-header {
    padding-top: calc(15px + env(safe-area-inset-top));
  }
  
  .bottom-nav {
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
  }
}

/* Dark mode support for mobile */
@media (prefers-color-scheme: dark) {
  .pwa-install-banner {
    background: linear-gradient(135deg, #495057, #6c757d);
  }
  
  .mobile-header {
    background: #212529;
    border-bottom-color: #495057;
  }
  
  .sidebar {
    background: #212529;
  }
  
  .bottom-nav {
    background: #212529;
    border-top-color: #495057;
  }
}

/* Mobile Navigation Menu Styles */
.mobile-nav-menu {
  position: fixed;
  top: 0;
  left: -100%;
  width: 280px;
  height: 100vh;
  background: white;
  z-index: 1050;
  transition: left 0.3s ease;
  box-shadow: 2px 0 10px rgba(0,0,0,0.1);
  overflow-y: auto;
}

.mobile-nav-menu.show {
  left: 0;
}

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid #e9ecef;
  background: #6f42c1;
}

.mobile-nav-logo {
  width: 32px;
  height: 32px;
}

.mobile-nav-close {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-nav-content {
  padding: 20px 0;
}

.mobile-nav-section {
  margin-bottom: 30px;
}

.mobile-nav-label {
  padding: 0 20px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mobile-nav-item {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: #333;
  text-decoration: none;
  transition: background-color 0.2s ease;
  border-radius: 0;
  margin: 0;
}

.mobile-nav-item:hover {
  background-color: #f8f9fa;
  color: #6f42c1;
}

.mobile-nav-item i {
  width: 20px;
  height: 20px;
  margin-right: 15px;
  flex-shrink: 0;
}

.mobile-nav-item span {
  font-size: 16px;
  font-weight: 500;
}

/* Body scroll lock when mobile menu is open */
body.mobile-menu-open {
  overflow: hidden;
}

/* Candidate App Specific Styles */
.candidate-app .bottom-nav-item.active {
  color: #6f42c1;
}

.candidate-app .pwa-install-banner {
  background: linear-gradient(135deg, #6f42c1, #e83e8c);
}

/* Recruiter App Specific Styles */
.recruiter-app .bottom-nav-item.active {
  color: #dc3545;
}

.recruiter-app .pwa-install-banner {
  background: linear-gradient(135deg, #dc3545, #fd7e14);
}