:root {
    --bg-color: #f0f0f0;
    --text-color: #0f0f0f;
    --header-color: #4D4D4D;
    --chat-bg: #FCFCFC;
    --border-color: #ffffff00;
    --primary-color: #312560;
    --message-left-bg: #E9E9EB;
    --message-left-text: #434343;
    --message-right-bg: #4188F6;
    --message-right-text: #ffffff;
    --version-color: #d4d4d4;
    --font-primary: 'Poppins', sans-serif;
    scrollbar-gutter: stable;
}

/* :root {
            --bg-color: #252B60;
            --text-color: #ffffff;
            --chat-bg: #32386D;
            --border-color: #ffffff00;
            --primary-color: #FF5C35;
            --message-left-bg: #E9E9E9;
            --message-left-text: #000000;
            --message-right-bg: #007bff;
            --message-right-text: #ffffff;
            --font-primary: 'Poppins', sans-serif;
            scrollbar-gutter: stable;
        } */
/* :root {
            --bg-color: #f7f7f8;
            --text-color: #333333;
            --chat-bg: #fffeff;
            --border-color: #ffffff00;
            --primary-color: #007bff;
            --message-left-bg: #f7f7f8;
            --message-right-bg: #007bff;
            --message-right-text: #ffffff;
            --font-primary: 'Inter', sans-serif;
            --font-secondary: 'Poppins', sans-serif;
            scrollbar-gutter: stable;
        } */

[data-theme="dark"] {
    --bg-color: #0d0d0e;
    --text-color: #ffffff;
    --chat-bg: #131314;
    --border-color: #40404000;
    /* --primary-color: #0d6efd; */
    --primary-color: #FF5C35;
    --message-left-bg: #1a1a1b;
    --message-left-text: #ffffff;
    --message-right-bg: #0d6efd;
    --message-right-text: #ffffff;
}

/* @media (max-height: 700px) {
    .form-container {
        height: auto !important;
        max-height: 85vh !important;
        overflow: auto !important;
    }

    .form-title {
        font-size: 1.2em !important;
        margin-top: 10px !important;
        margin-bottom: 10px !important;
    }

    .form-row {
        margin-bottom: 8px !important;
    }

    .form-input {
        margin-bottom: 8px !important;
    }

    #messages-container {
        display: flex;
        flex-direction: column;
    }
} */

@media (max-width: 768px) {

    html,
    body {
        width: 100%;
        position: fixed;
        overflow: hidden;
        margin: 0;
        padding: 0;
    }

    .mainBody {
        position: fixed;
        top: 0;
        left: 0;
        right: 5px;
        bottom: 0;
        height: 90vh;
        max-width: 90% !important;
        width: 90% !important;
        overflow: hidden;
        /* -webkit-overflow-scrolling: touch; */
    }

    /* Fix for iOS specifically */
    input,
    textarea {
        font-size: 15px;
        /* Prevents iOS zoom */
    }

    .chatBody {
        flex: 1;
        height: auto;
        min-height: 0;
    }

    .headerContainer {
        padding: 8px 12px;
        gap: 12px;
    }

    .logo-wrapper {
        flex-shrink: 0;
        z-index: 2;
    }

    .logo-image {
        margin-right: 0;
        margin-bottom: 0.75rem;
        max-height: 45px;
        /* Slightly smaller logo on mobile */
    }

    .title {
        font-size: 1.25rem;
        left: 50%;
        transform: translateX(-50%);
    }

    .title:hover {
        transform: translateX(-50%) scale(1.02);
    }

    .logo-wrapper {
        max-width: 120px;
    }

    .header-buttons {
        gap: 4px;
    }

    .note-button,
    .restart-chat {
        padding: 6px;
    }

    .note-button svg,
    .restart-chat svg {
        height: 24px;
        width: 24px;
    }

    #messages-container {
        -webkit-overflow-scrolling: touch;
        /* For iOS momentum scrolling */
        overflow-y: auto;
    }

    #restart-chat-button {
        position: absolute;
        top: 15px;
        right: 15px;
        width: auto;
        margin-left: 0;
        z-index: 10;
        background: none;
        box-shadow: none;
    }

    #messages-container .form-container {
        justify-content: none;
    }
}

html,
body {
    display: flex;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100%;
    height: 100%;
    position: relative;
    flex-direction: column;
}

