/* =========================================================
   FAUNA ADVISOR
   ========================================================= */

.fauna-advisor {
    position: fixed;

    right: 24px;
    bottom: 24px;

    z-index: 2600;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;
}


.fauna-advisor-launcher {
    min-width: 132px;
    height: 50px;

    display: flex;
    align-items: center;

    gap: 10px;

    padding:
        6px 14px 6px 7px;

    border:
        1px solid
        rgba(16, 21, 34, .13);

    border-radius: 14px;

    background: #101522;
    color: #fff;

    box-shadow:
        0 15px 40px
        rgba(16, 21, 34, .18);

    cursor: pointer;

    text-align: left;
}


.fauna-advisor-mark {
    width: 35px;
    height: 35px;

    flex:
        0 0 35px;

    display: grid;
    place-items: center;

    border-radius: 9px;

    background: #fff;
    color: #101522;

    font-size: 12px;
    font-weight: 800;
}


.fauna-advisor-launcher-copy {
    display: flex;
    flex-direction: column;

    line-height: 1.1;
}


.fauna-advisor-launcher-copy strong {
    font-size: 11px;
}


.fauna-advisor-launcher-copy small {
    margin-top: 3px;

    color:
        rgba(255, 255, 255, .55);

    font-size: 8px;
}


.fauna-advisor-panel {
    position: absolute;

    right: 0;
    bottom: 62px;

    width:
        min(
            390px,
            calc(100vw - 32px)
        );

    height:
        min(
            610px,
            calc(100vh - 120px)
        );

    display: grid;

    grid-template-rows:
        auto
        1fr
        auto
        auto
        auto;

    overflow: hidden;

    border:
        1px solid
        rgba(16, 21, 34, .12);

    border-radius: 18px;

    background: #fbfcf9;

    box-shadow:
        0 35px 100px
        rgba(16, 21, 34, .22);

    opacity: 0;
    visibility: hidden;

    transform:
        translateY(8px)
        scale(.985);

    transform-origin:
        bottom right;

    transition:
        opacity 170ms ease,
        transform 170ms ease,
        visibility 170ms ease;
}


.fauna-advisor.open
.fauna-advisor-panel {
    opacity: 1;
    visibility: visible;

    transform:
        translateY(0)
        scale(1);
}


.fauna-advisor-head {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 15px;

    border-bottom:
        1px solid
        rgba(16, 21, 34, .08);

    background: #fff;
}


.fauna-advisor-identity {
    display: flex;
    align-items: center;

    gap: 10px;
}


.fauna-advisor-identity
.fauna-advisor-mark {
    background: #101522;
    color: #fff;
}


.fauna-advisor-identity > div {
    display: flex;
    flex-direction: column;

    gap: 2px;
}


.fauna-advisor-identity strong {
    font-size: 11px;
}


.fauna-advisor-identity small {
    color: #9299a4;

    font-size: 8px;
}


.fauna-advisor-close {
    width: 34px;
    height: 34px;

    display: grid;
    place-items: center;

    border: 0;

    border-radius: 9px;

    background: #f1f3ef;
    color: #68717c;

    font-size: 20px;

    cursor: pointer;
}


.fauna-advisor-messages {
    overflow-y: auto;

    padding:
        20px 16px;

    scroll-behavior: smooth;
}


.fauna-advisor-message {
    display: flex;

    margin-bottom: 13px;
}


.fauna-advisor-message > div {
    max-width: 86%;

    padding:
        10px 12px;

    border-radius: 12px;

    white-space: pre-wrap;

    font-size: 11px;
    line-height: 1.55;
}


.fauna-advisor-message.assistant {
    justify-content: flex-start;
}


.fauna-advisor-message.assistant > div {
    border:
        1px solid
        rgba(16, 21, 34, .08);

    border-top-left-radius: 4px;

    background: #fff;
    color: #313947;
}


.fauna-advisor-message.user {
    justify-content: flex-end;
}


.fauna-advisor-message.user > div {
    border-top-right-radius: 4px;

    background: #101522;
    color: #fff;
}


.fauna-advisor-message.loading
> div {
    display: flex;

    gap: 4px;
}


.fauna-advisor-message.loading i {
    width: 5px;
    height: 5px;

    border-radius: 999px;

    background: #9299a4;

    animation:
        faunaTyping
        1s
        ease-in-out
        infinite;
}


