/* ==========================================================================
   LEARNPRESS OVERRIDES
   Organized by component role first (tokens, links, buttons, cards, chips,
   inputs, messages, tabs), then page-specific layout.
   Theme tokens: --wp--custom--imt--*
   ========================================================================== */

/* ---------- TOKENS ---------- */
/* LearnPress prints its own :root block in <head>; html:root out-specifies it
   regardless of load order. */
html:root {
    --lp-primary-color: var(--wp--custom--imt--color--background--secondary--color);
    --lp-secondary-color: var(--wp--custom--imt--color--background--neutral--color);
}

/* LearnPress re-declares --lp-primary-color on the curriculum for v3/v4 bodies */
html .learnpress-v4 .lp-course-curriculum,
html .learnpress-v3 .lp-course-curriculum {
    --lp-primary-color: var(--wp--custom--imt--color--background--primary--color);
}

/* ---------- LINKS ---------- */
[class*=wp-block-learnpress] a:not(.wp-block-learnpress-course-button-read-more),
ul.learn-press-collections .collection-title {
    color: var(--wp--custom--imt--color--link--dark) !important;
    font-weight: var(--wp--custom--imt--h--3--font-weight) !important;
}

[class*=wp-block-learnpress] a:hover:not(.wp-block-learnpress-course-button-read-more),
.lp-single-instructor .ul-instructor-courses .course-title:hover,
.lp-course-curriculum .course-section .course-item__left:hover,
ul.learn-press-collections .collection-title:hover {
    color: var(--wp--custom--imt--color--link--dark-hover) !important;
}

.course-item__link {
    text-decoration: none !important;
}

.course-item__link:hover .course-item__content .course-item__left {
    text-decoration: underline !important;
}

.course-item-lp_lesson .imt-card-group .imt-card.imt-card-color-override-primary a {
    text-decoration: underline !important;
}

/* share link: reposition and recolor */
.social-share-toggle .share-toggle-icon {
    justify-content: flex-end;
    margin-top: calc(var(--wp--custom--imt--spacer) * 0.75);
}

.social-share-toggle .share-toggle-icon:hover {
    color: var(--wp--custom--imt--color--link--dark-hover) !important;
}

/* classic card + collection links that sit outside block markup */
.learn-press-courses .wap-course-title a,
.learn-press-courses .course-instructor-category a,
.lp-single-collection .learn-press-breadcrumb a,
.lp-single-collection .collection-instructor__link,
.lp-collection-learning .learn-press-breadcrumb a,
.lp-collection-learning .collection-title a {
    color: var(--wp--custom--imt--color--link--dark) !important;
}

.learn-press-courses .wap-course-title a:hover,
.learn-press-courses .course-instructor-category a:hover,
.lp-single-collection .learn-press-breadcrumb a:hover,
.lp-single-collection .collection-instructor__link:hover,
.lp-collection-learning .learn-press-breadcrumb a:hover,
.lp-collection-learning .collection-title a:hover {
    color: var(--wp--custom--imt--color--link--dark-hover) !important;
}

/* "by … in …" line on course cards: smaller, names bold (block + classic markup) */
.learn-press-courses :is(.wp-block-learnpress-course-instructor, .wp-block-learnpress-course-categories, .course-instructor-category) {
    font-size: calc(var(--wp--custom--imt--font-size-base) * 0.875) !important;
}

.learn-press-courses li.course :is(.wp-block-learnpress-course-instructor, .wp-block-learnpress-course-categories, .course-instructor-category) :is(a, .instructor-display-name) {
    font-size: inherit !important;
    font-weight: var(--wp--custom--imt--font-weight-bold) !important;
}

/* classic course card titles (collections, membership account/profile, instructor):
   underline on hover only, matching the courses page */
.learn-press-courses .wap-course-title a,
:is(.lp-single-collection, .lp-collection-learning) .wap-course-title a {
    text-decoration: none !important;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.15em;
}

.learn-press-courses .wap-course-title a:is(:hover, :focus-visible),
:is(.lp-single-collection, .lp-collection-learning) .wap-course-title a:is(:hover, :focus-visible) {
    text-decoration: underline !important;
}

/* classic card titles (instructor page etc.) aren't block markup, so the rule above misses them */
.learn-press-courses .wap-course-title,
.learn-press-courses .wap-course-title a {
    font-weight: var(--wp--custom--imt--h--3--font-weight) !important;
}

/* ---------- BUTTON: PRIMARY ---------- */
/* secondary-role buttons that share .lp-button are excluded here so the
   secondary rules below don't have to out-specify these */
.lp-list-instructors .ul-list-instructors li.item-instructor .instructor-btn-view,
.certificate-actions.certificate-actions--modern .certificate-action__button,
.certificate-actions.certificate-actions--modern .social-share-link,
ul.learn-press-collections .collection-btn-read-more a,
button.lp-button:not(.lp-button-wishlist-action, .btn-no, .lp-btn-view-students),
.learn-press-form-register button[type=submit],
.wp-block-learnpress-course-button-read-more,
.learn-press-form-login button[type=submit],
.course-readmore a,
.course-filter-submit,
a.lp-collection-btn {
    background-color: var(--wp--custom--imt--color--background--primary--color) !important;
    color: var(--wp--custom--imt--color--background--primary--text) !important;
    border: var(--wp--custom--imt--button--default--border-width) solid var(--wp--custom--imt--color--background--primary--color) !important;
    font-size: var(--wp--custom--imt--button--default--font-size) !important;
    padding: var(--wp--custom--imt--button--default--padding) !important;
    outline-color: transparent !important;
    cursor: pointer;
    transition: var(--wp--custom--imt--hover-transition) !important;
}