body {
    font-family: var(--font-primary);
    max-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.error-message {
    color: #ff3b30;
    font-size: 12px;
    margin-top: 4px;
    margin-bottom: 0;
}

.input-error {
    border: 1px solid #ff3b30 !important;
    background-color: rgba(255, 59, 48, 0.05) !important;
}

.form-input:focus.input-error {
    border-color: #ff3b30 !important;
}

.inputBox {
    flex: 1;
    min-width: 0px;
    min-height: 40px;
    background-color: var(--chat-bg);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    padding: 10px;
    box-sizing: border-box;
    resize: vertical;
    font-size: 16px;
    color: var(--text-color);
}

.inputBox:focus {
    outline: none;
    border-color: var(--primary-color);
}

.inputRow {
    display: flex;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    margin-bottom: 0px;
    justify-content: center;
    gap: 10px;
    box-sizing: border-box;
    position: sticky;
    z-index: 10;
    background-color: var(--bg-color);
    /* padding-top: 15px; */
    opacity: 0;
    transform: translateY(100%);
    visibility: hidden;
    height: 0;
    overflow: hidden;
}

/* New class for when input row is visible */
.inputRow.visible {
    opacity: 1;
    /* margin-top: 20px; */
    max-width: 100%;
    transform: translateY(0);
    box-sizing: border-box;
    visibility: visible;
    height: auto;
    overflow: visible;
}

.inputSend {
    background-color: var(--primary-color);
    color: var(--message-right-text);
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    /* Padding inside the button */
    font-size: 16px;
    cursor: pointer;
    /* Changes the cursor to a pointer on hover */
}

.themeButton-new {
    /* margin-left: 0px; */
    background-color: #ffffff00;
    color: var(--text-color);
    border: none;
    border-radius: 8px;
    padding: 8px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 20px;
    /* Changes the cursor to a pointer on hover */
    /* margin-bottom: 20px; */
}

.body {
    background-color: var(--bg-color);
}

* {
    box-sizing: border-box;
    transition: all 0.3s ease-in-out, padding 0s;
}

.mainBody {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--bg-color);
    max-height: 90vh;
    height: 90vh;
    max-width: 60%;
    width: 60%;
    margin-top: 10px;
    margin: 0;
    padding: 10px;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.headerContainer {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: space-between;
    padding: 10px 25px;
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
}

.logo-wrapper {
    display: flex;
    align-items: center;
    width: 33.33%;
    justify-content: flex-start;
}

.title {
    width: 33.33%;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.title:hover {
    cursor: pointer;
    transform: scale(1.02);
    transition: transform 0.2s ease-in-out;
}

.header-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 33.33%;
    justify-content: flex-end;
}

.spacer {
    width: 33.33%;
    display: flex;
    justify-content: flex-end;
}

.note-button {
    background: none;
    border: none;
    color: var(--header-color);
    cursor: pointer;
    padding: 8px;
    display: none;
    transition: all 0.2s ease;
    border-radius: 8px;
}

.note-button:hover {
    background-color: rgba(66, 133, 244, 0.1);
    transform: scale(1.05);
}

.note-button:active {
    transform: scale(0.95);
}

.note-button svg {
    display: block;
}

/* Note Modal Styles */
.note-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.2s ease;
}

.note-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.note-modal-content {
    background-color: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 560px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    animation: slideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.note-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 1px solid #e8eaed;
}

.note-modal-header h2 {
    margin: 0;
    color: #202124;
    font-size: 1.375rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.note-modal-close {
    background: none;
    border: none;
    font-size: 1.75rem;
    color: #5f6368;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.note-modal-close:hover {
    background-color: #f1f3f4;
    color: #202124;
}

.note-modal-close:active {
    background-color: #e8eaed;
}

.note-modal-body {
    padding: 24px 28px;
}

.note-description {
    color: #5f6368;
    margin: 0 0 20px 0;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.note-textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #dadce0;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9375rem;
    color: #202124;
    background-color: #ffffff;
    resize: vertical;
    min-height: 140px;
    max-height: 300px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.note-textarea:hover {
    border-color: #bdc1c6;
}

.note-textarea:focus {
    outline: none;
    border-color: #4285f4;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
}

.note-textarea::placeholder {
    color: #9aa0a6;
}

.note-info {
    margin-top: 20px;
    padding: 16px;
    background-color: #f8f9fa;
    border-radius: 8px;
    font-size: 0.875rem;
    border: 1px solid #e8eaed;
}

.note-info p {
    margin: 0;
    padding: 6px 0;
    color: #5f6368;
    display: flex;
    align-items: center;
    gap: 8px;
}

.note-info p:first-child {
    padding-top: 0;
}

.note-info p:last-child {
    padding-bottom: 0;
}

.note-info strong {
    color: #202124;
    font-weight: 500;
    min-width: 85px;
}

.note-info span {
    color: #202124;
    font-family: 'Courier New', monospace;
    font-size: 0.8125rem;
}

.note-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 28px;
    border-top: 1px solid #e8eaed;
    background-color: #fafafa;
}

.note-cancel-btn,
.note-submit-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.01em;
}

