/** 
Leonardo CSS
*/
:root {
    --main-blue: #305680;
    --main-blue-light: #3f6791;
    --main-blue-gradient: #2d4661;

    --hover-link: #a0c0ff;

    --dark-grey: #5f5f5f;
    --light-grey: #EDEDED;
    --grey: #c1c1c1;

    --blue-logo-1: #36549b;
    --blue-logo-2: #2d418d;
    --blue-logo-3: #314a8d;

    --pourple-logo-1: #8da5d5;
    --pourple-logo-2: #6a77b5;
    --pourple-logo-3: #5564a8;

    --ciano-logo-1: #85c0c5;
    --ciano-logo-2: #79bbc2;
    --ciano-logo-3: #5da4b2;

    --yellow-warning: #eec441;
}


.bg-gradient-main-blue {
    background: var(--main-blue) linear-gradient(180deg, var(--main-blue), var(--main-blue-gradient)) repeat-x !important;
    color: #fff;
}

.bg-main-blue {
    background: var(--main-blue) !important;
    color: #fff;
}

.navbar .nav-link,
.sidebar .nav-pills .nav-link {
    color: white;
}

.sidebar .menu-is-opening.menu-open>.nav-link {
    font-weight: 600;
}

.nav-pills .nav-link.active {
    background-color: transparent;
    color: var(--yellow-warning);
}

.main-sidebar,
.main-sidebar::before {
    width: 260px;
}

.nav-item .first-submenu .active,
.first-submenu>.active {
    color: var(--main-blue) !important;
    background-color: var(--light-grey) !important;
}

.menu-is-opening,
.menu-open {
    border-radius: 4px;
    background-color: var(--main-blue-light);
    margin-bottom: 5px !important;
}

.nav-pills .nav-link:not(.active):hover {
    color: var(--hover-link);
}

.brand-link.text-sm .brand-image,
.text-sm .brand-link .brand-image {
    height: 32px;
}

.nav-sidebar .nav-treeview,
.nav-sidebar .nav-treeview .nav-treeview {
    text-indent: 0px;
}

.nav-sidebar .nav-item .has-treeview>.nav-link {
    color: var(--grey) !important;
}

.btn-spacing a:not(:first-child) {
    margin-left: 8px;
    /* Regola lo spazio tra i pulsanti */
}

.quantity_notify {
    top: -2px;
    border-radius: 10px;
}

.card-title {
    font-weight: 700;
    font-size: 1.6rem !important;
    line-height: 2.5rem;
    color: var(--main-blue);
}

.tab-title {
    font-weight: 700;
    font-size: 1.6rem !important;
    line-height: 2.5rem;
    color: var(--dark-grey);
}

.btn-primary {
    background-color: var(--main-blue);
    border-color: var(--main-blue);

}

.btn-outline-primary {
    border-color: var(--main-blue);
    color: var(--main-blue);
    ;
}

.btn-warning,
.btn-primary,
.btn-danger,
.btn-success,
.btn-info,
.btn-secondary,
.btn-light,
.btn-dark,
.btn-outline-primary {
    /* height: 38px; */
    line-height: 24px;
}

.text-primary {
    color: var(--main-blue) !important;
}

th a {
    color: var(--dark-grey);
}

.summary {
    color: var(--main-blue) !important;
    padding-left: 13px;
    margin-bottom: 1.2rem;
}

.content-header {
    background-color: var(--main-blue-light) !important;
    padding-bottom: 3px !important;
    margin-bottom: .2rem;
}

.breadcrumb-item a {
    color: white
}

.breadcrumb-item a:hover {
    color: var(--hover-link);
}

.breadcrumb-item.active {
    color: var(--yellow-warning)
}

.main-header {
    border-bottom: none;
}

.card-header:first-child {
    border-bottom: none;
}


.content-wrapper>.content {
    padding: 1rem;
}

label {
    color: var(--main-blue);
}

.user-icon-card {
    font-size: 5rem;
    line-height: 5rem;
}

.custom-switch .custom-control-label::before {
    width: 2.5rem !important;
    height: 1.3rem !important;
    border-radius: 1rem !important;
    left: -2.7rem;
    top: 0.15rem;
    box-shadow: 1px 1px 3px 0px rgba(0, 0, 0, 0.1);
}

.custom-switch .custom-control-label::after {
    left: calc(-2.25rem + 2px);
    width: calc(1.3rem - 4px);
    height: calc(1.3rem - 4px);
    left: -2.62rem;
    top: 0.24rem;
    box-shadow: 1px 1px 3px 0px rgba(0, 0, 0, 0.2);
}

.custom-switch .custom-control-input:checked~.custom-control-label::after {
    background-color: #dee2e6;
    -webkit-transform: translateX(1.2rem);
    transform: translateX(1.2rem);
}