.lp-list-instructors .ul-list-instructors li.item-instructor .instructor-btn-view:hover,
.certificate-actions.certificate-actions--modern .certificate-action__button:hover,
ul.learn-press-collections .collection-btn-read-more:hover,
a:hover .wp-block-learnpress-collection-button-read-more,
.wp-block-learnpress-course-button-read-more:hover,
button.lp-button:not(.lp-button-wishlist-action, .btn-no, .lp-btn-view-students):hover,
.learn-press-form-register button[type=submit]:hover,
.learn-press-form-login button[type=submit]:hover,
.course-readmore a:hover,
.course-filter-submit:hover,
a.lp-collection-btn:is(:hover, :focus-visible) {
    background-color: var(--wp--custom--imt--color--background--primary--hover--button--color) !important;
    color: var(--wp--custom--imt--color--background--primary--hover--button--text) !important;
    border-color: var(--wp--custom--imt--color--background--primary--hover--button--color) !important;
}

/* read-more class sits on a <button> inside a plain <a> */
.lp-list-instructors .ul-list-instructors li.item-instructor .instructor-btn-view:focus,
button.lp-button:not(.lp-button-wishlist-action, .btn-no, .lp-btn-view-students):focus,
.learn-press-form-register button[type=submit]:focus,
.course-button-read-more a:focus-visible .wp-block-learnpress-course-button-read-more,
.wp-block-learnpress-course-button-read-more:focus-visible,
.learn-press-form-login button[type=submit]:focus {
    background-color: var(--wp--custom--imt--color--background--primary--focus--button--color) !important;
    color: var(--wp--custom--imt--color--background--primary--focus--button--text) !important;
    border-color: var(--wp--custom--imt--color--background--primary--focus--button--color) !important;
}

button.wp-block-learnpress-course-button.lp-button.button-enroll-course {
    margin-bottom: var(--wp--custom--imt--button--default--margin);
}

#popup-content .lp-button {
    max-width: 200px;
}

/* course search: icon button beside the input (kept at LearnPress's compact padding) */
.block-search-courses button {
    background-color: var(--wp--custom--imt--color--background--primary--color) !important;
    color: var(--wp--custom--imt--color--background--primary--text) !important;
    border-color: var(--wp--custom--imt--color--background--primary--color) !important;
    cursor: pointer;
    transition: var(--wp--custom--imt--hover-transition) !important;
}

.block-search-courses button:is(:hover, :focus-visible) {
    background-color: var(--wp--custom--imt--color--background--primary--hover--button--color) !important;
    color: var(--wp--custom--imt--color--background--primary--hover--button--text) !important;
    border-color: var(--wp--custom--imt--color--background--primary--hover--button--color) !important;
}

.block-search-courses button:focus-visible {
    outline: 2px solid var(--wp--custom--imt--color--background--primary--focus--button--color) !important;
    outline-offset: 2px;
}

/* ---------- BUTTON: SECONDARY / OUTLINE ---------- */
.lp-button-wishlist-action.modern,
.course-filter-reset,
button.lp-button.btn-no,
.lp-btn-view-students {
    background-color: transparent !important;
    color: var(--wp--custom--imt--color--text--dark) !important;
    border: var(--wp--custom--imt--button--default--border-width) solid var(--wp--custom--imt--color--background--primary--color) !important;
    font-size: var(--wp--custom--imt--button--default--font-size) !important;
    padding: var(--wp--custom--imt--button--default--padding) !important;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    cursor: pointer;
    transition: var(--wp--custom--imt--hover-transition) !important;
}

.lp-button-wishlist-action.modern:hover,
.course-filter-reset:hover,
button.lp-button.btn-no:hover,
.lp-btn-view-students:hover {
    background-color: var(--wp--custom--imt--color--palette--background--primary--100) !important;
}

.lp-button-wishlist-action.modern:focus-visible,
.course-filter-reset:focus-visible,
button.lp-button.btn-no:focus-visible,
.lp-btn-view-students:focus-visible {
    outline: 2px solid var(--wp--custom--imt--color--background--primary--focus--button--color) !important;
    outline-offset: 2px;
}

/* ---------- BUTTON: WISHLIST ---------- */
/* saved state: the icon swaps from .lp-icon-heart-o to .lp-icon-heart */
.lp-button-wishlist-action:has(.lp-icon-heart) {
    background-color: var(--wp--custom--imt--color--palette--background--primary--100) !important;
}

.learn-press-courses .lp-button-wishlist-action.icon-only {
    top: 5px !important;
    left: 5px !important;
    padding: calc(var(--wp--custom--imt--spacer) * 0.25) !important;
    transition: all 0.3s ease;
}

.learn-press-courses .lp-button-wishlist-action.icon-only i {
    color: var(--wp--custom--imt--color--text--dark) !important;
}

.learn-press-courses .lp-button-wishlist-action.icon-only:hover {
    background-color: var(--wp--custom--imt--color--palette--background--primary--100) !important;
}

.learn-press-courses .lp-button-wishlist-action.icon-only:hover i {
    color: var(--wp--custom--imt--color--palette--background--primary--900) !important;
}

.lp-button-wishlist-action:not(.wp-block-learnpress-course-button-wishlist).icon-only i::before {
    font-size: 18px !important;
}

