/**
 * Expert Profile V2 - Mobile Optimizations
 * Mobile-first action hierarchy for expert profiles
 * Version: 1.0.1 - Debug mode enabled
 */

/* DEBUG: Test if CSS is loading */
body {
    --mobile-css-loaded: true;
}

/* ========================================
   MOBILE: BREADCRUMB FIXES
   ======================================== */

@media (max-width: 768px) {
    .profile-back-nav {
        padding: 0px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .breadcrumb-nav {
        flex-wrap: nowrap;
        gap: 8px;
        white-space: nowrap;
        min-width: min-content;
    }
    
    .breadcrumb-item {
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .breadcrumb-separator {
        flex-shrink: 0;
    }
    
    /* Hide scrollbar but keep functionality */
    .profile-back-nav::-webkit-scrollbar {
        display: none;
    }
    .profile-back-nav {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    
    /* Remove side padding from profile sections */
    .profile-container {
        padding: 0;
    }
    
    .profile-left-panel,
    .profile-right-panel {
        padding-left: 0;
        padding-right: 0;
    }
    
    .profile-header,
    .profile-section,
    .profile-bio,
    .expertise-tags,
    .profile-stats,
    .work-experience-section,
    .education-section,
    .portfolio-section,
    .highlights-section,
    .faqs-section {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    /* Smart Request Modal - One option per line on mobile */
    .modal-categories-grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }
    
    .smart-request-modal {
        max-height: 95vh;
        border-radius: 16px 16px 0 0;
    }
    
    .smart-request-modal-overlay {
        padding: 0;
        align-items: flex-end;
    }
    
    .modal-header {
        padding: 20px 16px;
    }
    
    .modal-body {
        padding: 16px;
    }
    
    .modal-category-card {
        padding: 14px;
    }
    
    .modal-section-title {
        font-size: 16px;
    }
    
    .modal-section-subtitle {
        font-size: 13px;
    }
}

/* ========================================
   MOBILE: HIDE DESKTOP ELEMENTS
   ======================================== */

@media (min-width: 769px) {
    .mobile-bottom-action-bar,
    .mobile-floating-chat-btn,
    .mobile-floating-plans-btn,
    .mobile-drawer,
    .mobile-drawer-overlay,
    .mobile-smart-request-card {
        display: none !important;
    }
}

/* ========================================
   MOBILE: SHOW MOBILE ELEMENTS
   ======================================== */

@media (max-width: 768px) {
    /* Hide desktop right panel on mobile */
    .profile-right-panel {
        display: none !important;
    }
    
    /* Full width left panel on mobile */
    .profile-left-panel {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Add bottom padding to content for sticky action bar */
    .profile-container {
        padding-bottom: 80px;
    }
}

/* ========================================
   MOBILE: INLINE SMART REQUEST CARD
   ======================================== */

.mobile-smart-request-card {
    display: none;
    background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
    border: 1px solid #BAE6FD;
    border-radius: 12px;
    padding: 20px;
    margin-top: 16px;
}

@media (max-width: 768px) {
    .mobile-smart-request-card {
        display: block;
    }
}

.mobile-smart-request-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.mobile-smart-request-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0EA5E9;
}

.mobile-smart-request-text {
    flex: 1;
}

.mobile-smart-request-title {
    font-size: 16px;
    font-weight: 600;
    color: #0F172A;
    margin: 0 0 4px 0;
}

.mobile-smart-request-description {
    font-size: 14px;
    color: #475569;
    margin: 0;
    line-height: 1.5;
}

.btn-mobile-smart-request {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #0EA5E9;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-mobile-smart-request:active {
    transform: scale(0.98);
    background: #0284C7;
}

/* ========================================
   MOBILE: FLOATING CHAT BUTTON
   ======================================== */

.mobile-floating-chat-btn {
    display: none;
    position: fixed;
    bottom: 90px;
    right: 16px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    cursor: pointer;
    z-index: 999;
    transition: all 0.3s;
}

@media (max-width: 768px) {
    .mobile-floating-chat-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.mobile-floating-chat-btn:active {
    transform: scale(0.95);
}

/* ========================================
   MOBILE: FLOATING PLANS BUTTON
   ======================================== */

.mobile-floating-plans-btn {
    display: none;
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
    cursor: pointer;
    z-index: 998;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .mobile-floating-plans-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.mobile-floating-plans-btn:active {
    transform: scale(0.95);
}

/* ========================================
   MOBILE: BOTTOM STICKY ACTION BAR
   ======================================== */

.mobile-bottom-action-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #E5E7EB;
    padding: 12px 16px;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    gap: 12px;
}

@media (max-width: 768px) {
    .mobile-bottom-action-bar {
        display: flex !important;
        align-items: center;
    }
}

.mobile-action-chat-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: transparent;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    color: #6B7280;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.mobile-action-chat-icon:active {
    background: #F3F4F6;
    transform: scale(0.95);
}

.mobile-action-primary {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.mobile-action-primary:active {
    transform: scale(0.98);
    box-shadow: 0 1px 4px rgba(59, 130, 246, 0.3);
}

.mobile-action-more-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: transparent;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    color: #6B7280;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.mobile-action-more-icon:active {
    background: #F3F4F6;
    transform: scale(0.95);
}

/* ========================================
   MOBILE: DRAWER SYSTEM
   ======================================== */

.mobile-drawer-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    animation: fadeIn 0.3s ease;
}

@media (max-width: 768px) {
    .mobile-drawer-overlay {
        display: block;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.mobile-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 20px 20px 0 0;
    max-height: 80vh;
    z-index: 1002;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: none;
    flex-direction: column;
}

@media (max-width: 768px) {
    .mobile-drawer {
        display: flex;
    }
}

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

.mobile-drawer-handle {
    width: 40px;
    height: 4px;
    background: #D1D5DB;
    border-radius: 2px;
    margin: 12px auto 8px;
    flex-shrink: 0;
}

.mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #F3F4F6;
    flex-shrink: 0;
}

.mobile-drawer-title {
    font-size: 18px;
    font-weight: 600;
    color: #0F172A;
    margin: 0;
}

.mobile-drawer-subtitle {
    font-size: 14px;
    color: #64748B;
    margin: 0 0 16px 0;
    padding: 0 20px;
}

.mobile-drawer-close {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    color: #6B7280;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.mobile-drawer-close:active {
    background: #F3F4F6;
}

.mobile-drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    -webkit-overflow-scrolling: touch;
}

.mobile-drawer-footer {
    padding: 16px 20px;
    border-top: 1px solid #F3F4F6;
    background: white;
    flex-shrink: 0;
}

/* ========================================
   MOBILE: BOOKING DRAWER
   ======================================== */

.mobile-session-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-session-card {
    background: #F9FAFB;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.mobile-session-card:active {
    transform: scale(0.98);
    border-color: #3B82F6;
    background: #EFF6FF;
}

.mobile-session-card.selected {
    border-color: #3B82F6;
    background: #EFF6FF;
}

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

.mobile-session-duration {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #0F172A;
}

.mobile-session-price {
    font-size: 16px;
    font-weight: 700;
    color: #3B82F6;
}

.price-amount {
    font-size: 16px;
    font-weight: 700;
}

.mobile-no-slots {
    text-align: center;
    padding: 40px 20px;
}

.mobile-no-slots-icon {
    width: 64px;
    height: 64px;
    color: #D1D5DB;
    margin: 0 auto 16px;
}

.mobile-no-slots-text {
    font-size: 15px;
    color: #64748B;
    margin: 0 0 20px 0;
}

.btn-mobile-request-slot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #F3F4F6;
    color: #374151;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-mobile-request-slot:active {
    background: #E5E7EB;
}

