/* =========================================================
   Persian Onyx — WooCommerce My Account
   Premium Navigation + Dashboard
========================================================= */

/* ---------------------------------------------------------
   1. Account page foundation
--------------------------------------------------------- */

body.woocommerce-account #site-content {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

body.woocommerce-account #site-content::before,
body.woocommerce-account #site-content::after {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
}

body.woocommerce-account #site-content::before {
    top: 30px;
    right: -260px;
    background: radial-gradient(
        circle,
        rgba(0, 150, 136, 0.13),
        rgba(0, 150, 136, 0.06) 42%,
        transparent 72%
    );
}

body.woocommerce-account #site-content::after {
    bottom: -220px;
    left: -240px;
    background: radial-gradient(
        circle,
        rgba(142, 36, 170, 0.12),
        rgba(142, 36, 170, 0.05) 44%,
        transparent 72%
    );
}

body.woocommerce-account main.container {
    width: min(1240px, calc(100% - 32px));
    max-width: 1240px;
    margin-inline: auto;
}

body.woocommerce-account article {
    max-width: none !important;
}

body.woocommerce-account .single-body {
    width: 100%;
}

body.woocommerce-account .single-title {
    position: relative;
    width: fit-content;

    margin: 0 0 30px;
    padding-bottom: 13px;

    color: #07191e;
    font-size: clamp(1.8rem, 3vw, 2.7rem);
    font-weight: 900 !important;
    line-height: 1.35;
}

body.woocommerce-account .single-title::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;

    width: 82px;
    height: 4px;

    border-radius: 999px;
    background: linear-gradient(
        90deg,
        #009688,
        #8e24aa
    );

    box-shadow: 0 5px 16px rgba(0, 150, 136, 0.25);
}


/* ---------------------------------------------------------
   2. Main account layout
--------------------------------------------------------- */

body.woocommerce-account .woocommerce {
    display: flex;
    grid-template-columns: 270px minmax(0, 1fr);
    align-items: start;
    gap: 26px;

    width: 100%;
    direction: rtl;
}


/* ---------------------------------------------------------
   3. Navigation glass card
--------------------------------------------------------- */

body.woocommerce-account .woocommerce-MyAccount-navigation {
    position: sticky;
    top: 125px;

    width: 100% !important;
    float: none !important;

    padding: 16px;

    border: 1px solid rgba(7, 25, 30, 0.08);
    border-radius: 24px;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.92),
            rgba(250, 252, 251, 0.75)
        );

    box-shadow:
        0 22px 55px rgba(7, 25, 30, 0.07),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);

    backdrop-filter: blur(18px) saturate(1.15);
    -webkit-backdrop-filter: blur(18px) saturate(1.15);

    box-sizing: border-box;
    overflow: hidden;

    max-width: 242px;
}

body.woocommerce-account .woocommerce-MyAccount-navigation::before {
    content: "";
    position: absolute;
    top: -90px;
    left: -90px;

    width: 210px;
    height: 210px;

    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(0, 150, 136, 0.13),
        transparent 68%
    );

    pointer-events: none;
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul {
    position: relative;
    z-index: 1;

    display: flex;
    flex-direction: column;
    gap: 7px;

    margin: 0 !important;
    padding: 0 !important;

    list-style: none;
}

body.woocommerce-account .woocommerce-MyAccount-navigation li {
    position: relative;

    width: 100%;
    margin: 0 !important;
    padding: 0 !important;

    list-style: none;
    border: 0 !important;
}

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


/* ---------------------------------------------------------
   4. Navigation links
--------------------------------------------------------- */

body.woocommerce-account .woocommerce-MyAccount-navigation a {
    position: relative;

    display: flex;
    align-items: center;

    min-height: 52px;
    width: 100%;

    padding: 0 18px 0 46px;

    color: rgba(7, 25, 30, 0.76) !important;
    background: transparent;

    border: 1px solid transparent;
    border-radius: 15px;

    font-family: "YekanBakh", sans-serif !important;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none !important;

    box-sizing: border-box;

    transition:
        color 0.24s ease,
        background 0.24s ease,
        border-color 0.24s ease,
        box-shadow 0.24s ease,
        transform 0.24s ease;
}

