
/********CONSULTANT CARD - INTRO PAGES TO BODY OBJ, MEAL PLANNER, CREATE FOODS ETC************/	

.consultant-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 15px;
    padding: 5px 30px !important; /* 5px Top/Bottom, 30px Left/Right */
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    margin: 20px auto;
    position: relative;
    /*overflow: hidden;*/
    /*min-height: 280px;*/
}

.consultant-info {
    flex: 1;
    text-align: left;
    padding-right: 20px;
}

.consultant-info h3 {
    font-size: 22px;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 400;
}

.consultant-info h3 strong {
    color: #56ab2f; /* Green Branding */
}

.consultant-info p {
    font-size: 16px;
    color: #555;
    line-height: 1.6;
}

.consultant-profile {
    width: 180px;
    text-align: center;
}

.consultant-profile img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    /* FIX: Ensures the top of the image (the head) is prioritized in the crop */
    object-position: top center; 
    border: 4px solid #f8f9fa;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-bottom: 10px;
}

.consultant-name {
    font-weight: bold;
    color: #333;
    font-size: 18px;
    margin-bottom: 2px;
}

.consultant-role {
    font-size: 14px;
    color: #888;
}

/* THE TITLE ROW - Forces header to span full width */
.consultant-title-row h3 {
    text-align: left !important; /* Forces left alignment */
    margin: 0 !important;
    padding: 0 !important;
    font-weight: 400; /* Keeps the non-bold part professional */
    color: #333;
}

/* BRANDING: Targets only the bold parts (Michael, Body Wellness Consultant, etc.) */
.consultant-title-row h3 strong {
    color: #56ab2f !important; /* Signature BSM Green */
    font-weight: 700;
}


.card-footer-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: #56ab2f; /* Progress bar look */
}

/* REMOVE EXCESS MARGIN FROM MICHAEL'S INTRO */
.consultant-info h3 {
    margin-top: 5px !important; /* Prevents the heading from pushing itself down */
}

/* Mobile Responsive Fixes */
@media (max-width: 600px) {
    .consultant-card {
        flex-direction: column-reverse;
        text-align: center;
        padding: 20px;
    }
    .consultant-info {
        padding-right: 0;
        margin-top: 20px;
        text-align: center;
	}
	.consultant-title-row h3 {
        text-align: center;
        font-size: 18px; /* Slightly smaller for mobile comfort */
        line-height: 1.3;
        margin-bottom: 15px !important;
    }		
  }
  
  
  /*fixes to above - remove duplication */
  
  @media (max-width: 600px) {
    .consultant-card {
        padding: 15px !important;
        text-align: left !important; /* Keep the overall briefing left-aligned */
    }

    .consultant-main-row {
        display: flex !important;
        flex-direction: column-reverse !important; /* Avatar on top, Text below */
    }

    /* THE FIX: Force the profile container to be full width and center its contents */
    .consultant-profile {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important; /* Horizontal Centering */
        justify-content: center !important;
        margin: 0 0 20px 0 !important; /* Adds some breathing room under the avatar */
    }

    .consultant-profile img {
        margin: 0 auto 10px auto !important; /* Double-check centering of the image */
    }
    
    .consultant-info {
        width: 100% !important;
        padding-right: 0 !important;
        text-align: left !important; /* Keeps the professional left-aligned look */
    }

    .consultant-title-row h3 {
        text-align: left !important; /* Ensures the header doesn't jump to center */
        margin-bottom: 15px !important;
    }
}
   
/***************************MINI CONSULTANT AVATAR*******************************************************************/	
/* THE BSM CONSULTANT LEAD SYSTEM */
.bsm-consultant-lead {
    display: inline-flex;
    align-items: center;
    gap: 12px; /* Space between Michael and the button/link */
    margin: 10px 0;
}

.bsm-mini-avatar {
    width: 32px; /* Slightly larger than before for better visibility */
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top center;
    border: 2px solid #eee;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    flex-shrink: 0; /* Prevents Michael from getting squished */
}

/* Optional: Subtle animation to draw the eye to the guide */
.bsm-consultant-lead:hover .bsm-mini-avatar {
    transform: scale(1.1);
    border-color: #56ab2f;
    transition: 0.3s ease;
}


/********************************** INTELLIGENT AGENT CHAT*****************************/

.chat-container {
    /* width: 580px;  */ 
    background: #ffffff;    
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
    display: flex;
	flex-direction: column;
	height: 85vh; 
	max-height: 900px;
	border: 1px solid #ddd;
	border-radius: 8px;
	/*overflow: hidden;*/ 
}

.chat-messages {
    flex: 1 1 auto;
    min-height: 0;       /* critical for scroll */
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}


    .chat-header {
        padding: 20px;
        text-align: center;
        background: #f2f7f6;
        border-bottom: 1px solid #e3ecea;
    }

    .chat-header img {
        width: 90px;
        border-radius: 50%;
        margin-bottom: 10px;
    }

    .chat-header h2 {
        margin: 0;
        font-size: 20px;
        font-weight: 600;
        color: #3a4a47;
    }

