/* Shared presentation tokens are supplied by the saved theme branding settings. */
:root body:not(.wp-admin) { font-family: var(--ec-font-body) !important; font-size: var(--ec-body-size); line-height: var(--ec-body-leading); }
:root body:not(.wp-admin) :is(main,.ec-header,.ec-footer) :is(p,li,a,button,input,select,textarea,label,span,strong,em,small,summary,dt,dd,th,td) { font-family: var(--ec-font-body) !important; }
:root body:not(.wp-admin) :is(main,.ec-header,.ec-footer) :is(h1,h2,h3,h4,h5,h6),
:root body:not(.wp-admin) :is(main,.ec-header,.ec-footer) :is(h1,h2,h3,h4,h5,h6) * { font-family: var(--ec-font-heading) !important; }
:root body:not(.wp-admin) .ec-course-card h3 { font-size: calc(var(--ec-card-title-size) * var(--ec-heading-scale)) !important; }
:root body:not(.wp-admin) .ec-course-card .ec-course-popover { width: min(var(--ec-popup-width), calc(100vw - 32px)) !important; }
:root body:not(.wp-admin) .ec-archive-course-popover { width: min(var(--ec-popup-width), calc(100vw - 32px)) !important; }
:root body:not(.wp-admin) .ec-course-popover h4 { font-size: calc(var(--ec-popup-title-size) * var(--ec-heading-scale)) !important; }
:root body:not(.wp-admin) .ec-course-popover p { font-size: var(--ec-popup-body-size) !important; }
:root body:not(.wp-admin) .ec-course-popover__points li { font-size: calc(var(--ec-popup-body-size) - 1px) !important; }
:root body:not(.wp-admin) .ec-archive-course-popover h3 { font-size: calc((var(--ec-popup-title-size) - 2px) * var(--ec-heading-scale)) !important; }
:root body:not(.wp-admin) .ec-archive-course-popover li { font-size: var(--ec-popup-body-size) !important; }