.note-cancel-btn {
    background-color: transparent;
    color: #5f6368;
    border: 1px solid #dadce0;
}

.note-cancel-btn:hover {
    background-color: #f8f9fa;
    border-color: #bdc1c6;
}

.note-cancel-btn:active {
    background-color: #e8eaed;
}

.note-submit-btn {
    background-color: #4285f4;
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.note-submit-btn:hover {
    background-color: #3b78e7;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
}

.note-submit-btn:active {
    background-color: #3367d6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.note-submit-btn:disabled {
    background-color: #dadce0;
    color: #9aa0a6;
    cursor: not-allowed;
    box-shadow: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-30px) scale(0.95);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .headerContainer {
        padding: 8px 12px;
        gap: 12px;
    }

    .title {
        font-size: 1.25rem;
    }

    .logo-wrapper {
        max-width: 120px;
    }

    .header-buttons {
        gap: 4px;
    }

    .note-button,
    .restart-chat {
        padding: 6px;
    }

    .note-button svg,
    .restart-chat svg {
        height: 24px;
        width: 24px;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.1rem;
    }

    .logo-wrapper {
        max-width: 100px;
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .note-modal.show {
        padding: 16px;
    }

    .note-modal-content {
        max-width: 100%;
    }

    .note-modal-header {
        padding: 20px 20px;
    }

    .note-modal-header h2 {
        font-size: 1.25rem;
    }

    .note-modal-body {
        padding: 20px;
    }

    .note-textarea {
        font-size: 1rem;
        padding: 12px 14px;
    }

    .note-info {
        padding: 14px;
    }

    .note-info strong {
        min-width: 75px;
        font-size: 0.8125rem;
    }

    .note-modal-footer {
        padding: 16px 20px;
        flex-direction: column-reverse;
    }

    .note-cancel-btn,
    .note-submit-btn {
        width: 100%;
        padding: 12px 24px;
    }
}

/* .restart-chat {
    width: 33.33%;
    background-color: #ffffff00;
    color: var(--header-color);
    border: none;
    border-radius: 8px;
    padding: 8px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    right: 0;
    align-items: center;
    justify-content: center; 
} */

/* .restart-chat {
    width: 33.33%;
    background-color: #ffffff00;
    color: var(--header-color);
    display: none;
    align-items: center;
    justify-content: flex-end;
    margin-left: auto;
    border: none;
    border-radius: 8px;
    padding: 8px;
    font-size: 16px;
    cursor: pointer;
} */
.restart-chat {
    background: none;
    border: none;
    color: var(--header-color);
    cursor: pointer;
    padding: 8px;
    display: none;
    transition: all 0.2s ease;
    border-radius: 8px;
}

.restart-chat:hover {
    background-color: rgba(66, 133, 244, 0.1);
    transform: scale(1.05);
}

.restart-chat:active {
    transform: scale(0.95);
}

.restart-chat svg {
    display: block;
}

.restart-chat svg:hover {
    cursor: pointer;
    transform: scale(1.05);
    transition: transform 0.2s ease-in-out;
}

.logo-image {
    max-height: 25px;
    margin-right: 1rem;
    width: auto;
    border-radius: 4px;
}

.logo-image:hover {
    cursor: pointer;
    transform: scale(1.02);
    transition: transform 0.2s ease-in-out;
}

.chatHeader {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    /* height: 50px; */
}

.chatBody {
    display: flex;
    flex-direction: column;
    flex: 1;
    background-color: var(--chat-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
    padding: 10px;
    width: 100%;
    padding-right: 0px;
    box-sizing: border-box;
    margin-top: 0px;
    margin-bottom: 15px;
    /* margin-top: 15px; */
    overflow-x: hidden;
    content: none;
}

.body h1 {
    margin: 0;
    /* flex: 1; */
    color: var(--header-color);
    margin-top: 0px;
    padding-top: 0px;
    padding-bottom: 0px;
    font-family: 'poppins', sans-serif;
    font-weight: normal;
}

.chatHeader h1:hover {
    cursor: pointer;
    transform: scale(1.02);
    transition: transform 0.2s ease-in-out;
}

.user-form h2 {
    font-weight: normal;
}

#messages-spacer {
    min-height: 0;
    flex-shrink: 0;
    /* transition: width 0s ease-in-out !important; */
    /* transition: height 0.3s ease-out; */
}

#messages-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    max-width: 100%;
    max-height: 100%;
    min-height: 0;
    background-color: var(--chat-bg);
    padding: 10px;
    padding-right: 5px;
    margin-right: 0 !important;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    scrollbar-width: thin;
    -ms-overflow-style: auto;
    /* Thin scrollbar for Firefox */
    scrollbar-color: var(--bg-color) transparent;
}

