:root {
    --primary-color: #0d6efd;
    --primary-dark: #0b5ed7;
    --bg-color: #f8f9fa;
    --text-color: #333;
    --bot-msg-bg: #e9ecef;
    --user-msg-bg: #0d6efd;
    --white: #ffffff;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --modal-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

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

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Dashboard */
.dashboard {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.header h2 {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.header p {
    color: #6c757d;
}

.questions-container {
    display: none; /* Moved to chatbot */
}

.search-bar {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-bar i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
}

.search-bar input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.search-bar input:focus {
    border-color: var(--primary-color);
}

.questions-list {
    list-style: none;
    overflow-y: auto;
    padding-right: 10px;
}

.questions-list li {
    padding: 12px 15px;
    border-bottom: 1px solid #f1f3f5;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.q-text {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.q-text::before {
    content: '\f059';
    font-family: 'FontAwesome';
    color: var(--primary-color);
}

.copy-q-btn {
    background-color: #f1f3f5;
    color: var(--primary-color);
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.copy-q-btn:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.questions-list li:hover {
    background-color: rgba(13, 110, 253, 0.05);
    color: var(--primary-color);
    transform: translateX(5px);
}

.questions-list::-webkit-scrollbar {
    width: 8px;
}
.questions-list::-webkit-scrollbar-thumb {
    background: #ced4da;
    border-radius: 4px;
}

/* Chatbot Button */
.chatbot-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: transform 0.3s, background-color 0.3s;
    z-index: 1000;
}

.chatbot-button:hover {
    transform: scale(1.1);
    background-color: var(--primary-dark);
}

/* Chatbot Window */
.chatbot-window {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    height: 550px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--modal-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform-origin: bottom right;
}

.chatbot-window.hidden {
    opacity: 0;
    transform: scale(0.5);
    pointer-events: none;
}

.chat-header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-dropdown-container {
    padding: 10px 15px;
    background-color: #f1f3f5;
    border-bottom: 1px solid #dee2e6;
}

.faq-dropdown {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--text-color);
    background-color: var(--white);
    outline: none;
    cursor: pointer;
}

.faq-dropdown:focus {
    border-color: var(--primary-color);
}

.chat-title {
    font-weight: 500;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-btn {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #ffd700;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.95rem;
    word-wrap: break-word;
    animation: fadeIn 0.3s ease;
}

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

.message.bot {
    align-self: flex-start;
    background-color: var(--bot-msg-bg);
    color: var(--text-color);
    border-bottom-left-radius: 4px;
}

.message.user {
    align-self: flex-end;
    background-color: var(--user-msg-bg);
    color: var(--white);
    border-bottom-right-radius: 4px;
}

.chat-input-container {
    padding: 15px;
    border-top: 1px solid #dee2e6;
    display: flex;
    gap: 10px;
    background: var(--white);
}

.chat-input-container input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ced4da;
    border-radius: 24px;
    outline: none;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.chat-input-container input:focus {
    border-color: var(--primary-color);
}

.send-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background-color: var(--primary-color);
    color: var(--white);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.send-btn:hover {
    background-color: var(--primary-dark);
}

/* Responsive */
@media (max-width: 480px) {
    .chatbot-window {
        width: 100vw;
        height: 100vh;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }
    .chatbot-button {
        bottom: 20px;
        right: 20px;
    }
}

/* Custom formatting for chat lists and links */
.chat-list {
    margin: 8px 0 8px 25px;
    padding: 0;
    line-height: 1.5;
}

.chat-list li {
    margin-bottom: 4px;
}

.chat-link {
    color: #4a90e2;
    text-decoration: underline;
    word-break: break-all;
    font-weight: 500;
}

.chat-link:hover {
    color: #0b5ed7;
}
