/* Chatbot container */
.chatbot-container {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 100%;
    max-width: 450px;
    height: 70vh;
    display: none;
    flex-direction: column;
    border-radius: 10px;
    box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.5);
    background-color: #ffffff;
    overflow: hidden;
    z-index: 9999;
}

.chat-header {
    background-color: #00509e;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
    font-weight: bold;
}

.chat-body {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    background-color: #f9f9f9;
    overflow-y: scroll; /* Enable scrolling */
    scrollbar-width: none; /* Hide scrollbar in Firefox */
    -ms-overflow-style: none; /* Hide scrollbar in IE/Edge */
}

.chat-body::-webkit-scrollbar {
    display: none; /* Hide scrollbar in Chrome, Safari, and Edge */
}

.chat-message {
    max-width: 80%;
    margin-bottom: 15px;
    margin-top: 15px;
    padding: 10px;
    border-radius: 10px;
}

.chat-message.bot {
    align-self: flex-start;
    background-color: #e9ecf1;
    color: #333;
}

.chat-message.user {
    align-self: flex-end;
    background-color: #00509e;
    color: white;
}

.chat-message img,
.chat-message video {
    max-width: 100%;
    border-radius: 8px;
    margin-top: 5px;
}

.chat-input {
    display: flex;
    align-items: center;
    padding: 10px;
    border-top: 1px solid #ddd;
    gap: 10px;
}

.chat-input input[type="text"] {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.chat-input button, .chat-input label {
    background-color: #00509e;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2rem;
}

.chat-input button:hover, .chat-input label:hover {
    background-color: #003366;
}

/* File attachment button */
.file-input {
    display: none;
}

.file-name {
    overflow-wrap: break-word;
    padding: 10px;
    font-size: 0.9rem;
    color: #555;
    border-top: 1px solid #ddd;
}

/* Floating Bot Icon */
.floating-bot-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: #00509e;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    font-size: 1.5rem;
}

.floating-bot-icon:hover {
    background-color: #003366;
}

/* Question List */
.question-list {
    margin-top: 20px;
}

.question-item {
    background-color: #00509e;
    color: white;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    text-align: left;
    display: inline-block;
}

.question-item:hover {
    background-color: #003366;
}

.answer-section {
    display: inline-block;
    background-color: #d5e7f5;
    color: #333;
    padding: 10px;
    margin-top: 10px;
    border-radius: 5px;
    align-self: flex-end;
    text-align: right;
}

.answer-section p {
    margin-bottom: 0px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .chatbot-container {
        width: 95%;
        bottom: 10px;
        max-width: none;
        left: 10px;
    }

    .floating-bot-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .chat-input {
        flex-direction: column; /* Stack input and button vertically */
        gap: 5px;
        align-items: stretch;
    }

    .chat-input input[type="text"] {
        width: 100%;
    }

    .chat-input button, .chat-input label {
        width: 100%;
    }
}

/* Button container */
.button-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Responsive grid */
    gap: 15px; /* Space between buttons */
    width: 100%; /* Full width */
    max-width: 800px; /* Limit width on large screens */
    padding: 20px;
    box-sizing: border-box; /* Include padding in width calculation */
}

/* Individual buttons */
.button {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #fff;
    color: #0078d7;
    border: 2px solid #0078d7;
    border-radius: 30px;
    padding: 10px 20px;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s ease;
    box-sizing: border-box; /* Ensures padding doesn't break layout */
}

/* Hover effect */
.button:hover {
    background-color: #0078d7;
    color: #fff;
}

/* Smaller screen adjustments */
@media (max-width: 600px) {
    .button-container {
        padding: 10px; /* Add padding on smaller devices */
    }
    .button {
        font-size: 14px;
        padding: 12px; /* Increase padding for better touch interaction */
    }
}

.chatbot-message {
    margin: 5px 0;
    padding: 10px;
    border-radius: 10px;
}

.bot-message {
    background: #d5e7f5;
    color: #000;
    align-self: flex-start;
}

.hidden-questions {
    display: none;
}