/*----------------------------
    Google fonts
-----------------------------*/
/* @import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script&display=swap'); */
@import url('https://fonts.googleapis.com/css2?family=Titillium+Web:ital,wght@0,200;0,300;0,400;0,600;0,700;0,900;1,200;1,300;1,400;1,600;1,700&display=swap');

html, body {
    height: 100% !important;
    padding: 0px !important;
}

body {
    font-family: "Titillium Web", sans-serif !important;
    /* font-family: 'Montserrat', sans-serif; */
    font-weight: 400;
    margin: auto !important;
    color: var(--contrast-theme-color) !important;
}

:root {
    /* Settings */
    --heading-page-height: 44px;
    --mg-scrollbar-thumb: rgba(var(--mangofit-color-rgb), 0.6);
    --mg-scrollbar-thumb-hover: var(--mangofit-color);
    --mg-scrollbar-track: transparent;
}

/*----------------------------
    Toast notify
-----------------------------*/
.toast.toast-notify  {
    z-index: 5060;
}

/* With a window or a side panel open, the top-right corner holds its close button: the messages move to the top
   centre, so «Profilo salvato» never covers the X. Separate rules, so a browser without :has() keeps the first. */
body.modal-open .toast-container {
    right: auto !important;
    left: 50% !important;
    transform: translateX(-50%);
}

body:has(.offcanvas.show) .toast-container {
    right: auto !important;
    left: 50% !important;
    transform: translateX(-50%);
}

/*----------------------------
    BOTTOM-RIGHT FLOATING CARDS
    The corner cards (index.js) stay above the page, but wait behind an open window, side panel or
    confirmation: they would cover its buttons. Separate rules, so a browser without :has() keeps the others.
-----------------------------*/
body.modal-open #mangofit-bottom-right-floating-wrapper,
body.swal2-shown #mangofit-bottom-right-floating-wrapper {
    visibility: hidden;
}

body:has(.offcanvas.show) #mangofit-bottom-right-floating-wrapper,
body:has(.offcanvas.showing) #mangofit-bottom-right-floating-wrapper {
    visibility: hidden;
}

/*----------------------------
    SIDEBAR ICONS AND COUNTERS
    Labels may fade while AdminLTE expands the sidebar; their width and margins must never move the icon slot.
-----------------------------*/
.home-notification-button > .mf-sidebar-icon-slot {
    display: inline-grid;
    place-items: center;
    width: 1.4rem;
    height: 1.4rem;
}

.home-notification-button > .mf-sidebar-icon-slot > .nav-icon {
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: contain;
}

#desktop_view_main_sidebar_container .nav-sidebar .menu_action_bar_btn,
#desktop_view_main_sidebar_container .home-notification-trigger.is-sidebar .home-notification-button {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    min-height: 2.5rem;
    height: auto;
}

#desktop_view_main_sidebar_container .nav-sidebar .menu_action_bar_btn {
    border: 0;
}

#desktop_view_main_sidebar_container .nav-sidebar .nav-link > p {
    margin: 0;
    flex: 0 0 auto;
}

#desktop_view_main_sidebar_container .mf-sidebar-icon-slot {
    position: relative;
    display: inline-grid;
    place-items: center;
    flex: 0 0 1.6rem;
    width: 1.6rem;
    height: 23px;
}

#desktop_view_main_sidebar_container .nav-sidebar .nav-icon {
    display: block;
    flex: 0 0 1.6rem;
    width: 1.6rem;
    height: 23px;
    margin: 0;
    object-fit: contain;
}

#desktop_view_main_sidebar_container .mf-sidebar-icon-slot > [data-id="li_all_chat_messages_counter"],
#desktop_view_main_sidebar_container .mf-sidebar-icon-slot > [data-coach-matching-menu-count],
#desktop_view_main_sidebar_container .home-notification-trigger.is-sidebar .mf-sidebar-icon-slot > [data-notification-badge] {
    top: -0.35rem;
    right: -0.4rem;
    left: auto;
}

#desktop_view_main_sidebar_container .mf-sidebar-icon-slot > [data-coach-matching-menu-count].is-new {
    top: -0.15rem;
    right: -0.15rem;
}

/*----------------------------
    SEARCH INPUT STICKY
-----------------------------*/
.search-input-sticky {
    position: sticky;
    background: var(--current-theme-color);
    padding-top: 5px !important;
    padding-bottom: 15px !important;
    z-index: 2;
}

/*-----------------------
    RESPONSIVE
-----------------------*/
@media screen and (min-width: 768px) { /* breakpoint “md” and above in Bootstrap */
    /*-----------------------
        SCROLLBAR
    -----------------------*/
    ::-webkit-scrollbar {
        width: 3px;
        height: 8px;
    }

    ::-webkit-scrollbar-thumb {
        background: var(--mg-scrollbar-thumb);
    }

    ::-webkit-scrollbar-thumb:hover {
        background: var(--mg-scrollbar-thumb-hover);
    }

    ::-webkit-scrollbar-track,
    ::-webkit-scrollbar-track-piece,
    ::-webkit-scrollbar-corner {
        background: transparent;
    }

    ::-webkit-scrollbar-button,
    ::-webkit-scrollbar-button:single-button {
        -webkit-appearance: none;
        background: transparent;
        display: none;
        height: 0;
        width: 0;
    }
}

@supports not selector(::-webkit-scrollbar) {
    @media screen and (min-width: 768px) { /* fallback for browsers without WebKit scrollbar styling */
        * {
            scrollbar-color: var(--mg-scrollbar-thumb) var(--mg-scrollbar-track);
            scrollbar-width: thin;
        }
    }
}

@media screen and (max-width: 767.98px) { /* breakpoints “sm” and lower in Bootstrap */
    /*-----------------------
        BODY
    -----------------------*/
    body {
        max-width: 768px !important;
    }

    .custom-subsection-sidebar {
        display: none !important;
    }
}

/*----------------------------
    MEDIA THEME QUERIES
-----------------------------*/
/* @media (prefers-color-scheme: dark) {
    body {
        background-color: var(--current-theme-color);
        color: white;
    }
}

@media (prefers-color-scheme: light) {
    body {
        background-color: white;
        color: var(--current-theme-color);
    }
} */

/*----------------------------
    HIGHCHART
-----------------------------*/
.highcharts-title {
    /* width: auto !important; */
    right: 10px !important;
}

/*----------------------------
    CUSTOM SUBSECTION SIDEBAR
-----------------------------*/
.custom-subsection-sidebar {
    height: 100%;
    width: 300px !important;
}
