/* Shared My Account navigation icons */
.hexo-megalearn-my-account-navigation li {
    --hmt-my-account-icon: "\f359";
}

.hexo-megalearn-my-account-navigation li.woocommerce-MyAccount-navigation-link--dashboard {
    --hmt-my-account-icon: "\f3fd";
}

.hexo-megalearn-my-account-navigation li.woocommerce-MyAccount-navigation-link--orders {
    --hmt-my-account-icon: "\f291";
}

.hexo-megalearn-my-account-navigation li.woocommerce-MyAccount-navigation-link--downloads {
    --hmt-my-account-icon: "\f0ed";
}

.hexo-megalearn-my-account-navigation li.woocommerce-MyAccount-navigation-link--edit-address {
    --hmt-my-account-icon: "\f5a0";
}

.hexo-megalearn-my-account-navigation li.woocommerce-MyAccount-navigation-link--customer-logout {
    --hmt-my-account-icon: "\f2f5";
}

.hexo-megalearn-my-account-navigation li.woocommerce-MyAccount-navigation-link--edit-account,
.hexo-megalearn-my-account-navigation li.woocommerce-MyAccount-navigation-link--login {
    --hmt-my-account-icon: "\f406";
}

.hexo-megalearn-my-account-navigation li.woocommerce-MyAccount-navigation-link--woo-wallet {
    --hmt-my-account-icon: "\f555";
}

.hexo-megalearn-my-account-navigation li.woocommerce-MyAccount-navigation-link--my-courses {
    --hmt-my-account-icon: "\f19d";
}

.hexo-megalearn-my-account-navigation li > a:before {
    content: var(--hmt-my-account-icon);
    font-family: "Font Awesome 5 Pro";
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    min-width: 32px;
    padding: 4px;
    font-size: 19px;
    font-style: normal;
    font-variant: normal;
    font-weight: 300;
    line-height: 1;
    text-align: center;
    text-rendering: auto;
}

.dashboard-navigation-wrapper .hexo-megalearn-my-account-navigation li > a:before {
    position: absolute;
    top: 8px;
    right: 5px;
    margin-top: 0;
    margin-right: -1px;
}

/* Widget */
.hexo-megalearn-my-account-button-wrapper {
    --hmt-account-button-width: auto;
    display: flex;
}

.hexo-megalearn-my-account-button-container {
    position: relative;
    display: inline-flex;
    width: var(--hmt-account-button-width);
    max-width: 100%;
}

.hexo-megalearn-my-account-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--hmt-account-button-width);
    min-width: 150px;
    max-width: 100%;
    padding: 12px 18px;
    color: var(--hmt-btn-text-color);
    background-color: var(--hmt-primary-color);
    border: 1px solid var(--hmt-primary-color);
    border-radius: 8px;
    font: inherit;
    font-weight: 500;
    line-height: 1.5;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.hexo-megalearn-my-account-button:hover,
.hexo-megalearn-my-account-button:focus {
    color: var(--hmt-btn-text-color);
    background-color: var(--hmt-primary-hover-color);
    border-color: var(--hmt-primary-hover-color);
    outline: none;
}

.hexo-megalearn-my-account-button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.hexo-megalearn-my-account-button-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-inline-end: 8px;
}

.hexo-megalearn-my-account-button-icon svg {
    width: 1em;
    height: 1em;
    fill: currentColor;
}

.hexo-megalearn-my-account-button-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hexo-megalearn-my-account-dropdown-icon {
    width: 8px;
    height: 8px;
    margin-inline-start: 12px;
    border-inline-end: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.2s ease;
}

.hexo-megalearn-my-account-button-container.is-open .hexo-megalearn-my-account-dropdown-icon {
    transform: rotate(225deg) translate(-2px, -2px);
}

.hexo-megalearn-my-account-dropdown {
    position: absolute;
    z-index: 999;
    top: 100%;
    inset-inline-end: 0;
    width: 260px;
    max-width: calc(100vw - 30px);
    margin-top: 10px;
    padding: 10px;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 35px rgb(0 0 0 / 12%);
    transform: translateY(8px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.hexo-megalearn-my-account-dropdown:before {
    position: absolute;
    right: 0;
    bottom: 100%;
    left: 0;
    height: 10px;
    content: "";
}

.hexo-megalearn-my-account-button-container.is-open .hexo-megalearn-my-account-dropdown {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.hexo-megalearn-my-account-dropdown .hexo-megalearn-my-account-navigation ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

.hexo-megalearn-my-account-dropdown .hexo-megalearn-my-account-navigation li {
    position: relative;
    margin: 0;
    border-radius: 7px;
    transition: background-color 0.2s ease;
}

.hexo-megalearn-my-account-dropdown .hexo-megalearn-my-account-navigation li:hover,
.hexo-megalearn-my-account-dropdown .hexo-megalearn-my-account-navigation li.is-active {
    background-color: var(--hmt-primary-color-alpha10);
}

.hexo-megalearn-my-account-dropdown .hexo-megalearn-my-account-navigation a {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 10px;
    color: #0b032d;
    line-height: 1.6;
}

.hexo-megalearn-my-account-dropdown .hexo-megalearn-my-account-navigation a:before {
    margin-inline-end: 6px;
    color: var(--hmt-primary-color);
}

.hexo-megalearn-my-account-dropdown .hexo-megalearn-my-account-navigation li.is-active a {
    font-weight: 700;
}

@media (max-width: 767px) {
    .hexo-megalearn-my-account-button-container,
    .hexo-megalearn-my-account-button {
        width: 100%;
    }

    .hexo-megalearn-my-account-dropdown {
        right: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hexo-megalearn-my-account-button,
    .hexo-megalearn-my-account-dropdown,
    .hexo-megalearn-my-account-dropdown-icon {
        transition: none;
    }
}