#messages-container .form-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* min-height: 50%; */
    margin: auto;
    /* width: min(600px, 90%); */
    flex: 1;
    /*Allow it to take up available space*/
}

/* Webkit scrollbar styling */
#messages-container::-webkit-scrollbar {
    width: 6px;
}

#messages-container::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 3px;
}

#messages-container::-webkit-scrollbar-track {
    background-color: transparent;
}

.message-wrapper {
    display: flex;
    width: 100%;
    padding: 0px;
    margin-bottom: 2px;
    padding-right: 0;
    position: relative;
    box-sizing: border-box;
}

.message-wrapper:has(.message-last),
.message-wrapper:has(.message-single) {
    margin-bottom: 20px;
}

.message-left,
.message-right {
    position: relative;
    padding: 8px 12px;
    word-break: break-word;
    line-height: 1.4;
    max-width: 70%;
    font-size: 14px;
    text-align: left;
    width: fit-content;
    margin-bottom: 2px;
    border-radius: 10px;
    white-space: pre-wrap;
}

/* Left message (AI) styling */
.message-left {
    background-color: var(--message-left-bg);
    border: 1px solid var(--border-color);
    color: var(--message-left-text);
    margin-right: 30px;
    /* box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3); */
}

/* Right message (user) styling */
.message-right {
    background-color: var(--message-right-bg);
    border: 1px solid var(--border-color);
    color: var(--message-right-text);
    margin-left: auto;
    margin-right: 0px !important;
    right: 0 !important;
    /* box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3); */
}

/* Message tails - hidden by default */
.message-left::before,
.message-right::before {
    transition: all 0.3s ease-in-out;
    content: "";
    position: absolute;
    border-style: solid;
    display: none;
    /* Hidden by default */
}

/* Left message tail */
.message-left::before {
    bottom: -10px;
    left: -1px;
    border-width: 10px 10px 0 0;
    border-color: var(--message-left-bg) transparent transparent transparent;
}

/* Right message tail */
.message-right::before {
    bottom: -9px;
    right: -1px;
    border-width: 10px 0 0 10px;
    border-color: var(--message-right-bg) transparent transparent transparent;
}

/* Message types based on position in streak */
.message-first.message-left,
.message-first.message-right {
    border-radius: 10px 10px 5px 5px;
}

.message-middle.message-left,
.message-middle.message-right {
    border-radius: 5px !important;
}

.message-last.message-left {
    border-radius: 5px 5px 10px 0px !important;
}

.message-last.message-right {
    border-radius: 5px 5px 0px 10px !important;
}

.message-single.message-left {
    border-radius: 10px 10px 10px 0px !important;
}

.message-single.message-right {
    border-radius: 10px 10px 0px 10px !important;
}

/* ONLY show tails for last and single messages */
.message-last.message-left::before,
.message-single.message-left::before,
.message-last.message-right::before,
.message-single.message-right::before {
    display: block;
}

/* Dark theme shadows */
/* [data-theme="dark"] .message-left {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .message-right {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);
} */

