.md-store-account {
    --md-account-gap: clamp(12px, 2.5vw, 24px);
    --md-account-panel: clamp(16px, 3vw, 28px);
    overflow-wrap: anywhere;
}

.md-store-account .md-store-intro h1 {
    font-size: clamp(2.35rem, 6vw, 4.65rem);
}

.md-store-account .woocommerce {
    --wc-form-color-background: var(--md-subtle);
    --wc-form-color-text: var(--md-ink);
    --wc-form-border-color: var(--md-rule);
    --wc-form-border-radius: 12px;
    color: var(--md-ink);
    line-height: 1.55;
}

.md-store-account .woocommerce:has(> .woocommerce-MyAccount-content) {
    display: grid;
    grid-template-columns: minmax(180px, .32fr) minmax(0, 1fr);
    align-items: start;
    gap: var(--md-account-gap);
}

.md-store-account .woocommerce:has(> .woocommerce-MyAccount-content)::before,
.md-store-account .woocommerce:has(> .woocommerce-MyAccount-content)::after,
.md-store-account .col2-set::before,
.md-store-account .col2-set::after {
    display: none;
}

.md-store-account .woocommerce > .woocommerce-notices-wrapper {
    grid-column: 1 / -1;
}

.md-store-account .woocommerce-notices-wrapper:empty {
    display: none;
}

.md-store-account .woocommerce :is(.woocommerce-MyAccount-content, .woocommerce-MyAccount-navigation),
.md-store-account .woocommerce:not(:has(> .woocommerce-MyAccount-content, > #customer_login)),
.md-store-account #customer_login > :is(.col-1, .col-2) {
    box-sizing: border-box;
    width: auto;
    min-width: 0;
    float: none;
    padding: var(--md-account-panel);
    border: 1px solid rgba(255, 255, 255, .34);
    border-radius: var(--md-panel-radius);
    background: linear-gradient(180deg, rgba(255, 255, 255, .58), rgba(255, 255, 255, .32));
    -webkit-backdrop-filter: blur(var(--md-glass-blur, 40px)) saturate(175%) brightness(1.35);
    backdrop-filter: blur(var(--md-glass-blur, 40px)) saturate(175%) brightness(1.35);
    box-shadow: none;
}

[data-md-theme="dark"] .md-store-account .woocommerce :is(.woocommerce-MyAccount-content, .woocommerce-MyAccount-navigation),
[data-md-theme="dark"] .md-store-account .woocommerce:not(:has(> .woocommerce-MyAccount-content, > #customer_login)),
[data-md-theme="dark"] .md-store-account #customer_login > :is(.col-1, .col-2) {
    border-color: rgba(255, 255, 255, .10);
    background: linear-gradient(180deg, rgba(25, 27, 32, .74), rgba(25, 27, 32, .52));
    -webkit-backdrop-filter: blur(var(--md-glass-blur, 40px)) saturate(140%);
    backdrop-filter: blur(var(--md-glass-blur, 40px)) saturate(140%);
}

.md-store-account .woocommerce .woocommerce-MyAccount-navigation {
    padding: 8px;
}

.md-store-account .woocommerce-MyAccount-navigation ul {
    list-style: none;
    display: grid;
    gap: 3px;
    padding: 0;
    margin: 0;
}

.md-store-account .woocommerce-MyAccount-navigation a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 6px 12px;
    border: 1px solid transparent;
    border-radius: 12px;
    box-sizing: border-box;
    color: var(--md-secondary);
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.25;
    text-decoration: none;
}

.md-store-account .woocommerce-MyAccount-navigation a:hover,
.md-store-account .woocommerce-MyAccount-navigation [aria-current] {
    background: var(--md-subtle);
    color: var(--md-link);
}

.md-store-account .woocommerce-MyAccount-navigation [aria-current] {
    border-color: var(--md-rule);
}

.md-store-account .woocommerce-MyAccount-content > :first-child,
.md-store-account .woocommerce > :first-child,
.md-store-account #customer_login h2:first-child {
    margin-top: 0;
}

.md-store-account :is(.woocommerce-MyAccount-content, .woocommerce, form) > :last-child {
    margin-bottom: 0;
}

.md-store-account :is(h2, h3, legend) {
    color: var(--md-ink);
    font-size: clamp(1.08rem, 2.4vw, 1.45rem);
    font-weight: 680;
    letter-spacing: -.025em;
    line-height: 1.2;
}

.md-store-account .woocommerce p {
    color: var(--md-secondary);
}

.md-store-account .woocommerce > .col2-set,
.md-store-account .woocommerce :is(.woocommerce-Addresses, .woocommerce-columns--addresses) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--md-account-gap);
}