/* ---------- CARD ---------- */
/* shared shell: block cards (li.course > item template > "Item Inner" group) + classic .course-item */
.learn-press-courses > li.course > .wp-block-learnpress-course-item-template > .wp-block-group,
.learn-press-courses > li.course > .wp-block-group,
.learn-press-courses .course-item,
.learn-press-courses .course-item:hover,
ul.learn-press-collections:not([data-layout=list]) .collection {
    border: 1px solid var(--wp--custom--imt--color--background--white--border, #e2e0db) !important;
    border-radius: calc(var(--wp--custom--imt--border-radius) * 0.625) !important;
    box-shadow: none !important;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

/* hover: green accent border (not primary, so it doesn't blend with the yellow CTAs),
   paired with the image zoom below */
.learn-press-courses li.course:hover > .wp-block-learnpress-course-item-template > .wp-block-group,
.learn-press-courses li.course:hover > .wp-block-group,
.learn-press-courses li.course:hover .course-item,
ul.learn-press-collections:not([data-layout=list]) .collection:hover {
    border-color: var(--wp--custom--imt--color--palette--background--accent--5--active) !important;
}

/* card body padding; .course-card-media covers the image if it gets wrapped in a group */
.learn-press-courses :is(.wp-block-learnpress-course-image, .course-card-media) + .wp-block-group {
    padding: 0 var(--wp--custom--imt--spacer) var(--wp--custom--imt--spacer) !important;
}

/* image zoom on card hover: block cards (archive) + classic cards (instructor, profile).
   LearnPress only ships this in learnpress.css, which isn't loaded on every page. */
.learn-press-courses :is(.wp-block-learnpress-course-image, .course-thumbnail),
ul.learn-press-collections .collection .collection-img {
    overflow: hidden;
}

.learn-press-courses :is(.wp-block-learnpress-course-image, .course-thumbnail) img,
ul.learn-press-collections .collection .collection-img img {
    transition: transform 0.3s ease;
}

.learn-press-courses li.course:hover :is(.wp-block-learnpress-course-image, .course-thumbnail) img,
ul.learn-press-collections .collection:hover .collection-img img {
    transform: scale(1.05);
}

@media (prefers-reduced-motion: reduce) {
    .learn-press-courses :is(.wp-block-learnpress-course-image, .course-thumbnail) img,
    ul.learn-press-collections .collection .collection-img img {
        transition: none;
    }

    .learn-press-courses li.course:hover :is(.wp-block-learnpress-course-image, .course-thumbnail) img,
    ul.learn-press-collections .collection:hover .collection-img img {
        transform: none;
    }
}

/* list layout: LearnPress draws a divider under each row; the card border replaces it */
.learn-press-courses[data-layout=list] .course {
    border-bottom: none !important;
    padding-bottom: calc(var(--wp--custom--imt--spacer) * 1.5) !important;
}

/* collection page: course overview cards are list layout; the plugin only pads the left
   of the content column, so give it room inside the card border */
.collection-course-overview__content.learn-press-courses li.course .course-content,
.collection-course-progress.learn-press-courses li.course .course-content {
    padding: var(--wp--custom--imt--spacer) calc(var(--wp--custom--imt--spacer) * 1.25) !important;
}

/* also rounds the single course sidebar image; clipped by the card shell in archives */
.wp-block-learnpress-course-image {
    border-radius: calc(var(--wp--custom--imt--border-radius) * 1.25) calc(var(--wp--custom--imt--border-radius) * 1.25) 0 0;
}

.lp-block-course-sidebar {
    border-radius: calc(var(--wp--custom--imt--border-radius) * 1.25);
}

/* ---------- CHIP / BADGE ---------- */
/* featured: course card lists only (archive, instructor page; block + classic markup) */
.learn-press-courses .course-featured,
.learn-press-courses .wp-block-learnpress-course-featured,
.learn-press-courses .course-thumbnail .lp-badge.featured,
ul.learn-press-collections .collection-type--learning-path {
    background-color: var(--wp--custom--imt--color--background--primary--color) !important;
    color: var(--wp--custom--imt--color--background--primary--text) !important;
    font-size: calc(var(--wp--custom--imt--font-size-base) * 0.75) !important;
    font-weight: var(--wp--custom--imt--font-weight-bold) !important;
}

.learn-press-courses .course-featured,
.learn-press-courses .wp-block-learnpress-course-featured,
ul.learn-press-collections .collection-type {
    display: inline-block;
    padding: calc(var(--wp--custom--imt--spacer) * 0.375) calc(var(--wp--custom--imt--spacer) * 0.75) !important;
    line-height: 1.2;
    border-radius: calc(var(--wp--custom--imt--border-radius) * 0.625) !important;
}

/* block version wraps a .course-featured span; pad the wrapper only */
.learn-press-courses .wp-block-learnpress-course-featured .course-featured {
    padding: 0 !important;
}

/* meta counts on course + collection cards (lessons, students, duration, level, quizzes, courses).
   display isn't set on classic .meta-item: LearnPress hides some of them per page with display: none. */
.learn-press-courses :is(.wp-block-learnpress-course-lesson, .wp-block-learnpress-course-student) .info-meta-item {
    display: inline-flex;
}

ul.learn-press-collections .info-meta-item {
    width: fit-content;
}

.learn-press-courses :is(.wp-block-learnpress-course-lesson, .wp-block-learnpress-course-student) .info-meta-item,
.learn-press-courses .course-wrap-meta .meta-item,
ul.learn-press-collections .info-meta-item {
    align-items: center;
    gap: 0.375em;
    margin: 0 !important;
    padding: calc(var(--wp--custom--imt--spacer) * 0.25) calc(var(--wp--custom--imt--spacer) * 0.5);
    border-radius: calc(var(--wp--custom--imt--border-radius) * 0.625);
    background-color: var(--wp--custom--imt--color--palette--background--neutral--200);
    color: var(--wp--custom--imt--color--text--dark);
    font-size: calc(var(--wp--custom--imt--font-size-base) * 0.875) !important;
    line-height: 1.2;
}

.learn-press-courses :is(.wp-block-learnpress-course-lesson, .wp-block-learnpress-course-student) .info-meta-item *,
.learn-press-courses .course-wrap-meta .meta-item *,
ul.learn-press-collections .info-meta-item * {
    font-size: inherit !important;
    line-height: inherit;
    margin: 0;
}

.learn-press-courses .course-wrap-meta {
    gap: calc(var(--wp--custom--imt--spacer) * 0.5) !important;
}

/* chip icons follow the chip text instead of LearnPress's accent colour */
.learn-press-courses :is(.wp-block-learnpress-course-lesson, .wp-block-learnpress-course-student) .info-meta-item i,
.learn-press-courses .course-wrap-meta .meta-item::before,
.learn-press-courses .course-wrap-meta .meta-item i,
ul.learn-press-collections .info-meta-item i {
    color: inherit !important;
}

/* space between the chip row and what follows (price / buttons) */
.learn-press-courses .wp-block-group:has(> :is(.wp-block-learnpress-course-lesson, .wp-block-learnpress-course-student)),
.learn-press-courses .course-wrap-meta,
ul.learn-press-collections .info-meta-item {
    margin-bottom: var(--wp--custom--imt--spacer) !important;
}

/* price — same chip shape as the meta chips; fill colour still signals free / paid / sale */
.course-price .course-item-price {
    font-weight: 500;
    font-size: calc(var(--wp--custom--imt--font-size-base) * 1.125) !important;
}

.course-price .course-item-price .free,
.course-price .course-item-price .price {
    display: inline-block;
    padding: calc(var(--wp--custom--imt--spacer) * 0.25) calc(var(--wp--custom--imt--spacer) * 0.5) !important;
    border-radius: calc(var(--wp--custom--imt--border-radius) * 0.625) !important;
    color: var(--wp--custom--imt--color--text--dark) !important;
    font-size: calc(var(--wp--custom--imt--font-size-base) * 0.875) !important;
    font-weight: var(--wp--custom--imt--font-weight--bold, 700) !important;
    line-height: 1.2;
}

.course-price .course-item-price .origin-price {
    color: var(--wp--custom--imt--color--palette--background--accent--1--100) !important;
}

.course-price .course-item-price .free {
    background-color: var(--wp--custom--imt--color--palette--background--secondary--100) !important;
}

.course-price .course-item-price .price {
    background-color: var(--wp--custom--imt--color--palette--background--primary--100) !important;
}

.course-price .course-item-price .origin-price+.price {
    background-color: var(--wp--custom--imt--color--palette--background--danger) !important;
    color: var(--wp--custom--imt--color--text--light) !important;
}

/* post-quiz result chips */
.question-answers .question-response.incorrect .label,
.question .question-response.incorrect .label,
.lp-fib-note:last-of-type span {
    background: var(--wp--custom--imt--color--palette--background--danger) !important;
}

.question-answers .question-response.correct .label,
.question .question-response.correct .label {
    background: var(--wp--custom--imt--color--palette--background--accent--5--active) !important;
    color: var(--wp--custom--imt--color--text--dark) !important;
}

.lp-fib-answered.fail {
    border-color: var(--wp--custom--imt--color--palette--background--danger) !important;
}

/* ---------- INPUT ---------- */
.learn-press-form .form-fields .form-field label {
    font-style: normal !important;
    font-size: var(--wp--custom--imt--gravity-forms--label--font-size) !important;
    line-height: var(--wp--custom--imt--gravity-forms--label--line-height) !important;
    font-weight: var(--wp--custom--imt--gravity-forms--label--font-weight) !important;
    margin: var(--wp--custom--imt--gravity-forms--label--margin) !important;
    color: var(--wp--custom--imt--gravity-forms--label--color) !important;
}

.learn-press-form .form-fields .form-field .asterisk,
.learn-press-form .form-fields .form-field .required {
    color: var(--wp--custom--imt--gravity-forms--label--required--astrix) !important;
    margin: var(--wp--custom--imt--gravity-forms--label--required--margin) !important;
    font-size: var(--wp--custom--imt--gravity-forms--label--required--font-size) !important;
    line-height: var(--wp--custom--imt--gravity-forms--label--required--line-height) !important;
    font-weight: var(--wp--custom--imt--gravity-forms--label--required--font-weight) !important;
}

.learn-press-form .form-fields .form-field textarea,
.learn-press-form .form-fields .form-field input[type=tel],
.learn-press-form .form-fields .form-field input[type=url],
.learn-press-form .form-fields .form-field input[type=text],
.learn-press-form .form-fields .form-field input[type=email],
.learn-press-form .form-fields .form-field input[type=number],
.learn-press-form .form-fields .form-field input[type=password] {
    box-shadow: var(--wp--custom--imt--gravity-forms--input--box-shadow) !important;
    background: var(--wp--custom--imt--gravity-forms--input--background) !important;
    font-size: var(--wp--custom--imt--gravity-forms--input--font-size) !important;
    line-height: var(--wp--custom--imt--gravity-forms--input--line-height) !important;
    color: var(--wp--custom--imt--gravity-forms--input--color) !important;
    border-width: var(--wp--custom--imt--gravity-forms--input--border--width) !important;
    border-style: var(--wp--custom--imt--gravity-forms--input--border--style) !important;
    border-color: var(--wp--custom--imt--gravity-forms--input--border--color) !important;
    border-radius: var(--wp--custom--imt--gravity-forms--input--border--radius) !important;
}

.learn-press-form .form-fields .form-field textarea:focus,
.learn-press-form .form-fields .form-field input[type=tel]:focus,
.learn-press-form .form-fields .form-field input[type=url]:focus,
.learn-press-form .form-fields .form-field input[type=text]:focus,
.learn-press-form .form-fields .form-field input[type=email]:focus,
.learn-press-form .form-fields .form-field input[type=number]:focus,
.learn-press-form .form-fields .form-field input[type=password]:focus {
    border-color: var(--wp--custom--imt--gravity-forms--input--border--color-focus) !important;
}

/* custom checkboxes */
.learn-press-form form input[type="checkbox"],
.lp-form-course-filter input[type="checkbox"] {
    opacity: 0;
    position: absolute;
}

/* filter: stretch the hidden input over the whole field so clicks land on it */
.lp-course-filter__field {
    position: relative;
}

.lp-form-course-filter input[type="checkbox"] {
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    z-index: 2;
    cursor: pointer;
}

.learn-press-form label:has(input[type="checkbox"])::before,
.lp-form-course-filter__content .lp-course-filter__field label::before {
    display: inline-block;
    z-index: 1;
    font-family: "Font Awesome 6 Pro" !important;
    content: "\f0c8";
    font-weight: 300;
    font-size: 28px;
    color: var(--wp--custom--imt--gravity-forms--input--checkbox--box--color);
}

.lp-form-course-filter__content .lp-course-filter__field label {
    display: flex;
    align-items: center;
}

.lp-form-course-filter__content .lp-course-filter__field label::before {
    padding-right: 8px;
    line-height: 1;
}

.learn-press-form label:has(input[type="checkbox"]:checked)::before,
.lp-form-course-filter input[type="checkbox"]:checked~label::before {
    content: "\f14a";
    font-weight: 900;
}

/* keyboard focus, since the real input is invisible */
.learn-press-form label:has(input[type="checkbox"]:focus-visible)::before,
.lp-form-course-filter input[type="checkbox"]:focus-visible~label::before {
    outline: 2px solid var(--wp--custom--imt--gravity-forms--input--border--color-focus);
    outline-offset: 2px;
    border-radius: 4px;
}

.lp-form-course-filter__content .lp-course-filter__field label {
    font-size: 14px;
}

.lp-form-course-filter__content,
.lp-form-course-filter__content .lp-cate-parent {
    display: grid;
    gap: calc(var(--wp--custom--imt--spacer) * 0.5);
}

/* quiz answer inputs */
label.option-title {
    padding: calc(var(--wp--custom--imt--spacer) * 1.25) calc(var(--wp--custom--imt--spacer) * 1.25) calc(var(--wp--custom--imt--spacer) * 1.25) calc(var(--wp--custom--imt--spacer) * 3.75) !important;
}

.question .answer-option input[type=checkbox],
.question .answer-option input[type=radio] {
    margin-left: var(--wp--custom--imt--spacer) !important;
}

.question .answer-option .option-title:hover,
.answer-options .answer-option:hover {
    background-color: var(--wp--custom--imt--color--palette--background--secondary--100) !important;
}

.question .answer-option input[type=radio],
.question .answer-option input[type=checkbox] {
    background: var(--wp--custom--imt--color--palette--background--white) !important;
    border-color: var(--wp--custom--imt--color--palette--background--neutral--400) !important;
}

.question .answer-option input[type=radio]:checked,
.question .answer-option input[type=checkbox]:checked {
    border-color: var(--wp--custom--imt--color--background--accent--5--color) !important;
}

.answer-options .answer-option input[type=radio]:checked::after {
    width: 18px !important;
    height: 18px !important;
    background: var(--wp--custom--imt--color--background--accent--5--color) !important;
}

.answer-options .answer-option input[type=checkbox]::after {
    color: var(--wp--custom--imt--color--background--accent--5--color) !important;
}

.question .answer-option input[type=radio]:disabled,
.question .answer-option input[type=checkbox]:disabled {
    border-color: var(--wp--custom--imt--color--palette--background--neutral--700) !important;
}

.question .answer-option input[type=radio]:disabled::after {
    background: var(--wp--custom--imt--color--palette--background--neutral--700) !important;
}

.answer-options .answer-option input[type=checkbox]:disabled::after {
    color: var(--wp--custom--imt--color--palette--background--neutral--700) !important;
}

/* LearnPress borders the block item-template wrapper (grid + related lists);
   the card shell already sits on the inner group, so drop the wrapper's border to avoid a double line */
.learn-press-courses .wp-block-learnpress-course-item-template {
    box-shadow: none !important;
    outline: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
}

/* ---------- MESSAGE / TOAST ---------- */
.learn-press-message.info,
.learn-press-message.success {
    background-color: var(--wp--custom--imt--color--palette--background--secondary--100) !important;
    color: var(--wp--custom--imt--color--link--dark-hover) !important;
}

.learn-press-message.info,
.learn-press-message.success {
    border-color: var(--wp--custom--imt--color--palette--background--secondary--300) !important;
}

.learn-press-message.info::before,
.learn-press-message.success::before {
    color: var(--wp--custom--imt--color--link--dark-hover) !important;
}

.learn-press-message {
    padding: var(--wp--custom--imt--spacer) calc(var(--wp--custom--imt--spacer) * 2) !important;
}

.toastify.on.lp-toast.success.toastify-center.toastify-bottom {
    font-family: 'neue-haas-grotesk-text';
}

button.toast-close {
    font-family: 'neue-haas-grotesk-text';
}

/* warning (e.g. course prerequisites note) */
.learn-press-courses .course-info .learn-press-message {
    margin-top: var(--wp--custom--imt--spacer) !important;
}

.learn-press-message.warning {
    background-color: var(--wp--custom--imt--color--palette--background--primary--100) !important;
    color: var(--wp--custom--imt--color--text--dark) !important;
    border-color: var(--wp--custom--imt--color--palette--background--warning) !important;
}

.learn-press-message.warning::before,
.learn-press-message.warning li::marker {
    color: var(--wp--custom--imt--color--palette--background--primary--900) !important;
}

.learn-press-message.warning a {
    color: var(--wp--custom--imt--color--link--dark) !important;
}

.learn-press-message.warning a:hover {
    color: var(--wp--custom--imt--color--link--dark-hover) !important;
}

.learn-press-message.warning .lp-course-prerequisite-status {
    color: var(--wp--custom--imt--color--text--dark);
}

/* AJAX loader: drop the empty wrapper once its spinner is hidden */
.loading-after:has(> .lp-hidden:only-child) {
    display: none;
}

/* ---------- TABS ---------- */
.learn-press-tabs a,
.learn-press-tabs a:hover {
    text-decoration: none !important;
}

.learn-press-tabs li a.active,
.learn-press-tabs li span.active,
.learn-press-tabs li.active a,
.learn-press-tabs li.active span {
    color: var(--wp--custom--imt--color--palette--background--secondary--active) !important;
}

.learn-press-tabs li a.active::after,
.learn-press-tabs li span.active::after,
.learn-press-tabs li.active a::after,
.learn-press-tabs li.active span::after,
.learn-press-tabs__item.active::after {
    background: var(--wp--custom--imt--color--palette--background--primary--active) !important;
}

.learn-press-tabs li a:hover,
.learn-press-tabs li span:hover {
    color: var(--wp--custom--imt--color--palette--background--secondary--700) !important;
}

.learn-press-tabs li a:hover::after,
.learn-press-tabs li span:hover::after {
    background: var(--wp--custom--imt--color--palette--background--secondary--700) !important;
}

/* ==========================================================================
   PAGE / LAYOUT
   ========================================================================== */

/* ---------- ARCHIVE GRID ---------- */
:where(.is-layout-grid) {
    gap: calc(var(--wp--custom--imt--spacer) * 0.25) !important;
}

.is-layout-grid> :is(*, div) {
    margin-bottom: 0 !important;
}

/* ---------- SINGLE COURSE, MAIN CONTENT ---------- */
.learnpress .entry-content .extra-box ul {
    list-style: initial !important;
}

.wp-block-learnpress-course-instructor,
.wp-block-learnpress-course-categories,
.wp-block-learnpress-course-progress {
    margin-bottom: calc(var(--wp--custom--imt--spacer) * 0.5) !important;
}

/* course cards: tighter title spacing, and author sits closer to its category
   than the category does to the chip row (only a 4px gap between author and category) */
.learn-press-courses :is(.wp-block-learnpress-course-title, .wap-course-title) {
    margin-bottom: calc(var(--wp--custom--imt--spacer) * 0.5) !important;
}

.learn-press-courses .wp-block-learnpress-course-instructor {
    margin-bottom: 0 !important;
}

.learn-press-courses .wp-block-group:has(> .wp-block-learnpress-course-instructor) {
    gap: calc(var(--wp--custom--imt--spacer) * 0.25) !important;
}

/* course curriculum headers */
.lp-course-curriculum .course-section .course-section-header {
    background: var(--wp--custom--imt--color--palette--background--primary--100) !important;
}

.lp-course-curriculum .course-section .course-section-header:hover {
    background: var(--wp--custom--imt--color--palette--background--secondary--100) !important;
    color: var(--wp--custom--imt--color--link--dark-hover) !important;
}

/* faq boxes */
.course-tab-panel-faqs .course-faqs-box__title {
    background-color: var(--wp--custom--imt--color--palette--background--secondary--100) !important;
    border-radius: 5px !important;
}

.course-tab-panel-faqs .course-faqs-box__title:hover,
input[name=course-faqs-box-ratio]:checked+.course-faqs-box .course-faqs-box__title {
    background-color: var(--wp--custom--imt--color--palette--background--primary--100) !important;
    color: var(--wp--custom--imt--color--text--dark) !important;
}

/* update in progress icon to be unique */
.lp-course-curriculum .course-section .course-item-ico.in-progress::before {
    font-family: "Font Awesome 6 Pro";
    content: "\e5d4" !important;
}

.info-learning .lp-icon-passed::before,
.info-learning .lp-user-item.graduation.passed {
    color: var(--wp--custom--imt--color--background--secondary--color) !important;
}

.course-item-ico.in-progress::before {
    color: var(--wp--custom--imt--color--palette--background--neutral--600) !important;
}

.course-item-ico.passed.completed::before {
    color: var(--wp--custom--imt--color--palette--background--accent--5--active) !important;
}

.lp-course-students-list-wrapper ul.lp-students-list-wrapper li .student-course-item .student-info {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

[class*=extra-box] {
    margin-bottom: calc(var(--wp--custom--imt--spacer) * 3);
}

/* ---------- SINGLE COURSE, SIDEBAR CARD ---------- */
.course-items-completed-progress-bar {
    margin: 6px 0;
}

[class*=wp-block-learnpress] .info-meta-item,
.wp-block-learnpress-course-price,
.info-learning>div {
    margin-bottom: calc(var(--wp--custom--imt--spacer) * 1);
}

.course-progress__label {
    margin-bottom: calc(var(--wp--custom--imt--spacer) * 0.25);
}

[class*=wp-block-learnpress] .info-meta-left,
.block-editor-block-list__block .info-meta-left {
    font-weight: var(--wp--custom--imt--font-weight-bold) !important;
}

/* ---------- SINGLE COLLECTION ---------- */
/* section headings: h3 type, separated by a hairline like the plugin intends */
.collection-course-overview__title,
.collection-related__title {
    font-family: var(--font-family--h--3);
    font-size: var(--wp--custom--imt--h--3--font-size) !important;
    font-weight: var(--wp--custom--imt--h--3--font-weight) !important;
    line-height: var(--wp--custom--imt--h--3--line-height);
    text-transform: var(--wp--custom--imt--h--3--text-transform);
    color: var(--wp--custom--imt--color--text--dark);
    margin: calc(var(--wp--custom--imt--spacer) * 2.5) 0 calc(var(--wp--custom--imt--spacer) * 1.5) !important;
    padding-top: calc(var(--wp--custom--imt--spacer) * 2.5) !important;
    border-top: 1px solid var(--wp--custom--imt--color--background--white--border, #e2e0db) !important;
}

/* header meta (weeks / courses / level) on the grey band: a translucent dark chip,
   the same contrast step the grey chips have on white */
.collection-info-meta {
    gap: calc(var(--wp--custom--imt--spacer) * 0.5) !important;
}

.collection-info-meta .info-meta-item {
    gap: 0.375em !important;
    padding: calc(var(--wp--custom--imt--spacer) * 0.25) calc(var(--wp--custom--imt--spacer) * 0.5);
    border-radius: calc(var(--wp--custom--imt--border-radius) * 0.625);
    background-color: rgba(0, 0, 0, 0.1);
    color: var(--wp--custom--imt--color--text--dark);
    font-size: calc(var(--wp--custom--imt--font-size-base) * 0.875);
    line-height: 1.2;
    margin: 0 !important;
}

.collection-info-meta .info-meta-item i {
    color: inherit !important;
}

/* course overview card: "Course 1" index as a chip in the image's top-left corner;
   in every list layout (overview + learning view) the wishlist heart sits top-right */
.collection-course-overview__content.learn-press-courses .course-item,
.learn-press-courses[data-layout=list] .course-thumbnail {
    position: relative;
}

.collection-course-overview__content.learn-press-courses li.course .course-index {
    position: absolute;
    top: calc(var(--wp--custom--imt--spacer) * 0.5);
    left: calc(var(--wp--custom--imt--spacer) * 0.5);
    z-index: 3;
    margin: 0 !important;
    padding: calc(var(--wp--custom--imt--spacer) * 0.25) calc(var(--wp--custom--imt--spacer) * 0.5);
    border-radius: calc(var(--wp--custom--imt--border-radius) * 0.625);
    background-color: var(--wp--custom--imt--color--palette--background--neutral--200);
    color: var(--wp--custom--imt--color--text--dark);
    font-size: calc(var(--wp--custom--imt--font-size-base) * 0.75);
    font-weight: var(--wp--custom--imt--font-weight-bold);
    line-height: 1.2;
}

.learn-press-courses[data-layout=list] .lp-button-wishlist-action.icon-only {
    left: auto !important;
    right: calc(var(--wp--custom--imt--spacer) * 0.5) !important;
    top: calc(var(--wp--custom--imt--spacer) * 0.5) !important;
}

/* timeline dot + connector: there's no per-course status on this view, so they use the
   neutral "not started" look that the curriculum's in-progress icon uses */
.collection-course-overview__content.learn-press-courses li.course::before {
    border: 2px solid var(--wp--custom--imt--color--palette--background--neutral--400) !important;
    background: var(--wp--custom--imt--color--palette--background--white) !important;
}

.collection-course-overview__content.learn-press-courses li.course::after {
    background: var(--wp--custom--imt--color--palette--background--neutral--200) !important;
    opacity: 1 !important;
}

/* progress (collection learning view): match the course progress bar */
.collection-progress .collection-progress__line,
.collection-course-progress .course-progress__line {
    background: var(--wp--custom--imt--color--palette--background--neutral--200) !important;
}

.collection-progress .collection-progress__line-inner,
.collection-course-progress .course-progress__line__active {
    background: var(--wp--custom--imt--color--palette--background--secondary--700) !important;
}

.collection-course-progress .course-progress__line__point {
    background: var(--wp--custom--imt--color--palette--background--secondary--900) !important;
}

/* completed collection: success chip colours */
.lp-single-collection .lp-button.collection-completed,
.lp-collection-learning .lp-button.collection-completed {
    background-color: var(--wp--custom--imt--color--palette--background--secondary--100) !important;
    border-color: var(--wp--custom--imt--color--palette--background--secondary--100) !important;
    color: var(--wp--custom--imt--color--link--dark-hover) !important;
}

/* ---------- LESSON POPUP ---------- */
.content-item-wrap {
    width: 1080px !important;
}

.course-curriculum .course-item.current {
    background: var(--wp--custom--imt--color--palette--background--secondary--100) !important;
}

#popup-sidebar .lp-course-curriculum .course-item.current:before {
    background: var(--wp--custom--imt--color--palette--background--secondary--active) !important;
}

.course-curriculum .course-item::before {
    width: 5px !important;
}

.course-title a {
    color: var(--wp--custom--imt--color--text--dark) !important;
}

.imt-section .imt-card-group .imt-card.imt-learnpress-left-align-img>.acf-innerblocks-container>.imt-img-container {
    margin-left: 0px !important;
    margin-bottom: 0px;
}

.learn-press-progress::before {
    background: var(--wp--custom--imt--color--palette--background--white) !important;
}

.learn-press-progress .learn-press-progress__active {
    background: var(--wp--custom--imt--color--palette--background--secondary--700) !important;
}

div#popup-header {
    border-color: var(--wp--custom--imt--color--palette--background--accent--5--active) !important;
}

#popup-header .course-title a:hover,
#popup-header .course-title a:focus-visible {
    color: var(--wp--custom--imt--color--background--secondary--color) !important;
    text-decoration: underline;
    transition: all 0.3s linear;
}

#popup-header .learn-press-progress .learn-press-progress__active,
.course-progress__line__active {
    background: var(--wp--custom--imt--color--background--primary--color) !important;
}

#popup-footer {
    max-width: 1080px !important;
}

