@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

:root {
    --bg-msg-you: #eff8ff;
    --txt-msg-you: #157fe2;
    --meduza-color: linear-gradient(10deg, rgb(73, 237, 103), rgb(192, 255, 253), rgb(0, 21, 255));
    --shadow-meduza: rgba(91, 89, 89, 0.186) 0px 5px 10px 1px;
}

meduza-modal {
    position: fixed;
    bottom: 20px;
    left: 50%;
    width: 400px;
    height: 400px;
    background-color: white;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    /* padding-top: 5px !important; */
    border-radius: 30px;
    font-family: "Inter", sans-serif;
    font-optical-sizing: auto;
    transition: 0.3s;
    outline: 1px solid #eeee;
    box-shadow: var(--shadow-meduza);
    z-index: 9999 !important;


    * {
        font-family: "Inter", sans-serif;
        font-optical-sizing: auto;
    }

    .meduza-name {
        display: flex;
        align-items: center;
        gap: 10px;
        color: black;

        img {
            /* width: 35px; */
            border-radius: 100px;
            visibility: hidden;
            display: none;
        }
    }

    .meduza-context {
        border-radius: 100px;
        font-size: 10px;
        PADDING: 4px 6px;
        FONT-WEIGHT: 600;

        &.on {
            background: #d9fdd3;
            color: #15603E;
            outline: #aecaa9 1px solid;
        }

        &.off {
            background: rgba(228, 228, 46, 0.471);
            outline: orange 1px solid;
        }
    }


    header {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        border-bottom: #eeee solid 1px;
        padding: 4px 20px;
        background: white;

        >span {
            font-weight: 500;
            font-size: 14px;
            color: black;

            &:last-child {
                cursor: pointer;
            }
        }
    }

    #chat-meduza {
        display: flex;
        flex-direction: column;
        height: 100%;
        gap: 10px;
        overflow-y: scroll;
        overflow-x: hidden;
        scrollbar-width: thin;
        scrollbar-color: #eee transparent;

        .meduza-welcome-chat {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            width: 100%;
            gap: 6px;
            margin-top: 60px;

            >div {
                display: flex;
                flex-direction: row;
                width: 100%;
                align-items: center;
                justify-content: center;
                margin-bottom: 10px;

                >img {
                    border-radius: 100px;
                    width: 100px;
                    height: 100px;
                    outline: 4px solid white;
                    box-shadow: var(--shadow-meduza);
                }
            }

            >span {
                color: black;

                &:last-child {
                    font-size: 13px;
                    color: grey;
                    font-style: italic;
                    text-align: center;
                }
            }
        }

        .meduza-msg-replay {
            &::after {
                content: "📌 Responder";
                position: absolute;
                width: max-content;
                font-size: 9px;
                translate: 0px 25px;
                left: 0;
                background-color: white !important;
                color: black !important;
                outline: 1px solid #eeee;
                padding: 5px;
                border-radius: 5px;
            }
        }

        .msg-meduza {
            padding: 12px;
            border-radius: 4px;
            font-weight: 500 !important;
            font-size: 14px;
            width: fit-content;
            pointer-events: auto !important;
            user-select: text !important;
            cursor: text !important;
            line-height: 1.4;

            a {
                color: #15603E;
            }
        }

        .msg-meduza-ia {
            margin-right: 20px;
            background-color: whitesmoke;
            position: relative;
            margin-left: 40px;
            color: rgba(0, 0, 0, 0.826);
            white-space: pre-wrap;
            word-break: break-word;

            label {
                position: absolute;
                right: -20px;
                opacity: 0.4;

                &:hover {
                    opacity: 1;
                    cursor: pointer;
                }
            }

            &::before {
                content: "";
                width: 35px;
                height: 35px;
                background-image: url('./../img/zapme_ia.png');
                background-position: center;
                background-repeat: no-repeat;
                background-size: 38px;
                position: absolute;
                border-radius: 100px;
                translate: -50px -8px;
                /* box-shadow: var(--shadow-meduza); */
            }
        }

        .msg-meduza-you {
            margin-left: 45px;
            background-color: var(--bg-msg-you);
            color: var(--txt-msg-you);
            align-self: end !important;
        }
    }

    #field-meduza {
        margin-top: auto;
        display: flex;
        flex-direction: row;
        gap: 8px;
        align-items: center;

        textarea {
            width: 100%;
            outline: none;
            border: none;
            background-color: #eeee;
            border-radius: 100px;
            padding: 16px;
            scrollbar-width: none;
            font-size: 14px;
            font-weight: 500;
            box-shadow: var(--shadow-meduza);
            resize: none;
            padding-right: 45px !important;

            &::placeholder {
                color: grey;
            }
        }

        button {
            position: absolute;
            right: 30px;
            border-radius: 100%;
            border: none;
            width: 45px;
            height: 42px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-left: auto;
            /* outline: 1px solid silver; */
            box-shadow: var(--shadow-meduza);

            &:hover {
                cursor: pointer;
            }
        }
    }
}

.mini-meduza {
    height: 10px !important;
    border-radius: 100px !important;
    width: 160px !important;
    padding-inline: 0px !important;

    .meduza-name {
        min-width: max-content;
        translate: -18px -5px;

        img {
            position: relative;
            visibility: visible !important;
            display: initial !important;
            /* translate: -18px -4px !important; */
            width: 37px;
        }
    }

    .chevron-mini-meduza {
        rotate: 180deg;
        translate: -8px -5px;
    }

    >header {
        border: none;
        height: 10px !important;
    }

    .meduza-context, #field-meduza, #chat-meduza {
        display: none;
    }
}

@media (max-width: 800px) {
    meduza-modal {
        display: none;
        visibility: hidden;
        scale: 0 0;
    }
}