/* Import Font Awesome */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css');

#pws-ai-tutor-chatbot {
    position: fixed;
    bottom: 0;
    right: 20px;
    font-family: 'Arial', sans-serif;
    max-width: 100%;
    z-index: 1000;
}

#pws-ai-tutor-chatbot-button {
    background-color: #007bff;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    text-align: center;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

#pws-ai-tutor-chatbot-button .icon-wrapper {
    margin-right: 10px;
}

#pws-ai-tutor-chat-window {
    display: none;
    flex: 1;
    flex-direction: column;
    justify-content: space-between;
    background-color: #f5f5f5;
    border-radius: 15px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    padding: 20px 10px 60px;
    width: 400px;
    min-height: 600px;
    max-height: 600px;
    overflow: hidden;
    position: fixed;
    bottom: 70px;
    right: 20px;
}


#pws-ai-tutor-chat-window.expanded {
    height: 90%;
    width: calc(100% - 40px);
    max-height: none;
    bottom: 70px;
    right: 20px;
    border-radius: 15px;
}

@media (max-width: 600px) {
    #pws-ai-tutor-chat-window.expanded {
        width: calc(100% - 40px);
        height: calc(100% - 40px);
        bottom: 70px;
        right: 20px;
        border-radius: 15px;
    }
}

#pws-ai-tutor-chat-header {
    display: flex;
    justify-content: flex-end;
    padding-bottom: 10px;
    position: absolute;
    top: 0;
    right: 10px;
    font-size: 24px;
}

#pws-ai-tutor-expand-button, #pws-ai-tutor-close-button {
    cursor: pointer;
    margin-left: 10px;
    transition: all 300ms linear;
}

#pws-ai-tutor-send-button {
    cursor: pointer;
    transition: all 300ms linear;
}

#pws-ai-tutor-expand-button:hover, #pws-ai-tutor-close-button:hover, #pws-ai-tutor-send-button:hover {
    color: #007bff;
}

#pws-ai-tutor-chat-messages {
    flex: 1;
    overflow-y: auto;
    margin: 10px 0;
}

#pws-ai-tutor-chat-messages::-webkit-scrollbar {
    width: 8px;
}

#pws-ai-tutor-chat-messages::-webkit-scrollbar-track {
    background: #f0f0f0;
}

#pws-ai-tutor-chat-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
}

#pws-ai-tutor-chat-messages::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

#pws-ai-tutor-chat-messages {
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f0f0f0;
}

#pws-ai-tutor-chat-input-container {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    max-width: 1024px;
    margin: 0 auto;
}

#pws-ai-tutor-chat-input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 15px;
    margin-right: 10px;
    box-shadow: 0 0 15px rgba(0, 122, 254, 0.2);
}

#pws-ai-tutor-chat-input:focus {
    box-shadow: 0 0 15px rgba(0, 122, 254, 0.4);
}

#pws-ai-tutor-send-button {
    cursor: pointer;
    font-size: 20px;
}

@media (max-width: 600px) {
    #pws-ai-tutor-chatbot {
        width: 100%;
        right: 0;
        bottom: 0;
    }

    #pws-ai-tutor-chat-window {
        width: calc(100% - 40px);
        border-radius: 15px 15px 0 0;
    }
}

.typing-indicator {
    display: flex;
    justify-content: center;
}

.typing-indicator span {
    display: inline-block;
    margin: 1em 2px 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #9e9e9e;
    animation: typing 1s infinite;
}

@keyframes typing {
    0% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0); }
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

/* Quick Replies */
.quick-replies {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 10px;
}

.quick-replies button {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 5px 15px;
    margin: 5px;
    cursor: pointer;
}

.message {
    display: flex;
    margin-bottom: 10px;
    align-items: center;
}

.bot-message .avatar {
    margin-right: 10px;
}

.user-message {
    flex-direction: row-reverse;
}

.avatar-container {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 10px;
}

.avatar-icon {
    font-size: 24px;
    color: #666;
}

.user-message .avatar-container {
    margin-right: 0;
    margin-left: 10px;
}

.message-box {
    padding: 0.5em 0.75em;
    border-radius: 10px;
    max-width: 70%;
}

.message-box p {
    margin-bottom: 0;
}

.bot-message .message-box {
    background-color: #e9e9eb;
}

.user-message .message-box {
    background-color: #007bff;
    color: #ffffff;
}