/* ---------- MODAL ---------- */
.lp-modal-header {
    font-family: var(--font-family--h--3);
    font-size: var(--wp--custom--imt--h--3--font-size);
    font-weight: var(--wp--custom--imt--h--3--font-weight);
}

.lp-modal-dialog .lp-modal-header {
    background: var(--wp--custom--imt--color--palette--background--accent--5--active) !important;
}

.lp-modal-body {
    font-family: var(--font-family--default);
    padding: calc(var(--wp--custom--imt--spacer) * 0.25);
}

.lp-modal-footer {
    font-family: var(--font-family--button);
    padding: var(--wp--custom--imt--spacer) calc(var(--wp--custom--imt--spacer) * 2);
    display: flex;
    justify-content: space-between;
}

.lp-modal-footer button {
    padding: var(--wp--custom--imt--button--default--padding) !important;
}

.learn-press-form.form-button {
    position: sticky;
    bottom: 11px;
    left: 0;
    padding: 12px;
    background-color: white;
    border-width: 1px 0 0 0;
    border-style: solid;
    border-color: var(--wp--custom--imt--color--palette--background--neutral--200);
    z-index: 4;
    width: 100%;
    display: grid;
    justify-items: center;
    align-items: center;
}

/* ---------- QUIZ ---------- */
.quiz-result.passed .result-message {
    color: var(--wp--custom--imt--color--background--accent--5--text);
    background-color: var(--wp--custom--imt--color--palette--background--accent--5--active) !important;
}

