
.grammar-bot-container {
    max-width: 800px;
    margin: 20px auto;
    border: 2px solid #0073aa;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
}

.bot-header {
    background: linear-gradient(135deg, #0073aa 0%, #005177 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.bot-header h3 {
    margin: 0 0 10px 0;
    font-size: 22px;
}

.bot-description {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

.student-name-section {
    padding: 15px 20px;
    background: #f0f8ff;
    border-bottom: 1px solid #d0e8f7;
}

.student-name-section label {
    display: block;
    margin-bottom: 8px;
    color: #0073aa;
}

.student-name-input {
    width: 100%;
    padding: 10px;
    border: 2px solid #0073aa;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

.student-name-input:focus {
    outline: none;
    border-color: #005177;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.bot-chat-window {
    height: 400px;
    overflow-y: auto;
    padding: 20px;
    background: #f9f9f9;
}

.bot-messages {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.bot-message,
.student-message {
    display: flex;
    gap: 10px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.student-message {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.bot-avatar {
    background: #e3f2fd;
}

.student-avatar {
    background: #c8e6c9;
}

.message-content {
    max-width: 70%;
}

.message-text {
    padding: 12px 16px;
    border-radius: 18px;
    line-height: 1.5;
    word-wrap: break-word;
}

.bot-message .message-text {
    background: white;
    border: 1px solid #e0e0e0;
    border-bottom-left-radius: 4px;
}

.student-message .message-text {
    background: #0073aa;
    color: white;
    border-bottom-right-radius: 4px;
}

.bot-input-area {
    padding: 15px;
    background: white;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
}

.bot-input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    transition: border-color 0.2s;
}

.bot-input:focus {
    outline: none;
    border-color: #0073aa;
}

.bot-send-btn {
    padding: 12px 24px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
    white-space: nowrap;
}

.bot-send-btn:hover {
    background: #005177;
}

.bot-send-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.bot-submit-section {
    padding: 15px 20px;
    background: #fff9e6;
    border-top: 2px solid #ffc107;
    text-align: center;
}

.bot-submit-conversation {
    padding: 12px 30px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.bot-submit-conversation:hover {
    background: #218838;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.bot-submit-conversation:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.submit-message {
    margin-top: 10px;
    padding: 10px;
    border-radius: 5px;
    font-weight: 600;
}

.submit-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.submit-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    width: fit-content;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: #999;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

/* Scrollbar styling */
.bot-chat-window::-webkit-scrollbar {
    width: 8px;
}

.bot-chat-window::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.bot-chat-window::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.bot-chat-window::-webkit-scrollbar-thumb:hover {
    background: #555;
}