.form-container {
    background-color: var(--chat-bg);
    border-radius: 8px;
    padding-right: 5px;
    width: min(600px, 90%);
    margin: auto;
    align-self: center;
    /* padding: 20px; */
}



.user-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-title {
    color: var(--text-color);
    font-size: 20px;
    margin: 0;
    padding: 0;
    text-align: center;
    transform: translateY(-20px);
}

.form-row {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    width: 100%;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    width: 100%;
}

.form-group label {
    color: var(--text-color);
    font-size: 14px;
}

.form-input {
    padding: 8px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--message-left-bg);
    color: var(--message-left-text);
    font-size: 14px;
    box-sizing: border-box;
    width: 100%;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-submit {
    padding: 10px;
    background-color: var(--primary-color);
    color: var(--message-right-text);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 18px;
    margin-top: 10px;
}

.form-submit:hover {
    opacity: 0.9;
}

.formQ {
    color: var(--text-color);
    font-size: 16px;
    padding: 0px;
    margin: 0px;
}

.toast-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1000;
    pointer-events: none;
}

.toast {
    background-color: var(--primary-color, #007bff);
    color: white;
    padding: 5px 5px;
    border-radius: 4px;
    margin-top: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    max-width: 50%;
    text-align: center;
    font-size: 12px;
    font-family: var(--font-primary);
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: auto;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    background-color: var(--success-color, #28a745);
}

.toast.error {
    background-color: var(--error-color, #dc3545);
}

.version {
    color: var(--version-color);
    margin-top: 5px;
    margin-bottom: 0px;
    padding-top: 0px;
    padding-bottom: 0px;
    font-weight: normal;
    position: fixed;
    bottom: 0;
}

/* Add this media query for smaller screens */
@media screen and (max-width: 400px) {
    .form-row {
        flex-direction: column;
        /* Change to column layout */
        gap: 15px;
    }

    .form-group {
        width: 100%;
        /* Full width on small screens */
    }

    .form-container {
        padding: 15px 10px;
        /* Adjust padding for small screens */
        width: 95%;
    }
}

@media screen and (max-width: 400px) {
    .header-left {
        flex-direction: column;
        align-items: center;
        gap: 5px;
        /* Reduce gap between items when stacked */
    }

    .chatHeader {
        padding: 5px 0;
        /* Add some padding top/bottom */
        flex-direction: column;
        /* Stack header elements */
        gap: 5px;
    }

    .logo-image {
        height: 25px;
        /* Slightly smaller logo on mobile */
    }

    .chatHeader h1 {
        font-size: 1.2rem;
        /* Smaller font size on mobile */
    }

    .themeButton-new {
        position: absolute;
        right: 20px;
        top: 10px;
    }
}

.typing-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1px 2px;
    height: 20px;
    width: 40px;
}

.typing-dot {
    background-color: var(--message-left-text);
    border-radius: 50%;
    height: 6px;
    width: 6px;
    margin: 0 3px;
    display: inline-block;
    animation: dotPulse 1.5s infinite ease-in-out;
    opacity: 0.6;
}

.typing-dot:nth-child(1) {
    animation-delay: 0s;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dotPulse {

    0%,
    60%,
    100% {
        transform: scale(0.8);
        opacity: 0.6;
    }

    30% {
        transform: scale(1.2);
        opacity: 1;
    }
}

@keyframes scaleOut {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes scaleIn {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(0.95);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes restart-spin {
    0% {
        transform: rotate(0deg);
        animation-timing-function: cubic-bezier(0.68, -0.55, 0.27, 1.55);
        /* EaseInBack */
    }

    10% {
        transform: rotate(-30deg);
        animation-timing-function: cubic-bezier(0.68, -0.55, 0.27, 1.55);
        /* EaseOutBack */
    }

    70% {
        transform: rotate(200deg);
        animation-timing-function: cubic-bezier(0.68, -0.55, 0.27, 1.55);
    }

    85% {
        transform: rotate(170deg);
        animation-timing-function: cubic-bezier(0.68, -0.55, 0.27, 1.55);
    }

    100% {
        transform: rotate(180deg);
    }
}

.restart-chat svg.spin-animate {
    animation: restart-spin 0.9s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.scale-out {
    animation: scaleOut 0.2s ease-in-out forwards;
}

.scale-in {
    animation: scaleIn 0.2s ease-in-out forwards;
}