/*
 * Tutor LMS 4.x screens (tutor-core loaded: dashboard, course builder,
 * learning area): undo the Elementor kit's global <button> styling.
 *
 * uploads/elementor/css/post-44.css gives every button on the site a 1px
 * solid #2e2e2e border and, on hover/focus, a #2e2e2e background with white
 * text (.elementor-kit-44 button at (0,1,1), :hover/:focus at (0,2,1)).
 * Tutor 4 buttons are border-less by design (border:none, the outline is a
 * box-shadow), so the kit adds a black ring and a 2px height jump on hover.
 * Tutor's variant rules already outrank the kit for colours; only the border
 * (and the avatar button, which does use a real border) need re-asserting.
 * body.tutor-lms is on every page Tutor runs on; the sheet itself is only
 * enqueued when tutor-core is (inc/tutor-dashboard-theme.php).
 */

body.tutor-lms .tutor-btn,
body.tutor-lms .tutor-btn:is(:hover, :focus, :focus-visible, :active) {
    border-width: 0;
}

/* Dashboard header avatar/menu button: Tutor's own 1px border colours. */
body.tutor-lms .tutor-dashboard-header-user-avatar {
    border-color: var(--tutor-border-idle);
    background-color: transparent;
    color: var(--tutor-text-primary);
}

body.tutor-lms .tutor-dashboard-header-user-avatar:is(:hover, :focus, :focus-visible, .active) {
    border-color: var(--tutor-border-brand);
    background-color: var(--tutor-button-ghost-hover, transparent);
    color: var(--tutor-text-primary);
}

/* Modal close buttons (button.tutor-icon.tutor-modal-close) and other icon-only
   buttons are not .tutor-btn, so the kit's 1px #2e2e2e border still lands on
   them: a black square around the "x" of "Quiz Submitted" and friends. */
body.tutor-lms .tutor-modal-close,
body.tutor-lms button.tutor-icon,
body.tutor-lms .tutor-modal-close:is(:hover, :focus, :focus-visible, :active),
body.tutor-lms button.tutor-icon:is(:hover, :focus, :focus-visible, :active) {
    border-width: 0;
}

/* Full-screen Tutor documents (body.ww-app-screen, inc/site-chrome.php):
   third-party floating widgets we do not enqueue ourselves would sit on top
   of the app. Essential Addons' scroll-to-top is the one left. */
body.ww-app-screen .eael-ext-scroll-to-top-wrap,
body.ww-app-screen #back-button,
body.ww-app-screen .ht-toast-container,
body.ww-app-screen .bb-onscreen-notification {
    /* .bb-onscreen-notification (BuddyBoss floating notifications) is an
       invisible bottom-right block that swallows clicks: it sat over Tutor's
       "Start Assignment" button. */
    display: none !important;
}

/* WordPress' TinyMCE (assignment / Q&A editors on Tutor screens): its toolbar
   buttons are plain <button>s inside .mce-btn, so the kit draws a 1px #2e2e2e
   box around every icon. TinyMCE styles them borderless itself. */
body.tutor-lms .mce-btn button,
body.tutor-lms .mce-btn button:is(:hover, :focus, :focus-visible, :active) {
    border-width: 0;
}

/* Course builder: Tutor offsets its sticky header by the WP admin bar height
   whenever the current user is an administrator or the "Hide admin bar for
   users" option is off (tutor-course-builder.js: wrapper(isAdmin || setting)),
   not by whether the bar is actually on the page. The frontend builder renders
   without it, so the offset shows as an empty 32px strip above the header. WP
   adds the admin-bar body class exactly when the bar is rendered; the header is
   the first child of the builder root's container. */
body:not(.admin-bar) #tutor-course-builder > div > div:first-child {
    top: 0;
}

/* Course builder: Tutor prints the site logo capped at 24px inside its 64px
   header, so the WiredWhite mark (700x430) comes out 39x24 and unreadable.
   The button around it is fixed at 24px too, hence height:auto. */
#tutor-course-builder > div > div:first-child > button:first-child {
    height: auto;
}

#tutor-course-builder > div > div:first-child > button:first-child img {
    max-height: 48px;
}
