@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

:root {
    --max-content-width: 1140px;
    --canvas: #F3F4F6;
    --surface: #FFFFFF;
    --border: #E6EAF0;
    /* App navigation theme tokens only */
    --app-nav-bg-start: #052767;
    --app-nav-bg-solid: #1f5f97;
    --app-nav-bg-end: #3478b3;
    --app-nav-text: rgba(255, 255, 255, .88);
    --app-nav-text-strong: #ffffff;
    --app-nav-text-muted: rgba(255, 255, 255, .62);
    --app-nav-hover-bg: rgba(255, 255, 255, .10);
    --app-nav-active-bg: rgba(255, 255, 255, .18);
    --app-nav-active-bg-strong: rgba(255, 255, 255, .24);
    --app-nav-radius: 10px;
    --app-nav-icon-width: 2rem;
    --app-nav-icon-size: 1.05rem;
    --app-nav-scrollbar: rgba(255, 255, 255, .35);
}

html, body {
    height: 100%;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif,'Geeza Pro', 'Nadeem', 'Al Bayan', 'DecoType Naskh', 'DejaVu Serif';
}

/* Canvas background (app-wide) */
body {
    background: var(--canvas);
}

/* Ensure your layout wrapper also paints the canvas */
.page {
    background: var(--canvas);
    min-height: 100vh;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0366d6;
    text-decoration:none;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

.cursor-pointer {
    cursor: pointer;
}

.view-label {
    font-size: .8rem;
    color: #6c757d; /* bootstrap secondary */
    margin-bottom: .25rem;
}

.view-text {
    white-space: pre-wrap; /* keep line breaks */
    word-wrap: break-word; /* wrap long words */
}

#blazor-error-ui {
    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: 2000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }


.top-row {
    height: 3.5rem;
    display: flex;
    align-items: center;
    z-index: 99;
}

.main {
    flex: 1;
}

    .main .top-row {
        background-color: var(--surface); /* stays white */
        border-bottom: 1px solid var(--border); /* #E6EAF0 from tokens */
        border-top: 0; /* doc: no extra ribbon line */
        justify-content: flex-end; /* keep your current alignment */
    }

/*    .main .top-row {
        background-color: #f7f7f7;
        border-bottom: 1px solid #d6d5d5;
        justify-content: flex-end;
        border-top: 1px solid #d6d5d5;
    }*/

        .main .top-row > a, .main .top-row .btn-link {
            white-space: nowrap;
            margin-left: 1.5rem;
        }

        .main .top-row a:first-child {
            overflow: hidden;
            text-overflow: ellipsis;
        }

.csidebar {
    background-image: linear-gradient( 180deg, var(--app-nav-bg-start) 0%, var(--app-nav-bg-solid) 52%, var(--app-nav-bg-end) 100% );
    color: var(--app-nav-text, rgba(255, 255, 255, .88));
}

    .csidebar .top-row {
        /*        border-top: 5px solid red !important;*/
    }

    .csidebar .navbar-brand {
        font-size: 1.2rem;
    }

    .csidebar .oi {
        width: 2rem;
        font-size: 1.2rem;
        vertical-align: text-top;
        top: -2px;
    }

    .csidebar .navcs-item {
        font-size: 1.1rem;
        padding-bottom: 0.5rem;
    }

        .csidebar .navcs-item:first-of-type {
            padding-top: 1rem;
        }

        .csidebar .navcs-item:last-of-type {
            padding-bottom: 1rem;
        }

        .csidebar .navcs-item a {
            color: rgba(255,255,255,.88); /*#d7d7d7;*/
            border-radius: 4px;
            height: 3rem;
            display: flex;
            align-items: center;
            line-height: 1.2rem;
        }

            .csidebar .navcs-item a.active {
                background-color: rgba(255,255,255,0.25);
                color: white;
            }

            .csidebar .navcs-item a:hover {
                background-color: rgba(255,255,255,0.1);
                color: white;
            }

    .csidebar * {
        color: inherit;
    }

    .csidebar .nav-link {
        color: rgba(255,255,255,.88) !important;
    }

        .csidebar .nav-link:hover,
        .csidebar .nav-link.active {
            color: white !important;
        }

        .csidebar a,
        .csidebar a:visited,
        .csidebar .nav-link,
        .csidebar .nav-link:visited {
            color: rgba(255,255,255,.88) !important;
        }