/* Decorative icon container */
body.woocommerce-account .woocommerce-MyAccount-navigation a::before {
    position: absolute;
    left: 13px;

    display: inline-grid;
    place-items: center;

    width: 28px;
    height: 28px;

    color: #00796b;
    background: rgba(0, 150, 136, 0.09);
    border: 1px solid rgba(0, 150, 136, 0.13);
    border-radius: 9px;

    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;

    transition:
        color 0.24s ease,
        background 0.24s ease,
        border-color 0.24s ease,
        transform 0.24s ease;
}

/* Dashboard */
body.woocommerce-account
.woocommerce-MyAccount-navigation-link--dashboard a::before {
    content: "⌂";
}

/* Orders */
body.woocommerce-account
.woocommerce-MyAccount-navigation-link--orders a::before {
    content: "▤";
}

/* Downloads */
body.woocommerce-account
.woocommerce-MyAccount-navigation-link--downloads a::before {
    content: "↓";
}

/* Address */
body.woocommerce-account
.woocommerce-MyAccount-navigation-link--edit-address a::before {
    content: "⌖";
}

/* Payment methods */
body.woocommerce-account
.woocommerce-MyAccount-navigation-link--payment-methods a::before {
    content: "◫";
}

/* Account details */
body.woocommerce-account
.woocommerce-MyAccount-navigation-link--edit-account a::before {
    content: "◎";
}

/* Logout */
body.woocommerce-account
.woocommerce-MyAccount-navigation-link--customer-logout a::before {
    content: "↪";
}


/* Hover */
body.woocommerce-account
.woocommerce-MyAccount-navigation li:not(.is-active) a:hover {
    color: #00695c !important;

    background:
        linear-gradient(
            135deg,
            rgba(0, 150, 136, 0.09),
            rgba(255, 255, 255, 0.58)
        );

    border-color: rgba(0, 150, 136, 0.17);

    box-shadow:
        0 10px 25px rgba(0, 150, 136, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.75);

    transform: translateX(-3px);
}

body.woocommerce-account
.woocommerce-MyAccount-navigation li:not(.is-active) a:hover::before {
    color: #ffffff;
    background: #009688;
    border-color: #009688;
    transform: scale(1.04);
}


/* Active item */
body.woocommerce-account
.woocommerce-MyAccount-navigation li.is-active a {
    color: #ffffff !important;

    background:
        linear-gradient(
            135deg,
            #009688 0%,
            #00796b 56%,
            #8e24aa 145%
        );

    border-color: rgba(255, 255, 255, 0.18);

    box-shadow:
        0 14px 30px rgba(0, 150, 136, 0.25),
        0 6px 18px rgba(142, 36, 170, 0.11),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

body.woocommerce-account
.woocommerce-MyAccount-navigation li.is-active a::before {
    color: #009688;

    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(255, 255, 255, 0.8);

    box-shadow: 0 6px 16px rgba(7, 25, 30, 0.14);
}


/* Logout distinction */
body.woocommerce-account
.woocommerce-MyAccount-navigation-link--customer-logout {
    margin-top: 8px !important;
    padding-top: 9px !important;

    border-top: 1px solid rgba(7, 25, 30, 0.07) !important;
}

body.woocommerce-account
.woocommerce-MyAccount-navigation-link--customer-logout a {
    color: #b42318 !important;
}

body.woocommerce-account
.woocommerce-MyAccount-navigation-link--customer-logout a::before {
    color: #b42318;
    background: rgba(180, 35, 24, 0.07);
    border-color: rgba(180, 35, 24, 0.11);
}

body.woocommerce-account
.woocommerce-MyAccount-navigation-link--customer-logout a:hover {
    color: #ffffff !important;
    background: linear-gradient(135deg, #c0392b, #9f2319);
    border-color: transparent;
}

body.woocommerce-account
.woocommerce-MyAccount-navigation-link--customer-logout a:hover::before {
    color: #b42318;
    background: #ffffff;
    border-color: #ffffff;
}


/* ---------------------------------------------------------
   5. Dashboard content glass card
--------------------------------------------------------- */

body.woocommerce-account .woocommerce-MyAccount-content {
    position: relative;

    width: 100% !important;
    min-width: 0;
    float: none !important;

    padding: clamp(24px, 3vw, 38px);

    border: 1px solid rgba(7, 25, 30, 0.075);
    border-radius: 26px;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.94),
            rgba(250, 252, 251, 0.78)
        );

    box-shadow:
        0 26px 70px rgba(7, 25, 30, 0.075),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);

    backdrop-filter: blur(22px) saturate(1.15);
    -webkit-backdrop-filter: blur(22px) saturate(1.15);

    box-sizing: border-box;
    overflow: hidden;
}

