/* /Layout/MainLayout.razor.rz.scp.css */
/* =========================
   NAVMENU (Blazor) - CLEAN
   ========================= */

/* ---------- Legacy template bits (ok tenerli) ---------- */
.navbar-toggler[b-tmopy668it] {
    background-color: rgba(255, 255, 255, 0.1);
}

.top-row[b-tmopy668it] {
    height: 3.5rem;
    background-color: rgba(0,0,0,0.4);
}

.navbar-brand[b-tmopy668it] {
    font-size: 1.1rem;
}

/* Se usi ancora icone "legacy" con background-image, limitale a .nav-legacy */
.nav-legacy .bi[b-tmopy668it] {
    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-tmopy668it] {
    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-tmopy668it] {
    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-tmopy668it] {
    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");
}

/* Regole legacy per .nav-link (le lasciamo ma non devono toccare side-item/side-sub) */
.nav-item[b-tmopy668it]  a.nav-link {
    color: #d7d7d7;
    border-radius: 4px;
    height: 3rem;
    display: flex;
    align-items: center;
    line-height: 3rem;
}

    .nav-item[b-tmopy668it]  a.nav-link.active {
        background-color: rgba(255,255,255,0.37);
        color: white;
    }

    .nav-item[b-tmopy668it]  a.nav-link:hover {
        background-color: rgba(255,255,255,0.1);
        color: white;
    }

@media (min-width: 641px) {
    .navbar-toggler[b-tmopy668it] {
        display: none;
    }

    .collapse[b-tmopy668it] {
        /* Never collapse the sidebar for wide screens */
        display: block;
    }

    .nav-scrollable[b-tmopy668it] {
        height: calc(100vh - 3.5rem);
        overflow-y: auto;
    }
}

/* ---------- Modern sidebar (your new menu) ---------- */

/* container */
/*.sidebar {
    background: linear-gradient(180deg,#0b1f3a,#0a1630);
    color: #e9eef7;
    padding: .75rem .5rem;*/
}
.sidebar[b-tmopy668it] {
    background: linear-gradient(180deg,#0b1f3a,#0a1630);
    color: #e9eef7;
    padding: .75rem .5rem;
    position: relative;
}


    .sidebar[b-tmopy668it]::before {
        content: "";
        position: absolute;
        inset: 0;
        background: rgba(255,255,255,.06);
        pointer-events: none;
    }

    .sidebar > *[b-tmopy668it] {
        position: relative;
    }

    /* reset list spacing inside sidebar */
    .sidebar ul[b-tmopy668it], .sidebar li[b-tmopy668it] {
        margin: 0 !important;
        padding: 0 !important;
    }

    .sidebar .nav-item[b-tmopy668it] {
        padding: 0 !important; /* neutralizza padding del template */
        font-size: inherit;
    }

    /* each row (links + buttons) */
    .sidebar .side-item[b-tmopy668it],
    .sidebar .side-sub[b-tmopy668it],
    .sidebar .side-toggle[b-tmopy668it] {
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        text-align: left !important;
        padding: .60rem .70rem !important;
        margin: .10rem 0 !important;
        border-radius: .65rem;
        border: 1px solid transparent;
        background: transparent;
        height: auto !important;
        line-height: normal !important;
        text-decoration: none;
    }

    /* icon column */
    .sidebar .side-ic[b-tmopy668it] {
        width: 28px !important;
        flex: 0 0 28px !important;
        display: inline-flex !important;
        justify-content: center !important;
        opacity: .95;
    }

    /* text column */
    .sidebar .side-tx[b-tmopy668it] {
        flex: 1 1 auto !important;
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* chevron column */
    .sidebar .side-ch[b-tmopy668it] {
        margin-left: auto !important;
        width: 24px !important;
        display: inline-flex !important;
        justify-content: center !important;
        opacity: .75;
    }

    /* Bootstrap icons in sidebar: behave like font icons (no background-image hacks) */
    .sidebar :deep(i.bi)[b-tmopy668it] {
        background-image: none !important;
        background-size: auto !important;
        width: auto !important;
        height: auto !important;
        margin-right: 0 !important;
        top: 0 !important;
    }

    /* hover/active background */
    .sidebar .side-item:hover[b-tmopy668it],
    .sidebar .side-sub:hover[b-tmopy668it] {
        background: rgba(255,255,255,.06);
        border-color: rgba(255,255,255,.06);
    }

    .sidebar .side-item.active[b-tmopy668it],
    .sidebar .side-sub.active[b-tmopy668it] {
        background: rgba(255,255,255,.10);
        border-color: rgba(255,255,255,.10);
    }

    /* sublist indentation */
    .sidebar .side-sublist[b-tmopy668it] {
        margin: .10rem 0 .35rem 12px !important;
        padding-left: .35rem !important;
        border-left: 1px solid rgba(255,255,255,.08);
    }

    .sidebar .side-sub[b-tmopy668it] {
        font-size: .92rem;
        opacity: .95;
    }

    /* chevron rotate */
    .sidebar .side-ch i[b-tmopy668it] {
        transition: transform .15s ease;
    }

    .sidebar .side-toggle.open .side-ch i[b-tmopy668it] {
        transform: rotate(90deg);
    }

/* ---------- DEFINITIVE anti-blue link colors (CSS isolation) ---------- */
/* This overrides app.css (a { color:#0071c1 }) and bootstrap reboot */
#mainNav :deep(a.side-item)[b-tmopy668it],
#mainNav :deep(a.side-sub)[b-tmopy668it],
#mainNav :deep(a.side-item:visited)[b-tmopy668it],
#mainNav :deep(a.side-sub:visited)[b-tmopy668it] {
    color: rgba(255,255,255,.92) !important;
    text-decoration: none !important;
}

#mainNav :deep(a.side-item:hover)[b-tmopy668it],
#mainNav :deep(a.side-sub:hover)[b-tmopy668it],
#mainNav :deep(a.side-item:focus)[b-tmopy668it],
#mainNav :deep(a.side-sub:focus)[b-tmopy668it],
#mainNav :deep(a.side-item:active)[b-tmopy668it],
#mainNav :deep(a.side-sub:active)[b-tmopy668it],
#mainNav :deep(a.side-item.active)[b-tmopy668it],
#mainNav :deep(a.side-sub.active)[b-tmopy668it] {
    color: #ffffff !important;
    text-decoration: none !important;
}