:root body:not(.wp-admin) :is(.ec-button--primary,.ec-course-popover__buy,.ec-archive-cart-button,.ec-cart-menu__actions a:last-child,.ec-course-sticky-title__inner>a,.ec-archive-filter-actions button) {
    background: var(--ec-brand-primary) !important; border-color: var(--ec-brand-primary) !important; color: var(--ec-brand-on-primary) !important;
}
:root body:not(.wp-admin) :is(.ec-button--primary,.ec-course-popover__buy,.ec-archive-cart-button,.ec-cart-menu__actions a:last-child,.ec-course-sticky-title__inner>a,.ec-archive-filter-actions button):hover {
    background: var(--ec-brand-hover) !important; border-color: var(--ec-brand-hover) !important; color: var(--ec-brand-on-hover) !important;
}
:root body:not(.wp-admin) :is(.ec-button--ghost,.ec-course-buy-now,.ec-course-wishlist,.ec-course-popover__favorite,.ec-archive-favorite-button,.ec-cart-menu__browse,.ec-cart-menu__actions a:first-child,.ec-course-shelf__arrows button,.ec-author-rail-nav,.ec-archive-filter-button) {
    border-color: var(--ec-brand-primary) !important; color: var(--ec-brand-primary) !important; background: #fff !important;
}
:root body:not(.wp-admin) :is(.ec-button--ghost,.ec-course-buy-now,.ec-course-wishlist,.ec-course-popover__favorite,.ec-archive-favorite-button,.ec-cart-menu__browse,.ec-cart-menu__actions a:first-child,.ec-course-shelf__arrows button,.ec-author-rail-nav,.ec-archive-filter-button):hover,
:root body:not(.wp-admin) .ec-archive-filter-button.is-active { background: var(--ec-brand-soft) !important; }
:root body:not(.wp-admin) :is(.ec-course-popover__favorite,.ec-archive-favorite-button)[aria-pressed="true"] { background: var(--ec-brand-primary) !important; color: var(--ec-brand-on-primary) !important; }
:root body:not(.wp-admin) .ec-course-hero-stats__premium { background: var(--ec-brand-primary) !important; }
:root body:not(.wp-admin) .ec-cart-menu__toggle>span { background: var(--ec-brand-primary) !important; color: var(--ec-brand-on-primary) !important; }
:root body:not(.wp-admin) .ec-footer__top { color: var(--ec-brand-primary) !important; }
:root body:not(.wp-admin) .ec-footer__top::before { background: conic-gradient(var(--ec-brand-primary) calc(var(--ec-scroll-progress,0) * 1%), #d7d9df 0) !important; }
:root body:not(.wp-admin) :is(.ec-button,.ec-course-popover__buy,.ec-course-buy-now,.ec-course-wishlist,.ec-course-popover__favorite,.ec-archive-cart-button,.ec-archive-favorite-button,.ec-course-shelf__arrows button,.ec-author-rail-nav):focus-visible { outline: 2px solid var(--ec-brand-primary) !important; outline-offset: 3px; }

/* Imported courses have one access message, with no empty rating columns. */
:root body:not(.wp-admin) .ec-course-single .ec-course-hero-stats--access-only {
    display: block !important; height: auto !important; min-height: 76px !important; grid-template-columns: minmax(0,1fr) !important;
}
:root body:not(.wp-admin) .ec-course-single .ec-course-hero-stats--access-only>.ec-course-hero-stats__plan {
    display: flex !important; align-items: center !important; width: 100% !important; min-width: 0 !important; min-height: 76px !important;
    padding: 18px 24px !important; border: 0 !important; background: #fff !important; color: #1f2937 !important;
}
:root body:not(.wp-admin) .ec-course-single .ec-course-hero-stats--access-only>.ec-course-hero-stats__plan>span {
    display: block !important; width: auto !important; max-width: none !important; color: #1f2937 !important; white-space: normal !important; overflow-wrap: normal !important;
}
.ec-cart-menu__thumb>a { display: grid; place-items: center; width: 100%; height: 100%; }
.ec-cart-menu__items article>div:nth-child(2) { min-width: 0; }
.ec-cart-menu__items article>div:nth-child(2)>a { display: block; color: #111827; font-size: 13px; font-weight: 900; }

/* Hovered catalog cards stay underneath site navigation. Their previews use the
   same dimensions and surface as the home and related-course previews. */
:root body:not(.wp-admin) .ec-course-card:is(:hover,:focus-within,.is-popover-open) { z-index: 15 !important; }
:root body:not(.wp-admin) .ec-archive-course-grid-card .ec-course-card>.ec-course-popover {
    display: block !important; min-height: 0 !important; max-height: none !important;
    padding: 0 !important; overflow: visible !important; border: 1px solid #d7ddea !important;
    border-radius: 8px !important; background: #fff !important; color: #2f3142 !important;
    box-shadow: 0 18px 45px rgba(15,23,42,.16) !important;
}
:root body:not(.wp-admin) .ec-archive-course-grid-card .ec-course-popover h4 a { color: inherit !important; text-decoration: none !important; }
:root body:not(.wp-admin) .ec-course-popover.is-compact-preview .ec-course-popover__content { padding: 14px !important; gap: 5px !important; }
:root body:not(.wp-admin) .ec-course-popover.is-compact-preview h4 { line-height: 1.25 !important; }
:root body:not(.wp-admin) .ec-course-popover.is-compact-preview .ec-course-popover__points { gap: 6px !important; margin: 0 !important; }
:root body:not(.wp-admin) .ec-course-popover.is-compact-preview .ec-course-popover__share { margin: 0 !important; }

@media (min-width: 1101px) {
    :root body:not(.wp-admin) .ec-course-single.is-course-scrolled .ec-course-sidebar {
        top: var(--ec-sidebar-sticky-top,56px) !important;
    }
    :root body:not(.wp-admin) .ec-course-single.is-course-scrolled .ec-course-enroll-card__body {
        padding: 16px 20px !important; gap: 8px !important;
    }
    :root body:not(.wp-admin) .ec-course-single.is-course-scrolled .ec-course-feature-list { gap: 4px !important; }
    :root body:not(.wp-admin) .ec-course-single.is-course-scrolled .ec-course-sidebar.is-sidebar-tight .ec-course-enroll-card__body {
        padding: 12px 18px !important; gap: 4px !important;
    }
    :root body:not(.wp-admin) .ec-course-single.is-course-scrolled .ec-course-sidebar.is-sidebar-tight .ec-course-feature-list { gap: 0 !important; }
    :root body:not(.wp-admin) .ec-course-single.is-course-scrolled .ec-course-sidebar.is-sidebar-tight :is(.ec-button,.ec-course-buy-now) { min-height: 44px !important; }
    :root body:not(.wp-admin) .ec-course-single.is-course-scrolled .ec-course-sidebar.is-sidebar-flow {
        position: relative !important; top: auto !important;
    }
}
@media (max-width: 600px) {
    :root body:not(.wp-admin) .ec-course-single .ec-course-hero-stats--access-only>.ec-course-hero-stats__plan { padding: 16px !important; }
}

/* Course sharing row, matching the supplied circular social reference. */
:root body:not(.wp-admin) .ec-social-share {
    --ec-social-size: 34px;
    /* Auto-created tracks redistribute space when social links are added or removed. */
    display: grid !important;
    grid-auto-flow: column !important;
    grid-auto-columns: minmax(0, 1fr) !important;
    align-items: center !important;
    justify-items: center !important;
    width: 100% !important;
    min-width: 0 !important;
    gap: clamp(4px, 2%, 8px) !important;
    padding: 0 !important;
    margin: 4px 0 0 !important;
}
:root body:not(.wp-admin) .ec-social-share::before,
:root body:not(.wp-admin) .ec-social-share::after {
    content: "";
    width: 100%;
    min-width: 0;
    height: 1px;
    background: #e5e5e5;
}
:root body:not(.wp-admin) .ec-social-share .ec-social-share__link {
    --ec-social-hover: var(--ec-brand-primary, #2563eb);
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    width: min(var(--ec-social-size), 100%) !important;
    height: auto !important;
    aspect-ratio: 1 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 1px solid #dedede !important;
    border-radius: 50% !important;
    color: #68757e !important;
    background: transparent !important;
    text-decoration: none !important;
    box-shadow: none !important;
    transition: background-color .15s, border-color .15s, color .15s;
}
:root body:not(.wp-admin) .ec-social-share__link svg {
    display: block;
    width: 14px;
    height: 16px;
    max-width: 60%;
    fill: currentColor;
    pointer-events: none;
}
:root body:not(.wp-admin) .ec-social-share .ec-social-share__link--facebook { --ec-social-hover: #1877f2; }
:root body:not(.wp-admin) .ec-social-share .ec-social-share__link--x { --ec-social-hover: #24bceb; }
:root body:not(.wp-admin) .ec-social-share__link--x svg { width: 16px; }
:root body:not(.wp-admin) .ec-social-share .ec-social-share__link--pinterest { --ec-social-hover: #bd081c; }
:root body:not(.wp-admin) .ec-social-share .ec-social-share__link--linkedin { --ec-social-hover: #0a66c2; }
:root body:not(.wp-admin) .ec-social-share .ec-social-share__link:is(:hover, :focus-visible) {
    color: #fff !important;
    border-color: var(--ec-social-hover) !important;
    background: var(--ec-social-hover) !important;
}
:root body:not(.wp-admin) .ec-social-share__link:focus-visible {
    outline: 2px solid var(--ec-brand-primary) !important;
    outline-offset: 3px;
}
:root body:not(.wp-admin) .ec-course-popover.is-compact-preview .ec-social-share {
    --ec-social-size: 32px;
}

/* Longer configured social lists wrap without reducing the icon target size. */
:root body:not(.wp-admin) .ec-social-share--wrap {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
}
:root body:not(.wp-admin) .ec-social-share--wrap::before,
:root body:not(.wp-admin) .ec-social-share--wrap::after { display: none; }
:root body:not(.wp-admin) .ec-social-share--wrap .ec-social-share__link {
    flex: 0 0 var(--ec-social-size) !important;
    width: var(--ec-social-size) !important;
}