.quiz-result .result-statistic .result-statistic-field p {
    line-height: 2.1875em;
}

.question-explanation-content,
.question-hint-content {
    padding: calc(var(--wp--custom--imt--spacer) * 1.25) !important;
}

.content-item-wrap .questions-pagination .nav-links .page-numbers {
    color: var(--wp--custom--imt--color--link--dark) !important;
}

.content-item-wrap .questions-pagination .nav-links .page-numbers:hover,
.content-item-wrap .questions-pagination .nav-links .page-numbers.current {
    color: var(--wp--custom--imt--color--link--dark-hover) !important;
    background: var(--wp--custom--imt--color--palette--background--secondary--100) !important;
}

.question .btn-show-hint {
    color: var(--wp--custom--imt--color--background--accent--5--color) !important;
}

.quiz-result.passed .result-grade svg circle {
    stroke: var(--wp--custom--imt--color--background--accent--5--color) !important;
}

/* ---------- LOGIN / REGISTER FORMS ---------- */
.learn-press-form-login,
.learn-press-form-register {
    border-radius: calc(var(--wp--custom--imt--border-radius) * 2) !important;
}

.learn-press-form p {
    margin-top: calc(var(--wp--custom--imt--spacer) * 1.5) !important;
}

/* ---------- PROFILE ---------- */
.lp-user-profile .lp-profile-nav-tabs>li.active>a,
.lp-user-profile .lp-profile-nav-tabs>li.active>a i,
.course-info .course-price .course-item-price .free {
    color: var(--wp--custom--imt--color--text--default) !important;
}

