﻿@import url(fontawesome.min.css);
@import url(regular.min.css);
@import url(solid.min.css);

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=PT+Serif:ital,wght@0,400;0,700;1,400;1,700&display=swap');

:root {
    --theme-blue: #103753;
    --theme-light-blue: #007aff;

    --theme-light-gray: #EAEAEA;
    --theme-dark-gray: #202020;

    --theme-dark-green: #4a722d;
    --theme-light-green: #86bb82;

    --theme-dark-red: #b03238;
    --theme-light-red: #ff3030;

    --bg-color: var(--theme-light-gray);
    --light-bg-color: white;

    --text-color: var(--theme-dark-gray);

    --button-success-bg: var(--theme-light-green);
    --button-success-fg: white;

    --separator-color: rgba(0, 0, 0, 0.4);
   
    --scroll-bg: transparent;
    --scroll-fg: white;
    --scroll-fg-active: var(--theme-dark-gray);

    --left-nav-width: 300px;
    --left-nav-bg: var(--theme-blue);
    --left-nav-fg: white;

    --modal-bg: rgba(0, 0, 0, 0.4);

    --home-color: var(--theme-dark-red);
    --iso-9001-color: var(--theme-dark-green);
    --iso-14001-color: var(--theme-light-blue);
    --org-color: var(--theme-light-red);

    --question-bg: var(--home-color);
    --question-fg: white;

    --answer-bg: var(--light-bg-color);
    --answer-fg: var(--text-color);

    --body-font: "DM Sans", sans-serif;
    --heading-font: "PT Serif", serif;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: auto;
    background-color: var(--bg-color);
    color: var(--text-color);

    font-family: var(--body-font);
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
}

p {
    padding: 0;
    margin: 0;
}

.login {
    margin: 3rem auto;
    background: var(--light-bg-color);

    max-width: 480px;

    padding: 2rem;

    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.login button, .login input {
    align-self: stretch;
}

input {
    border: 0;
    border-bottom: 1px solid var(--separator-color);

    padding: 0.5rem;
}

input, button, textarea {
    font-family: var(--body-font);
    font-size: inherit;
}

button {
    border-radius: 3rem;
    padding: 0.75rem;

    border: 0;
    cursor: pointer;
}

    button.success {
        background-color: var(--button-success-bg);
        color: var(--button-success-fg);
    }

a, a:visited, a:focus, a:hover {
    color: inherit;
    text-decoration: underline;
}

a.button {
    text-decoration: none;
}

textarea {
    border: 0;
    border-radius: 1.5rem;
    resize: none;
}

.platform-main {
    display: flex;
}

.platform-main main {
    flex: 1;
}

.left-nav {
    flex: 0.3;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--left-nav-width);
    background-color: var(--left-nav-bg);
    color: var(--left-nav-fg);
    transition: transform ease-in-out 0.5s;
    transform: translateX(calc(-1 * var(--left-nav-width)));
    z-index: 20;
    padding: 1rem;
    box-sizing: border-box;
    overflow: auto;

    aside {
        display: flex;
        flex-direction: column;
    }

    .menu-group {
        font-variant: small-caps;
        letter-spacing: 1px;
        margin: 0.5rem 0;
    }

    ul {
        list-style: none;
        margin: 0;
        padding: 0;
        gap: 1rem;
        display: flex;
        flex-direction: column;
    }

    li {
        line-height: 2rem;
        font-size: 120%;

        i {
            font-size: 28px;
            color: var(--accent-color);
            display: block;
            width: 32px;
            height: 32px;
            line-height: 32px;
            text-align: center;
        }

        .is-active {
            font-weight: bold;
            color: var(--accent-color);
        }

        a {
            text-decoration: none;
            display: flex;
            gap: 1rem;
        }
    }

    .brand {
        margin-bottom: 1rem;
    }
}

.is-home {
    --accent-color: var(--home-color);
}

.is-iso-9001 {
    --accent-color: var(--iso-9001-color);
}

.is-iso-14001 {
    --accent-color: var(--iso-14001-color);
}

.is-org {
    --accent-color: var(--org-color);
}

main {
    padding: 2rem !important;
}

html.show-nav {
    .left-nav {
        transform: translateX(0);
    }
}

@media (min-width: 1024px) {
    main {
        margin-left: var(--left-nav-width);
    }

    .left-nav {
        transform: translateX(0);
    }
}

main:has(.fixed-layout) {
    height: 100%;
    width: 100%;
}

.account-popup {
    display: flex;
    justify-content: flex-end;

    button {
        i {
            font-size: 200%;
        }

        padding: 0;
    }
}