.mybtng:link {
    font-size: 14px;
    font-family: "Geeza Pro", "Nadeem", "Al Bayan", "DecoType Naskh", "DejaVu Serif", Segoe UI,'SegoeUIWF',Arial,sans-serif;
    text-decoration: none;
    color: #666666;
    padding: 0;
    min-width: 100px;
}

.mybtng:visited {
    text-decoration: none;
    color: #666666;
    padding: 0;
}

.mybtng:active {
    color: #666666;
    text-decoration: none;
    font-style: italic;
    padding: 0;
}

.mybtng:hover {
    text-decoration: none;
    font-weight: bold;
    color: #666666;
    padding: 0;
}

#components-reconnect-modal {
    display: none;
}

    #components-reconnect-modal.components-reconnect-show {
        display: block;
    }

.launch-pad {
    position: fixed;
    bottom: 16px !important; /* Integrated spacing */
    width: 100%;
    display: flex;
    justify-content: center;
    padding-left: 1rem;
    padding-right: 1rem;
    z-index: 1030;
}

.launch-pad-content {
    background-color: white;
    padding: 0.5rem;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 50px;
    max-width: 420px;
    width: 100%;
    text-align: end; /* Matches your 'text-end' */
    z-index: 1031;
}

.sectionlargeLine {
    padding: 5px 10px 10px 10px;
    font-family: 'open sans',arial,sans-serif;
    font-size: 1.4em;
    font-weight: bold;
    border-bottom: 1px solid #E4E2D5;
    margin-bottom: 0px;
    color: #444;
}

.affixable_course {
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    width: 100% !important;
    will-change: transform !important;
    -webkit-flex-direction: column !important;
    -webkit-box-orient: vertical !important;
    -webkit-box-direction: normal !important;
}

.containerSubwayTracks_course {
    display: block !important;
    margin-top: -1px !important;
    overflow: hidden !important;
    position: relative !important;
    padding-top: 1px !important;
}

.item_course {
    border-bottom: 1px solid transparent !important;
    display: block !important;
    vertical-align: top !important;
    width: 100% !important;
    -webkit-box-sizing: border-box !important;
}

.fixed_course {
    flex: 0 0 auto !important;
    -webkit-flex: 0 0 auto !important;
}

.row_course {
    white-space: nowrap !important;
    width: 100% !important;
}

.videoWrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    /*    padding-bottom: calc(var(--aspect-ratio, .5625) * 100%);*/
    height: 0;
}

    .videoWrapper iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

