/* AI Assistant Button */
.ai-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #0f6be4;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 20px;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: background-color 0.3s ease;
    z-index: 1000;
}

.assist-top-text {
    font-size: 24px;
    font-weight: bold;
    text-transform: none;
    color: white;
    font: arial;
}

.ai-button:hover {
    background-color: #4185df;
}

.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    top: 100%;
    left: 100%;
    transform: translate(-103%, -103%);
    width: 100%; /* Full width */
    max-width: 500px; /* Max width */
    height: auto; /* Auto height */
    max-height: 90vh; /* Ensure modal doesn't exceed viewport height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.5); /* Black w/ opacity */
    border-radius: 7px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    animation: fadeIn 0.3s;
    z-index: 1001; /* Ensure it's above the button */
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 0;
    border: 1px solid #fefefe;
    width: 100%;
    max-width: 500px; /* Max width */
    border-radius: 7px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    animation: fadeIn 0.3s;
}

.close-btn {
    color: #fefefe;
    float: right;
    font-size: 28px;
    font-weight: bold;
    padding: 10px 15px;
    cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
    color: gray;
    text-decoration: none;
    cursor: pointer;
}

.chat-container {
    display: flex;
    flex-direction: column;
    height: 500px;
}

.chat-header {
    background-color: #0f6be4;
    color: white;
    padding: 15px;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    text-align: center;
}

.chat-box {
    padding: 15px;
    flex-grow: 1;
    overflow-y: auto;
    background-color: #f9f9f9;
    font-size: 16px;
    text-transform: none;
    color: black;
    font: arial;
}

.message {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.message.user .text {
    align-self: flex-end;
    background-color: #DCF8C6;
}

.message.ai .text {
    align-self: flex-start;
    background-color: #e9e4e4;
}

.text {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 20px;
    word-wrap: break-word;
    position: relative;
    font-size: 16px;
    text-transform: none;
    color: black;
    font: arial;
}

#chat-form {
    display: flex;
    border-top: 1px solid #ccc;
    font-size: 16px;
    text-transform: none;
    color: black;
    font: arial;
    background-color: white;
}

#user-input {
    flex-grow: 1;
    padding: 15px;
    border: none;
    font-size: 16px;
    text-transform: none;
    color: black;
    font: arial;
    background-color: #f9f9f9;
}

#user-input:focus {
    outline: none;
    font-size: 16px;
    text-transform: none;
    color: black;
    font: arial;
    background-color: #f9f9f9;
}

#chat-form button {
    border-radius: 5px;
    padding: 15px;
    border: none;
    background-color: #0f6be4;
    color: white;
    cursor: pointer;
    font-size: 16px;
}

#chat-form button:hover {
    background-color: #0f6be4;
}

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

@media (max-width: 600px) {
    .modal-content {
        width: 95%;
        margin: 20px auto;
    }

    .chat-container {
        height: 80vh;
    }
}

.chat-footer {
    display: flex;
    padding: 10px;
    border-top: 1px solid #ccc;
}

.support-button {
    background-color: #0f6be4;
    border: none;
    color: white;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.support-button:hover {
    background-color: #0f6be4;
}