.chat-messages {
    flex: 1 1 auto;
    min-height: 0; /* CRITICAL */
    overflow-y: auto;
}


    .chat-bubble {
        max-width: 80%;
        padding: 12px 16px;
        border-radius: 16px;
        font-size: 15px;
        line-height: 1.4;
        animation: fadeIn 0.3s ease;
    }

    .chat-user {
        align-self: flex-end;
        background: #d8f3e3;
        color: #2f4f3f;
        border-bottom-right-radius: 4px;
    }

    .chat-ai {
        align-self: flex-start;
        background: #f1f5f4;
        color: #3a4a47;
        border-bottom-left-radius: 4px;
    }

    @keyframes fadeIn {
        from { opacity: 0; transform: translateY(6px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .chat-input-area {
        padding: 16px;
        display: flex;
        gap: 10px;
        background: #f7faf9;
        border-top: 1px solid #e3ecea;
    }

    .chat-input-area input {
        flex: 1;
        padding: 12px 14px;
        border-radius: 14px;
        border: 1px solid #cfd9d6;
        font-size: 15px;
        outline: none;
    }

    .chat-input-area button {
        padding: 12px 18px;
        background: #7ac4a8;
        border: none;
        border-radius: 14px;
        color: white;
        font-weight: 600;
        cursor: pointer;
        transition: 0.2s;
    }
	.chat-body { 
	/*	
	display: flex; 
	flex-direction: column; 
	flex: 1 1 auto; 
	min-height: 0;
	*/
	}

    .chat-input-area button:hover {
        background: #6ab89b;
    }
    
    .chat-thinking {
        align-self: flex-start;
        background: #f1f5f4;
        color: #6b7a76;
        padding: 10px 16px;
        border-radius: 16px;
        font-size: 14px;
        opacity: 0.8;
        font-style: italic;
        border-bottom-left-radius: 4px;
        animation: fadeIn 0.3s ease;
    }


.username-highlight {
    font-weight: 700;
    color: #6ab89b; /* calming wellness green */
    text-transform: capitalize;
}

.proceed-btn { 
	padding: 12px 20px; 
	background: #7ac4a8; 
	border: none; 
	border-radius: 14px; 
	color: white; 
	font-weight: 600; 
	cursor: pointer; 
	margin-top: 10px; 
} 
.proceed-btn:hover { background: #6ab89b; }

.chat-options {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.chat-option-btn {
    padding: 10px 14px;
    background: #e8f3ef;
    border: 1px solid #c7ded6;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
}

.chat-option-btn:hover {
    background: #d9ece6;
}

.chat-option-btn:first-child {
    background: #6fbf9f;      /* darker green for triage preferred option */
    border-color: #5aa98b;
    color: white;
}

.chat-option-btn:first-child:hover {
    background: #63b391;      /* slightly darker on hover */
}



.proceed-btn {
    padding: 12px 20px;
    background: #7ac4a8;
    border: none;
    border-radius: 14px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
}

.proceed-btn:hover {
    background: #6ab89b;
}


 /* CHAT CONTROLS CSS EG VOICE AND MIC */
   .chat-controls-stack {
       display: flex;
       flex-direction: column;
       margin-left: 5px;
       width: 40px; 
       gap: 4px; 
       flex-shrink: 0; 
   }

   /* !IMPORTANT added to override Theme defaults */
   .chat-control-btn {
       flex: 1; 
       border: 1px solid #ccc !important;
       background: #ffffff !important; 
       cursor: pointer;
       font-size: 20px !important; /* Force Large Icon */
       line-height: 1 !important;
       padding: 0 !important; /* Remove theme padding */
       margin: 0 !important;
       border-radius: 4px;
       color: #555 !important;
       display: flex;
       align-items: center;
       justify-content: center;
       min-width: 100% !important;
       box-shadow: none !important;
   }
   
   .chat-control-btn:hover {
       background: #f0f0f0 !important;
   }

   /* Active States */
   .chat-voice-active {
       background: #d4edda !important;
       border-color: #28a745 !important;
       color: #155724 !important;
   }

   .chat-mic-active {
       background: #f8d7da !important;
       border-color: #dc3545 !important;
       color: #721c24 !important;
       animation: chat-pulse 1.5s infinite;
   }

   @keyframes chat-pulse {
       0% { opacity: 1; }
       50% { opacity: 0.6; }
       100% { opacity: 1; }
   }
   
   #messages {
    /* 1. Restrict height so internal scrolling triggers */
    height: 60vh;          /* Uses 60% of the screen height */
    max-height: 600px;     /* Cap it so it doesn't get too huge */
    
    /* 2. Enable internal scrolling */
    overflow-y: auto;
    
    /* 3. Smoothness and spacing */
    scroll-behavior: smooth;
    padding: 20px;
    
    /* 4. Ensure it fills width */
    width: 100%;
    box-sizing: border-box;
}

/* Optional: Make the scrollbar thin/subtle so it doesn't look like a "double bar" */
#messages {
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}
   
   