﻿
#promptArea {
    height: 128px !important;
}
.e-footer {
    display: none !important;
}

.e-aiassistview {
    overflow: hidden !important;
}
.e-aiassistview .e-views .e-suggestion-list > ul > li {
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
    align-self: flex-end !important;
    border-radius: 23px !important;
    padding: 13px !important;
}
.e-aiassistview .e-views .e-suggestion-list > ul > li:nth-child(even) {
    align-self: flex-start !important;
}
.e-suggestion-list > ul {
    flex-direction: column !important;
}
.e-aiassistview .e-view-content {
    height: calc(100vh - 160px) !important;
}

.aiassist-content-typing {
    height: calc(100vh - 234px - var(--virtual-keyboard-portion)) !important;
}

.aiassist-content-typing .e-aiassistview .e-view-content {
    height: calc(100vh - 160px - var(--virtual-keyboard-portion)) !important;
}
.aiassist-content {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 234px);
    overflow-y: auto;
}
.prompt {
    width: 350px;
    min-height: 60px;
    border-radius: 18px;
    border: 1px #fafafa solid;
    display: flex;
    gap: 1rem;
    padding-left: 12px;
    cursor: pointer;
}
.prompt-hidden{
   display: none;
}
@media screen and (min-width: 800px) {
    .e-suggestion-list {
        width: 700px !important;
    }
}
@media (max-width: 800px) {
    .prompt {
        width: 100% !important;
    }

    .e-aiassistview .e-views .e-suggestion-list > ul > li {
        width: 100% !important;
    }
}
.prompt p {
    text-align: start !important;
    margin-block: auto !important;
    font-weight: 400 !important;
}
/* Evito che il button "Stop response" sia coperto dal prompt */
.e-stop-response.e-btn-active {
    position: absolute !important;
    bottom: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
}   
.hints-table {
    overflow-y: auto;
    min-width: 450px !important;
}

@media (max-width: 600px) {
    .hints-table {
        overflow-y: auto;
        min-width: 100% !important;
        max-width: 100% !important;
    }
}
.popover-heading {
    display: flex;
    justify-content: space-between;
    height: 50px;
    min-width: 300px;
}
.custom-footer {
    display: flex;
    height: 160px;
    width: 100%;
    bottom: 0;
    left: 0;
    padding-block: 16px;
    padding-inline: 12px;
    background-color: #fff;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, .05), 0 -10px 15px -3px rgba(0, 0, 0, .1);
    border: 1px solid #dee2e6;
}
.custom-footer form {
    position: relative;
}
.send-button {
    position: absolute !important;
    bottom: 1px !important;
    right: 1px !important;
}

.send-button-hidden {
    cursor: not-allowed !important;
    pointer-events: none !important;
    display: none !important;
}
.close-fab {
    height: fit-content !important;
    border-radius: 50% !important;
}
.empty-chat-fab {
    /* top: 50%;
            transform: translateY(-50%); */
    margin-right: 8px !important;
    border-radius: 50% !important;
    box-shadow: 0px 3px 5px -1px rgba(0, 0, 0, .2), 0px 6px 10px 0px rgba(0, 0, 0, .14), 0px 1px 18px 0px rgba(0, 0, 0, .12) !important;
    height: fit-content !important;
}
.not-authorized-response {
    background-color: #FFEBEE;
    padding: 12px;
    border-left: 6px solid #F44336;
    border-radius: 4px;
}

.max-iterations-response {
    background-color: #EEEEEE;
    padding: 12px;
    border-left: 6px solid #757575;
    border-radius: 4px;
}
.popover-standard {
    max-height: 350px;
    width: calc(100% - 24px);
}
.e-stop-response {
    pointer-events: none !important;
    cursor: not-allowed !important;
}
/* Le tabelle non hanno il pulsante di download immagine */
div.responseItemContent:has(> div.responseContent > .mud-table) + * .e-toolbar-item.e-tbtn-align:has(> button > span.e-icons.e-image) {
    display: none;
}
/* I grafici a barre hanno i button torta e linea */
div.responseItemContent:has(> div.responseContent > div.canvas-container-bar) + * .e-toolbar-item.e-tbtn-align:has(> button > span.e-icons.e-chart) {
    display: none;
}
/* I grafici a linea hanno i button barre e torta */
div.responseItemContent:has(> div.responseContent > div.canvas-container-line) + * .e-toolbar-item.e-tbtn-align:has(> button > span.e-icons.e-chart-2d-line-marked) {
    display: none;
}

/* I grafici a torta hanno i button barre e linea */
div.responseItemContent:has(> div.responseContent > div.canvas-container-pie) + * .e-toolbar-item.e-tbtn-align:has(> button > span.e-icons.e-chart-2d-pie-2) {
    display: none;
}

/* I grafici non hanno il button copia */
div.responseItemContent:has(> div.responseContent > div.canvas-container) + * .e-toolbar-item.e-tbtn-align:has(> button > span.e-icons.e-copy) {
    display: none;
}

div.responseItemContent:has(> div.responseContent > div.canvas-container) + * .e-toolbar-item.e-tbtn-align:has(> button > span.e-icons.e-download) {
    display: none;
}
/* Il messaggio di numero massimo iterazioni superate non ha il pulsante di copia */
div.responseItemContent:has(> div.responseContent > div > button.mud-button-root) + * .e-toolbar-item.e-tbtn-align:has(> button > span.e-icons.e-copy) {
    display: none;
}

div.responseItemContent:has(> div.responseContent > div > button.mud-button-root) + * .e-toolbar-item.e-tbtn-align:has(> button > span.e-icons.e-download) {
    display: none;
}

div.responseItemContent:not(:has(> div.responseContent > .mud-table)):not(:has(> div.responseContent > div.canvas-container)) + * .e-toolbar-item.e-tbtn-align:has(> button > span.e-icons.e-chart,.e-chart-2d-line-marked,.e-chart-2d-pie-2) {
    display: none;
}
/* I messaggi di errore non hanno il button download */
div.responseItemContent:not(:has(> div.responseContent > .mud-table)):not(:has(> div.responseContent > div.canvas-container)) + * .e-toolbar-item.e-tbtn-align:has(> button > span.e-icons.e-download) {
    display: none;
}
/* I messaggi di errore non hanno il button di download immagine */
div.responseItemContent:not(:has(> div.responseContent > .mud-table-container)):not(:has(> div.responseContent > div.canvas-container)) + * .e-toolbar-item.e-tbtn-align:has(> button > span.e-icons.e-image) {
    display: none;
}
/******* START Animazione typewriter *******/
.e-stop-response span {
    overflow: hidden; /* Ensures the content is not revealed until the animation */
    border-right: .15em solid white; /* The typwriter cursor */
    white-space: nowrap; /* Keeps the content on a single line */
    margin: 0 auto; /* Gives that scrolling effect as the typing happens */
    /*letter-spacing: .15em; /* Adjust as needed */
    animation: typing 2s steps(40, end), blink-caret .75s step-end infinite;
}

/* The typing effect */
@keyframes typing {
    from {
        width: 0
    }

    to {
        width: 100%
    }
}

/* The typewriter cursor effect */
@keyframes blink-caret {
    from, to {
        border-color: transparent;
    }
}
/******* END Animazione typewriter *******/
