* {
    box-sizing: border-box;
}

[id] {
    scroll-margin-top: var(--header-height, 100px);
}

/* Menu block styles */

.wp-block-menu {
    --menu-gap: 0.75rem;
}

.wp-block-menu--overlay .wp-block-menu-dialog {
    --menu-gap: 1.5em;
    font-size: var(--wp--preset--font-size--medium);
}

.wp-block-menu[data-location='header'],
.wp-block-menu[data-location='header-user'] {
    font-weight: 500;
}

/* navigation block style overrides */

header.wp-block-template-part {
    position: sticky;
    top: 0;
    top: calc(0px + var(--wp-admin--admin-bar--height, 0px));
    z-index: 10;

    & > .wp-block-group {
        transition: background-color 0.3s ease;
    }
}
.transparent-sticky-menu header.wp-block-template-part {
    position: fixed;
    width: 100%;
}
.transparent-sticky-menu:not(.is-sticky) header.wp-block-template-part > .wp-block-group {
    background-color: transparent !important;
}
html:not(.has-modal-open) .transparent-sticky-menu.sticky-menu-color--light.is-sticky header.wp-block-template-part :where(.wc-block-mini-cart__badge) {
    background-color: var(--wp--preset--color--primary);
    color: var(--wp--preset--color--base);
}

html:not(.has-modal-open) .transparent-sticky-menu.sticky-menu-color--light:not(.is-sticky) header.wp-block-template-part {
    & .wp-block-navigation {
        color: var(--wp--preset--color--base);
    }

    & .wp-block-button.is-style-outline .wp-block-button__link, & a:where(:not(.wp-element-button)) {
        color: var(--wp--preset--color--base);
    }

    & .wp-block-site-logo,
    & .wp-block-image.header-logo {
        filter: brightness(0) invert(1);
    }
    & .wp-block-acf-animated-logo-svg .text {
        fill: var(--wp--preset--color--base);
    }
    & .wc-block-mini-cart__button {
        color: var(--wp--preset--color--base);
    }
    & :where(.wc-block-mini-cart__badge) {
        color: var(--wp--preset--color--primary);
    }
}

html:not(.has-modal-open) .transparent-sticky-menu.sticky-menu-color--dark:not(.is-sticky) header.wp-block-template-part {
    & .wp-block-navigation {
        color: var(--wp--preset--color--primary);
    }

    & .wp-block-button.is-style-outline .wp-block-button__link {
        color: var(--wp--preset--color--primary);
    }
}

@media screen and (min-width: 600px) {
    header.wp-block-template-part {
        top: var(--wp-admin--admin-bar--height, 0);
    }

    header.wp-block-template-part ul.wp-block-navigation .wp-block-navigation__submenu-container {
        border: none;
        box-shadow: 0 3px 4px 0 #00000040;
    }

    header.wp-block-template-part ul.wp-block-navigation > li.wp-block-navigation-item {
        padding: 0 1rem;
        z-index: 1;

        & > a {
            display: inline-block;
            padding: 0.75rem 0;
            text-decoration: underline;
            text-decoration-color: transparent;
            text-underline-offset: 5px;
        }

        &.current-menu-item > a,
        & > a.current-menu-ancestor,
        &:hover > a {
            text-decoration-color: currentcolor;
        }
    }

    .wp-block-navigation .has-child .wp-block-navigation-submenu__toggle[aria-expanded=true] ~ .wp-block-navigation__submenu-container,
    .wp-block-navigation .has-child:not(.open-on-click):hover > .wp-block-navigation__submenu-container,
    .wp-block-navigation .has-child:not(.open-on-click, .open-on-hover-click):focus-within > .wp-block-navigation__submenu-container {
        min-width: 260px;
    }
}

/* mobile menu nav block overrides */

