/* Chat Section */
.chat-section {
    padding: 2rem;
    background-color: #FFFBCA;
    min-height: calc(100vh - 200px);
}

.chat-container {
    max-width: 1000px;
    margin: 0 auto;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 80vh;
}

.chat-header {
    background: linear-gradient(135deg, #4635B1, #B771E5);
    color: white;
    padding-top: 50px;
    padding-bottom: 30px;
    text-align: center;
}

.chat-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.chat-header p {
    opacity: 0.9;
    font-size: 1.1rem;
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    max-width: 80%;
    padding: 1rem;
    border-radius: 12px;
    position: relative;
    animation: fadeIn 0.3s ease;
}

.user-message {
    background-color: #4635B1;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.bot-message {
    background-color: #B771E5;
    color: white;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.message-content {
    line-height: 1.5;
}

.message-content p {
    margin-bottom: 0.5rem;
}

.message-content p:last-child {
    margin-bottom: 0;
}

/* Typing Indicator */
.typing-indicator {
    display: none;
    padding: 1rem;
    align-self: flex-start;
}

.typing-indicator.active {
    display: flex;
    gap: 0.5rem;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background-color: #B771E5;
    border-radius: 50%;
    animation: typing 1s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

/* Chat Form */
.chat-form {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background-color: white;
    border-top: 1px solid #eee;
}

.chat-form input {
    flex: 1;
    padding: 1rem;
    border: 2px solid #B771E5;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.chat-form input:focus {
    outline: none;
    border-color: #4635B1;
}

.chat-form button {
    background-color: #4635B1;
    color: white;
    border: none;
    padding: 0 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-form button:hover {
    background-color: #B771E5;
}

.chat-form button i {
    font-size: 1.2rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes typing {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .chat-section {
        padding: 1rem;
    }

    .chat-container {
        height: calc(100vh - 150px);
    }

    .message {
        max-width: 90%;
    }

    .chat-form {
        padding: 1rem;
    }

    .chat-form input {
        padding: 0.8rem;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .chat-container {
        border: 2px solid #000;
    }

    .chat-form input {
        border: 2px solid #000;
    }

    .message {
        border: 1px solid #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .message,
    .typing-indicator span {
        animation: none;
    }
}

/* Focus Styles */
.chat-form input:focus,
.chat-form button:focus {
    outline: 2px solid #4635B1;
    outline-offset: 2px;
}

@media (prefers-contrast: high) {
    .chat-form input:focus,
    .chat-form button:focus {
        outline: 2px solid #000;
    }
} 