aside#profile-sidebar,
#profile-nav {
    border-radius: calc(var(--wp--custom--imt--border-radius) * 1.25) !important;
}

.lp-user-profile .lp-profile-nav-tabs>li:first-of-type {
    border-radius: calc(var(--wp--custom--imt--border-radius) * 1.25) calc(var(--wp--custom--imt--border-radius) * 1.25) 0 0 !important;
}

.lp-user-profile .lp-profile-nav-tabs>li:last-of-type {
    border-radius: 0 0 calc(var(--wp--custom--imt--border-radius) * 1.25) calc(var(--wp--custom--imt--border-radius) * 1.25) !important;
}

.lp-profile-nav-tabs:last-child a {
    border-radius: 0 0 calc(var(--wp--custom--imt--border-radius) * 1.25) calc(var(--wp--custom--imt--border-radius) * 1.25) !important;
}

table.lp-list-table tfoot tr td {
    font-size: calc(var(--wp--custom--imt--font-size-base) * 0.875) !important;
    padding: 6px;
}

/* ---------- INSTRUCTOR PAGE ---------- */
.lp-list-instructors .ul-list-instructors li.item-instructor .instructor-display-name {
    font-size: var(--wp--custom--imt--h--3--font-size) !important;
    font-weight: var(--wp--custom--imt--h--3--font-weight) !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lp-list-instructors .ul-list-instructors li.item-instructor .instructor-avatar img {
    height: auto;
}

/* ---------- CERTIFICATE MODAL ---------- */
.certificate-actions.certificate-actions--modern .certificate-action__button,
.certificate-actions.certificate-actions--modern .social-share-link {
    font-family: var(--font-family--default) !important;
    border-radius: var(--wp--custom--imt--button--sm--border-radius) !important;
}

.certificate-actions.certificate-actions--modern .certificate-action__button img {
    filter: none !important;
}

.certificate-actions.certificate-actions--modern .certificate-action__button:hover img {
    filter: brightness(0) invert(1) !important;
}

/* ---------- MOBILE ---------- */
@media (max-width: 800px) {
    .learnpress.widget {
        padding-top: 100px;
    }
}