.md-store-account .woocommerce :is(.col-1, .col-2) {
    width: auto;
    min-width: 0;
    float: none;
}

.md-store-account .woocommerce form:is(.login, .register, .lost_reset_password),
.md-store-account .woocommerce form .form-row {
    margin: 0;
    padding: 0;
    border: 0;
}

.md-store-account .woocommerce form .form-row {
    margin-bottom: 14px;
}

.md-store-account .woocommerce form :is(.form-row-first, .form-row-last) {
    width: calc(50% - 7px);
}

.md-store-account .woocommerce form .form-row label {
    display: block;
    margin-bottom: 5px;
    color: var(--md-ink);
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.4;
}

.md-store-account .woocommerce :is(.input-text, select, .select2-selection--single) {
    box-sizing: border-box;
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid var(--md-rule);
    border-radius: 12px;
    background: var(--md-subtle);
    color: var(--md-ink);
    box-shadow: none;
    font: inherit;
    font-size: 1rem;
}

.md-store-account .woocommerce :is(.password-input input, input[type="password"]) {
    padding-inline-end: 48px;
}

.md-store-account .woocommerce .show-password-input {
    color: var(--md-muted);
    background-color: transparent;
}

.md-store-account .woocommerce .show-password-input::after {
    background-color: currentColor;
}

.md-store-account .select2-selection--single .select2-selection__rendered {
    padding: 0 22px 0 0;
    color: inherit;
    line-height: 24px;
}

.md-store-account .select2-selection--single .select2-selection__arrow {
    height: 44px;
    right: 8px;
}

.woocommerce-account > .select2-container .select2-dropdown,
.woocommerce-account > .select2-container .select2-search__field {
    border-color: var(--md-rule);
    background: var(--md-card);
    color: var(--md-ink);
}

.woocommerce-account > .select2-container .select2-results__option[aria-selected="true"] {
    background: var(--md-subtle);
}

.woocommerce-account > .select2-container .select2-results__option--highlighted[aria-selected] {
    background: var(--md-link);
    color: var(--md-surface);
}

.md-store-account :is(fieldset, .woocommerce-Address, .woocommerce-column--billing-address, .woocommerce-column--shipping-address) {
    box-sizing: border-box;
    min-width: 0;
    margin: 0 0 14px;
    padding: 16px;
    border: 1px solid var(--md-rule);
    border-radius: 14px;
    background: var(--md-subtle);
}

.md-store-account fieldset legend { padding-inline: 5px; }

.md-store-account .woocommerce-Address .title :is(h2, a) {
    float: none;
    margin: 0;
}

.md-store-account .woocommerce-Address .title a {
    display: inline-block;
    margin-block: 6px;
}

.md-store-account .woocommerce address {
    border: 0;
    padding: 0;
    color: var(--md-secondary);
    font-style: normal;
}

.md-store-account #add_payment_method #payment {
    background: var(--md-subtle);
    border: 1px solid var(--md-rule);
    border-radius: 14px;
}

.md-store-account #add_payment_method #payment .payment_methods {
    border-color: var(--md-rule);
}

.md-store-account #add_payment_method #payment .payment_box {
    background: var(--md-card);
    color: var(--md-ink);
    border-radius: 12px;
}

.md-store-account #add_payment_method #payment .payment_box::before { display: none; }
.md-store-account #add_payment_method #payment > .form-row { margin: 0; }

.md-store-account .woocommerce .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    max-width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 8px 16px;
    border: 1px solid var(--md-rule);
    border-radius: 999px;
    background: var(--md-subtle);
    color: var(--md-ink);
    box-shadow: none;
    font: inherit;
    font-size: .875rem;
    font-weight: 650;
    line-height: 1.25;
    text-align: center;
    white-space: normal;
}

.md-store-account .woocommerce .button:hover {
    border-color: var(--md-link);
    text-decoration: none;
}

.md-store-account .woocommerce button.button,
.md-store-account .woocommerce a.button:is(.woocommerce-MyAccount-downloads-file, .pay),
.md-store-account #add_payment_method #place_order {
    min-height: 46px;
    border-color: transparent;
    background: var(--md-accent, #0071e3);
    color: #fff !important;
}

.md-store-account .woocommerce button.button:hover,
.md-store-account .woocommerce a.button:is(.woocommerce-MyAccount-downloads-file, .pay):hover {
    filter: brightness(.92);
}

.md-store-account #add_payment_method #place_order { float: none; }

