/* Ensure full-height layout for sticky footer */
html, body {
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
}

body {
    padding-bottom: 60px;
    background-color: #f8f9fa;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    flex: 1 0 auto;
}

/* Main content area should grow */
main {
    flex: 1 0 auto;
}

/* Footer should not shrink and should stay at bottom */
footer {
    flex-shrink: 0;
    background-color: #f1f1f1;
    padding: 1rem;
    text-align: center;
    font-size: 0.9rem;
    border-top: 1px solid #ccc;
}

/* Scrollable card body for scraped content */
.scroll-box {
    max-height: 300px;
    overflow-y: auto;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    padding: 1rem;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    white-space: pre-wrap;
}

/* Chat container layout */
.btn-green {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
}
#sendFollowUp {
    background-color: #007bff; /* blue or change to #28a745 for green */
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
}
#downloadDocx {
    background-color: #28a745; /* Green */
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
}

    #downloadDocx:hover {
        background-color: #218838;
    }
#chatPane {
    max-height: 300px;
    overflow-y: auto;
    background: #f9f9f9;
    padding: 10px;
    border-radius: 6px;
}
.chat-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

/* User chat bubble - Bootstrap primary color, right aligned */
.chat-bubble-user {
    align-self: flex-end;
    background-color: var(--bs-primary, #0d6efd);
    color: #fff;
    padding: 0.75rem 1rem;
    border-radius: 1rem 1rem 0 1rem;
    max-width: 75%;
    text-align: right;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Bot chat bubble - Bootstrap light color, left aligned */
.chat-bubble-bot {
    align-self: flex-start;
    background-color: var(--bs-light, #e9ecef);
    color: #212529;
    padding: 0.75rem 1rem;
    border-radius: 1rem 1rem 1rem 0;
    max-width: 75%;
    text-align: left;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Input spacing and responsiveness */
.input-group {
    margin-top: 1rem;
}

input[type="text"].form-control {
    font-size: 1rem;
    padding: 0.5rem;
}

/* Button consistency */
.btn-primary {
    font-weight: 500;
    padding: 0.5rem 1rem;
    font-size: 1rem;
}

/* Alert improvement */
.alert-warning {
    font-size: 0.95rem;
}

/* Card enhancements */
.card {
    border-radius: 0.5rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.card-header {
    font-weight: 600;
    font-size: 1rem;
}

/* Responsive tweaks */
@media (max-width: 576px) {
    .chat-bubble-user,
    .chat-bubble-bot {
        max-width: 100%;
        font-size: 0.9rem;
    }

    .scroll-box {
        max-height: 200px;
    }
}