body.woocommerce-account .woocommerce-MyAccount-content::before {
    content: "";
    position: absolute;
    top: -150px;
    left: -120px;

    width: 330px;
    height: 330px;

    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(142, 36, 170, 0.085),
        transparent 68%
    );

    pointer-events: none;
}

body.woocommerce-account .woocommerce-MyAccount-content::after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;

    width: 4px;
    height: 100%;

    background: linear-gradient(
        180deg,
        #009688,
        rgba(0, 150, 136, 0.15),
        #8e24aa
    );

    opacity: 0.78;
}

body.woocommerce-account
.woocommerce-MyAccount-content > * {
    position: relative;
    z-index: 1;
}


/* ---------------------------------------------------------
   6. Dashboard welcome paragraph
--------------------------------------------------------- */

body.woocommerce-account
.woocommerce-MyAccount-content > p:first-of-type {
    position: relative;

    margin: 0 0 20px !important;
    padding: 22px 72px 22px 22px;

    color: #203238;

    background:
        linear-gradient(
            135deg,
            rgba(0, 150, 136, 0.10),
            rgba(255, 255, 255, 0.58)
        );

    border: 1px solid rgba(0, 150, 136, 0.16);
    border-radius: 18px;

    font-size: 15px;
    line-height: 2;
}