@media screen and (max-width: 991px) {
    .wp-block-navigation__responsive-container-close {
        right: var(--wp--style--root--padding-right);
        top: 2rem;
    }

    header.wp-block-template-part .wp-block-navigation__responsive-container.is-menu-open {
        overflow: hidden;
        z-index: 100;
    }

    header.wp-block-template-part .wp-block-navigation__responsive-container .wp-block-navigation__responsive-container-content {
        margin-top: 90px;
        max-height: calc(100vh - 90px);
        overflow-y: auto !important;
        padding: 2rem var(--wp--style--root--padding-right);
    }

    .has-modal-open header.wp-block-template-part .wp-block-site-logo {
        position: relative;
        z-index: 110;
    }

    .has-modal-open header.wp-block-template-part .is-menu-open .wp-block-navigation__responsive-dialog {
        padding-top: 1px;
    }
}

.wp-block-button.is-style-gold-button > .wp-block-button__link::before {
    background: var(--wp--preset--color--gold-4);
    border-radius: 999px;
    content: '';
    height: 100%;
    left: 0;
    opacity: 0;
    position: absolute;
    top: 0;
    transition: opacity 0.3s ease;
    width: 100%;
    z-index: -1;
}

.wp-block-button.is-style-gold-button > .wp-block-button__link:hover::before {
    opacity: 1;
}

.is-style-tab-buttons .wp-block-button.is-style-gold-button > .wp-block-button__link[aria-expanded="true"]::before {
    background-color: var(--wp--preset--color--secondary);
    opacity: 1;
}

/* toggle switch */
.is-style-tab-buttons.is-style-toggle:has(.wp-block-button:last-child:nth-of-type(2)) > .wp-block-button {
    position: relative;
    .wp-block-button__link {
        border-color: transparent;
        border-radius: 0;
        border-width: 1px;
        padding: 0.3rem 0.5rem;
        background-color: transparent;
        transition: color 0.3s ease, border 0.3s ease;
    }
    .wp-block-button__link[aria-expanded="true"] {
        border-bottom-color: currentColor;
        background-color: transparent !important;
        color: var(--wp--preset--color--secondary) !important;
    }
    &:first-child {
        padding-right: calc(var(--wp--preset--spacing--30) + 2em);
        &:before,
        &:after {
            content: "";
            position: absolute;
            top: 50%;
            height: 1em;
            width: 1em;
            border: 2px solid var(--wp--preset--color--secondary);
            border-radius: 0.5em;
            right: 0;
            margin-top: -0.5em;
            margin-right: 0;
            transition: all 0.3s 0s ease-out, opacity 0.3s 0.3s ease-out;
            background-color: var(--wp--preset--color--base);
            opacity: 0;
        }
        &:before {
            width: 2em;
            background-color: var(--wp--preset--color--secondary);
        }
        &:has(.wp-block-button__link[aria-controls]) {
            &:before,
            &:after {
                opacity: 1;
            }
        }
        &:has(.wp-block-button__link[aria-expanded="true"]) {
            &:after {
                margin-right: 1em;
            }
        }
        & .wp-block-button__link:not([aria-expanded="true"])::after {
            content: "";
            right: 0;
            width: 2em;
            height: 1em;
            position: absolute;
            z-index: 1;
            display: block;
            top: 50%;
            margin-top: -0.5em;
        }
    }
    &:last-child .wp-block-button__link:not([aria-expanded="true"])::before {
        content: "";
        left: -4rem;
        width: 2em;
        height: 1em;
        position: absolute;
        z-index: 1;
        display: block;
        top: 50%;
        margin-top: -0.5em;
    }
}


.product-card-button :where(.wp-element-button, .wp-block-button__link) {
    background: var(--wp--preset--gradient--gold-gradient) !important;
    color: var(--wp--preset--color--primary) !important;
    font-weight: 500;
    &:hover, &:focus {
        background: var(--wp--preset--color--gold-4) !important;
    }
}
.wp-block-query .subscription-grid .limited-subscription-notice {
    position: absolute;
    bottom: 2px;
    left: 2px;
    right: 2px;
    text-align: center;
    background-color: var(--wp--preset--color--secondary);
    color: var(--wp--preset--color--base);
    border-bottom-left-radius: 3rem;
    border-bottom-right-radius: 3rem;
    padding: 1rem 2rem;
    margin: 0;
}
.wp-block-query .subscription-grid .product > .wp-block-group {
    position: relative;
    padding-bottom: 6rem !important;
}

