/* =========================================================
   GOODWILL AIME
   Main Stylesheet
   ========================================================= */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;

    width: 100%;
    height: 100%;
}

body {
    font-family:
        Arial,
        Helvetica,
        sans-serif;

    background: #f5f8fc;
    color: #10213d;

    overflow: hidden;
}


/* =========================================================
   MAIN SHELL
   ========================================================= */

.shell {
    display: flex;

    width: 100%;
    height: 100vh;
    min-height: 100vh;
}


/* =========================================================
   SIDEBAR
   ========================================================= */

.sidebar {
    width: 250px;
    min-width: 250px;
    height: 100vh;

    background:
        linear-gradient(
            180deg,
            #073f78 0%,
            #005eb8 100%
        );

    display: flex;
    flex-direction: column;

    padding:
        0
        12px
        20px;

    overflow-y: auto;
    overflow-x: hidden;
}


/* =========================================================
   GOODWILL LOGO
   ========================================================= */

.gw-mark {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;

    padding:
        20px
        10px
        22px;

    text-decoration: none;

    flex-shrink: 0;
}

.gw-mark img {
    display: block;

    width: 110px;
    height: auto;

    max-width: 110px;
    max-height: 145px;

    object-fit: contain;
}


/* =========================================================
   SIDEBAR NAVIGATION
   ========================================================= */

.sidebar nav {
    display: flex;
    flex-direction: column;

    gap: 5px;

    width: 100%;
}

.nav {
    display: flex;
    align-items: center;

    gap: 15px;

    min-height: 54px;

    padding:
        11px
        18px;

    color: #ffffff;

    text-decoration: none;

    border-radius: 14px;

    font-size: 16px;

    transition:
        background 0.15s ease,
        transform 0.15s ease;
}

.nav b {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 26px;
    min-width: 26px;

    font-size: 21px;
    font-weight: normal;
}

.nav span {
    white-space: nowrap;
}

.nav:hover {
    background:
        rgba(
            255,
            255,
            255,
            0.12
        );
}

.nav.active {
    background: #1683e7;
    color: #ffffff;
}


/* =========================================================
   MAIN CONTENT
   ========================================================= */

.main {
    flex: 1;

    min-width: 0;
    height: 100vh;

    display: flex;
    flex-direction: column;

    padding:
        20px
        32px
        18px;

    background:
        linear-gradient(
            180deg,
            #f7faff 0%,
            #ffffff 100%
        );

    overflow: hidden;
}


/* =========================================================
   HEADER
   ========================================================= */

.main header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 24px;

    flex-shrink: 0;

    margin-bottom: 16px;
}

.header-title {
    min-width: 0;
}

.main header h1 {
    margin: 0;

    color: #074b91;

    font-size: 42px;
    line-height: 1;

    font-weight: 800;
}

.main header h2 {
    margin:
        6px
        0
        3px;

    color: #005eb8;

    font-size: 22px;
    line-height: 1.15;

    font-weight: 700;
}

.main header p {
    margin: 0;

    color: #667892;

    font-size: 15px;
    line-height: 1.35;
}


/* =========================================================
   SLOGAN
   ========================================================= */

.slogan {
    color: #074b91;

    font-size: 15px;
    line-height: 1.05;

    font-style: italic;
    font-weight: 700;

    text-align: right;

    padding-top: 1px;

    white-space: nowrap;
}

.slogan span {
    font-size: 13px;
}


/* =========================================================
   CHAT CARD
   ========================================================= */

.chat-card {
    flex: 1;

    min-height: 0;

    display: flex;
    flex-direction: column;

    background: #ffffff;

    border:
        1px
        solid
        #d8e2ef;

    border-radius: 18px;

    overflow: hidden;

    box-shadow:
        0
        4px
        14px
        rgba(
            15,
            65,
            115,
            0.04
        );
}


/* =========================================================
   CHAT AREA
   ========================================================= */