body.woocommerce-account
.woocommerce-MyAccount-content > p:first-of-type::before {
    content: "◎";
    position: absolute;
    top: 50%;
    right: 20px;

    display: grid;
    place-items: center;

    width: 38px;
    height: 38px;

    color: #ffffff;
    background: linear-gradient(135deg, #009688, #8e24aa);
    border-radius: 13px;

    box-shadow:
        0 10px 22px rgba(0, 150, 136, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);

    font-family: Arial, sans-serif;
    font-size: 18px;

    transform: translateY(-50%);
}

body.woocommerce-account
.woocommerce-MyAccount-content > p:first-of-type strong {
    color: #00796b;
    font-weight: 900;
}


/* ---------------------------------------------------------
   7. Dashboard description panel
--------------------------------------------------------- */

body.woocommerce-account
.woocommerce-MyAccount-content > p:nth-of-type(2) {
    margin: 0 !important;
    padding: 24px;

    color: rgba(7, 25, 30, 0.68);

    background: rgba(255, 255, 255, 0.46);
    border: 1px solid rgba(7, 25, 30, 0.055);
    border-radius: 18px;

    font-size: 15px;
    line-height: 2.15;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

body.woocommerce-account
.woocommerce-MyAccount-content p a {
    position: relative;

    color: #00897b !important;
    font-weight: 800;
    text-decoration: none !important;

    transition:
        color 0.22s ease,
        background 0.22s ease;
}

body.woocommerce-account
.woocommerce-MyAccount-content p a:not(.button) {
    padding: 1px 4px;
    border-radius: 5px;
}

body.woocommerce-account
.woocommerce-MyAccount-content p a:not(.button):hover {
    color: #6a1b9a !important;
    background: rgba(142, 36, 170, 0.07);
}


/* ---------------------------------------------------------
   8. Notices inside account
--------------------------------------------------------- */

body.woocommerce-account
.woocommerce-MyAccount-content .woocommerce-notices-wrapper {
    margin-bottom: 18px;
}

body.woocommerce-account
.woocommerce-MyAccount-content .woocommerce-message,
body.woocommerce-account
.woocommerce-MyAccount-content .woocommerce-info,
body.woocommerce-account
.woocommerce-MyAccount-content .woocommerce-error {
    margin-bottom: 18px !important;
}


/* ---------------------------------------------------------
   9. Dark mode
--------------------------------------------------------- */

body.dark-mode.woocommerce-account .single-title,
html[data-theme="dark"]
body.woocommerce-account .single-title {
    color: #f4fffd;
}

body.dark-mode.woocommerce-account
.woocommerce-MyAccount-navigation,
html[data-theme="dark"]
body.woocommerce-account
.woocommerce-MyAccount-navigation {
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.075),
            rgba(255, 255, 255, 0.028)
        );

    border-color: rgba(255, 255, 255, 0.09);

    box-shadow:
        0 24px 65px rgba(0, 0, 0, 0.43),
        inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

body.dark-mode.woocommerce-account
.woocommerce-MyAccount-navigation a,
html[data-theme="dark"]
body.woocommerce-account
.woocommerce-MyAccount-navigation a {
    color: rgba(240, 255, 252, 0.72) !important;
}

body.dark-mode.woocommerce-account
.woocommerce-MyAccount-navigation li:not(.is-active) a:hover,
html[data-theme="dark"]
body.woocommerce-account
.woocommerce-MyAccount-navigation li:not(.is-active) a:hover {
    color: #d8fffa !important;

    background:
        linear-gradient(
            135deg,
            rgba(0, 150, 136, 0.18),
            rgba(255, 255, 255, 0.045)
        );

    border-color: rgba(0, 191, 165, 0.22);
}

body.dark-mode.woocommerce-account
.woocommerce-MyAccount-navigation-link--customer-logout,
html[data-theme="dark"]
body.woocommerce-account
.woocommerce-MyAccount-navigation-link--customer-logout {
    border-top-color: rgba(255, 255, 255, 0.075) !important;
}

body.dark-mode.woocommerce-account
.woocommerce-MyAccount-content,
html[data-theme="dark"]
body.woocommerce-account
.woocommerce-MyAccount-content {
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.072),
            rgba(255, 255, 255, 0.026)
        );

    border-color: rgba(255, 255, 255, 0.09);

    box-shadow:
        0 28px 75px rgba(0, 0, 0, 0.44),
        inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

body.dark-mode.woocommerce-account
.woocommerce-MyAccount-content > p:first-of-type,
html[data-theme="dark"]
body.woocommerce-account
.woocommerce-MyAccount-content > p:first-of-type {
    color: rgba(244, 255, 253, 0.88);

    background:
        linear-gradient(
            135deg,
            rgba(0, 150, 136, 0.20),
            rgba(255, 255, 255, 0.045)
        );

    border-color: rgba(0, 191, 165, 0.20);
}

body.dark-mode.woocommerce-account
.woocommerce-MyAccount-content > p:first-of-type strong,
html[data-theme="dark"]
body.woocommerce-account
.woocommerce-MyAccount-content > p:first-of-type strong {
    color: #78e2d7;
}

body.dark-mode.woocommerce-account
.woocommerce-MyAccount-content > p:nth-of-type(2),
html[data-theme="dark"]
body.woocommerce-account
.woocommerce-MyAccount-content > p:nth-of-type(2) {
    color: rgba(235, 250, 248, 0.69);

    background: rgba(255, 255, 255, 0.033);
    border-color: rgba(255, 255, 255, 0.065);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.035);
}


/* ---------------------------------------------------------
   10. Tablet layout
--------------------------------------------------------- */