.md-store-account .woocommerce :is(.woocommerce-message, .woocommerce-info, .woocommerce-error) {
    display: block;
    box-sizing: border-box;
    padding: 12px 14px;
    margin: 0 0 14px;
    border-width: 1px;
    border-style: solid;
    border-radius: 14px;
    box-shadow: none;
    font-size: .875rem;
    line-height: 1.5;
}

.md-store-account .woocommerce :is(.woocommerce-message, .woocommerce-info, .woocommerce-error)::before {
    display: none;
}

.md-store-account .woocommerce :is(.woocommerce-message, .woocommerce-info, .woocommerce-error) .button {
    margin-inline-start: 10px;
}

.md-store-account .woocommerce table.shop_table {
    display: table;
    table-layout: auto;
    width: 100%;
    margin: 0 0 14px;
    border: 1px solid var(--md-rule);
    border-radius: 14px;
    border-spacing: 0;
    color: var(--md-ink);
    font-size: .875rem;
}

.md-store-account .woocommerce table.shop_table :is(th, td) {
    padding: 10px;
    border-color: var(--md-rule);
    vertical-align: middle;
}

.md-store-account .woocommerce table.shop_table thead th,
.md-store-account .woocommerce table.shop_table tbody tr:nth-child(even) > :is(th, td),
.md-store-account .woocommerce table.shop_table tfoot th {
    background-color: var(--md-subtle);
    color: var(--md-ink);
}

.md-store-account .woocommerce table.shop_table .button { margin: 2px; }

.md-store-account .woocommerce .woocommerce-orders-table__cell-order-number a {
    white-space: nowrap;
}

.md-store-account .woocommerce mark:is(.order-number, .order-date, .order-status) {
    border-radius: 4px;
    background: var(--md-subtle);
    color: var(--md-ink);
}

@media (min-width: 801px) {
    .md-store-account .woocommerce:not(:has(> .woocommerce-MyAccount-content, > #customer_login)) {
        width: min(100%, 500px);
        margin-inline: auto;
    }
    .md-store-account .woocommerce:has(> #customer_login) {
        width: min(100%, 860px);
        margin-inline: auto;
    }
}

@media (max-width: 800px) {
    .md-store-account .woocommerce:has(> .woocommerce-MyAccount-content) {
        grid-template-columns: minmax(0, 1fr);
    }
    .md-store-account .woocommerce-MyAccount-navigation ul {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 100px), 1fr));
    }
    .md-store-account .woocommerce-MyAccount-navigation a {
        justify-content: center;
        padding-inline: 6px;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .md-store-account .woocommerce:has(> .woocommerce-MyAccount-content),
    .md-store-account .woocommerce :is(.col2-set, .woocommerce-Addresses, .woocommerce-columns--addresses) {
        gap: 10px;
    }
    .md-store-account .woocommerce table.shop_table_responsive {
        display: block;
        border: 0;
    }
    .md-store-account .woocommerce table.shop_table_responsive tr {
        margin-bottom: 8px;
        border: 1px solid var(--md-rule);
        border-radius: 12px;
        background: var(--md-subtle);
        overflow: clip;
    }
    .md-store-account .woocommerce table.shop_table_responsive tbody tr > :is(th[scope="row"], td) {
        display: flow-root;
        box-sizing: border-box;
        border-top: 1px solid var(--md-rule);
        background: transparent;
    }
    .md-store-account .woocommerce table.shop_table_responsive tbody th[scope="row"] { text-align: end; }
    .md-store-account .woocommerce table.shop_table_responsive tbody th[scope="row"][data-title]::before {
        content: attr(data-title) ":";
        float: left;
        margin-inline-end: 10px;
    }
    .md-store-account .woocommerce table.shop_table_responsive tbody tr > :first-child { border-top: 0; }
    .md-store-account .woocommerce table.shop_table_responsive tr td::before { margin-inline-end: 10px; }
    .md-store-account .woocommerce table.shop_table_responsive tr td .button { margin-inline-end: 0; }
}

@media (max-width: 560px) {
    .md-store-account .woocommerce > .col2-set,
    .md-store-account .woocommerce :is(.woocommerce-Addresses, .woocommerce-columns--addresses) {
        grid-template-columns: minmax(0, 1fr);
    }
    .md-store-account .woocommerce form :is(.form-row-first, .form-row-last) {
        float: none;
        width: 100%;
    }
    .md-store-account .woocommerce :is(.woocommerce-message, .woocommerce-info, .woocommerce-error) .button {
        display: flex;
        float: none;
        width: fit-content;
        margin: 0 0 8px;
    }
    .md-store-account .woocommerce form button.button:not(.show-password-input) { width: 100%; }
}
