/*
Theme Name: MGT LMS
Theme URI: https://meritglobaltraining.com/lms
Description: Merit Global Training LMS theme. Replicates the main site header & footer so the WordPress (Tutor LMS) site looks consistent with meritglobaltraining.com.
Author: Merit Global Training
Version: 1.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
*/

/* --- LMS content area spacing (so Tutor content isn't flush to header/footer) --- */
.mgt-lms-main { padding: 40px 0 60px; min-height: 55vh; background: #fff; }
.mgt-lms-main .container { max-width: 1170px; }

/* --- Make the header sit above WordPress admin bar nicely --- */
body.admin-bar .top-bar { margin-top: 0; }

/* --- Self-contained mobile menu open state (we don't load the main site's main.js to avoid jQuery conflicts with Tutor LMS) --- */
@media (max-width: 991px) {
    #mainnav { display: none; }
    body.mgt-menu-open #mainnav { display: block !important; background:#fff; }
    body.mgt-menu-open #mainnav ul.menu { display:block; }
    body.mgt-menu-open #mainnav ul.menu > li { display:block; border-bottom:1px solid #eee; }
    body.mgt-menu-open #mainnav ul.menu > li > a { padding:12px 15px; display:block; }
    #mainnav .submenu, #mainnav .drop { position: static !important; display:none; box-shadow:none; }
    #mainnav li.mgt-open > .submenu, #mainnav li.mgt-open > ul.drop { display:block !important; }
}

/* keep Tutor LMS course content readable inside our wrapper */
.mgt-lms-main .tutor-wrap, .mgt-lms-main .tutor-course-details-page { background:#fff; }

/* --- Header fixes so it matches the main site exactly --- */
/* Our header is not fixed/sticky, so remove the sticky body padding that left a white gap. */
body { padding-top: 0 !important; }

/* Constrain the logo to the main-site size (~44px tall) so logo + menu fit on one row. */
#header .header-wrap .logo img { max-height: 45px; width: auto; }

/* Desktop: reveal the "Who We Are" submenu on hover (we don't load the main site's main.js). */
@media (min-width: 992px) {
    #mainnav ul.menu > li { position: relative; }
    #mainnav ul.menu > li > .submenu {
        display: none; position: absolute; top: 100%; left: 0; min-width: 190px;
        background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.12); z-index: 9999; padding: 6px 0; list-style: none;
    }
    #mainnav ul.menu > li:hover > .submenu { display: block; }
    #mainnav ul.menu > li > .submenu > li { display: block; float: none; }
    #mainnav ul.menu > li > .submenu > li > a { display: block; padding: 9px 18px; white-space: nowrap; color: #0a3d62; }
    #mainnav ul.menu > li > .submenu > li > a:hover { background: #f1f6fa; }
}

/* --- Tutor LMS dashboard: hide instructor stat cards (Total Students / Total Courses / Total Earnings) ---
   Scope to the actual card column (.tutor-col-xl-4) so :has() does NOT also match the
   outer .tutor-col-12 wrapper (which would hide the whole stats section). */
.tutor-dashboard .tutor-col-xl-4:has(> .tutor-card .tutor-icon-user-graduate),
.tutor-dashboard .tutor-col-xl-4:has(> .tutor-card .tutor-icon-box-open),
.tutor-dashboard .tutor-col-xl-4:has(> .tutor-card .tutor-icon-coins) {
    display: none !important;
}
/* Hide the instructor "My Courses" preview table on the dashboard (students see Enrolled Courses instead) */
.tutor-dashboard .popular-courses-heading-dashboard,
.tutor-dashboard .table-popular-courses {
    display: none !important;
}