@media (max-width: 980px) {
    body.woocommerce-account .woocommerce {
        grid-template-columns: 220px minmax(0, 1fr);
        gap: 20px;
    }

    body.woocommerce-account
    .woocommerce-MyAccount-navigation {
        padding: 12px;
    }

    body.woocommerce-account
    .woocommerce-MyAccount-navigation a {
        min-height: 49px;
        padding-right: 14px;
        padding-left: 43px;
        font-size: 13px;
    }

    body.woocommerce-account
    .woocommerce-MyAccount-content {
        padding: 24px;
    }
}


/* ---------------------------------------------------------
   11. Mobile account navigation
--------------------------------------------------------- */

@media (max-width: 767px) {
    body.woocommerce-account main.container {
        width: min(100% - 24px, 1240px);
    }

    body.woocommerce-account .single-title {
        margin-bottom: 22px;
        font-size: 1.85rem;
    }

    body.woocommerce-account .woocommerce {
        display: flex;
        flex-direction: column;
        gap: 18px;
    }

    body.woocommerce-account
    .woocommerce-MyAccount-navigation {
        position: relative;
        top: auto;

        width: 100%;
        padding: 10px;

        border-radius: 20px;
        overflow: hidden;

        max-width: 100%;

    }

    body.woocommerce-account
    .woocommerce-MyAccount-navigation ul {
        display: flex;
        flex-direction: row;
        gap: 8px;

        width: 100%;

        padding: 2px 2px 8px !important;

        overflow-x: auto;
        overflow-y: hidden;

        scrollbar-width: none;
        scroll-snap-type: x proximity;
    }

    body.woocommerce-account
    .woocommerce-MyAccount-navigation ul::-webkit-scrollbar {
        display: none;
    }

    body.woocommerce-account
    .woocommerce-MyAccount-navigation li {
        flex: 0 0 auto;
        width: auto;
        scroll-snap-align: start;
    }

    body.woocommerce-account
    .woocommerce-MyAccount-navigation a {
        min-width: max-content;
        min-height: 44px;

        padding: 0 13px 0 42px;

        border-radius: 13px;
        font-size: 12px;
    }

    body.woocommerce-account
    .woocommerce-MyAccount-navigation a::before {
        left: 9px;

        width: 26px;
        height: 26px;

        border-radius: 8px;
        font-size: 12px;
    }

    body.woocommerce-account
    .woocommerce-MyAccount-navigation
    li:not(.is-active) a:hover {
        transform: none;
    }

    body.woocommerce-account
    .woocommerce-MyAccount-navigation-link--customer-logout {
        margin-top: 0 !important;
        padding-top: 0 !important;
        border-top: 0 !important;
    }

    body.woocommerce-account
    .woocommerce-MyAccount-content {
        padding: 20px;
        border-radius: 21px;
    }

    body.woocommerce-account
    .woocommerce-MyAccount-content > p:first-of-type {
        padding: 66px 18px 18px;
        font-size: 14px;
    }

    body.woocommerce-account
    .woocommerce-MyAccount-content > p:first-of-type::before {
        top: 17px;
        right: 18px;

        width: 34px;
        height: 34px;

        transform: none;
    }

    body.woocommerce-account
    .woocommerce-MyAccount-content > p:nth-of-type(2) {
        padding: 19px;
        font-size: 14px;
        line-height: 2;
    }
}


/* ---------------------------------------------------------
   12. Very small screens
--------------------------------------------------------- */

@media (max-width: 420px) {
    body.woocommerce-account
    .woocommerce-MyAccount-content {
        padding: 16px;
    }

    body.woocommerce-account
    .woocommerce-MyAccount-content > p:first-of-type,
    body.woocommerce-account
    .woocommerce-MyAccount-content > p:nth-of-type(2) {
        border-radius: 15px;
    }
}


/* ---------------------------------------------------------
   13. Reduced motion
--------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    body.woocommerce-account
    .woocommerce-MyAccount-navigation a {
        transition: none !important;
    }

    body.woocommerce-account
    .woocommerce-MyAccount-navigation a:hover {
        transform: none !important;
    }
}