/* Form Styling */

/*new css*/

/* Styling for the unavailable chat message */
#chat-container.unavailable {
    display:flex;
    align-items:center;
    justify-content:center;
    text-align: center; /* Center the text */
    padding: 15px; /* Add padding for better spacing */
    background-color: #f9f9f9; /* Light grey background */
    border: 1px solid #e0e0e0; /* Add a border */
    border-radius: 8px; /* Rounded corners */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Add a subtle shadow */
    max-width: 70%; /* Limit the width for better readability */
    margin: 0 auto; /* Center the container horizontally */
}

#chat-container.unavailable .message {
    
    color: #333; /* Dark grey text color */
    font-size: 16px; /* Increase font size for better readability */
    line-height: 1.6; /* Improve line spacing */
    margin: 0; /* Remove default margin */
}

#chat-container.unavailable .message strong {
    color: #0073e6; /* Theme color for emphasis */
}

/* Chat container */
#chat-container {
    width: 85%; /* Take 80% of the screen width */
    max-width: 1000px;
    margin: 0 auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #f9f9f9;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Adjust width for smaller screens (e.g., phones) */
@media (max-width: 768px) {
    #chat-container {
        width: 100%; /* Take up the full width on smaller screens */
        border-radius: 0; /* Remove rounded corners for full-width effect */
        border-left: none;
        border-right: none;
    }
}

/* Chat messages area */
#chat-messages {
    height: 400px;
    overflow-y: auto;
    padding: 20px;
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;

}

/* Individual message */
.message {
    margin-bottom: 15px;
    padding: 10px 15px;
    border-radius: 8px;
    max-width: 70%;
    word-wrap: break-word;
}

/* User message */
.user-message {
    background-color: #0073e6;
    color: #ffffff;
    margin-left: auto;
}

/* Bot message */
.bot-message {
    background-color: #e0e0e0;
    color: #333;
    margin-right: auto;
}

/* Chat header area */
#chat-header {
    display: flex;
    flex-direction: column; /* Stack elements vertically */
    padding: 15px; /* Add more padding for better spacing */
    background-color: #f9f9f9;
    border-bottom: 1px solid #e0e0e0; /* Slightly thicker and themed border */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Add a subtle shadow for depth */
    border-radius: 8px 8px 0 0; /* Rounded corners on the top */
    text-align: center; /* Center align the text */
}

#chat-header h4 {
    margin: 0; /* Remove default margin */
    font-size: 1.2rem; /* Set a readable font size */
    font-weight: bold; /* Make the title stand out */
    color: #0073e6; /* Theme-colored title */
}

#chat-header h5 {
    margin: 5px 0 0; /* Add space between the elements */
    font-size: 0.9rem; /* Smaller font size for the subtitle */
    color: #4f4f4f; /* Subtle gray text */
    line-height: 1.4; /* Improve readability */
}

/* Chat input area */
#chat-input {
    display: flex;
    padding: 10px;
    background-color: #f9f9f9;
    
}

/* Input field */
#chat-input-field {
    flex: 1;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
}

/* Send button */
#chat-send-button {
    margin-left: 10px;
    padding: 10px 10px;
    background-color: #0073e6;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

#chat-send-button:hover {
    background-color: #005bb5;
}

/* Loading state */
.loading {
    text-align: center;
    font-size: 16px;
    color: #0073e6;
    padding: 10px;
}

/* Error message */
.error {
    color: #ff0000;
    font-weight: bold;
}
/*old css*/

#deepseek-form {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

#deepseek-form input[type="text"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 16px;
    color: #333;
    outline: none;
    transition: border-color 0.3s ease;
}

#deepseek-form input[type="text"]:focus {
    border-color: #0073e6;
}

#deepseek-form button[type="submit"] {
    width: 100%;
    padding: 12px;
    background-color: #0073e6;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#deepseek-form button[type="submit"]:hover {
    background-color: #005bb5;
}

/* Response Styling */
#deepseek-response {
    max-width: 500px;
    margin: 20px auto;
    padding: 20px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    font-size: 16px;
    color: #333;
    line-height: 1.6;
}

#deepseek-response pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

/* Loading Animation */
#deepseek-response.loading {
    text-align: center;
    font-size: 18px;
    color: #0073e6;
}

#deepseek-response.loading::after {
    content: " ";
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #0073e6;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Bot message styling */
.bot-message strong {
    color: #0073e6; /* Theme color for bold text */
}

.bot-message ul {
    list-style-type: disc; /* Bullet points */
    margin-left: 20px; /* Indent bullet points */
    padding-left: 10px;
}

.bot-message li {
    margin-bottom: 5px; /* Space between bullet points */
}

.bot-message code {
    background-color: #f4f4f4; /* Light gray background for code */
    padding: 2px 5px;
    border-radius: 3px;
    font-family: monospace;
    color: #d63384; /* Pinkish color for code */
}

/* Animation for user messages */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Animation for bot messages */
@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Apply animations to user and bot messages */
.user-message {
    animation: slideInRight 0.4s ease-out;
}

.bot-message {
    animation: slideInLeft 0.4s ease-out;
}