/* Mobile-First Chat Experience Enhancement */

/* Mobile Chat - Full Screen Takeover Approach */
@media (max-width: 768px) {
    
    /* Hero Section - More Compact on Mobile */
    #hero-section {
        min-height: auto;
        padding-bottom: 40px;
    }
    
    .hero-content {
        padding: 40px 20px;
    }
    
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.1;
        margin-bottom: 15px;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 30px;
    }
    
    /* Hero CTAs - Stack and Make Prominent */
    .hero-cta-group {
        flex-direction: column;
        gap: 15px;
    }
    
    .hero-primary-cta {
        width: 100%;
        padding: 18px 30px;
        font-size: 1.1rem;
        border-radius: 30px;
        background: #000;
        position: relative;
        animation: pulse-subtle 2s infinite;
    }
    
    @keyframes pulse-subtle {
        0%, 100% { box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2); }
        50% { box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3); }
    }
    
    .hero-secondary-cta {
        display: none; /* Hide secondary CTA on mobile */
    }
    
    /* AI Evaluation Section - Full Mobile Optimization */
    #ai-evaluation {
        padding: 0;
        margin-top: -1px;
        border-top: none;
        background: #000;
    }
    
    #ai-evaluation::before {
        display: none; /* Remove badge on mobile */
    }
    
    .evaluation-container {
        padding: 0;
        max-width: 100%;
    }
    
    /* Hide header on mobile - go straight to chat */
    .evaluation-header {
        display: none;
    }
    
    /* Chat Container - Full Screen Experience */
    .chat-container {
        height: calc(100vh - 60px);
        min-height: 600px;
        border: none;
        border-radius: 0;
        margin: 0;
        max-width: 100%;
        box-shadow: none;
        display: flex;
        flex-direction: column;
    }
    
    /* Active Advisor Bar - Floating Style */
    .active-advisor-bar {
        background: #000;
        padding: 15px;
        position: sticky;
        top: 0;
        z-index: 100;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .active-advisor-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 3px;
    }
    
    .active-advisor-info span {
        font-size: 0.75rem;
        opacity: 0.6;
        text-transform: uppercase;
        letter-spacing: 1px;
    }
    
    .active-advisor-info strong {
        font-size: 1.1rem;
        font-weight: 600;
    }
    
    .advisor-switch-hint {
        background: rgba(255, 255, 255, 0.1);
        padding: 6px 12px;
        border-radius: 15px;
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    /* Chat Header - Cleaner Mobile Design */
    .chat-header {
        background: linear-gradient(180deg, #000 0%, #111 100%);
        padding: 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .chat-header-flex {
        margin-bottom: 8px;
    }
    
    .chat-advisor-name {
        font-size: 1.3rem;
        font-weight: 600;
    }
    
    .chat-status {
        font-size: 0.75rem;
    }
    
    .status-dot {
        width: 6px;
        height: 6px;
    }
    
    .chat-subtitle {
        font-size: 0.85rem;
        line-height: 1.3;
        opacity: 0.8;
    }
    
    /* Conversation Area - Optimized for Mobile */
    .conversation {
        flex: 1;
        background: #fff;
        padding: 20px 15px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Messages - Better Mobile Sizing */
    .message {
        margin-bottom: 18px;
    }
    
    .message.system .message-content {
        background: #f5f5f5;
        border-left: 3px solid #000;
        padding: 15px;
        border-radius: 8px;
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    .message.system .message-content p {
        margin: 0 0 10px 0;
    }
    
    .message.system .message-content strong {
        display: block;
        margin-bottom: 8px;
        font-size: 1rem;
    }
    
    .message.user .message-content {
        background: #000;
        color: white;
        padding: 12px 16px;
        border-radius: 18px 18px 4px 18px;
        font-size: 0.95rem;
        max-width: 85%;
        margin-left: auto;
    }
    
    /* Input Area - Mobile Optimized */
    .input-area {
        background: #fff;
        border-top: 1px solid #e0e0e0;
        padding: 12px;
        position: sticky;
        bottom: 0;
    }
    
    .input-container {
        display: flex;
        gap: 10px;
        align-items: center;
    }
    
    #user-input {
        flex: 1;
        padding: 12px 16px;
        border: 1px solid #ddd;
        border-radius: 24px;
        font-size: 16px; /* Prevents iOS zoom */
        min-height: 44px;
        max-height: 100px;
        background: #f8f8f8;
        transition: all 0.2s ease;
    }
    
    #user-input:focus {
        outline: none;
        background: #fff;
        border-color: #000;
        box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
    }
    
    #user-input::placeholder {
        color: #999;
        font-size: 14px;
    }
    
    #send-button {
        width: auto;
        padding: 0 16px;
        height: 44px;
        border-radius: 4px;
        background: #000;
        border: none;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        font-size: 14px;
        font-weight: 600;
        color: white;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    #send-button:active {
        transform: scale(0.98);
        background: #333;
    }
    
    #send-button svg {
        display: none; /* Hide icon on mobile */
    }
    
    #send-button::after {
        content: 'Send';
    }
    
    /* Stats Section - Compact on Mobile */
    .evaluation-stats {
        background: #f8f8f8;
        padding: 40px 20px;
        margin-top: 0;
    }
    
    .stats-row {
        gap: 0;
        justify-content: space-around;
    }
    
    .stat {
        padding: 0 10px;
    }
    
    .stat-value {
        font-size: 1.8rem;
        font-weight: 700;
    }
    
    .stat-label {
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-top: 4px;
    }
    
    /* Team Section on Mobile - Card Style */
    #team {
        padding: 60px 20px;
        background: #fff;
    }
    
    .team-grid {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
    
    .team-member {
        background: #fff;
        border: 2px solid #000;
        border-radius: 12px;
        padding: 20px;
        position: relative;
        cursor: pointer;
        transition: all 0.2s ease;
    }
    
    .team-member:active {
        transform: scale(0.98);
        background: #f8f8f8;
    }
    
    .team-member.active {
        background: #000;
        color: white;
    }
    
    .team-member.active .member-title,
    .team-member.active .member-bio,
    .team-member.active .stat-label {
        color: rgba(255, 255, 255, 0.8);
    }
    
    .team-member.active::after {
        content: 'ACTIVE';
        position: absolute;
        top: 15px;
        right: 15px;
        background: white;
        color: #000;
        padding: 4px 10px;
        font-size: 10px;
        letter-spacing: 1px;
        font-weight: 700;
        border-radius: 4px;
    }
    
    .member-card {
        display: flex;
        align-items: flex-start;
        gap: 15px;
    }
    
    .member-avatar {
        width: 60px;
        height: 60px;
        background: #000;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
    
    .team-member.active .member-avatar {
        background: white;
    }
    
    .avatar-initials {
        color: white;
        font-size: 1.2rem;
        font-weight: 600;
    }
    
    .team-member.active .avatar-initials {
        color: #000;
    }
    
    .member-content {
        flex: 1;
    }
    
    .member-content h3 {
        font-size: 1.3rem;
        margin-bottom: 4px;
    }
    
    .member-title {
        font-size: 0.85rem;
        color: #666;
        margin-bottom: 10px;
    }
    
    .member-bio {
        font-size: 0.9rem;
        line-height: 1.4;
        margin-bottom: 12px;
    }
    
    .member-expertise,
    .member-stats {
        display: none; /* Hide on mobile for cleaner look */
    }
    
    .member-cta {
        background: #000;
        color: white;
        padding: 12px;
        border-radius: 8px;
        text-align: center;
        margin-top: 15px;
    }
    
    .team-member.active .member-cta {
        background: white;
        color: #000;
    }
    
    .member-cta-text {
        font-size: 0.9rem;
        font-weight: 600;
        display: block;
    }
    
    .member-cta-text::after {
        content: ' →';
    }
    
    /* Floating Action Button Style for Mobile */
    .mobile-advisor-toggle {
        display: block;
        position: fixed;
        bottom: 80px;
        right: 20px;
        width: 60px;
        height: 60px;
        background: #000;
        color: white;
        border-radius: 50%;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        font-weight: 600;
        text-align: center;
        line-height: 1.2;
    }
    
    /* Hide elements that don't work on mobile */
    .evaluation-notice {
        display: none;
    }
    
    /* Navigation on Mobile */
    .nav-container {
        padding: 15px 20px;
    }
    
    .nav-links {
        display: none; /* Hide desktop nav on mobile */
    }
    
    /* Safe area for iPhone notch */
    @supports (padding: max(0px)) {
        .active-advisor-bar {
            padding-top: max(15px, env(safe-area-inset-top));
        }
        
        .input-area {
            padding-bottom: max(12px, env(safe-area-inset-bottom));
        }
    }
}

/* Landscape Mobile Adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    .chat-container {
        height: calc(100vh - 40px);
        min-height: 400px;
    }
    
    .active-advisor-bar {
        padding: 10px 15px;
    }
    
    .chat-header {
        padding: 10px 15px;
    }
    
    .conversation {
        padding: 15px;
    }
}

/* Small Mobile (iPhone SE, etc) */
@media (max-width: 375px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .chat-advisor-name {
        font-size: 1.1rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    #user-input {
        font-size: 16px;
        padding: 10px 14px;
    }
}

/* Hide desktop-only elements on mobile */
@media (max-width: 768px) {
    #app {
        display: none !important;
    }
    
    .advisor-selector {
        display: none;
    }
}