/* General Styles */
body {
    background-color: #f4f4f4;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    font-family: 'Roboto', sans-serif;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 800px;
    height: 100%;
    padding: 10px;
}

/* Chat Window Styles */
.chat-window {
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    width: 100%;
    height: 80vh;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.chat-header {
    background-color: #0078d7;
    color: #ffffff;
    padding: 15px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
}

.chat-box {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    word-wrap: break-word;
}

.message {
    margin: 10px 0;
    font-size: 14px;
    line-height: 1.5;
    padding: 10px;
    border-radius: 8px;
}

.message.user {
    text-align: left;
    background-color: #e6e6e6;
    margin-left: auto;
    max-width: 75%;
}

.message.assistant {
    text-align: left;
    background-color: #ffffff;
    margin-right: auto;
    max-width: 75%;
}

.chat-footer {
    display: flex;
    align-items: flex-end;
    padding: 10px;
    gap: 10px;
    border-top: 1px solid #ddd;
    position: relative;
}

textarea {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    font-size: 14px;
    resize: none;
    font-family: inherit;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    max-height: 150px;
    overflow-y: auto;
    min-height: 36px;
}

textarea:focus {
    border-color: #0078d7;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 120, 215, 0.5);
}

button#send-button {
    position: absolute;
    right: 15px;
    bottom: 15px;
    background-color: #0078d7;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

button:hover:enabled {
    background-color: #005a9e;
}

svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Support Ticket Form Styles */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.ticket-form {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    animation: fadeIn 0.3s ease-in-out;
}

.ticket-form h3 {
    margin-top: 0;
    color: #333;
    text-align: center;
}

.ticket-form label {
    display: block;
    margin-top: 15px;
    font-weight: bold;
    color: #555;
}

.ticket-form input,
.ticket-form textarea {
    width: 90%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
}

.ticket-form button#submit-ticket-button {
    margin-top: 20px;
    width: 100%;
    background: #007bff;
    color: #fff;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ticket-form button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.ticket-form button:hover:enabled {
    background: #0056b3;
}

.loading {
    color: #007bff;
    text-align: center;
    font-size: 16px;
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading:before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 10px;
    border: 3px solid #007bff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Close Button */
.close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
}

.close-button:hover {
    color: #333;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
    .ticket-form {
        width: 95%;
        padding: 15px;
    }

    .ticket-form h3 {
        font-size: 18px;
    }

    .ticket-form input,
    .ticket-form textarea {
        font-size: 13px;
        padding: 8px;
    }

    .ticket-form button {
        font-size: 14px;
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .ticket-form {
        width: 100%;
        border-radius: 0;
        padding: 10px;
    }

    .ticket-form h3 {
        font-size: 16px;
    }

    .ticket-form input,
    .ticket-form textarea {
        font-size: 12px;
        padding: 6px;
    }

    .ticket-form button {
        font-size: 12px;
        padding: 6px 10px;
    }
}
