@font-face {
    font-display: swap;
    font-family: 'Optimistic Display';
    font-style: normal;
    font-weight: 300;
    src: url(/fonts/optimistic-display-normal.woff2) format('woff2');
}

@font-face {
    font-display: swap;
    font-family: 'Optimistic Display';
    font-style: normal;
    font-weight: 500;
    src: url(/fonts/optimistic-display-bold.woff2) format('woff2');
}

@font-face {
    font-display: swap;
    font-family: 'Optimistic Text';
    font-style: normal;
    font-weight: 400;
    src: url(/fonts/optimistic-text-normal.woff2) format('woff2');
}

@font-face {
    font-display: swap;
    font-family: 'Optimistic Text';
    font-style: normal;
    font-weight: 500;
    src: url(/fonts/optimistic-display-bold.woff2) format('woff2');
}

@font-face {
    font-display: swap;
    font-family: 'Optimistic Text';
    font-style: normal;
    font-weight: 700;
    src: url(/fonts/optimistic-display-vbold.woff2) format('woff2');
}

html {
    font-family: "Optimistic Display", Montserrat, Helvetica, Arial, "Noto Sans", sans-serif;
    background: #f9f9f9;
    color: white;
    text-align: center;
    margin: 0;
    padding: 0;
    background: url("/images/background.webp") no-repeat center center fixed;
    background-size: cover;
}

h1 {
    font-family: "Optimistic Text", Montserrat, Helvetica, Arial, "Noto Sans", sans-serif;
    font-size: 23px;
    margin: 20px;
    padding: 0;
    line-height: 40px;
    font-weight: 300;
    display: flex;
    padding-left: 20px;
    margin-left: 0px;
    border-left: 1px solid white;
}

h2 {
    font-family: "Optimistic Text", Montserrat, Helvetica, Arial, "Noto Sans", sans-serif;
    font-size: 30px;
    margin: 20px;
    padding: 0;
    line-height: 30px;
    font-weight: 300;
}

.container {
    width: 100%;
    max-width: 850px;
    margin: auto;
}

.logo {
    margin: 20px;
    height: 33px;
    width: auto;
}

#logoHolder {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: row;
}

.llamaLogo {
    height: 30vh;
    width: auto;
    margin: 0 10px;
    position: absolute;
    z-index: -1;
    bottom: 40px;
}

#new-chat {
    display: none;
}

.centeredView {
    display: flex;
    justify-content: center;
    align-items: center;
    height: calc(100vh - 80px);
}

.centeredView .contents {
    display: block;
    position: relative;
    width: 100%;
}

.contents #output div {
    white-space: normal;
}

.contents p,
.contents ol,
.contents ul,
.contents h1,
.contents h2,
.contents h3,
.contents h4,
.contents h5,
.contents h6 {
    margin: 0.5rem 0 1rem 0;
    display: inline-block;
    width: 95%;
}

.contents ol,
.contents ul {
    margin-bottom: 0;
}

.contents li {
    margin-bottom: 1rem;
}

.contents .thumbnails {
    width: 100%;
    max-width: 90vw;
    box-sizing: border-box;
    display: flex;
    overflow-x: auto;
    gap: 0.5rem;
    padding: 0.5rem 0;
    scroll-behavior: smooth;
    margin-bottom: 1rem;
}

.contents .thumbnails a {
    flex: 0 0 auto;
}

.contents .thumbnails .thumb {
    height: 100px;
    display: block;
    border-radius: 4px;
}

.contents .request-done {
    display: flex;
    align-items: center;
    text-align: center;
    color: white;
    margin: 1rem 0;
}

.contents .request-done::before,
.contents .request-done::after {
    content: '';
    flex: 1;
    border-bottom: 1px dashed rgba(200, 200, 200, 0.75);
    margin: 0 1rem 0 0;
}

.contents .request-done::after {
    margin: 0 0 0 1rem;
}

input {
    width: 80%;
    padding: 10px 20px;
    font-size: 1rem;
    margin-bottom: 10px;
    border-radius: 100px;
    border: none;
}

button {
    padding: 10px 20px;
    margin: 5px;
    font-size: 1rem;
    background-color: rgb(0, 100, 224);
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 100px;
}

button.big {
    padding: 20px 20px;
}

button:hover {
    background-color: rgb(0, 100, 224);
}

#questionHolder {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: row;
    margin-bottom: 20px;
    gap: 10px;
    position: relative;
    margin: 20px auto;
    width: 100%;
    max-width: 700px;
}

#questionHolder button {
    margin: 0;
    height: 50px;
    width: 50px;
    font-size: 1.2rem;
    position: absolute;
    right: 0;
    padding: 10px;
    transition: all 0.5s;
    opacity: 0.5;
    cursor: not-allowed;
    transform: translatex(-25%);
}

#questionHolder button.active {
    opacity: 1;
    cursor: pointer;
}

#questionHolder input {
    margin: 0;
    font-size: 1.5rem;
    padding: 20px 40px;
    padding-right: 90px;
    height: 30px;
}

#output {
    margin: 20px 0;
    text-align: left;
    white-space: pre-wrap;
    display: flex;
    max-height: calc(100vh - 220px);
    position: relative;
    overflow: hidden;
    overflow-y: auto;
    margin-top: -10px;
    padding: 0 20px;
    scrollbar-width: thin;
    /* For Firefox */
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
    /* For Firefox */
    font-size: 16px;
    line-height: 25px;
    flex-direction: column;
}

.researchMode #output {
    max-height: calc(100vh - 150px);
}

#output.has-scrollbar {
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 30px);
    mask-image: linear-gradient(to bottom, transparent, black 30px);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
}