.begin-chat-area {
    margin: min(10rem, 10vh) auto 0 auto;
    max-width: 768px;
    display: flex;
    flex-direction: column;
    align-items: center;

    form {
        width: 100%;
        display: flex;
        align-items: center;
        background-color: white;
        border-radius: 1.5rem;
        overflow: hidden;
        margin: 1rem;
        padding: 0 0.5rem;

        input {
            flex: 1;
            border: 0;
        }

        input::placeholder {
            color: var(--text-color);
        }

        input:focus {
            outline: 0;
        }

        button {
            background-color: black;
            color: white;
            padding: 0.3rem 0.4rem;
        }
    }

    .ai-disclaimer {
        font-size: 80%;
        text-align: center;
    }
}

.continue-chat {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.is-mute {
    color: rgba(0, 0, 0, 0.6);
}

.dropdown {
    display: inline-flex;
    position: relative;
    vertical-align: top
}

.dropdown.is-active .dropdown-menu {
    display: block;
}

.dropdown-menu {
    display: none;
    left: 0;
    min-width: 12rem;
    padding-top: 0.5rem;
    position: absolute;
    top: 100%;
    z-index: 20;
}

.dropdown.is-right .dropdown-menu {
    right: 0;
    left: auto;
}

.dropdown-content {
    background-color: var(--bg-color);
    border-radius: 5px;
    box-shadow: 0px calc(1px * (clamp(0, var(--elevation, 3), 1) + clamp(0, var(--elevation, 3) - 3, 1) + 2 * clamp(0, var(--elevation, 3) - 4, 1))) calc(1px * (2 * clamp(0, var(--elevation, 3), 1) + clamp(0, var(--elevation, 3) - 2, 1) + clamp(0, var(--elevation, 3) - 4, 1))) 0px RGBA(var(--elevation-color-rgb, var(--theme-shadow-rgb, 0 0 0)) / 30%), 0px calc(1px * (clamp(0, var(--elevation, 3), 1) + clamp(0, var(--elevation, 3) - 1, 1) + 2 * clamp(0, var(--elevation, 3) - 2, 3))) calc(1px * (3 * clamp(0, var(--elevation, 3), 2) + 2 * clamp(0, var(--elevation, 3) - 2, 3))) calc(1px * (clamp(0, var(--elevation, 3), 4) + 2 * clamp(0, var(--elevation, 3) - 4, 1))) RGBA(var(--elevation-color-rgb, var(--theme-shadow-rgb, 0 0 0)) / 15%) !important;    padding-bottom: var(--bulma-dropdown-content-padding-bottom);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dropdown-item {
    padding: 0.5rem;
}

a.dropdown-item {
    text-decoration: none;

    &:hover {
        background-color: var(--theme-blue);
        color: white;
    }
}

.modal {
    align-items: center;
    display: none;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    position: fixed;
    z-index: 40;
}

.modal-background {
    background-color: var(--modal-bg);
}

.modal-background, .modal {
    bottom: 0;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.modal-card {
    position: relative;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - var(--bulma-modal-card-spacing));
    overflow: hidden;
    overflow-y: visible;

    background-color: rgba(240, 240, 240, 0.9);
    border-radius: 5px;
    box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
}

.modal-card-head {
    align-items: center;
    display: flex;
    flex-shrink: 0;
    justify-content: flex-start;
    padding: 0.5rem;
    position: relative;
}

.modal-card-title {
    flex-grow: 1;
    flex-shrink: 0;
}

delete {
    --bulma-delete-dimensions: 1.25rem;
    --bulma-delete-background-l: 0%;
    --bulma-delete-background-alpha: 0.5;
    --bulma-delete-color: var(--bulma-white);
    appearance: none;
    background-color: hsla(var(--bulma-scheme-h),var(--bulma-scheme-s),var(--bulma-delete-background-l),var(--bulma-delete-background-alpha));
    border: none;
    border-radius: var(--bulma-radius-rounded);
    cursor: pointer;
    display: inline-flex;
    flex-grow: 0;
    flex-shrink: 0;
    font-size: 1em;
    height: var(--bulma-delete-dimensions);
    max-height: var(--bulma-delete-dimensions);
    max-width: var(--bulma-delete-dimensions);
    min-height: var(--bulma-delete-dimensions);
    min-width: var(--bulma-delete-dimensions);
    outline: none;
    pointer-events: auto;
    position: relative;
    vertical-align: top;
    width: var(--bulma-delete-dimensions)
}

.delete:after,.delete:before {
    background-color: var(--bulma-delete-color);
    content: "";
    display: block;
    left: 50%;
    position: absolute;
    top: 50%;
    transform: translateX(-50%) translateY(-50%) rotate(45deg);
    transform-origin: center center
}

.delete:before {
    height: 2px;
    width: 50%
}

.delete:after {
    height: 50%;
    width: 2px
}

.modal.is-active {
    display: flex;
}

.is-hidden {
    display: none !important;
}

.fixed-layout {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden;
    gap: 5px;
    flex: 1;
}

.chat {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow: auto;
    flex: 1;
}

    .chat ol, .chat ul {
        margin-left: 2em;
        list-style-position: outside;
    }

.title {
    font-weight: lighter;
}

#next-interaction {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat .question {
    border-radius: 1.5rem;
    background-color: var(--question-bg);
    color: var(--question-fg);
    padding: 10px;
    margin-left: 4rem;
}

.chat .response {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

    .chat .response .text {
        border-radius: 1.5rem;
        background-color: var(--answer-bg);
        color: var(--answer-fg);
        padding: 10px;
    }

.message-metrics {
    border-radius: 5px;
    background-color: var(--bulma-scheme-main-bis);
    padding: 2px 8px;
    font-size: 12px;
    align-self: end;
    font-weight: 500;
    display: flex;
    gap: 10px;
}

.question-text {
    display: flex;
    background-color: var(--light-bg-color);
    height: 100px;
    width: 100%;
    box-sizing: border-box;
    padding: 5px;
    align-items: center;
    gap: 5px;
    border-radius: 5px;
}

    .question-text textarea {
        background-color: transparent;
        flex: 1;
        padding: 10px;
        align-self: stretch;
    }

textarea:focus-visible {
    outline: 0;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-corner {
    background: transparent;
}

::-webkit-scrollbar-track {
    background-color: var(--scroll-bg);
    box-shadow: 0 0 2px 0 var(--scroll-bg) inset;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    border-radius: 4px;
    background-color: var(--scroll-fg)
}

    ::-webkit-scrollbar-thumb:hover {
        background-color: var(--scroll-fg-active)
    }

    ::-webkit-scrollbar-thumb:active {
        background-color: var(--scroll-fg-active)
    }


dt {
    font-weight: bold;
}

dd {
    display: block;
    margin-bottom: 1rem;
}

.validation-summary-valid {
    display: none;
}

.typing {
    position: relative;
    display: block;
    line-height: 20px;
    height: 10px;
    margin: 10px;
}

    .typing span {
        content: "";
        animation: blink 1.5s infinite;
        animation-fill-mode: both;
        height: 10px;
        width: 10px;
        background: #3b5998;
        position: absolute;
        left: 0;
        top: 0;
        border-radius: 50%;
        user-select: none;
    }

        .typing span:nth-child(2) {
            animation-delay: .2s;
            margin-left: 15px;
        }

        .typing span:nth-child(3) {
            animation-delay: .4s;
            margin-left: 30px;
        }

@keyframes blink {
    0% {
        opacity: .1;
    }

    20% {
        opacity: 1;
    }

    100% {
        opacity: .1;
    }
}

x-hstack, .hstack {
    display: flex;
    flex-direction: row;
    min-height: 0;
}

x-vstack, .vstack {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.flex {
    flex: 1;
}

.container {
    display: grid;
}

.gap {
    gap: 1rem;
}

.template-editor {
    resize: none;
    padding: 1rem;
    flex: 1;
}

.vote {
    cursor: pointer;
}

    .vote.upvote:hover {
        color: darkgreen;
    }

    .vote.downvote:hover {
        color: darkred;
    }

.chat-tile {
    display: block;
    width: 300px;
    height: 150px;
    background-color: rgba(240, 240, 240, 0.9);
    border-radius: 5px;
    padding: 1rem;
    box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
}

.chat-tile a {
    color: inherit;
    text-decoration: none;
}

.chat-tile-group {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1rem 0;
    justify-content: center;
}

.is-title {
    font-size: 120%;
    font-weight: 500;
    word-wrap: break-word;
}

.is-subtitle {
    margin-top: 0.5rem;
}

.is-menu {
    float: right;
}

.cost-column {
    text-align: right !important;
    font-variant-numeric: lining-nums;
}

.button-bar {
    margin: 0 0 2rem 0;
}

fieldset legend {
    color: var(--bulma-text);
    font-size: var(--bulma-size-5);
    font-weight: var(--bulma-weight-normal);
    line-height: 1.25;
    margin: 0 0 1rem -1rem;
}

fieldset {
    margin: 2rem 0 1rem 1rem;
}

.subtitle {
    margin-top: 2rem;
    margin-bottom: 0.5rem !important; 
}