/* HealTrack Chat Panel Styles */
.chat-panel {
    width: 350px;
    background: linear-gradient(135deg, #EEEFE0 0%, #F5F5F0 100%);
    border-left: 1px solid rgba(129, 154, 145, 0.2);
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease, transform 0.3s ease;
    position: relative;
}

.chat-panel.collapsed {
    width: 0;
    transform: translateX(100%);
    overflow: hidden;
    border-left: none;
}

.chat-header {
    padding: 22px 20px;
    background: #034C53;
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.chat-container {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.msg {
    max-width: 90%;
    padding: 10px 15px;
    border-radius: 16px;
    font-size: 13px;
    line-height: 1.5;
}

.msg.bot {
    background: white;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
    border: 1px solid rgba(129, 154, 145, 0.1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.msg.user {
    background: linear-gradient(135deg, #4C585B 0%, #4C585B 100%);
    color: white;
    border-bottom-right-radius: 4px;
    align-self: flex-end;
}

.chat-input-area {
    padding: 15px;
    background: white;
    display: flex;
    gap: 10px;
    border-top: 1px solid rgba(129, 154, 145, 0.2);
}

.chat-input-area input {
    flex: 1;
    border-radius: 20px;
    padding: 10px 15px;
    border: 1px solid rgba(129, 154, 145, 0.3);
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}

.chat-input-area input:focus {
    border-color: #4C585B;
}

.chat-input-area button {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #4C585B 0%, #4C585B 100%);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 18px;
    transition: transform 0.2s;
}

.chat-input-area button:hover {
    transform: scale(1.1);
}

.toggle-chat {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4CAF50 0%, #45A049 100%);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(129, 154, 145, 0.4);
    z-index: 100;
    font-size: 24px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.toggle-chat:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(129, 154, 145, 0.5);
}

.loader-dots {
    display: flex;
    gap: 3px;
    padding: 10px 15px;
}

.loader-dots span {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #4C585B;
    border-radius: 50%;
    animation: bounce 1.4s infinite;
}

.loader-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loader-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Medical disclaimer in chat */
.chat-disclaimer {
    padding: 10px;
    background: #FFF3CD;
    border-left: 3px solid #FFC107;
    font-size: 11px;
    color: #856404;
    margin: 10px;
    border-radius: 4px;
}