.wp-block-query .subscription-grid .product.product-in-cart > .wp-block-group form::after {
    content: "This product has been added to your cart";
    background-color: var(--wp--preset--color--secondary);
    color: var(--wp--preset--color--base);
    border-bottom-left-radius: 3rem;
    border-bottom-right-radius: 3rem;
    padding: 1rem 2rem;
    display: block;
    position: absolute;
    bottom: 2px;
    left: 2px;
    right: 2px;
    text-align: center;
}

.wp-block-query .subscription-grid .product.featured > .wp-block-group {
    overflow: hidden;
    border-color: var(--wp--preset--color--gold-1) !important;
}
.wp-block-query .subscription-grid .product.featured > .wp-block-group::before {
    content: "Most Popular";
    position: absolute;
    background: var(--wp--preset--gradient--gold-gradient);
    color: var(--wp--preset--color--primary);
    padding: 0.5rem 0.875rem;
    left: 0;
    right: 0;
    top: 0;
    font-size: 0.75rem;
    text-align: center;
    font-weight: 600;
    line-height: 1;
}

.wp-block-query .subscription-grid .product .wp-block-post-title .product-subtitle {
    display: block;
    font-size: var(--wp--preset--font-size--medium);
}
/* Details block */
.wp-block-details {
    border-radius: 0.5rem;
}
.wp-block-details > summary {
    align-items: center;
    display: flex;
    font-size: var(--wp--preset--font-size--medium);
    justify-content: space-between;
    list-style: none;
    padding: var(--wp--preset--spacing--20);
}

.wp-block-details > summary::after {
    background-color: currentcolor;
    content: '';
    display: block;
    height: 1.5em;
    margin-left: 1rem;
    mask-image: url("data:image/svg+xml,%3Csvg width='32' height='32' viewBox='0 0 32 32' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M22.8353 22.3641L22.364 22.8354C22.1036 23.0958 21.6815 23.0959 21.4212 22.8355L16 17.4143L10.5788 22.8355C10.3185 23.0958 9.89639 23.0958 9.63603 22.8354L9.16468 22.3641C8.90432 22.1037 8.90432 21.6816 9.1646 21.4213L14.5858 16.0001L9.16463 10.579C8.90428 10.3186 8.9043 9.89648 9.16465 9.63613L9.63601 9.16477C9.89637 8.90441 10.3185 8.9044 10.5788 9.16475L16 14.5859L21.4212 9.16474C21.6815 8.90439 22.1036 8.90441 22.364 9.16476L22.8353 9.63612C23.0957 9.89648 23.0957 10.3186 22.8354 10.5789L17.4142 16.0001L22.8354 21.4213C23.0957 21.6816 23.0957 22.1037 22.8353 22.3641Z' fill='%23000000'/%3E%3C/svg%3E%0A");
    mask-position: center;
    mask-repeat: no-repeat;
    mask-size: contain;
    transform: rotate(45deg);
    transition: transform 0.3s ease;
    width: 1.5em;
}

.wp-block-details[open] > summary::after {
    transform: rotate(90deg);
}

.wp-block-details > summary::-webkit-details-marker,
.wp-block-details > summary::marker {
    display: none !important;
}

.wp-block-details > *:not(summary) {
    margin-left: var(--wp--preset--spacing--20);
    margin-right: var(--wp--preset--spacing--20);
}

.wp-block-details[open] > *:not(summary) {
    animation: 0.3s ease details-open 1 forwards;
}
@keyframes details-open {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}
.is-position-sticky {
    top: calc(var(--header-height, 96px) + var(--wp-admin--admin-bar--position-offset, 0px)) !important;
    z-index: 1 !important;
}

/* Media & Text Block */

.wp-block-media-text.has-media-on-the-right > .wp-block-media-text__content {
    padding-left: 0;
}
/*list style */

