/* ============================================
   MOBILE APP - Layout (Header, Navigation, Tabs)
   ============================================ */

/* Mobile Header */
.mobile-header {
    display: none;
    background: var(--mobile-background);
    border-bottom: 1px solid var(--mobile-border);
    padding: var(--mobile-space-md) var(--mobile-space-lg);
    position: sticky;
    top: 0;
    z-index: var(--mobile-z-sticky);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.mobile-app .mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-header-logo {
    display: flex;
    align-items: center;
    gap: var(--mobile-space-sm);
    text-decoration: none;
    color: var(--mobile-text-primary);
}

.mobile-header-logo img {
    height: 32px;
    width: auto;
}

.mobile-header-title {
    font-size: var(--mobile-text-lg);
    font-weight: 600;
    color: var(--mobile-text-primary);
}

.mobile-header-search-btn {
    display: none; /* Removed - search is available in bottom navigation */
}

/* Bottom Navigation - Modern iOS Style */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    /* Modern iOS: Semi-transparent with strong blur */
    background: rgba(251, 251, 253, 0.8); /* iOS system background with transparency */
    border-top: 0.5px solid rgba(60, 60, 67, 0.29); /* Subtle border like iOS */
    z-index: var(--mobile-z-fixed);
    padding: 8px 0;
    padding-bottom: max(8px, env(safe-area-inset-bottom, 8px));
    /* Strong blur for modern iOS glass effect */
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    /* Subtle shadow for depth */
    box-shadow: 0 -0.5px 0 rgba(0, 0, 0, 0.1);
}

.mobile-app .bottom-nav {
    display: flex;
}

.bottom-nav-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 100%;
    width: 100%;
    padding: 0 8px; /* Consistent padding like iOS */
    height: 49px; /* Standard iOS tab bar height (49pt) */
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px; /* Tight gap between icon and label like iOS */
    flex: 1;
    padding: 6px 8px; /* Modern iOS spacing */
    background: none;
    border: none;
    color: rgba(60, 60, 67, 0.85); /* Darker text for better visibility */
    cursor: pointer;
    transition: color 0.2s ease, transform 0.1s ease;
    text-decoration: none;
    min-width: 0;
    position: relative;
    /* Ensure minimum touch target (44x44pt iOS standard) */
    min-height: 44px;
    min-width: 44px;
}

.bottom-nav-item:active {
    transform: scale(0.96);
    opacity: 0.6;
}

.bottom-nav-item.active {
    color: #007AFF; /* iOS system blue */
}

.bottom-nav-item-icon {
    width: 28px; /* iOS standard icon size */
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.bottom-nav-item-icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    /* Darker icons for better visibility */
    opacity: 0.8;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.bottom-nav-item.active .bottom-nav-item-icon img {
    /* Modern iOS: Active icons are fully opaque and slightly larger */
    opacity: 1;
    transform: scale(1.05);
}

.bottom-nav-item-label {
    font-size: 10px; /* iOS standard label size (10pt) */
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    letter-spacing: -0.01em; /* Slight letter spacing like iOS */
    line-height: 1.2;
}

/* Modern iOS: Remove top bar indicator, use filled icon style instead */
/* Active state is now handled by icon opacity and color change */

/* Tab Content Areas */
.tab-content {
    display: none;
    width: 100%;
    min-height: calc(100vh - 60px - 80px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--mobile-background);
}

.tab-content.active {
    display: block;
}

/* Chat tab content should fill available space without scrolling */
.tab-content#chatTabContent {
    display: none;
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
    background: var(--mobile-background);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding-top: env(safe-area-inset-top, 0px);
}

.tab-content#chatTabContent.active {
    display: flex;
    flex-direction: column;
}

