html {
    height: 100%;
    width: 100%;
    font-size: 100%;
}

body {
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    background-color: #282828;
    font-family: 'Roboto';
    font-size: 1.05rem;
    color: #e4e4e4;
}

/* Width and height for Webkit browsers */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

/* Track */
::-webkit-scrollbar-track {
    background: #1a1a1a;
    /* Dark background color */
}

/* Handle */
::-webkit-scrollbar-thumb {
    background: #3c3c3c;
    /* Darker color for the scrollbar handle */
    border-radius: 4px;
    /* Rounded corners for the handle */
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
    background: #5c5c5c;
    /* Darker color when the handle is hovered */
}

.chat-container {
    width: 80vw;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    max-width: 768px;
    height: 75vh;
    height: 75svh;
    background-color: #0f0f0f;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 29px 52px rgba(0, 0, 0, 0.40), 0 25px 16px rgba(0, 0, 0, 0.20);
    padding: 12px;
}

.chat-banner {
    background-image: linear-gradient(to right, #144cea, #7c00b2);
    text-align: center;
    padding: 0.5rem 1rem 0.5rem 0.4rem;
    border-radius: 24px;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #f5f5f5;
}

.banner-left-side {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
}

.avatar {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    width: 36px;
    height: 36px;
    min-width: 24px;
}

#logo-container {
    background-image: var(--helper-avatar);
    margin-right: 3px;
    align-self: center;
}

.helper-avatar {
    background-image: var(--helper-avatar);
}

.user-avatar {
    background-image: var(--user-avatar);
}

#initial-questions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.initial-question {
    margin: 0 0.75rem 0.75rem 0;
    padding: 0.75rem;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 0.75rem;
    background:
        linear-gradient(#000, #0f0f0f) padding-box,
        linear-gradient(to bottom right, #327d92, #bb2dcd) border-box;
}

.initial-question.something-else {
    background:
        linear-gradient(#000, #0f0f0f) padding-box,
        linear-gradient(to bottom right,
            #d24343,
            #42bb31,
            #009fff) border-box;
}

.initial-question.follow-up {
    animation: fadeIn 0.5s ease-in-out;
    background:
        linear-gradient(#000, #0f0f0f) padding-box,
        linear-gradient(to bottom right, #327d92, #bb2dcd) border-box;
}

.chat-banner h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: bold;
    font-family: 'Abel';
    letter-spacing: 0.1rem;
}

#chat-messages {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 1rem 0.5rem;
    overflow-y: auto;
    height: 100%;
}

.message {
    display: flex;
    align-items: flex-start;
    margin-bottom: 16px;
    line-height: 1.6;
}

.message:not(.sent) {
    animation: fadeIn 0.5s ease-in-out;
    /* Add fade-in animation */
}

.message img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-right: 0.2rem;
}

.message p {
    margin: 0.375rem;
}

.message p:not(:first-child):not(:last-child) {
    margin-bottom: 1rem;
}

.message-content {
    padding: 0.375rem;
    max-width: 500px;
    background: #272727;
    border-radius: 0 20px 20px 20px;
}

.message.sent {
    display: flex;
    align-items: flex-end;
    /* Align the reply message to the right */
    justify-content: flex-end;
    /* Align the reply message to the right */
    margin-bottom: 16px;
}

.message.sent .message-content {
    border-radius: 20px 20px 0 20px;
    background-image: linear-gradient(to right, #144cea, #1144d2);
}

.message.sent img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-left: 0.2rem;
}

.timestamp {
    font-size: 0.675rem;
    color: #a9a9aa;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}

.message.sent .timestamp {
    color: #d3d2d2;
}

.user-input {
    display: flex;
    margin: 0.6rem;
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    border: 1px solid #3d3d3d;
}

.user-input #userInputText {
    max-height: 150px;
    overflow-x: hidden;
    overflow-y: auto;
    line-height: 1.25rem;
    padding-right: 0.4rem;
    width: 100%;
}

[contenteditable=plaintext-only]:empty:before {
    content: attr(placeholder);
    color: #616264;
    display: block;
    /* For Firefox */
}

.user-input #userInputText:focus {
    outline: none;
    /* Remove focus border */
}

.user-input #send-button {
    margin-left: auto;
    width: 50px;
    height: 50px;
    border: none;
    background: none;
    cursor: pointer;
    align-self: center;
    background-image: url('/static/images/send_plane_icon.png');
    background-repeat: no-repeat;
    background-size: 24px;
    background-position: right 10px center;
    min-width: 50px;
}