.wp-block-list.is-style-default.has-base-color {
    list-style-image: url('../assets/icons/bullet-light.svg');
}

/* Splide control styles */
.splide {
    display: flex;
    flex-wrap: wrap;
}

.splide .splide__track {
    order: 1;
    width: 100%;
}

.splide .splide__pagination {
    align-items: center;
    display: flex;
    flex-grow: 1;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-start !important;
    order: 2;
    padding: 2rem 0 0;
    position: unset;
}

.splide .splide__arrows {
    align-items: center;
    display: flex;
    flex-grow: 1;
    gap: 0.5rem;
    justify-content: flex-end;
    order: 3;
    padding-top: 2rem;
}

.splide:not(.is-overflow) .splide__arrows,
.splide:not(.is-overflow) .splide__pagination {
    display: none;
}

.splide .splide__arrows .splide__arrow {
    background-color: transparent;
    border: 1px solid var(--wp--preset--color--base);
    color: var(--wp--preset--color--base);
    height: 40px;
    opacity: 1;
    position: unset;
    transform: unset;
    transition:
        color 0.3s ease,
        background-color 0.3s ease;
    width: 40px;
}

.splide .splide__arrows .splide__arrow:disabled {
    opacity: 0.3;
    pointer-events: none;
}

.splide .splide__arrows .splide__arrow:hover,
.splide .splide__arrows .splide__arrow:focus {
    background-color: var(--wp--preset--color--base);
    color: var(--wp--preset--color--primary);
}

.splide .splide__arrows .splide__arrow svg {
    fill: currentcolor;
    height: 0.7em;
    width: 0.7em;
}

.splide .splide__pagination .splide__pagination__page {
    background-color: transparent;
    border: 1px solid var(--wp--preset--color--base);
    height: 10px;
    margin: 0;
    opacity: 1;
    transform: unset;
    transition: background-color 0.3s ease;
    width: 10px;
}

.splide .splide__pagination .splide__pagination__page.is-active,
.splide .splide__pagination .splide__pagination__page:hover,
.splide .splide__pagination .splide__pagination__page:focus {
    background-color: var(--wp--preset--color--base);
}

/* My Account - Manage attachments page */

.attachment-card-link {
    align-items: center;
    aspect-ratio: 1 / 1;
    display: flex;
    justify-content: center;
    position: relative;
    border: 1px solid var(--wp--preset--color--accent);
    box-shadow: inset 0 0 15px rgba(181, 188, 247, .3), inset 0 0 0 1px rgba(181, 188, 247, .1);
    border-radius: 4px;
    max-height: 300px;
}
.attachment-card .delete-attachment,
.attachment-card .download-attachment {
    opacity: 0;
    top: 0.5rem;
    transition: all 0.3s ease-out;
}
.attachment-card .delete-attachment {
    right: 0.5rem;
}
.attachment-card .download-attachment {
    left: 0.5rem;
}
.attachment-card:hover .delete-attachment,
.attachment-card:hover .download-attachment {
    opacity: 1;
}

/* Menu block */

.wp-block-menu .menu--header {
    font-weight: 500;
}

.wp-block-menu .menu-item > a {
    text-decoration-color: transparent;
    text-underline-offset: 0.25em;
    transition: all 0.25s ease-in-out;
}

.wp-block-menu .menu-item > a:focus,
.wp-block-menu .menu-item > a:hover {
    text-decoration-color: currentColor;
}

.wp-block-menu .current-menu-item > a {
    text-decoration-color: currentColor;
}

@media screen and (min-width: 1200px) {
    .wp-block-menu .menu {
        gap: 1.5rem;
    }
}