/* also force inner text to follow link color */
#mainNav :deep(a.side-item .side-tx)[b-tmopy668it],
#mainNav :deep(a.side-sub .side-tx)[b-tmopy668it] {
    color: inherit !important;
}


/* /Layout/NavMenu.razor.rz.scp.css */
/* =========================
   NAVMENU (Blazor) - CLEAN
   ========================= */

/* ---------- Legacy template bits (ok tenerli) ---------- */
.navbar-toggler[b-9qkkwgv1yd] {
    background-color: rgba(255, 255, 255, 0.1);
}

.top-row[b-9qkkwgv1yd] {
    height: 3.5rem;
    background-color: rgba(0,0,0,0.4);
}

.navbar-brand[b-9qkkwgv1yd] {
    font-size: 1.1rem;
}

/* Se usi ancora icone "legacy" con background-image, limitale a .nav-legacy */
.nav-legacy .bi[b-9qkkwgv1yd] {
    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-9qkkwgv1yd] {
    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-9qkkwgv1yd] {
    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-9qkkwgv1yd] {
    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");
}

/* Regole legacy per .nav-link (le lasciamo ma non devono toccare side-item/side-sub) */
.nav-item[b-9qkkwgv1yd]  a.nav-link {
    color: #d7d7d7;
    border-radius: 4px;
    height: 3rem;
    display: flex;
    align-items: center;
    line-height: 3rem;
}

    .nav-item[b-9qkkwgv1yd]  a.nav-link.active {
        background-color: rgba(255,255,255,0.37);
        color: white;
    }

    .nav-item[b-9qkkwgv1yd]  a.nav-link:hover {
        background-color: rgba(255,255,255,0.1);
        color: white;
    }

@media (min-width: 641px) {
    .navbar-toggler[b-9qkkwgv1yd] {
        display: none;
    }

    .collapse[b-9qkkwgv1yd] {
        /* Never collapse the sidebar for wide screens */
        display: block;
    }

    .nav-scrollable[b-9qkkwgv1yd] {
        height: calc(100vh - 3.5rem);
        overflow-y: auto;
    }
}

/* ---------- Modern sidebar (your new menu) ---------- */

