/* 
 * Dunamis Growth - Mobile-specific CSS
 * Production version - 2025-10-10
 */

/* Mobile-specific overrides */
@media (max-width: 768px) {
  /* Enhanced mobile navigation */
  .mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 100;
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    transition: transform 0.3s ease;
  }
  
  /* Collapsed state for mobile nav */
  .mobile-nav.collapsed {
    transform: translateY(100%);
  }
  
  /* Toggle button for mobile nav */
  .mobile-nav-toggle {
    position: fixed;
    bottom: 70px;
    right: 16px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--primary);
    color: var(--white);
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 101;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
  }
  
  .mobile-nav-toggle.nav-hidden {
    bottom: 16px;
  }
  
  .mobile-nav-toggle i {
    font-size: 24px;
    transition: transform 0.3s ease;
  }
  
  .mobile-nav-toggle.nav-hidden i {
    transform: rotate(180deg);
  }
  
  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 0;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 12px;
  }
  
  .mobile-nav-item.active {
    color: var(--primary);
  }
  
  .mobile-nav-item i {
    font-size: 24px;
    margin-bottom: 4px;
  }
  
  /* Adjust header for mobile */
  .mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--primary);
    color: var(--white);
    z-index: 100;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  }
  
  .mobile-header-title {
    font-size: 18px;
    font-weight: 500;
    margin: 0;
  }
  
  .mobile-menu-button {
    background: none;
    border: none;
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Adjust content for fixed header and footer */
  .mobile-content {
    padding-top: 60px;
    padding-bottom: 90px; /* Increased padding to prevent content being hidden */
    min-height: 100vh;
  }
  
  /* Main content area padding for mobile */
  .main-content {
    padding-bottom: 90px !important;
  }
  
  /* Dashboard content padding */
  .dashboard-content {
    padding-bottom: 90px !important;
  }
  
  /* Content sections padding */
  .content-section {
    padding-bottom: 90px !important;
  }
  
  /* Mobile drawer menu */
  .mobile-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 80%;
    max-width: 300px;
    height: 100%;
    background-color: var(--white);
    z-index: 200;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
  }
  
  .mobile-drawer.active {
    transform: translateX(0);
  }
  
  .mobile-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 199;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
  }
  
  .mobile-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
  }
  
  .mobile-drawer-header {
    padding: 16px;
    background-color: var(--primary);
    color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .mobile-drawer-close {
    background: none;
    border: none;
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
  }
  
  .mobile-drawer-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 16px 0;
  }
  
  .mobile-drawer-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    transition: background-color 0.3s;
  }
  
  .mobile-drawer-item:hover, .mobile-drawer-item.active {
    background-color: var(--background);
    color: var(--primary);
  }
  
  .mobile-drawer-item i {
    margin-right: 16px;
    font-size: 20px;
  }
  
  .mobile-drawer-footer {
    padding: 16px;
    border-top: 1px solid var(--divider);
  }
  
  /* Mobile-specific card styles */
  .mobile-card {
    margin: 10px;
    border-radius: 8px;
    padding: 15px;
  }
  
  /* Mobile-specific form styles */
  .mobile-form-group {
    margin-bottom: 12px;
  }
  
  .mobile-form-control {
    height: 44px; /* Larger touch target */
    font-size: 16px; /* Prevent zoom on iOS */
  }
  
  /* Mobile-specific button styles */
  .mobile-btn {
    height: 44px;
    font-size: 16px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Mobile-specific table styles */
  .mobile-table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Card-based table alternative for mobile */
  .mobile-table-card {
    margin-bottom: 10px;
    padding: 12px;
    border-radius: 8px;
    background-color: var(--white);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  }
  
  .mobile-table-row {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--divider);
  }
  
  .mobile-table-row:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
  }
  
  .mobile-table-cell {
    width: 100%;
    padding: 4px 0;
  }
  
  .mobile-table-label {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 12px;
    display: block;
  }
  
  .mobile-table-value {
    font-size: 14px;
  }
  
  /* Mobile-specific modal styles */
  .mobile-modal {
    width: 95%;
    max-width: none;
    margin: 10px;
    max-height: 80vh;
  }
  
  /* Mobile-specific tab styles */
  .mobile-tabs {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
  }
  
  .mobile-tabs::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Opera */
  }
  
  .mobile-tab {
    flex: 0 0 auto;
    padding: 10px 16px;
    white-space: nowrap;
  }
  
  /* Bottom sheet for mobile */
  .bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--white);
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
  }
  
  .bottom-sheet.active {
    transform: translateY(0);
  }
  
  .bottom-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
  }
  
  .bottom-sheet-overlay.active {
    opacity: 1;
    visibility: visible;
  }
  
  .bottom-sheet-handle {
    width: 40px;
    height: 5px;
    background-color: var(--divider);
    border-radius: 3px;
    margin: 10px auto;
  }
  
  .bottom-sheet-header {
    padding: 0 16px 10px;
    border-bottom: 1px solid var(--divider);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .bottom-sheet-title {
    font-size: 18px;
    font-weight: 500;
    margin: 0;
  }
  
  .bottom-sheet-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
  }
  
  .bottom-sheet-content {
    padding: 16px;
    overflow-y: auto;
    flex-grow: 1;
    -webkit-overflow-scrolling: touch;
  }
  
  .bottom-sheet-footer {
    padding: 16px;
    border-top: 1px solid var(--divider);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
  }
  
  /* FAB for mobile */
  .fab {
    position: fixed;
    bottom: 80px; /* Above the mobile nav */
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--accent);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 90;
    transition: transform 0.3s, box-shadow 0.3s;
  }
  
  .fab:active {
    transform: scale(0.95);
    box-shadow: 0 1px 5px rgba(0,0,0,0.2);
  }
  
  .fab i {
    font-size: 24px;
  }
  
  /* Pull to refresh */
  .pull-to-refresh {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-100%);
    transition: transform 0.3s;
  }
  
  .pull-to-refresh.visible {
    transform: translateY(0);
  }
  
  .pull-to-refresh-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(103, 58, 183, 0.3);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
  }
  
  /* Toast notifications for mobile */
  .mobile-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0,0,0,0.8);
    color: var(--white);
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s;
  }
  
  .mobile-toast.active {
    opacity: 1;
  }
  
  /* Mobile-specific review system */
  .mobile-review-form {
    padding: 16px;
  }
  
  .mobile-star-rating {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
  }
  
  .mobile-star {
    font-size: 36px;
    color: #FFD700;
    margin: 0 5px;
  }
  
  /* Mobile-specific utility classes */
  .mobile-hidden {
    display: none !important;
  }
  
  .mobile-visible {
    display: block !important;
  }
  
  .mobile-p-0 { padding: 0 !important; }
  .mobile-p-1 { padding: 0.25rem !important; }
  .mobile-p-2 { padding: 0.5rem !important; }
  .mobile-p-3 { padding: 1rem !important; }
  
  .mobile-m-0 { margin: 0 !important; }
  .mobile-m-1 { margin: 0.25rem !important; }
  .mobile-m-2 { margin: 0.5rem !important; }
  .mobile-m-3 { margin: 1rem !important; }
  
  .mobile-text-center { text-align: center !important; }
  .mobile-text-left { text-align: left !important; }
  .mobile-text-right { text-align: right !important; }
}
