/* ABOUTME: Responsive layout styles for mobile viewports */

/* ABOUTME: Handles menu drawer, bottom nav, and touch-friendly spacing */

/*
 * Mobile Layout Styles
 * Responsive styles for mobile views
 */

/* Mobile Menu Drawer */
.mobile-menu-drawer {
  position: fixed;
  inset: 0;
  background: rgb(0 0 0 / 50%);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-menu-drawer.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-radius: var(--radius) var(--radius) 0 0;
  max-height: 80vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.mobile-menu-drawer.open .mobile-menu-content {
  transform: translateY(0);
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  background: white;
  z-index: 1;
}

.mobile-menu-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-900);
}

.mobile-menu-close {
  background: none;
  border: none;
  color: var(--gray-500);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.5rem;
  margin: -0.5rem;
  min-width: 48px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu-close:active {
  color: var(--gray-700);
}

.mobile-menu-items {
  padding: 0.5rem 0;
}

.mobile-menu-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  color: var(--gray-700);
  text-decoration: none;
  transition: background 0.15s ease;
  min-height: 56px; /* Generous touch target */
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-size: 1rem;
  cursor: pointer;
}

.mobile-menu-item i {
  font-size: 1.125rem;
  width: 1.5rem;
  text-align: center;
  color: var(--gray-500);
}

.mobile-menu-item:active {
  background: var(--gray-50);
}

.mobile-menu-item.danger {
  color: var(--error-600);
}

.mobile-menu-item.danger i {
  color: var(--error-600);
}

.mobile-menu-divider {
  height: 1px;
  background: var(--gray-200);
  margin: 0.5rem 1.25rem;
}


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

/* Mobile layout adjustments */
@media (width <= 768px) {
  /* Hide the modal chat overlay - not using it anymore */
  .mobile-chat-overlay {
    display: none !important;
  }

  /* Chat card fills viewport on mobile */
  .chat-card {
    height: 100% !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    display: flex !important;
    flex-direction: column !important;
  }

  /* Show chat header on mobile for visual consistency */
  .chat-card-header {
    flex-shrink: 0;
  }

  /* Make chat body fill remaining space */
  .chat-card .card-body {
    flex: 1 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }
}

/* Desktop: Hide mobile chat overlay */
@media (width >= 769px) {
  .mobile-chat-overlay {
    display: none !important;
  }
}

/* Page header styling - consistent blue headers for Profile, Account, etc. */
.page-header {
  background: var(--primary-50);
  border-bottom: 1px solid var(--primary-100);
  padding: 1rem 0;
  width: 100%;
  display: flex;
  justify-content: center;
  height: 80px;
  box-sizing: border-box;
}

.page-header .container {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-header h2,
.page-header h1 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-900);
}

.page-header p {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--gray-600);
}
