/* /Components/Layout/MainLayout.razor.rz.scp.css */
.page[b-ykuyjuq063] {
    position: relative;
    display: flex;
    flex-direction: column;
}

main[b-ykuyjuq063] {
    flex: 1;
}

.sidebar[b-ykuyjuq063] {
    background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
}

.top-row[b-ykuyjuq063] {
    background-color: #f7f7f7;
    border-bottom: 1px solid #d6d5d5;
    justify-content: flex-end;
    height: 3.5rem;
    display: flex;
    align-items: center;
}

    .top-row[b-ykuyjuq063]  a, .top-row[b-ykuyjuq063]  .btn-link {
        white-space: nowrap;
        margin-left: 1.5rem;
        text-decoration: none;
    }

    .top-row[b-ykuyjuq063]  a:hover, .top-row[b-ykuyjuq063]  .btn-link:hover {
        text-decoration: underline;
    }

    .top-row[b-ykuyjuq063]  a:first-child {
        overflow: hidden;
        text-overflow: ellipsis;
    }

@media (max-width: 640.98px) {
    .top-row[b-ykuyjuq063] {
        justify-content: space-between;
    }

    .top-row[b-ykuyjuq063]  a, .top-row[b-ykuyjuq063]  .btn-link {
        margin-left: 0;
    }
}

@media (min-width: 641px) {
    .questionform[b-ykuyjuq063] {
        width: calc(100% - 250px);
        margin-left: 250px;
    }
    .page[b-ykuyjuq063] {
        flex-direction: row;
    }

    .sidebar[b-ykuyjuq063] {
        width: 250px;
        height: 100vh;
        position: sticky;
        top: 0;
    }

    .top-row[b-ykuyjuq063] {
        position: sticky;
        top: 0;
        z-index: 1;
    }

    .top-row.auth[b-ykuyjuq063]  a:first-child {
        flex: 1;
        text-align: right;
        width: 0;
    }

    .top-row[b-ykuyjuq063], article[b-ykuyjuq063] {
        padding-left: 2rem !important;
        padding-right: 1.5rem !important;
    }
}

#blazor-error-ui[b-ykuyjuq063] {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss[b-ykuyjuq063] {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }
/* /Components/Layout/NavMenu.razor.rz.scp.css */
.navbar-toggler[b-h8755etd0t] {
    appearance: none;
    cursor: pointer;
    width: 3.5rem;
    height: 2.5rem;
    color: white;
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") no-repeat center/1.75rem rgba(255, 255, 255, 0.1);
}

.navbar-toggler:checked[b-h8755etd0t] {
    background-color: rgba(255, 255, 255, 0.5);
}

.top-row[b-h8755etd0t] {
    height: 3.5rem;
    background-color: rgba(0,0,0,0.4);
}

.navbar-brand[b-h8755etd0t] {
    font-size: 1.1rem;
}

.bi[b-h8755etd0t] {
    display: inline-block;
    position: relative;
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.75rem;
    top: -1px;
    background-size: cover;
}

.bi-house-door-fill-nav-menu[b-h8755etd0t] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-house-door-fill' viewBox='0 0 16 16'%3E%3Cpath d='M6.5 14.5v-3.505c0-.245.25-.495.5-.495h2c.25 0 .5.25.5.5v3.5a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-7a.5.5 0 0 0-.146-.354L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293L8.354 1.146a.5.5 0 0 0-.708 0l-6 6A.5.5 0 0 0 1.5 7.5v7a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5Z'/%3E%3C/svg%3E");
}

.bi-plus-square-fill-nav-menu[b-h8755etd0t] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-plus-square-fill' viewBox='0 0 16 16'%3E%3Cpath d='M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2zm6.5 4.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3a.5.5 0 0 1 1 0z'/%3E%3C/svg%3E");
}

.bi-list-nested-nav-menu[b-h8755etd0t] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-list-nested' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M4.5 11.5A.5.5 0 0 1 5 11h10a.5.5 0 0 1 0 1H5a.5.5 0 0 1-.5-.5zm-2-4A.5.5 0 0 1 3 7h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm-2-4A.5.5 0 0 1 1 3h10a.5.5 0 0 1 0 1H1a.5.5 0 0 1-.5-.5z'/%3E%3C/svg%3E");
}

.nav-item[b-h8755etd0t] {
    font-size: 0.9rem;
    padding-bottom: 0.5rem;
}

    .nav-item:first-of-type[b-h8755etd0t] {
        padding-top: 1rem;
    }

    .nav-item:last-of-type[b-h8755etd0t] {
        padding-bottom: 1rem;
    }

    .nav-item[b-h8755etd0t]  .nav-link {
        color: #d7d7d7;
        background: none;
        border: none;
        border-radius: 4px;
        height: 3rem;
        display: flex;
        align-items: center;
        line-height: 3rem;
        width: 100%;
    }

.nav-item[b-h8755etd0t]  a.active {
    background-color: rgba(255,255,255,0.37);
    color: white;
}

.nav-item[b-h8755etd0t]  .nav-link:hover {
    background-color: rgba(255,255,255,0.1);
    color: white;
}

.nav-scrollable[b-h8755etd0t] {
    display: none;
}

.navbar-toggler:checked ~ .nav-scrollable[b-h8755etd0t] {
    display: block;
}