.chat {
    flex: 1;

    min-height: 0;

    overflow-y: auto;

    padding:
        20px
        22px
        10px;

    scroll-behavior: smooth;
}


/* =========================================================
   MESSAGE ROW
   ========================================================= */

.msg-row {
    display: flex;

    align-items: flex-start;

    gap: 13px;

    width: 100%;

    margin-bottom: 18px;
}

.msg-row.user {
    flex-direction: row-reverse;
}


/* =========================================================
   AVATAR
   ========================================================= */

.avatar {
    width: 56px;
    height: 56px;

    min-width: 56px;

    border-radius: 50%;

    object-fit: cover;

    border:
        2px
        solid
        #0875d1;

    background: #eaf3fc;
}

.user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;

    color: #0753a0;

    font-size: 11px;
    font-weight: 700;
}


/* =========================================================
   MESSAGE BOX
   ========================================================= */

.msg-box {
    max-width: 82%;
}

.msg-label {
    margin:
        0
        0
        5px
        7px;

    color: #064b91;

    font-size: 16px;
    font-weight: 700;
}

.user .msg-label {
    text-align: right;

    margin:
        0
        7px
        5px
        0;
}

.msg-content {
    padding:
        15px
        18px;

    background: #f4f8fc;

    border:
        1px
        solid
        #d9e5f1;

    border-radius: 16px;

    color: #10213d;

    font-size: 16px;
    line-height: 1.5;

    overflow-wrap: anywhere;
}

.user .msg-content {
    background:
        linear-gradient(
            135deg,
            #005eb8,
            #087ce0
        );

    border-color: #005eb8;

    color: #ffffff;
}


/* =========================================================
   MARKDOWN INSIDE AIME RESPONSES
   ========================================================= */

.msg-content p {
    margin:
        0
        0
        10px;
}

.msg-content p:last-child {
    margin-bottom: 0;
}

.msg-content ul,
.msg-content ol {
    margin:
        8px
        0
        10px;

    padding-left: 24px;
}

.msg-content li {
    margin-bottom: 5px;
}

.msg-content a {
    color: #006fd6;
}

.msg-content strong {
    font-weight: 700;
}

.msg-content code {
    padding:
        2px
        5px;

    border-radius: 5px;

    background: #e6eef7;

    font-family:
        Consolas,
        monospace;
}

.msg-content pre {
    overflow-x: auto;

    padding: 14px;

    background: #10213d;
    color: #ffffff;

    border-radius: 10px;
}

.msg-content pre code {
    padding: 0;

    background: transparent;
    color: inherit;
}


/* =========================================================
   ERROR MESSAGE
   ========================================================= */

.error {
    color: #a61b1b;
    font-weight: 700;
}


/* =========================================================
   CHAT FOOTER
   ========================================================= */

.chat-card footer {
    flex-shrink: 0;

    padding:
        10px
        18px
        14px;

    background: #ffffff;

    border-top:
        1px
        solid
        #edf1f6;
}


/* =========================================================
   COMPOSER
   ========================================================= */

.composer {
    display: flex;
    align-items: flex-end;

    gap: 10px;

    width: 100%;
}

.composer textarea {
    flex: 1;

    min-height: 56px;
    max-height: 150px;

    resize: none;

    padding:
        16px
        18px;

    border:
        2px
        solid
        #1683e7;

    border-radius: 14px;

    outline: none;

    background: #ffffff;

    color: #10213d;

    font-family: inherit;
    font-size: 16px;
    line-height: 1.4;
}

.composer textarea:focus {
    border-color: #005eb8;

    box-shadow:
        0
        0
        0
        3px
        rgba(
            0,
            94,
            184,
            0.10
        );
}

.composer textarea::placeholder {
    color: #8493a8;
}


/* =========================================================
   SEND BUTTON
   ========================================================= */