/* WebKit (Chrome, Edge, Safari) */
#output::-webkit-scrollbar {
    width: 6px;
    /* Thin scrollbar */
}

#output::-webkit-scrollbar-track {
    background: transparent;
    /* Transparent track */
}

#output::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.3);
    /* Semi-transparent thumb */
    border-radius: 4px;
}

#output>div:first-child {
    margin-top: 30px;
}

button svg {
    height: 100%;
    width: auto;
}


img.platformIcon {
    height: 30px;
    width: 30px;
    padding-right: 10px;
    display: inline;
    vertical-align: middle;
    margin-bottom: 5px;
}

.icon {
    font-size: 26px;
    line-height: 30px;
    padding-right: 10px;
    display: inline;
    vertical-align: middle;
    margin-bottom: 5px;
}

#inputs {
    display: block;
}

#inputs.active {
    display: none;
}

#loading {
    width: 80px;
    height: 48px;
    display: block;
    margin: auto;
    display: none;
}

#loading.active {
    display: block;
}

#loading svg {
    width: 100%;
    height: auto;
    display: block;
}

#loading .loader {
    display: block;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    position: relative;
    animation: rotate 1s linear infinite;
    opacity: 0.5;
}

#loading .loader::before {
    content: "";
    box-sizing: border-box;
    position: absolute;
    inset: 0px;
    border-radius: 50%;
    border: 5px solid #FFF;
    animation: prixClipFix 2s linear infinite;
}


.conversationMode #output {
    display: flex;
    height: auto;
}

/* .conversationMode #questionHolder input {
    font-size: 1rem;
    padding: 10px 20px;
    padding-right: 50px;
    height: 20px;
    transition: all 1s;
    width: 100%;
} */


/* .conversationMode #questionHolder button {
    font-size: 1rem;
    padding: 5px;
    height: 30px;
    width: 30px;
    transition: all 1s;
} */

.conversationMode .llamaLogo,
.conversationMode .quick-actions {
    display: none;
    transition: 0.5s;
}

.conversationMode #new-chat {
    display: inline-block;
    transition: 0.5s;
}

.researchMode #inputs {
    display: none;
}

.expandable {
    margin: 10px 0;
}

.exlabel {
    cursor: pointer;
    font-weight: bold;
    text-decoration: underline;
}

.hiddenData {
    display: none;
    margin-top: 5px;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg)
    }
}

@keyframes prixClipFix {
    0% {
        clip-path: polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0)
    }

    25% {
        clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 0, 100% 0, 100% 0)
    }

    50% {
        clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 100% 100%, 100% 100%)
    }

    75% {
        clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 100%)
    }

    100% {
        clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 0)
    }
}

@media (max-width: 760px) {
    body {
        font-size: 14px;
    }

    h1 {
        font-size: 24px;
        line-height: 24px;
    }

    .container {
        width: 100%;
        max-width: 100%;
    }

    button.big {
        padding: 10px 20px;
    }

    #questionHolder {
        max-width: 90%;
    }

    #questionHolder button {
        transform: none;
    }

    #questionHolder input {
        font-size: 0.9rem;
        padding: 10px 20px;
        padding-right: 50px;
        width: 100%;
    }
}

@media (max-width: 600px) {
    .centeredView {
        height: 90vh;
    }

    .centeredView .contents {
        width: 95vw;
    }

    .quick-actions {
        width: 95vw;
        padding: 0 1.25rem;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
    }

    .quick-actions button {
        display: block;
        font-size: 0.9rem;
    }


}

.user-msg,
.ai-msg {
    padding: 0.75rem 1rem;
    margin: 0.5rem 0;
    max-width: 80%;
    border-radius: 12px;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.user-msg {
    background-color: rgb(0, 100, 224);
    align-self: flex-end;
    margin-left: auto;
    text-align: right;
    border-top-right-radius: 0;
}

.ai-msg {
    background-color: #ad0963;
    align-self: flex-start;
    margin-right: auto;
    text-align: left;
    color: #ffffff;
    border-top-left-radius: 0;
}

.request-done {
    font-weight: bold;
    text-align: center;
    padding: 1rem;
    margin-top: 1rem;
    background: #005514;
    border-radius: 8px;
}

.ip {
    --hue: 223;
    --bg: hsl(var(--hue), 90%, 95%);
    --fg: hsl(var(--hue), 90%, 5%);
    --trans-dur: 0.3s;
    font-size: calc(16px + (24 - 16) * (100vw - 320px) / (1280 - 320));
}


.ip {
    width: 16em;
    height: 8em;
}

.ip__track {
    stroke: hsl(var(--hue), 90%, 90%);
    transition: stroke var(--trans-dur);
}

.ip__worm1,
.ip__worm2 {
    animation: worm1 2s linear infinite;
}

.ip__worm2 {
    animation-name: worm2;
}

/* Dark theme */
@media (prefers-color-scheme: dark) {
    .ip {
        --bg: hsl(var(--hue), 90%, 5%);
        --fg: hsl(var(--hue), 90%, 95%);
    }

    .ip__track {
        stroke: hsl(var(--hue), 90%, 15%);
    }
}

/* Animation */
@keyframes worm1 {
    from {
        stroke-dashoffset: 0;
    }

    50% {
        animation-timing-function: steps(1);
        stroke-dashoffset: -358;
    }

    50.01% {
        animation-timing-function: linear;
        stroke-dashoffset: 358;
    }

    to {
        stroke-dashoffset: 0;
    }
}

@keyframes worm2 {
    from {
        stroke-dashoffset: 358;
    }

    50% {
        stroke-dashoffset: 0;
    }

    to {
        stroke-dashoffset: -358;
    }
}