.btn-mobile-confirm-booking {
    width: 100%;
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.btn-mobile-confirm-booking:active {
    transform: scale(0.98);
}

/* ========================================
   MOBILE: MORE MENU
   ======================================== */

.mobile-more-menu-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mobile-more-menu-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid #F3F4F6;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.mobile-more-menu-item:last-child {
    border-bottom: none;
}

.mobile-more-menu-item:active {
    background: #F9FAFB;
}

.mobile-more-menu-item > i:first-child {
    color: #6B7280;
    flex-shrink: 0;
}

.mobile-more-menu-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mobile-more-menu-label {
    font-size: 15px;
    font-weight: 600;
    color: #0F172A;
}

.mobile-more-menu-description {
    font-size: 13px;
    color: #64748B;
}

.mobile-more-menu-item > i:last-child {
    color: #D1D5DB;
    flex-shrink: 0;
}

.mobile-more-menu-item-danger {
    color: #DC2626;
}

.mobile-more-menu-item-danger .mobile-more-menu-label {
    color: #DC2626;
}

.mobile-more-menu-item-danger > i:first-child {
    color: #DC2626;
}

/* ========================================
   MOBILE: PLANS DRAWER
   ======================================== */

.mobile-plans-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mobile-plan-card {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.mobile-plan-card:active {
    transform: scale(0.98);
    border-color: #3B82F6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.mobile-plan-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.mobile-plan-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.mobile-plan-type-badge.mentorship {
    background: #EEF2FF;
    color: #4F46E5;
}

.mobile-plan-type-badge.consultation {
    background: #F0FDF4;
    color: #16A34A;
}

.mobile-plan-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.price-cycle {
    font-size: 13px;
    font-weight: 500;
    color: #64748B;
}

.mobile-plan-name {
    font-size: 17px;
    font-weight: 600;
    color: #0F172A;
    margin: 0 0 8px 0;
}

.mobile-plan-description {
    font-size: 14px;
    color: #64748B;
    line-height: 1.5;
    margin: 0 0 16px 0;
}

.btn-mobile-purchase-plan {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-mobile-purchase-plan:active {
    transform: scale(0.98);
}