.custom-switch {
    padding-left: 2.7rem;
    line-height: 1.6rem;
}

th a {
    text-decoration: none;
    color: inherit;
}

th a.asc::after {
    content: ' \25B2';
    /* Freccia su */
    font-size: 0.8rem;
    margin-left: 5px;
}

th a.desc::after {
    content: ' \25BC';
    /* Freccia giù */
    font-size: 0.8rem;
    margin-left: 5px;
}


ul.pagination li {
    display: inline;
    line-height: 2.4rem;
    background-color: transparent;
}

.page-item,
.page-link {
    height: 2.5rem;
    min-width: 2.5rem;
    text-align: center;
    color: var(--main-blue) !important;
    line-height: 2.4rem;
}

.page-item.disabled {
    border-left: 1px solid #9aafe5 !important;
    border-top: 1px solid #9aafe5 !important;
    border-bottom: 1px solid #9aafe5 !important;
    color: var(--main-blue) !important;
}

.page-item.disabled:first-child {
    border-top-left-radius: .25rem !important;
    border-bottom-left-radius: .25rem !important;
}

.page-item.disabled:last-child {
    border-top-right-radius: .25rem !important;
    border-bottom-right-radius: .25rem !important;
    border-right: 1px solid #9aafe5 !important;
}

.js-push-btn-modal-text {
    position: relative;
    top: -4px;
    color: var(--main-blue);
    font-weight: 700;
}

.sweet-check {
    background-color: #dc3545;
    border-color: #921925;
    margin-top: 3px;
}

.sweet-check .outline {
    background-color: #7c151f;
}

.sweet-check.checked {
    background-color: #28a745;
    border-color: #145523;
}

.sweet-check.checked .outline {
    background-color: #86e29b;
}

.tabs-above.tab-bordered .tab-content,
.nav-tabs,
.nav-tabs .nav-link.active {
    border: none;

}

.nav-tabs .nav-link.active {
    cursor: unset;
    color: var(--main-blue);
    font-weight: 700;
    margin-left: -3px;
    font-size: x-large;
    margin-bottom: 1rem;
}

.btn-group,
.btn-group-vertical {
    border: 1px solid lightgray;
}

.user-text {
    color: var(--main-blue);
    font-size: 1.2rem;
}

/* .tabs-x.tabs-above.tab-align-left.tab-bordered.tabs-krajee {
    margin-left: -10px !important;
} */
.content-thumb-kb {
    min-height: 208px;
}

.content-thumb-kb embed {
    height: 208px;
}

.content-txt-kb {
    /* margin-top: 46px !important; */
    font-weight: 500;
}

.card-header-kb {
    font-weight: 700;
    font-size: large;
    padding: 8px;
    color: var(--main-blue);
    background-color: var(--light-grey);
    white-space: nowrap;
    /* Evita il ritorno a capo */
    overflow: hidden;
    /* Nasconde il testo che eccede la larghezza */
    text-overflow: ellipsis;
    /* Aggiunge i puntini di sospensione */
}

.card-body-kb {
    background-color: var(--light-grey) !important;
    border-bottom-right-radius: 4px;
    border-bottom-left-radius: 4px;
}

.card-kb {
    /* width: 14rem; */
    border: 1px solid white;
}

.card-footer {
    padding: 8px;
}

.table-responsive.kartik {
    overflow-x: hidden;
}

.table-bordered td,
.table-bordered th {
    border: none;

}

.table-bordered tr {
    border-bottom: 1px solid #dee2e6 !important;
    border-top: 1px solid #dee2e6 !important;
}

.table-info,
.table-info>td,
.table-info>th {
    background-color: #dee2e6;
}

.table-info tbody+tbody,
.table-info td,
.table-info th,
.table-info thead th {
    border-color: #dee2e6;
}

.table.table-sm.table-hover.table-bordered {
    margin-bottom: 0;
    /* margin-top: -1rem; */
}

.table-info {
    --bs-table-hover-bg: var(--main-blue-light) !important;
}

.btn.btn-icon,
.btn-icon {
    font-size: 18px !important;
}

.tabs-x .nav-tabs .nav-link.active {
    background-color: var(--main-blue);
    color: white;
    font-weight: 600;
    border-radius: 4px;
    margin-left: unset;
    font-size: inherit;
    margin-bottom: unset;
}

.tabs-x .nav-link {
    color: var(--main-blue);
    font-weight: 600;
    border-radius: 4px;
}

.tabs-x .nav-tabs .nav-link:hover {
    border-color: var(--main-blue);
}

.tabs-x .nav-fill .nav-item,
.tabs-x .nav-fill>.nav-link {
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
    text-align: center;
    padding: 5px;
}