.fauna-advisor-message.loading
i:nth-child(2) {
    animation-delay:
        .14s;
}


.fauna-advisor-message.loading
i:nth-child(3) {
    animation-delay:
        .28s;
}


@keyframes faunaTyping {

    0%,
    60%,
    100% {
        opacity: .3;
        transform: translateY(0);
    }

    30% {
        opacity: 1;
        transform: translateY(-2px);
    }

}


.fauna-advisor-prompts {
    display: flex;

    gap: 6px;

    overflow-x: auto;

    padding:
        0 16px 10px;
}


.fauna-advisor-prompts button {
    flex: 0 0 auto;

    padding:
        7px 9px;

    border:
        1px solid
        rgba(16, 21, 34, .1);

    border-radius: 999px;

    background: #fff;
    color: #59616d;

    font-size: 8px;
    font-weight: 650;

    cursor: pointer;
}


.fauna-advisor-form {
    display: grid;

    grid-template-columns:
        1fr 42px;

    align-items: end;

    gap: 8px;

    margin:
        0 12px;

    padding: 8px;

    border:
        1px solid
        rgba(16, 21, 34, .13);

    border-radius: 13px;

    background: #fff;
}


.fauna-advisor-form textarea {
    width: 100%;

    min-height: 34px;
    max-height: 110px;

    padding:
        8px;

    resize: none;

    border: 0;
    outline: 0;

    background: transparent;
    color: #101522;

    font: inherit;
    font-size: 11px;
    line-height: 1.45;
}


.fauna-advisor-form textarea::placeholder {
    color: #a1a8b1;
}


.fauna-advisor-form button {
    width: 42px;
    height: 38px;

    display: grid;
    place-items: center;

    border: 0;

    border-radius: 10px;

    background: #101522;
    color: #fff;

    cursor: pointer;

    font-size: 15px;
}


.fauna-advisor-form button:disabled {
    opacity: .45;
}


.fauna-advisor-footer {
    padding:
        8px 15px 11px;

    color: #a1a8b1;

    font-size: 7px;

    text-align: center;
}


/* =========================================================
   INLINE CONFIGURATOR HELP
   ========================================================= */

.advisor-inline-help {
    display: inline-flex;
    align-items: center;

    gap: 6px;

    margin-top: 14px;

    padding: 0;

    border: 0;

    background: transparent;
    color: #59616d;

    font-size: 10px;
    font-weight: 650;

    cursor: pointer;
}


.advisor-inline-help span {
    width: 19px;
    height: 19px;

    display: grid;
    place-items: center;

    border:
        1px solid
        rgba(16, 21, 34, .13);

    border-radius: 999px;

    font-size: 9px;
}


@media (max-width: 600px) {

    .fauna-advisor {
        right: 12px;
        bottom: 12px;
    }


    .fauna-advisor-panel {
        position: fixed;

        left: 10px;
        right: 10px;
        bottom: 72px;

        width: auto;

        height:
            min(
                650px,
                calc(100vh - 92px)
            );

        transform-origin:
            bottom center;
    }

}

/* =========================================================
   V10.1 — ADVISOR NATIVE DIALOG
   ========================================================= */

.fauna-advisor-dialog {
    position: fixed;

    inset:
        auto
        24px
        24px
        auto;

    width:
        min(
            390px,
            calc(100vw - 32px)
        );

    height:
        min(
            610px,
            calc(100vh - 48px)
        );

    max-width: none;
    max-height: none;

    margin: 0;
    padding: 0;

    border: 0;

    background: transparent;
    color: #101522;

    overflow: visible;

    z-index: 3000;
}


.fauna-advisor-dialog::backdrop {
    background:
        rgba(
            10,
            15,
            27,
            .12
        );

    backdrop-filter:
        blur(1px);
}


.fauna-advisor-dialog
.fauna-advisor-panel {
    position: relative;

    inset: auto;

    width: 100%;
    height: 100%;

    display: grid;

    grid-template-rows:
        auto
        1fr
        auto
        auto
        auto;

    overflow: hidden;

    border:
        1px solid
        rgba(
            16,
            21,
            34,
            .12
        );

    border-radius: 18px;

    background: #fbfcf9;

    box-shadow:
        0 35px 100px
        rgba(
            16,
            21,
            34,
            .22
        );

    opacity: 1;
    visibility: visible;

    transform: none;
}


/*
 * Hide the launcher while the panel is open.
 *
 * This avoids displaying both:
 *
 * Ask Fauna launcher
 * +
 * open Advisor
 */

