/* BEARDPOWERED AI - MOBILE CSS */

@media (max-width: 680px) {

  html, body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    height: 100%;
    max-width: 100vw;
    overscroll-behavior: none;
  }

  #app {
    display: flex;
    flex-direction: column;
    height: 100svh;
    width: 100vw;
    max-width: 100vw;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
  }

  #sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 280px;
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  #sidebar.open { transform: translateX(0); }

  #top-bar {
    position: sticky;
    top: 0;
    z-index: 90;
    flex-shrink: 0;
    width: 100%;
    height: 46px;
    padding: 0 14px;
    font-size: 11px;
    background: #141414;
    border-bottom: 1px solid #2a2a2a;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  #hamburger { display: none !important; }
  #top-bar .tb-tagline { display: none; }

  #main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    width: 100%;
    min-height: 0;
  }

  #launchpad,
  #messages,
  #graph-view,
  #admin-view,
  #inbox-view,
  #review-view {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    box-sizing: border-box;
    padding-bottom: 72px;
  }

  #launchpad { padding: 14px 14px 80px; }
  #messages  { padding: 10px 10px 16px; }

  #input-area {
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    background: #141414;
    border-top: 1px solid #2a2a2a;
  }

  #input-row {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    width: 100%;
    box-sizing: border-box;
  }

  #model-dropdown { display: none !important; }
  #stop-btn { display: none !important; }
  #input-disclaimer { display: none !important; }
  #paste-banner { font-size: 12px; }

  #upload-btn {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 10px;
    color: #888;
  }

  #user-input {
    flex: 1;
    min-width: 0 !important;
    width: 0 !important;
    box-sizing: border-box !important;
    font-size: 16px;
    min-height: 36px;
    max-height: 120px;
    overflow-y: auto;
    resize: none;
    border-radius: 18px;
    padding: 8px 14px;
    background: #1e1e1e;
    border: 1px solid #333;
    color: #f0f0f0;
    line-height: 1.4;
  }

  #deep-check-btn {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    padding: 0;
    font-size: 0;
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 10px;
    color: #888;
  }
  #deep-check-btn::before { content: "🔍"; font-size: 16px; }
  #deep-check-btn.active {
    border-color: #2774AE;
    background: #2a1500;
  }

  #send-btn {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    padding: 0;
    font-size: 0;
    background: #2774AE;
    border: none;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  #send-btn::before { content: "➤"; font-size: 16px; }

  #mobile-nav {
    
    display: flex;
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    width: 100%;
    height: 56px;
    background: #1a1a1a;
    border-top: 1px solid #2a2a2a;
    z-index: 100;
    padding: 4px 0 env(safe-area-inset-bottom, 0px);
  }

  #app.in-chat #mobile-nav { display: none !important; }

  .mn-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 10px;
    color: #666;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 0;
  }
  .mn-item span { font-size: 20px; }
  .mn-item.active { color: #2774AE; }

  .lp-cards { grid-template-columns: 1fr !important; width: 100%; }
  .flip-card { width: 100% !important; max-width: 100% !important; box-sizing: border-box; }
  .lp-prompt-grid { grid-template-columns: 1fr; }
  .lp-greeting { font-size: 18px; overflow-wrap: break-word; word-break: break-word; }

  .message { max-width: 90%; font-size: 14px; }
  .message.ai pre { overflow-x: auto; max-width: 100%; }
  .token-card { max-width: 100%; }

  #graph-canvas-wrap { height: 320px; }
  #graph-stats { grid-template-columns: repeat(2, 1fr); }

  /* Hide mode bar on mobile */
  #name-suggest-bar { display: none !important; }
  #mode-bar { display: none !important; }
  #mode-switch-nudge { display: none !important; }
  .token-card { display: none !important; }
}
#mobile-nav.hidden{display:none !important}