.gradtext {
    font-size: 128px;
    color: #eee;
    background: -webkit-linear-gradient(45deg, #05fd46 30%, #236aec 80%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

a.newslinkcloud:visited {
    font-size: 20px;
    font-family: "Geeza Pro", "Nadeem", "Al Bayan", "DecoType Naskh", "DejaVu Serif", Segoe UI,'SegoeUIWF',Arial,sans-serif;
    text-decoration: none;
}

a.newslinkcloud:active {
    font-size: 20px;
    font-family: "Geeza Pro", "Nadeem", "Al Bayan", "DecoType Naskh", "DejaVu Serif", Segoe UI,'SegoeUIWF',Arial,sans-serif;
    text-decoration: none;
    font-style: italic;
}

a.newslinkcloud:link {
    font-size: 20px;
    font-family: "Geeza Pro", "Nadeem", "Al Bayan", "DecoType Naskh", "DejaVu Serif", Segoe UI,'SegoeUIWF',Arial,sans-serif;
    text-decoration: none;
}

a.newslinkcloud:hover {
    font-size: 20px;
    font-family: "Geeza Pro", "Nadeem", "Al Bayan", "DecoType Naskh", "DejaVu Serif", Segoe UI,'SegoeUIWF',Arial,sans-serif;
    text-decoration: none;
}

@media (max-width: 767.98px) {
    .main .top-row:not(.auth) {
        display: none;
    }

    .main .top-row.auth {
        justify-content: space-between;
    }

    .main .top-row a, .main .top-row .btn-link {
        margin-left: 0;
    }

    .wrapper_course {
        border-right: 1px solid #D6D8DA;
        position: relative;
        width: 100% !important;
        min-height: 600px !important;
    }
}

.row-hover:hover {
    background-color: #f8f9fa; /* This is a light gray color */
}

@media (min-width: 768px) {
    app {
        flex-direction: row;
    }

    .sidebar {
        width: 250px;
        min-width: 250px;
        height: 100vh;
        position: sticky;
        top: 0;
    }

    .csidebar {
        width: 250px;
        height: 100vh;
        position: sticky;
        top: 0;
    }

    .main .top-row {
        position: sticky;
        top: 0;
    }

    .main > div {
        padding-left: 2rem !important;
        padding-right: 1.5rem !important;
    }

    .navbar-toggler {
        display: none;
    }

    .sidebar .collapse {
        /* Never collapse the sidebar for wide screens */
        display: block;
    }

    .wrapper_course {
        border-right: 1px solid #D6D8DA;
        position: relative;
        width: 100% !important;
        min-height: 100% !important;
    }
}

.gradienttext {
    background: -webkit-linear-gradient(180deg, rgb(233 94 236 / 84%) 0%, #2d6aa7d1 70%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gradienttext2 {
    background: -webkit-linear-gradient(90deg, rgb(233 94 236 / 84%) 0%, #2d6aa7d1 70%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

@media (min-width: 1921px) {
    .row-cols-xxxl-5 > * {
        flex: 0 0 auto;
        width: 20%;
    }
}

.lightgray-icon {
    color: lightgray;
}

.lightgray-text {
    color: #888888;
}

@media print {
    .noprint{
        display: none !important;
    }
}

/* CERTIFICATE PRINT (ADD THIS) */
@media print {

    @page {
        size: landscape;
    }

    /* hide everything */
    body * {
        visibility: hidden;
    }

    /* show only certificate area */
    .container,
    .container * {
        visibility: visible;
    }

    .container {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0 auto;
    }

    /* hide buttons */
    .no-print {
        display: none !important;
    }
}

.slider-thumb-at-start::-webkit-slider-thumb {
    background-color: lightgrey;
}

.centered-max-width {
    max-width: var(--max-content-width);
    margin-left: auto;
    margin-right: auto;
}


/*MenuComponentInstructor*/
/*.custom-menu-container {
    overflow-x: auto;
    white-space: nowrap;
    display: flex;
    -webkit-overflow-scrolling: touch;
    background-color: #ffffff !important;*/ /* White background color for the menu */
    /*padding: 0;
    margin: 0;
    width: 100%;
}

.custom-nav {
    display: flex;
    width: 100%;
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
    gap: 10px;*/ /* Base gap between items */
/*}

.custom-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;*/ /* Adjust padding as needed */
    /*color: #808080;*/ /* Grey color for non-active links */
    /*text-decoration: none;
    flex-grow: 1;*/ /* Allow items to grow evenly */
    /*text-align: center;
    font-size: 1.1rem;*/ /* Slightly larger font size for better readability */
/*}

    .custom-nav-link.active, .custom-nav-link.active:hover {
        color: #000000;*/ /* Black text for active items */
        /*background-color: transparent;*/ /* Transparent background for active items */
        /*border-bottom: 3px solid #0000ff;*/ /* Dark blue bottom border for active items */
        /*text-decoration: none;
    }*/

/* Responsive adjustments for different screen sizes remain the same */
/*@media (max-width: 576px) {
    .custom-nav {
        gap: 3px;
    }
    .custom-nav-link {
        padding: 0.4rem 0.8rem;*/ /* Adjust padding as needed */
        /*font-size: 0.9rem;
    }
    .fs-smaller-on-small {
        font-size: 0.8rem!important;
    }

@media (min-width: 577px) and (max-width: 768px) {
    .custom-nav {
        gap: 20px;
    }
    .fs-smaller-on-small {
        font-size: 0.8rem!important;
    }

@media (min-width: 769px) and (max-width: 992px) {
    .custom-nav {
        gap: 30px;
    }
}

@media (min-width: 993px) {
    .custom-nav {
        gap: 40px;
    }
}*/



.custom-menu-container {
    overflow-x: auto;
    white-space: nowrap;
    display: flex;
    -webkit-overflow-scrolling: touch;
    background-color: #e8e8e8!important; /* Light grey background color for the menu */
    padding: 0;
    margin: 0;
    width: 100%;
    border-radius: 10px;
}

.custom-nav {
    display: flex;
    width: 100%;
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
    gap: 10px; /* Base gap between items */
}

.custom-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.5rem; /* Internal padding */
    margin: 0.4rem; /* External margin around each pill */
    color: #808080; /* Grey color for non-active links */
    text-decoration: none;
    flex-grow: 1; /* Allow items to grow evenly */
    text-align: center;
    font-size: 1.1rem; /* Slightly larger font size for better readability */
    background-color: transparent; /* Transparent background for non-active items */
}

    .custom-nav-link.active, .custom-nav-link.active:hover {
        color: #000000; /* Black text for active items */
        background-color: #d0d0d0; /* Slightly darker background for active items */
        border-radius: 15px; /* Rounded corners for iPhone style */
        text-decoration: none;
    }

/* Responsive adjustments for different screen sizes remain the same */
@media (max-width: 576px) {
    .custom-nav {
        gap: 3px;
    }

    .custom-nav-link {
        padding: 0.4rem 0.8rem; /* Adjust padding as needed */
        font-size: 0.9rem;
    }

    .fs-smaller-on-small {
        font-size: 0.8rem !important;
    }
}

@media (min-width: 577px) and (max-width: 768px) {
    .custom-nav {
        gap: 20px;
    }

    .fs-smaller-on-small {
        font-size: 0.8rem !important;
    }
}

@media (min-width: 769px) and (max-width: 992px) {
    .custom-nav {
        gap: 30px;
    }
}

@media (min-width: 993px) {
    .custom-nav {
        gap: 40px;
    }
}
/*MenuComponentInstructor*/




@media (max-width: 767.98px) {
    .horizontal-scroll-sm {
        -ms-overflow-style: none;  /* Internet Explorer 10+ */
        scrollbar-width: none;  /* Firefox */
    }
    .horizontal-scroll-sm::-webkit-scrollbar { 
        display: none;  /* Safari and Chrome */
    }
}


.custom-menu2-container {
    overflow-x: auto;
    white-space: nowrap;
    display: flex;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    border: 1px solid #63a4ff;
}
.nav-link-inactive2 {
    background-color: white;
    border: 1px solid white;
    color: #808080; /* #63a4ff; 
    border-radius: 0; /* Sharp edges */
}
    .nav-link-inactive2:hover {
        background-color: #f8f9fa; /* Slightly different background on hover */
    }

@media (max-width: 576px) {
    .btn-custom2 {
        width: 80px; /* Fixed width for all buttons */
        min-width: 80px;
        border-radius: 0;
        font-size: 0.9rem;
        padding-left: 4px;
        padding-right: 4px;
    }
    .textsize1 {
        font-size: 1rem;
    }
}

@media (min-width: 577px) and (max-width: 768px) {
    .textsize1 {
        font-size: 1.1rem;
    }
}

@media (min-width: 769px) and (max-width: 992px) {
    .textsize1 {
        font-size: 1.2rem;
    }
}

@media (min-width: 993px) {
    .textsize1 {
        font-size: 1.2rem;
    }
}

.circle-badge {
    background-color: #343a40; /* Dark grey background */
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%; /* Makes the badge circular */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.25rem;
    font-weight: bold;
}

/* Media query for small devices */
@media (max-width: 576px) {
    .circle-badge {
        width: 30px; /* Smaller circle size on small screens */
        height: 30px; /* Smaller circle size on small screens */
        font-size: 1rem; /* Smaller font size on small screens */
    }
}


.fab-wrapper {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    width: 100%;
    display: flex;
    justify-content: center;
    pointer-events: none; /* Allows clicks through the container */
}

.fab-container {
    width: 100%;
    max-width: var(--max-content-width); /* Uses the CSS variable */
    display: flex;
    justify-content: flex-end;
}

.fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: white;
    color: black;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    border: none;
    pointer-events: auto; /* Allows clicks on the button */
}

    .fab i {
        font-size: 24px;
    }

.fab2 {
    /*position: fixed;*/ /* Changed to fixed to position relative to the viewport */
    bottom: 20px; /* Distance from bottom */
    right: 20px; /* Distance from right */
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: #ffffff; /* Ensure high contrast against possible backgrounds */
    color: #000000; /* Readable icon color */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    border: none;
    cursor: pointer; /* To indicate it's clickable */
    z-index: 1050; /* Make sure it's on top of other elements */
}

.fab2-fixed {
    position: fixed;
}

.fab2-above-footer {
    bottom: 70px;
}

    .fab2 i {
        font-size: 24px; /* Icon size */
    }



/*.custom-modal.custom-show {
    display: block;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.custom-modal {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.custom-modal-lg {
    max-width: 100%;
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    border: none;
    outline: none;
    padding: 0;
    overflow: hidden;
}

*/


/* Base style for the modal */
.custom-modal {
    display: none; /* Controlled by inline style for immediate toggling */
    opacity: 0; /* Start fully transparent */
    position: fixed; /* Stay in place */
    top: 0;
    right: 0; /* Start from the right edge */
    height: 100%; /* Full height */
    background-color: white; /* Light color background */
    box-shadow: -2px 0 8px rgba(0,0,0,0.1); /* Shadow for depth */
    z-index: 1150; /* High z-index to overlay content */
    transition: transform 0.3s ease, opacity 0.3s ease; /* Smooth transition for transform and opacity */
    transform: translateX(100%); /* Start off-screen to the right */
    width: var(--modal-width, 400px); /* Default to 400px if not specified */
}

    /* When modal is active */
    .custom-modal.custom-show {
        display: block; /* Show the modal */
        opacity: 1; /* Make modal opaque */
        transform: translateX(0%); /* Slide in to align with the right edge */
    }


    /* Flexbox layout for modal-content */
    .custom-modal .modal-content {
        display: flex;
        flex-direction: column;
        height: 100%;
    }

    .custom-modal .modal-body {
        flex: 1 1 auto;
        overflow-y: auto;
    }

    .custom-modal .modal-footer {
        flex-shrink: 0;
    }


/* Global avatar styles for all contexts */
.avatar {
    border: 2px solid #ddd;
    transition: transform 0.3s ease, border-color 0.3s ease;
    object-fit: cover;
    display: inline-block;
    width: 100%; /* Responsive: allow the avatar to scale */
    height: auto; /* Maintain aspect ratio */
    min-width: 80px; /* Enforce a minimum width */
    min-height: 80px; /* Enforce a minimum height */
    max-width: 150px; 
    max-height: 150px; 
    aspect-ratio: 1 / 1; /* Ensures a perfect square aspect ratio */
}

/* Hover effect */
a:hover .avatar {
    transform: scale(1.05);
    border-color: #aaa;
}

/* Specific styles for multiple avatars in a list or grid */
.avatar-list .avatar {
    width: 50px;
    height: 50px;
    /*margin-right: 10px;*/ /* Add space between avatars */
}

.avatar-list a:hover .avatar {
    transform: none; /* Disable hover scaling in avatar lists for better UX */
}


/* GLOBAL overrides so they apply across CSS isolation */

.modal-backdrop {
    position: fixed !important; /* ensure viewport-level */
    inset: 0 !important;
    z-index: 20000 !important; /* above nav/offcanvas/headers */
}

.custom-modal {
    position: fixed !important; /* break out of any ancestors */
    top: 0 !important;
    right: 0 !important;
    height: 100vh !important;
    z-index: 20001 !important; /* > backdrop */
}

    .custom-modal.custom-show {
        transform: translateX(0) !important; /* belt & suspenders */
    }



/* =====================================================================
   THEME PATCH (components only)
   Scope: ONLY inside .wrapper_course .affixable_course (not the header)
   - Course mode (no .mode-badge): headings white; links/icons = dim white by default,
     brighten on hover/focus/active.
   - Badge mode (.mode-badge): headings dark; links/icons solid dark grey.
   ===================================================================== */

/* ----- COURSE MODE (blue bg) ----- */
.wrapper_course:not(.mode-badge) .affixable_course .menu-heading h1,
.wrapper_course:not(.mode-badge) .affixable_course .menu-heading h2,
.wrapper_course:not(.mode-badge) .affixable_course .menu-heading h3,
.wrapper_course:not(.mode-badge) .affixable_course .menu-heading h4,
.wrapper_course:not(.mode-badge) .affixable_course .menu-heading h5,
.wrapper_course:not(.mode-badge) .affixable_course .menu-heading h6 {
    color: #fff !important;
}

/* default: slightly dim white */
.wrapper_course:not(.mode-badge) .affixable_course .nav.flex-column .nav-link,
.wrapper_course:not(.mode-badge) .affixable_course .navcs-item .nav-link {
    color: rgba(255,255,255,.86) !important;
    background: transparent !important;
    text-decoration: none;
}

    /* brighten on interaction */
    .wrapper_course:not(.mode-badge) .affixable_course .nav.flex-column .nav-link:hover,
    .wrapper_course:not(.mode-badge) .affixable_course .navcs-item .nav-link:hover,
    .wrapper_course:not(.mode-badge) .affixable_course .nav.flex-column .nav-link:focus-visible,
    .wrapper_course:not(.mode-badge) .affixable_course .navcs-item .nav-link:focus-visible,
    .wrapper_course:not(.mode-badge) .affixable_course .nav.flex-column .nav-link.active,
    .wrapper_course:not(.mode-badge) .affixable_course .navcs-item .nav-link.active {
        color: #fff !important;
        background: rgba(255,255,255,.10) !important;
    }

    /* icons follow the same ramp */
    .wrapper_course:not(.mode-badge) .affixable_course .nav.flex-column .nav-link .oi,
    .wrapper_course:not(.mode-badge) .affixable_course .navcs-item .nav-link .oi,
    .wrapper_course:not(.mode-badge) .affixable_course .navcs-item .oi {
        color: rgba(255,255,255,.86) !important;
    }

    .wrapper_course:not(.mode-badge) .affixable_course .nav.flex-column .nav-link:hover .oi,
    .wrapper_course:not(.mode-badge) .affixable_course .navcs-item .nav-link:hover .oi,
    .wrapper_course:not(.mode-badge) .affixable_course .nav.flex-column .nav-link:focus-visible .oi,
    .wrapper_course:not(.mode-badge) .affixable_course .navcs-item .nav-link:focus-visible .oi,
    .wrapper_course:not(.mode-badge) .affixable_course .nav.flex-column .nav-link.active .oi,
    .wrapper_course:not(.mode-badge) .affixable_course .navcs-item .nav-link.active .oi {
        color: #fff !important;
    }

/* ----- BADGE MODE (grey bg) ----- */
.mode-badge .affixable_course .menu-heading h1,
.mode-badge .affixable_course .menu-heading h2,
.mode-badge .affixable_course .menu-heading h3,
.mode-badge .affixable_course .menu-heading h4,
.mode-badge .affixable_course .menu-heading h5,
.mode-badge .affixable_course .menu-heading h6 {
    color: #111 !important;
}

/* solid dark text across states so Bootstrap can’t wash it out */
.mode-badge .affixable_course .nav.flex-column .nav-link,
.mode-badge .affixable_course .nav.flex-column .nav-link:link,
.mode-badge .affixable_course .nav.flex-column .nav-link:visited,
.mode-badge .affixable_course .navcs-item .nav-link,
.mode-badge .affixable_course .navcs-item .nav-link:link,
.mode-badge .affixable_course .navcs-item .nav-link:visited {
    color: #1f1f1f !important;
    background: transparent !important;
    text-decoration: none;
}

    .mode-badge .affixable_course .nav.flex-column .nav-link .oi,
    .mode-badge .affixable_course .navcs-item .nav-link .oi,
    .mode-badge .affixable_course .navcs-item .oi {
        color: #1f1f1f !important;
    }

    /* hover/active */
    .mode-badge .affixable_course .nav.flex-column .nav-link:hover,
    .mode-badge .affixable_course .navcs-item .nav-link:hover {
        background: #eaeaea !important;
        color: #111 !important;
    }

    .mode-badge .affixable_course .nav.flex-column .nav-link.active,
    .mode-badge .affixable_course .navcs-item .nav-link.active,
    .mode-badge .affixable_course .nav.flex-column .nav-link[aria-current="true"] {
        background: #e2e2e2 !important;
        color: #111 !important;
    }

/* Optional: disabled state clarity inside the components */
.affixable_course .nav.flex-column .nav-link[aria-disabled="true"],
.affixable_course .navcs-item .nav-link[aria-disabled="true"] {
    pointer-events: none;
    opacity: .55;
}

/* Theme 2 background — scope to the wrapper only */
.wrapper_course.mode-badge,
.wrapper_course.mode-badge .affixable_course {
    background: #f7f7f7;
    background-image: none;
}

/* Course (default) — let the .csidebar gradient show through */
.wrapper_course:not(.mode-badge) .affixable_course {
    background: transparent !important; /* unpaint the inner panel */
    background-image: none !important;
}

/* DEFAULT (Theme 1) reset — make wrapper + inner panel transparent */
.wrapper_course.mode-default,
.wrapper_course.mode-default .affixable_course {
    background: transparent !important;
    background-image: none !important;
}

.loading-overlay {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    background: rgba(255,255,255,.9);
    border: 1px solid #eee;
    border-radius: .5rem;
    padding: .35rem .55rem;
    z-index: 1040;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.page-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.55);
    backdrop-filter: blur(2px);
    pointer-events: auto;
    overscroll-behavior: contain;
    touch-action: none;
}

.form-check-input-answer {
    position: absolute;
    margin-top: .3rem;
    margin-left: -1.25rem;
    margin-right: -1.25rem;
}

.mcq-option--correct {
    background-color: #d4edda;
}

.mcq-option--wrong {
    background-color: #f8d7da;
}

.icon-answer {
    margin-left: 5px;
}

@media (min-width: 768px) {
    .layout-footer {
        display: none !important;
    }
}