/* container */
.sidebar[b-9qkkwgv1yd] {
    background: linear-gradient(180deg,#0b1f3a,#0a1630);
    color: #e9eef7;
    padding: .75rem .5rem;
}

    /* reset list spacing inside sidebar */
    .sidebar ul[b-9qkkwgv1yd], .sidebar li[b-9qkkwgv1yd] {
        margin: 0 !important;
        padding: 0 !important;
    }

    .sidebar .nav-item[b-9qkkwgv1yd] {
        padding: 0 !important; /* neutralizza padding del template */
        font-size: inherit;
    }

    /* each row (links + buttons) */
    .sidebar .side-item[b-9qkkwgv1yd],
    .sidebar .side-sub[b-9qkkwgv1yd],
    .sidebar .side-toggle[b-9qkkwgv1yd] {
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        text-align: left !important;
        padding: .60rem .70rem !important;
        margin: .10rem 0 !important;
        border-radius: .65rem;
        border: 1px solid transparent;
        background: transparent;
        height: auto !important;
        line-height: normal !important;
        text-decoration: none;
    }

    /* icon column */
    .sidebar .side-ic[b-9qkkwgv1yd] {
        width: 28px !important;
        flex: 0 0 28px !important;
        display: inline-flex !important;
        justify-content: center !important;
        opacity: .95;
    }

    /* text column */
    .sidebar .side-tx[b-9qkkwgv1yd] {
        flex: 1 1 auto !important;
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* chevron column */
    .sidebar .side-ch[b-9qkkwgv1yd] {
        margin-left: auto !important;
        width: 24px !important;
        display: inline-flex !important;
        justify-content: center !important;
        opacity: .75;
    }

    /* Bootstrap icons in sidebar: behave like font icons (no background-image hacks) */
    .sidebar :deep(i.bi)[b-9qkkwgv1yd] {
        background-image: none !important;
        background-size: auto !important;
        width: auto !important;
        height: auto !important;
        margin-right: 0 !important;
        top: 0 !important;
    }

    /* hover/active background */
    .sidebar .side-item:hover[b-9qkkwgv1yd],
    .sidebar .side-sub:hover[b-9qkkwgv1yd] {
        background: rgba(255,255,255,.06);
        border-color: rgba(255,255,255,.06);
    }

    .sidebar .side-item.active[b-9qkkwgv1yd],
    .sidebar .side-sub.active[b-9qkkwgv1yd] {
        background: rgba(255,255,255,.10);
        border-color: rgba(255,255,255,.10);
    }

    /* sublist indentation */
    .sidebar .side-sublist[b-9qkkwgv1yd] {
        margin: .10rem 0 .35rem 12px !important;
        padding-left: .35rem !important;
        border-left: 1px solid rgba(255,255,255,.08);
    }

    .sidebar .side-sub[b-9qkkwgv1yd] {
        font-size: .92rem;
        opacity: .95;
    }

    /* chevron rotate */
    .sidebar .side-ch i[b-9qkkwgv1yd] {
        transition: transform .15s ease;
    }

    .sidebar .side-toggle.open .side-ch i[b-9qkkwgv1yd] {
        transform: rotate(90deg);
    }

/* ---------- DEFINITIVE anti-blue link colors (CSS isolation) ---------- */
/* This overrides app.css (a { color:#0071c1 }) and bootstrap reboot */
#mainNav :deep(a.side-item)[b-9qkkwgv1yd],
#mainNav :deep(a.side-sub)[b-9qkkwgv1yd],
#mainNav :deep(a.side-item:visited)[b-9qkkwgv1yd],
#mainNav :deep(a.side-sub:visited)[b-9qkkwgv1yd] {
    color: rgba(255,255,255,.92) !important;
    text-decoration: none !important;
}

#mainNav :deep(a.side-item:hover)[b-9qkkwgv1yd],
#mainNav :deep(a.side-sub:hover)[b-9qkkwgv1yd],
#mainNav :deep(a.side-item:focus)[b-9qkkwgv1yd],
#mainNav :deep(a.side-sub:focus)[b-9qkkwgv1yd],
#mainNav :deep(a.side-item:active)[b-9qkkwgv1yd],
#mainNav :deep(a.side-sub:active)[b-9qkkwgv1yd],
#mainNav :deep(a.side-item.active)[b-9qkkwgv1yd],
#mainNav :deep(a.side-sub.active)[b-9qkkwgv1yd] {
    color: #ffffff !important;
    text-decoration: none !important;
}

/* also force inner text to follow link color */
#mainNav :deep(a.side-item .side-tx)[b-9qkkwgv1yd],
#mainNav :deep(a.side-sub .side-tx)[b-9qkkwgv1yd] {
    color: inherit !important;
}
