/* AlphaChat Mobile — responsive styles for phones */

/* Bottom tab bar — hidden on desktop */
.mobile-tabs {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.mobile-tabs .tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-muted);
  font-size: 10px;
  cursor: pointer;
  border: none;
  background: none;
  padding: 4px;
  -webkit-tap-highlight-color: transparent;
}

.mobile-tabs .tab.active {
  color: var(--accent);
}

.mobile-tabs .tab svg {
  width: 22px;
  height: 22px;
}

/* Voice button in chat input */
.voice-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--bg-secondary);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.voice-btn.recording {
  background: #ef4444;
  color: white;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Share button on messages */
.msg-share-btn {
  padding: 4px 8px;
  font-size: 11px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

/* Mobile breakpoint */
@media (max-width: 768px) {
  /* Hide desktop sidebar */
  .sidebar {
    display: none !important;
  }

  /* Hide right sidebar */
  .right-sidebar {
    display: none !important;
  }

  /* Show bottom tabs */
  .mobile-tabs {
    display: flex;
  }

  /* Main content full width with bottom padding for tabs */
  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
    padding-bottom: 60px;
  }

  /* Top bar adjustments */
  .top-bar {
    padding: 8px 12px !important;
  }

  /* Chat area */
  .chat-messages {
    padding: 8px !important;
  }

  .chat-input-area {
    padding: 8px !important;
  }

  .chat-input-area input,
  .chat-input-area textarea {
    font-size: 16px !important; /* prevent iOS zoom on focus */
  }

  /* Cards full width */
  .card {
    border-radius: 8px !important;
  }

  /* Page content */
  .page-content {
    padding: 12px !important;
  }

  .section-title {
    font-size: 20px !important;
  }

  /* Workflow grid 2 columns on phone */
  .page-content [style*="grid-template-columns: repeat(auto-fill"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Hide desktop-only elements */
  .desktop-only {
    display: none !important;
  }
}

/* Small phones */
@media (max-width: 380px) {
  .mobile-tabs {
    height: 50px;
  }

  .mobile-tabs .tab {
    font-size: 9px;
  }

  .mobile-tabs .tab svg {
    width: 20px;
    height: 20px;
  }
}