@media (min-width: 641px) {
    .navbar-toggler[b-h8755etd0t] {
        display: none;
    }

    .nav-scrollable[b-h8755etd0t] {
        /* Never collapse the sidebar for wide screens */
        display: block;

        /* Allow sidebar to scroll for tall menus */
        height: calc(100vh - 3.5rem);
        overflow-y: auto;
    }
}
/* /Components/Pages/Realtime.razor.rz.scp.css */
/* Keep the page from getting horizontal scrollbars */
:global(html)[b-m31w4gm41o], :global(body)[b-m31w4gm41o] {
    overflow-x: hidden;
}

.page[b-m31w4gm41o] {
    height: 80vh;
    display: flex;
    flex-direction: column;
}

/* CHAT: usa flex + gap, niente margini sulle righe */
.chat[b-m31w4gm41o] {
    margin-top: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    flex: 1 1 auto;
    /*min-height: 0;*/
    overflow: auto;
    background: #f6f7fb;
    color: #111827;
    padding: 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px; /* distanza verticale tra messaggi */
}

/* Riga messaggio */
.msg-row[b-m31w4gm41o] {
    display: flex;
    align-items: flex-end;
    gap: 8px; /* spazio tra avatar e bubble, se c'è */
}


    .msg-row.left[b-m31w4gm41o] {
        justify-content: flex-start;
    }

    .msg-row.right[b-m31w4gm41o] {
        justify-content: flex-end;
    }

/* Bubble */
.msg[b-m31w4gm41o] {
    display: flex;
    flex-direction: column;
    width: fit-content;
    max-width: min(124ch, 82%);
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
    overflow-wrap: anywhere;
    color: #111827;
}




    .msg.assistant[b-m31w4gm41o] {
        background: #ffffff;
        border-color: #e5e7eb;
    }

    .msg.user[b-m31w4gm41o] {
        background: #e8edff;
        border-color: #c7d2fe;
    }

    /* Header meta */
    .msg .meta[b-m31w4gm41o] {
        display: inline-flex; /* invece di flex */
        align-items: center;
        gap: 10px;
        margin-bottom: 6px;
        font-size: 11.5px;
        color: #6b7280;
    }

        .msg .meta .name[b-m31w4gm41o] {
            font-weight: 600;
            color: #111827;
        }

        .msg .meta .time[b-m31w4gm41o] {
            margin-left: auto;
            white-space: nowrap;
            font-weight: 400;
        }

    /* Text block */
    .msg .text[b-m31w4gm41o] {
        margin-top: 2px;
        white-space: normal; /* per HTML */
    }

        /* Se il testo contiene tag HTML tipo <p> */
        .msg .text p[b-m31w4gm41o] {
            margin: 0;
            border: 1px solid black;
        }

/* "Codino" leggero */
.msg-row.left .msg[b-m31w4gm41o] {
    border-top-left-radius: 10px;
}

.msg-row.right .msg[b-m31w4gm41o] {
    border-top-right-radius: 10px;
}

/* Link */
.msg a[b-m31w4gm41o] {
    color: #1d4ed8;
    text-decoration: none;
}

    .msg a:hover[b-m31w4gm41o] {
        text-decoration: underline;
    }

.cursor[b-m31w4gm41o] {
    margin-left: 4px;
}

/* Thinking dots */
.thinking[b-m31w4gm41o] {
    display: inline-flex;
    gap: 4px;
    margin-left: 6px;
    vertical-align: middle;
}

    .thinking .dot[b-m31w4gm41o] {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: currentColor;
        opacity: 0.35;
        animation: thinking-bounce-b-m31w4gm41o 1s infinite ease-in-out;
    }

        .thinking .dot:nth-child(2)[b-m31w4gm41o] {
            animation-delay: 0.15s;
        }

        .thinking .dot:nth-child(3)[b-m31w4gm41o] {
            animation-delay: 0.3s;
        }

@keyframes thinking-bounce-b-m31w4gm41o {
    0%, 80%, 100% {
        transform: translateY(0);
        opacity: 0.35;
    }

    40% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

.composer[b-m31w4gm41o] {
}

    .composer button:disabled[b-m31w4gm41o] {
        opacity: 0.5;
        cursor: not-allowed;
    }

    .composer.disabled[b-m31w4gm41o] {
        opacity: 0.5;
        pointer-events: none;
    }
/* LOG */
.log[b-m31w4gm41o] {
    display: none;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-top: auto;
    padding: 8px;
    border: 1px solid #333;
    border-radius: 6px;
    background: #111;
    color: #9ca3af;
    font-size: 12px;
    line-height: 1.3;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    max-height: 220px;
    overflow: auto;
}

/**********************************Onda animata inizio**********************************/
.listening-icon[b-m31w4gm41o] {
    font-size: 1.25rem;
    color: #ffffff;
    display: block;
    transform-origin: center center;
    animation: soundwave-b-m31w4gm41o 1.1s infinite ease-in-out;
}

.icon-wrapper[b-m31w4gm41o] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px; /* dimensione FISSA */
    height: 24px; /* dimensione FISSA */
    overflow: hidden; /* impedisce crescita */
    font-size: 1.4rem; /* stessa grandezza del pulse */
    transform: scale(1.3); /* dimensione visiva fissa */
    transform-origin: center center;
}

@keyframes soundwave-b-m31w4gm41o {
    0% {
        transform: scale(1, 0.8);
        opacity: 0.6;
    }

    25% {
        transform: scale(1.3, 1.4);
        opacity: 1;
    }

    50% {
        transform: scale(1.15, 1.0);
        opacity: 0.8;
    }

    75% {
        transform: scale(1.4, 1.6);
        opacity: 1;
    }

    100% {
        transform: scale(1, 0.8);
        opacity: 0.6;
    }
}
/**********************************Onda animata fine**********************************/

