/* ========================================================
   SAJOMA OS - MOBILE RESPONSIVE ENGINE (PWA & MOBILE BROWSERS)
   ======================================================== */

@media (max-width: 768px) {
  /* Prevent horizontal scrolling and rubber-band effect */
  html, body {
    overflow-x: hidden;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
  }

  /* Hide Desktop Multi-Window Taskbar on Mobile */
  .taskbar {
    display: none !important;
  }

  /* Desktop Group Shortcuts readjustment for mobile touch */
  .desktop-workspace {
    padding: 10px 10px 80px 10px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .grouped-desktop-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .desktop-group-category {
    background: rgba(15, 23, 42, 0.7) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    padding: 12px !important;
    backdrop-filter: blur(12px);
  }

  .group-shortcuts-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .desktop-shortcut {
    padding: 12px 8px !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
  }

  .shortcut-icon {
    width: 46px !important;
    height: 46px !important;
    font-size: 22px !important;
  }

  .shortcut-label {
    font-size: 11px !important;
    margin-top: 6px !important;
  }

  /* Window Overlays in Mobile: Full Screen Touch Overlays */
  .os-window {
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: calc(100vh - 65px) !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
  }

  .os-window-header {
    padding: 12px 14px !important;
    height: 48px !important;
  }

  .os-window-body {
    height: calc(100% - 48px) !important;
    padding: 10px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  /* MOBILE BOTTOM NAVIGATION BAR */
  .mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 62px;
    background: rgba(15, 23, 42, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(16px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 99999;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 500;
    text-decoration: none;
    flex: 1;
    height: 100%;
    transition: all 0.2s ease;
    cursor: pointer;
  }

  .mobile-nav-item i {
    font-size: 20px;
    margin-bottom: 2px;
  }

  .mobile-nav-item.active {
    color: #38bdf8;
    font-weight: 700;
  }

  .mobile-nav-item.active i {
    transform: translateY(-2px);
    color: #38bdf8;
  }

  /* POS MOBILE CART BOTTOM SHEET */
  .mobile-cart-badge {
    position: fixed;
    bottom: 72px;
    right: 16px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    border-radius: 30px;
    padding: 12px 20px;
    font-weight: 800;
    font-size: 14px;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 9999;
    cursor: pointer;
  }

  .mobile-cart-badge i {
    font-size: 18px;
  }

  /* Form Elements Touch Sizing */
  .form-control, .btn {
    min-height: 42px !important;
    font-size: 14px !important;
  }

  .data-table {
    font-size: 12px !important;
  }

  .data-table th, .data-table td {
    padding: 8px 6px !important;
  }
}

/* Hide Mobile Nav on Desktop */
@media (min-width: 769px) {
  .mobile-bottom-nav {
    display: none !important;
  }
  .mobile-cart-badge {
    display: none !important;
  }
}