.tab-content {
    padding: 5px;
}

.font-large {
    font-size: large;
}

.canvas-frame {
    border: 8px solid var(--main-blue);
    border-radius: 4px;
    padding: 2px;
    background-color: var(--light-grey);
    box-shadow: 0px 0px 14px #00000033;
}

.btn-icon.disabled {
    color: var(--grey) !important;
    cursor: not-allowed;
}

.btn-icon.disabled:hover {
    color: var(--grey) !important;
    cursor: not-allowed;
}

.fileinput-cancel {
    display: none !important;
}

.custom-file-input-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.custom-clear-icon {
    display: none;
    /* Nascosto di default */
    position: relative;
    left: 5px;
    top: -70px;
    transform: translateY(-50%);
    cursor: pointer;
    color: red;
    font-size: 18px;
    z-index: 10;
}

#response-test {
    display: none;
    ;
}

.chat-box .table-bordered {
    border: none;
}

.chat-box .table-striped tbody tr:nth-of-type(odd) {
    background-color: white;
}
.chat-box .table-bordered tr {
    border-bottom: none !important;
    border-top: none !important;
}
.chat-box .table-responsive {
    position: relative;
    height: 520px;
}

.chat-box .rounded {
    border-radius: 25px !important;
}
.chat-container {
    margin: auto;
    display: flex;
    flex-direction: column;
}

.chat-header {
    align-items: center;
    background: #fff;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 10px;
}

.chat-header .form-group {
    display: inline-block;
    margin-right: 10px;
}

.chat-header button {
    margin-left: 10px;
}

.chat-content {
    display: flex;
}

.chat-sidebar {
    width: 250px;
    background: #fff;
    padding: 15px 10px;
    border-radius: 10px;
    margin-right: 15px;
    transition: transform 0.3s ease;
}

.chat-sidebar-collapsed {
    transform: translateX(-110%);
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    z-index: 999;
}

.chat-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

/* Mostra hamburger sotto i 768px */
@media (max-width: 768px) {
    .chat-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        z-index: 999;
        transform: translateX(-110%);
    }

    .chat-sidebar.show {
        transform: translateX(0);
    }

    .hamburger-btn {
        display: inline-block;
        background: none;
        border: none;
        font-size: 24px;
        margin: 10px;
    }

    .chat-sidebar-overlay.show {
        display: block;
    }
}
.chat-sidebar .list-group-item:not(:last-child) {
    border-bottom: 1px solid #DDD;
    padding-bottom: 8px;
}

.chat-sidebar .list-group-item a:first-child {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-box {
    flex: 1;
    background: #fff;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.chat-message {
    display: flex;
    margin-bottom: 15px;
}

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

.chat-message.ai {
    justify-content: flex-start;
}

.message-bubble {
    padding: 12px 16px;
    border-radius: 20px;
    max-width: 75%;
}

.message-bubble.user {
    background-color: #007bff;
    color: white;
}

.message-bubble.ai {
    background-color: #f1f1f1;
    color: black;
}

.chat-input {
    align-items: center;
    padding: 10px;
    border-top: 1px solid #ddd;
}

.chat-input textarea {
    flex: 1;
    border: none;
    padding: 10px;
    border-radius: 20px;
    resize: none;
}

.chat-input button {
    margin-left: 10px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.chat-sidebar .list-group-item {
    border: none;
    padding: 0;
    margin-bottom: 5px;
}
.chat-sidebar .list-group-item a {
    color:var(--main-blue)
}
.chat-sidebar .list-group-item a:hover {
    color:var(--main-blue-light)
}
.list-group {
    overflow-y: auto;
    max-height: 53vh;
    padding-right: 10px;
}

/* Stile per la scrollbar */
.list-group::-webkit-scrollbar, .table-responsive::-webkit-scrollbar {
    width: 6px; /* Imposta una scrollbar sottile */
}

/* Stile per il "pollice" della scrollbar (la parte trascinabile) */
.list-group::-webkit-scrollbar-thumb, .table-responsive::-webkit-scrollbar-thumb {
    background: var(--grey); /* Colore del pollice */
    border-radius: 4px; /* Angoli arrotondati */
}

/* Stile per la traccia della scrollbar */
.list-group::-webkit-scrollbar-track, .table-responsive::-webkit-scrollbar-track {
    background: transparent; /* Sfondo trasparente */
}

/* Nasconde le frecce della scrollbar */
.list-group::-webkit-scrollbar-button, .table-responsive::-webkit-scrollbar-button {
    display: none;
}
.progress {
    height: 2px;
    background-color: rgba(0, 0, 0, .125);
}
.progress-bar {
    background-color: white;
}
.progress-bar-resources {
    background-color: #007bff;
}