.send {
    width: 58px;
    height: 56px;

    min-width: 58px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: 14px;

    background:
        linear-gradient(
            135deg,
            #005eb8,
            #087ce0
        );

    color: #ffffff;

    font-size: 27px;

    cursor: pointer;

    transition:
        transform 0.15s ease,
        opacity 0.15s ease;
}

.send:hover {
    transform:
        translateY(-1px);
}

.send:disabled {
    opacity: 0.55;

    cursor: not-allowed;

    transform: none;
}


/* =========================================================
   DISCLAIMER
   ========================================================= */

.note {
    display: flex;
    justify-content: space-between;

    gap: 15px;

    margin-top: 8px;

    padding:
        0
        4px;

    color: #74849a;

    font-size: 12px;
    line-height: 1.35;
}

.demo-label {
    white-space: nowrap;

    color: #0753a0;

    font-weight: 700;
}


/* =========================================================
   SCROLLBARS
   ========================================================= */

.chat::-webkit-scrollbar,
.sidebar::-webkit-scrollbar {
    width: 8px;
}

.chat::-webkit-scrollbar-track,
.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.chat::-webkit-scrollbar-thumb {
    background: #c2cfde;

    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb {
    background:
        rgba(
            255,
            255,
            255,
            0.25
        );

    border-radius: 10px;
}


/* =========================================================
   MEDIUM SCREENS / IFRAMES
   ========================================================= */

@media (max-width: 1250px) {

    .sidebar {
        width: 220px;
        min-width: 220px;
    }

    .main {
        padding:
            18px
            24px
            16px;
    }

    .main header h1 {
        font-size: 38px;
    }

    .main header h2 {
        font-size: 20px;
    }

    .main header p {
        font-size: 14px;
    }

    .slogan {
        font-size: 14px;
    }

    .slogan span {
        font-size: 12px;
    }

}


/* =========================================================
   SMALLER SCREENS
   ========================================================= */

@media (max-width: 850px) {

    body {
        overflow: auto;
    }

    .shell {
        height: auto;
        min-height: 100vh;
    }

    .sidebar {
        width: 84px;
        min-width: 84px;

        padding:
            0
            8px
            16px;
    }

    .gw-mark {
        padding:
            18px
            4px
            20px;
    }

    .gw-mark img {
        width: 62px;

        max-width: 62px;
        max-height: 90px;
    }

    .nav {
        justify-content: center;

        min-height: 54px;

        padding:
            12px
            8px;
    }

    .nav span {
        display: none;
    }

    .nav b {
        width: auto;
        min-width: 0;
    }

    .main {
        min-height: 100vh;

        padding:
            16px
            14px;
    }

    .main header h1 {
        font-size: 34px;
    }

    .main header h2 {
        font-size: 18px;
    }

    .main header p {
        font-size: 13px;
    }

    .slogan {
        display: none;
    }

    .msg-box {
        max-width:
            calc(
                100%
                -
                60px
            );
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 560px) {

    .sidebar {
        display: none;
    }

    .main {
        width: 100%;

        padding:
            12px
            10px;
    }

    .main header {
        margin-bottom: 12px;
    }

    .main header h1 {
        font-size: 32px;
    }

    .main header h2 {
        font-size: 17px;
    }

    .main header p {
        font-size: 13px;
    }

    .chat {
        padding:
            14px
            10px
            8px;
    }

    .avatar {
        width: 42px;
        height: 42px;

        min-width: 42px;
    }

    .msg-row {
        gap: 8px;
    }

    .msg-box {
        max-width:
            calc(
                100%
                -
                50px
            );
    }

    .msg-content {
        padding:
            12px
            13px;

        font-size: 14px;
    }

    .chat-card footer {
        padding:
            8px
            10px
            10px;
    }

    .composer textarea {
        min-height: 50px;

        padding:
            13px
            14px;

        font-size: 14px;
    }

    .send {
        width: 50px;
        height: 50px;

        min-width: 50px;
    }

    .note {
        display: block;
    }

    .demo-label {
        display: block;

        margin-top: 3px;
    }

}