body.fauna-advisor-open
> .fauna-advisor {
    opacity: 0;

    visibility: hidden;

    pointer-events: none;

    transform:
        translateY(5px);

    transition:
        opacity 140ms ease,
        transform 140ms ease,
        visibility 140ms ease;
}


/* =========================================================
   CONFIGURATOR HELP BUTTON
   ========================================================= */

.configurator
.advisor-inline-help {
    display: inline-flex;
    align-items: center;

    gap: 7px;

    margin-top: 15px;

    padding:
        8px 11px;

    border:
        1px solid
        rgba(
            16,
            21,
            34,
            .12
        );

    border-radius: 999px;

    background: #f8f9f6;
    color: #404957;

    box-shadow:
        0 3px 10px
        rgba(
            16,
            21,
            34,
            .035
        );

    font-size: 10px;
    font-weight: 600;

    cursor: pointer;

    transition:
        border-color 150ms ease,
        background 150ms ease,
        transform 150ms ease;
}


.configurator
.advisor-inline-help:hover {
    border-color:
        rgba(
            49,
            92,
            244,
            .32
        );

    background: #fff;

    transform:
        translateY(-1px);
}


.configurator
.advisor-inline-help > span {
    width: 20px;
    height: 20px;

    display: grid;
    place-items: center;

    flex:
        0 0 20px;

    border: 0;

    border-radius: 999px;

    background: #e9edff;
    color: #315cf4;

    font-size: 9px;
    font-weight: 800;
}


.configurator
.advisor-inline-help strong {
    color: #101522;

    font-size: inherit;
}


.configurator
.advisor-inline-help i {
    margin-left: 1px;

    color: #315cf4;

    font-style: normal;
}


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

@media (max-width: 600px) {

    .fauna-advisor-dialog {
        inset:
            auto
            10px
            10px
            10px;

        width: auto;

        height:
            min(
                650px,
                calc(100vh - 20px)
            );
    }


    .fauna-advisor-dialog
    .fauna-advisor-panel {
        position: relative;

        inset: auto;

        width: 100%;
        height: 100%;
    }

}

/* =========================================================
   V11 — FAUNA ADVISOR
   ========================================================= */

.fauna-advisor-launcher {
    border-radius: 10px;

    background: #181a16;

    box-shadow:
        0 14px 38px
        rgba(28, 30, 25, .16);
}


.fauna-advisor-launcher
.fauna-advisor-mark {
    border-radius: 6px;

    background: #e95d3f;
    color: #fff;
}


.fauna-advisor-dialog {
    inset:
        auto
        20px
        20px
        auto;

    width:
        min(
            402px,
            calc(100vw - 28px)
        );

    border-radius: 16px;
}


.fauna-advisor-dialog
.fauna-advisor-panel {
    border-radius: 16px;

    background: #fffdf8;

    box-shadow:
        0 30px 80px
        rgba(28, 30, 25, .16);
}


.fauna-advisor-head {
    background: #fffdf8;
}


.fauna-advisor-identity
.fauna-advisor-mark {
    border-radius: 6px;

    background: #181a16;
}


.fauna-advisor-message.assistant > div {
    border-radius:
        4px 10px 10px 10px;

    background: #f3f1ea;
}


.fauna-advisor-message.user > div {
    border-radius:
        10px 4px 10px 10px;

    background: #181a16;
}


.fauna-advisor-form {
    border-radius: 10px;

    background: #fff;
}


.fauna-advisor-form button {
    border-radius: 7px;

    background: #181a16;
}


.configurator
.advisor-inline-help,
.result-advisor-link {
    border-radius: 7px !important;
}


.configurator
.advisor-inline-help > span,
.result-advisor-link > span {
    border-radius: 5px !important;

    background: #fbe9e3 !important;
    color: #e95d3f !important;
}


@media (max-width: 600px) {

    .fauna-advisor-dialog {
        inset:
            auto
            0
            0
            0;

        width: 100%;

        height:
            min(
                78dvh,
                680px
            );

        border-radius:
            24px 24px 0 0;
    }


    .fauna-advisor-dialog::backdrop {
        background:
            rgba(20, 22, 18, .3);

        backdrop-filter:
            blur(3px);
    }


    .fauna-advisor-dialog
    .fauna-advisor-panel {
        border-radius:
            24px 24px 0 0;
    }

}