﻿/* Ensure full-page layout */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* Chat container fills available space while leaving room for footer */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 180px); /* Leaves space for footer */
    background-color: #FFFFFF;
}

/* Messages area takes up all space between header & input */
.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Chat message wrapper */
.chat-message-container {
    display: flex;
    align-items: flex-start;
    width: 100%;
    margin-bottom: 10px;
}

/* Align AI messages to the left */
.ai-message-container {
    justify-content: flex-start;
}

/* Align User messages to the right */
.user-message-container {
    justify-content: flex-end;
}

/* Chat message bubbles */
.chat-message {
    max-width: 60%;
    padding: 12px;
    border-radius: 10px;
    word-wrap: break-word;
}

/* User messages */
.user-message {
    background-color: #f1f1f1;
    color: black;
    border-bottom-right-radius: 5px;
    align-self: flex-end;
}

/* Ensure AI messages are stacked correctly */
.ai-message-container {
    display: flex;
    flex-direction: column; /* Stack avatar above response */
    align-items: flex-start;
    width: 100%;
    margin-bottom: 15px;
}

/* AI Message Header (Holds Avatar or Animation) */
.ai-message-header {
    display: flex;
    align-items: center;
    margin-bottom: 5px; /* Adds spacing between avatar and response */
}

/* AI Message Bubble */
.ai-message {
    background-color: #f1f1f1;
    color: black;
    padding: 12px;
    border-radius: 10px;
    max-width: 60%;
    word-wrap: break-word;
    border-bottom-left-radius: 5px;
}

/* AI Avatar */
.ai-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* AI Thinking Animation (Same Size as Avatar) */
.ai-animation {
    width: 40px; /* Match avatar size */
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.ai-animation video {
    width: 100%; /* Half the avatar size */
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.highchart-container {
    width: 100%;
    min-width: 500px;
    margin: 10px 0;
    border-radius: 8px;
    overflow: hidden;
}

.highchart {
    min-height: 400px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Chat input bar */
.chat-input-container {
    display: flex;
    align-items: center;
    padding: 10px;
    background-color: white;
    border-top: 1px solid #ddd;
    gap: 10px;
    width: 100%;
    position: relative;
}

/* Siri-style AI typing animation */
.ai-wave-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 40px;
    margin-top: 10px;
}

.wave {
    width: 6px;
    height: 20px;
    margin: 0 4px;
    background-color: #007aff;
    border-radius: 10px;
    animation: wave-animation 1.2s infinite ease-in-out;
}

.ai-disclaimer {
    font-size: 0.8rem;
    color: #888;
    margin-top: 8px;
    font-style: italic;
}

@keyframes wave-animation {
    0%, 100% { transform: scaleY(0.3); opacity: 0.5; }
    50% { transform: scaleY(1); opacity: 1; }
}

.initial-greeting {
    text-align: center;
    padding: 15px;
}

.logo-container {
    margin-bottom: 10px;
}

.beatcortex-logo {
    height: 35px;
    width: auto;
    vertical-align: middle;
    margin-left: 8px;
}

.website-link {
    display: inline-block;
    margin-top: 10px;
    color: #3f51b5;
    text-decoration: none;
    font-weight: bold;
}

.website-link:hover {
    text-decoration: underline;
}