/**
 * 龍龍代購「我的帳號」選單修復。
 * 保留 WooCommerce 與外掛動態加入的 endpoint，只統一版面與圖示。
 *
 * @since 4.1.8
 */

body.woocommerce-account .woocommerce-MyAccount-navigation {
    min-width: 0;
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul {
    display: block;
    margin: 0;
    padding: 0 !important;
    border: 1px solid #ddd;
    background: #fff;
    list-style: none !important;
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul > li {
    display: block;
    float: none;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    list-style: none !important;
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul > li::before,
body.woocommerce-account .woocommerce-MyAccount-navigation ul > li::after,
body.woocommerce-account .woocommerce-MyAccount-navigation ul > li::marker {
    display: none !important;
    content: none !important;
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul > li + li {
    border-top: 1px solid #ddd;
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul > li > a {
    display: flex !important;
    align-items: center;
    justify-content: flex-start !important;
    min-height: 54px;
    padding: 10px 13px !important;
    background: #fff;
    color: #555 !important;
    font-size: 16px !important;
    font-weight: 500;
    line-height: 1.45;
    text-align: left !important;
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease;
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul > li > a::before {
    display: inline-flex !important;
    flex: 0 0 24px;
    align-items: center;
    justify-content: center;
    width: 24px !important;
    margin: 0 11px 0 0 !important;
    color: #61717c;
    content: "\f105" !important;
    font-family: "FontAwesome" !important;
    font-size: 19px;
    font-style: normal;
    font-weight: normal !important;
    line-height: 1;
    text-rendering: auto;
}

body.woocommerce-account .woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--dashboard a::before {
    content: "\f0e4" !important;
}

body.woocommerce-account .woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--orders a::before {
    content: "\f07a" !important;
}

body.woocommerce-account .woocommerce-MyAccount-navigation li[class*="dragonshop_ticket"] a::before,
body.woocommerce-account .woocommerce-MyAccount-navigation li[class*="ticket"] a::before {
    content: "\f145" !important;
}

body.woocommerce-account .woocommerce-MyAccount-navigation li[class*="serial"] a::before,
body.woocommerce-account .woocommerce-MyAccount-navigation li[class*="gift"] a::before {
    content: "\f06b" !important;
}

body.woocommerce-account .woocommerce-MyAccount-navigation li[class*="subscription"] a::before {
    content: "\f021" !important;
}

body.woocommerce-account .woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--downloads a::before {
    content: "\f019" !important;
}

body.woocommerce-account .woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--edit-address a::before,
body.woocommerce-account .woocommerce-MyAccount-navigation li[class*="address"] a::before {
    content: "\f041" !important;
}

body.woocommerce-account .woocommerce-MyAccount-navigation li[class*="discord"] a::before {
    content: "\f1d8" !important;
}

body.woocommerce-account .woocommerce-MyAccount-navigation li[class*="wallet"] a::before {
    content: "\f0d6" !important;
}

body.woocommerce-account .woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--edit-account a::before {
    content: "\f007" !important;
}

body.woocommerce-account .woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--customer-logout a::before {
    content: "\f08b" !important;
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul > li > a:hover,
body.woocommerce-account .woocommerce-MyAccount-navigation ul > li > a:focus-visible {
    background: #fff7f5;
    color: #ea7259 !important;
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul > li.is-active > a,
body.woocommerce-account .woocommerce-MyAccount-navigation ul > li.current-menu-item > a {
    background: #ea7259 !important;
    color: #fff !important;
    font-weight: 700;
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul > li.is-active > a::before,
body.woocommerce-account .woocommerce-MyAccount-navigation ul > li.current-menu-item > a::before {
    color: #fff !important;
}

/* 部分舊外掛會在選單 UL 內留下隱藏 checkbox，避免顯示成單獨的小方塊。 */
body.woocommerce-account .woocommerce-MyAccount-navigation > input[type="checkbox"],
body.woocommerce-account .woocommerce-MyAccount-navigation ul > input[type="checkbox"] {
    display: none !important;
}

@media (max-width: 767px) {
    body.woocommerce-account .woocommerce-MyAccount-navigation,
    body.woocommerce-account .woocommerce-MyAccount-content {
        float: none !important;
        width: 100% !important;
    }

    body.woocommerce-account .woocommerce-MyAccount-navigation {
        margin-bottom: 28px;
    }
}