.user-input:hover {
    border: 1px solid #4b4b4b;
}

/* Default link color */
a {
    color: #7ab7ff;
    /* Blue color */
    text-decoration: none;
    /* Remove underline */
}

/* Visited link color */
a:visited {
    color: #7ab7ff;
    /* Purple color */
}

/* Active link color */
a:active {
    color: #7ab7ff;
    /* Red color */
}

/* Hover effect - slightly change brightness */
a:not(.from):hover {
    filter: brightness(85%);
    /* Reduce brightness to 85% */
}

/* Media query for mobile devices */
@media only screen and (max-width: 1024px) {
    #user-question {
        margin-bottom: 0.3rem;
    }

    .chat-container {
        width: 100vw;
        max-width: 100vw;
        height: 100vh;
        height: 100svh;
        padding: 0px;
        border-radius: 0;
    }

    .chat-banner {
        border-radius: 0;
        margin: 0;
    }

    .message p {
        font-size: 1rem;
        margin: 0.1875rem;
    }

    .message-content {
        padding: 0.5rem;
        margin: 0 0.375rem;
    }
}

@media only screen and (max-width: 768px) {
    .avatar {
        width: 24px;
        height: 24px;
        min-width: 24px;
    }

    .chat-banner {
        border-radius: 0;
        margin: 0 0 0.5rem 0;
    }

    .message.sent img,
    .message img {
        width: 24px;
        height: 24px;
    }

    .message.sent img {
        margin-left: 0.075rem;
    }

    .message img {
        margin-right: 0.075rem;
    }

    .disclaimer {
        padding: 0rem 0.5rem 1.5rem 0.5rem !important;
    }
}

/* Animations */
.typing-animation {
    display: flex;
    align-items: center;
    padding: 0.125rem 0.375rem;
}

.dot {
    width: 10px;
    height: 10px;
    background: #8d8d8d;
    border-radius: 50%;
    animation: blink 1.5s infinite;
    animation-fill-mode: both;
    margin-right: 0.375rem;
}

.dot:nth-child(2) {
    animation-delay: 0.2s;
}

.dot:nth-child(3) {
    animation-delay: 0.4s;
}

.from {
    text-decoration: none;
    color: inherit;
    text-decoration: none;
    font-size: 1.2rem;
    font-family: 'PT Sans';
}

a.from:visited {
    color: #e4e4e4;
}

.just-from {
    font-family: 'Caveat';
    font-size: 1.3rem;
    margin-right: 0.2rem;
}

.blinking-cursor {
    font-family: 'Abel';
    animation: 1s cursorBlink step-end infinite;
    font-size: 1rem;
    vertical-align: middle;
    vertical-align: revert;
}

.disclaimer {
    color: #a3a7a5;
    font-size: 0.75rem;
    align-self: center;
    padding: 0.2rem 0.5rem 1rem 0.5rem;
}

.spin-animation {
    animation: spin 0.6s ease-in-out;
}

@keyframes blink {
    0% {
        opacity: 0.1;
    }

    20% {
        opacity: 1;
    }

    100% {
        opacity: 0.1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cursorBlink {

    from,
    to {
        color: transparent;
    }

    50% {
        color: #e4e6eb;
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(180deg);
    }
}