/* BC MQI Color Scheme */
:root {
    --bcmqi-blue: #003366;
    --bcmqi-light-blue: #0066cc;
    --bcmqi-green: #006633;
    --bcmqi-gray: #f5f5f5;
    --bcmqi-white: #ffffff;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: var(--bcmqi-gray);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.main-header {
    background: linear-gradient(135deg, var(--bcmqi-blue) 0%, var(--bcmqi-light-blue) 100%);
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    color: white;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 30px;
}

.logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    flex-shrink: 0;
}

.header-text {
    flex: 1;
    text-align: center;
}

.header-text h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
}

.header-text p {
    font-size: 1.2rem;
    margin: 0.5rem 0 0 0;
    color: #e6f3ff;
}



/* Disclaimer */
.disclaimer {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 5px;
    padding: 15px;
    margin: 20px 0;
    text-align: center;
}

.disclaimer p {
    margin: 0;
    color: #856404;
    font-size: 0.95rem;
}

/* Chat Container */
.chat-container {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    min-height: 300px;
    display: none; /* Hidden by default */
}

.chat-container.has-messages {
    display: block; /* Show when there are messages */
}

.chat-container h3 {
    margin: 0 0 1rem 0;
    color: var(--bcmqi-blue);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.chat-history {
    max-height: 500px;
    overflow-y: auto;
}

.message {
    margin: 1rem 0;
    padding: 1rem;
    border-radius: 10px;
}

.user-message {
    background: var(--bcmqi-gray);
    border-left: 4px solid var(--bcmqi-blue);
}

.bot-message {
    background: #e6f3ff;
    border-left: 4px solid var(--bcmqi-light-blue);
    line-height: 1.6;
}

.bot-message p {
    margin: 0.5rem 0;
}

.bot-message ol, .bot-message ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.bot-message li {
    margin: 0.25rem 0;
}

/* Feedback buttons */
.feedback-section {
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.feedback-btn {
    background: none;
    border: 1px solid #ddd;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.feedback-btn:hover {
    background: #f0f0f0;
}

.feedback-message {
    font-size: 0.9em;
    color: #28a745;
}

/* Question Section */
.question-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.question-section h3 {
    color: var(--bcmqi-blue);
    margin-bottom: 1rem;
}

.question-form textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--bcmqi-gray);
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 15px;
}

.question-form textarea:focus {
    outline: none;
    border-color: var(--bcmqi-light-blue);
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.2);
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.submit-btn {
    background: var(--bcmqi-blue);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    flex: 1;
}

.submit-btn:hover {
    background: var(--bcmqi-light-blue);
}

.submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.terms-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.terms-btn:hover {
    background: #5a6268;
}

.terms-notice {
    text-align: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
}

.terms-notice small {
    color: #666;
    font-size: 0.85em;
}

/* Footer */
.footer {
    background: var(--bcmqi-blue);
    color: white;
    text-align: center;
    padding: 1rem;
    border-radius: 10px;
    margin-top: 2rem;
}

.footer a {
    color: #e6f3ff;
    text-decoration: none;
    margin: 0 10px;
}

.footer a:hover {
    text-decoration: underline;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    background: var(--bcmqi-blue);
    color: white;
    padding: 1rem 2rem;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    opacity: 0.7;
}

.modal-body {
    padding: 2rem;
}

.warning-box {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 5px;
    padding: 20px;
    margin: 15px 0;
}

.warning-box ul {
    margin: 10px 0;
    padding-left: 25px;
}

.warning-box li {
    margin: 8px 0;
}

.info-box {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 5px;
    padding: 20px;
    margin: 15px 0;
}

.info-box ol {
    margin: 10px 0;
    padding-left: 25px;
}

.info-box li {
    margin: 8px 0;
}

.modal-footer {
    padding: 1rem 2rem;
    border-top: 1px solid #eee;
}

.close-btn {
    background: var(--bcmqi-blue);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
}

.close-btn:hover {
    background: var(--bcmqi-light-blue);
}

/* Loading Overlay */
.loading-overlay {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
}

.loading-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--bcmqi-blue);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .logo {
        width: 60px;
        height: 60px;
    }

    .header-text h1 {
        font-size: 2rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}