/* read more block */
.wp-block-read-more {
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 1.25em;
    position: relative;
    line-height: 1.2;
    transition: color 0.3s linear, border-color 0.3s ease, background-color 0.3s ease;

    &::after {
        content: "";
        background-color: currentColor;
        width: 1em;
        height: 1em;
        display: inline-block;
        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 23 24' fill='none'%3E%3Cpath d='M15.0533 11.3231C15.233 11.5029 15.3339 11.7466 15.3339 12.0007C15.3339 12.2548 15.233 12.4985 15.0533 12.6782L9.63203 18.0995C9.54362 18.1911 9.43788 18.2641 9.32096 18.3143C9.20404 18.3645 9.07828 18.3909 8.95104 18.3921C8.82379 18.3932 8.6976 18.3689 8.57982 18.3207C8.46204 18.2725 8.35504 18.2014 8.26506 18.1114C8.17508 18.0214 8.10392 17.9144 8.05574 17.7966C8.00755 17.6789 7.98331 17.5527 7.98441 17.4254C7.98552 17.2982 8.01195 17.1724 8.06218 17.0555C8.1124 16.9386 8.18541 16.8328 8.27694 16.7444L13.0207 12.0007L8.27694 7.25694C8.10237 7.07619 8.00578 6.83412 8.00796 6.58285C8.01015 6.33157 8.11093 6.09121 8.28862 5.91353C8.4663 5.73585 8.70666 5.63506 8.95793 5.63288C9.20921 5.63069 9.45128 5.72729 9.63203 5.90185L15.0533 11.3231Z' fill='currentColor'/%3E%3C/svg%3E");
        mask-size: contain;
        mask-position: center;
        mask-repeat: no-repeat;
    }
    &:hover {
        background-color: var(--wp--preset--color--primary) !important;
        color: var(--wp--preset--color--base) !important;
    }
}

/* pagination block */
.wp-block-query-pagination {
    padding-top: 3rem;
}
.wp-block-query-pagination-numbers {
    display: flex;
    gap: 0.5em;
}
.wp-block-query-pagination-numbers > * {
    padding: 0.75em;
    display: block;
    border: 1px solid transparent;
    transition: border-color 0.3s ease;
    line-height: 1;
    text-decoration: none;
}
.wp-block-query-pagination-numbers .current,
.wp-block-query-pagination-numbers > *:hover {
    border-color: var(--wp--preset--color--accent);
    color: currentColor;
}
.wp-block-query-pagination .is-arrow-arrow {
    font-size: 0px;
    &::after {
        content: "";
        background-color: currentColor;
        width: 1.25rem;
        height: 1.25rem;
        display: inline-block;
        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 23 24' fill='none'%3E%3Cpath d='M15.0533 11.3231C15.233 11.5029 15.3339 11.7466 15.3339 12.0007C15.3339 12.2548 15.233 12.4985 15.0533 12.6782L9.63203 18.0995C9.54362 18.1911 9.43788 18.2641 9.32096 18.3143C9.20404 18.3645 9.07828 18.3909 8.95104 18.3921C8.82379 18.3932 8.6976 18.3689 8.57982 18.3207C8.46204 18.2725 8.35504 18.2014 8.26506 18.1114C8.17508 18.0214 8.10392 17.9144 8.05574 17.7966C8.00755 17.6789 7.98331 17.5527 7.98441 17.4254C7.98552 17.2982 8.01195 17.1724 8.06218 17.0555C8.1124 16.9386 8.18541 16.8328 8.27694 16.7444L13.0207 12.0007L8.27694 7.25694C8.10237 7.07619 8.00578 6.83412 8.00796 6.58285C8.01015 6.33157 8.11093 6.09121 8.28862 5.91353C8.4663 5.73585 8.70666 5.63506 8.95793 5.63288C9.20921 5.63069 9.45128 5.72729 9.63203 5.90185L15.0533 11.3231Z' fill='currentColor'/%3E%3C/svg%3E");
        mask-size: contain;
        mask-position: center;
        mask-repeat: no-repeat;
    }
}
.wp-block-query-pagination-previous,
.wp-block-query-pagination-next {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap:0.5em;
}
.wp-block-query-pagination-previous .wp-block-query-pagination-previous-arrow::after {
    transform: scaleX(-1);
}

/* Tutorials Query Block */

@media screen and (max-width: 998px) {
    .wp-block-query .wp-block-post-template.columns-3 {
        grid-template-columns: 1fr 1fr;
    }
}