/* static/aichatbot.css */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', Courier, monospace;
    background-color: rgb(234, 255, 221);
    color: black;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Navbar - matching dashboard style */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    background-color: rgb(220, 255, 198);
    border-color: black;
    border-style: solid;
    border-bottom-width: 2px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: black;
}

.nav-links {
    display: flex;
    gap: 15px;
}

.nav-btn {
    padding: 8px 16px;
    font-size: 14px;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    border-radius: 4px;
    border: 2px solid black;
    background-color: transparent;
    cursor: pointer;
    transition: 0.3s;
}

.nav-btn:hover {
    background-color: rgb(201, 255, 167);
    color: rgb(0, 0, 0);
}

.logout-btn:hover {
    background-color: #ffcccc;
}

/* Chat Wrapper */
.chat-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    min-height: calc(100vh - 70px);
}

.chat-container {
    width: 100%;
    max-width: 900px;
    background-color: white;
    border: 3px solid black;
    border-radius: 12px;
    box-shadow: 8px 8px 0px rgba(0, 0, 0, 0.8);
    overflow: hidden;
}

/* Header Section */
.header-section {
    background: linear-gradient(135deg, rgb(201, 255, 167), rgb(220, 255, 198));
    padding: 25px;
    text-align: center;
    border-bottom: 3px solid black;
}

.chat-title {
    font-size: 28px;
    margin-bottom: 8px;
    color: black;
}

.chat-subtitle {
    font-size: 14px;
    color: #333;
    margin-bottom: 12px;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background-color: rgba(255, 255, 255, 0.7);
    border: 2px solid black;
    border-radius: 20px;
}

.status-dot {
    width: 10px;
    height: 10px;
    background-color: #00ff00;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-text {
    font-size: 12px;
    font-weight: bold;
}

/* Chat Box */
.chat-box {
    height: 450px;
    overflow-y: auto;
    padding: 25px;
    background-color: #fafafa;
    border-bottom: 3px solid black;
}

.chat-box::-webkit-scrollbar {
    width: 8px;
}

.chat-box::-webkit-scrollbar-thumb {
    background-color: rgb(201, 255, 167);
    border-radius: 10px;
    border: 2px solid black;
}

/* Messages */
.message {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-message {
    flex-direction: row-reverse;
}

.bot-avatar, .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    border: 2px solid black;
    flex-shrink: 0;
}

.bot-avatar {
    background-color: rgb(220, 255, 198);
}

.user-avatar {
    background-color: rgb(255, 220, 198);
}

.message-content {
    max-width: 70%;
    padding: 12px 16px;
    border: 2px solid black;
    border-radius: 12px;
    background-color: white;
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.3);
}

.user-message .message-content {
    background-color: rgb(220, 255, 198);
}

.message-content p {
    margin: 0;
    word-wrap: break-word;
}

.welcome-message {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Typing Indicator */
.typing-indicator .message-content {
    padding: 16px;
}

.typing-dots {
    display: flex;
    gap: 6px;
    align-items: center;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background-color: #666;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Input Area */
.chat-input-area {
    padding: 20px;
    background-color: rgb(220, 255, 198);
}

.input-wrapper {
    display: flex;
    gap: 12px;
    border: 3px solid black;
    border-radius: 8px;
    overflow: hidden;
    background-color: white;
    transition: all 0.3s;
}

.input-wrapper.focused {
    box-shadow: 0 0 0 3px rgba(201, 255, 167, 0.5);
}

#user-input {
    flex: 1;
    padding: 14px;
    border: none;
    outline: none;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
}

.send-btn {
    padding: 0 24px;
    background-color: rgb(201, 255, 167);
    border: none;
    border-left: 3px solid black;
    cursor: pointer;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.send-btn:hover {
    background-color: rgb(180, 255, 140);
}

.send-btn:active {
    transform: scale(0.95);
}

/* Quick Questions */
.quick-questions {
    padding: 20px;
    border-top: 2px dashed #ccc;
    background-color: rgb(240, 255, 230);
}

.quick-label {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 12px;
    color: #333;
}

.quick-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick-btn {
    padding: 8px 14px;
    font-size: 12px;
    font-family: 'Courier New', Courier, monospace;
    background-color: white;
    border: 2px solid black;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.quick-btn:hover {
    background-color: rgb(201, 255, 167);
    transform: translateY(-2px);
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.3);
}

/* Decorative Plants */
.decorative-plants {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    pointer-events: none;
    z-index: 0;
}

.plant {
    position: absolute;
    font-size: 48px;
    opacity: 0.2;
    transition: all 0.3s;
}

.plant-1 {
    bottom: 20px;
    left: 5%;
    animation: sway 3s infinite ease-in-out;
}

.plant-2 {
    bottom: 40px;
    right: 10%;
    animation: sway 4s infinite ease-in-out;
    animation-delay: 0.5s;
}

.plant-3 {
    bottom: 10px;
    left: 50%;
    animation: sway 3.5s infinite ease-in-out;
    animation-delay: 1s;
}

@keyframes sway {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        padding: 12px 20px;
    }

    .logo {
        font-size: 20px;
    }

    .nav-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .chat-container {
        border-radius: 0;
        box-shadow: none;
        border-left: none;
        border-right: none;
    }

    .chat-box {
        height: 350px;
        padding: 15px;
    }

    .message-content {
        max-width: 85%;
    }

    .quick-buttons {
        justify-content: center;
    }
}

