/* Account navigation must fit above every account endpoint. */
.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation {
    display: block;
    float: none;
    width: 100%;
    margin: 0 0 20px;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    position: static;
    margin: 0 !important;
    padding: 0;
    list-style: none;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li {
    display: flex;
    flex: 1 1 150px;
    min-width: 0;
    margin: 0;
    padding: 0;
    background: transparent;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    border: 1px solid #e2ceaa !important;
    background: #fff;
    color: #525252 !important;
    font-size: 16px;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover {
    background: #faf6eb;
    border-color: #9f7743 !important;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a {
    background: #9f7743;
    border-color: #9f7743 !important;
    color: #fff !important;
}

.woocommerce-account .woocommerce-MyAccount-navigation a:focus-visible,
.woocommerce-account .woocommerce-MyAccount-content a:focus-visible {
    outline: 2px solid #9f7743;
    outline-offset: 3px;
}

.woocommerce-account .woocommerce .woocommerce-MyAccount-content {
    box-sizing: border-box;
    float: none;
    clear: both;
    width: 100%;
    min-width: 0;
    padding: 28px;
    border: 1px solid #e2ceaa !important;
    overflow-wrap: anywhere;
}

.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-orders-table {
    width: 100%;
    margin: 0 0 20px;
    border: 0;
    border-collapse: collapse;
    color: #525252;
    font-size: 15px;
    line-height: 1.5;
}

.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-orders-table th,
.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-orders-table td {
    padding: 14px 12px;
    border: 0;
    border-bottom: 1px solid #e2ceaa;
    vertical-align: middle;
    text-align: left !important;
    text-transform: none;
}

.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-orders-table thead th {
    background: #faf6eb;
    color: #9f7743;
    font-weight: 400;
}

.woocommerce-account .woocommerce-MyAccount-content .woocommerce-orders-table .button,
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-pagination .button,
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-info .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    max-width: 100%;
    min-height: 44px;
    margin: 4px 4px 4px 0;
    padding: 10px 16px;
    border: 1px solid #9f7743;
    border-radius: 0;
    background: #9f7743;
    color: #fff !important;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    white-space: normal;
}

.woocommerce-account .woocommerce-MyAccount-content .woocommerce-orders-table .button:hover,
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-pagination .button:hover,
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-info .button:hover {
    background: #795a32;
    border-color: #795a32;
}

.woocommerce-account .woocommerce-MyAccount-content .woocommerce-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
}

@media (max-width: 768px) {
    .woocommerce-account .woocommerce .woocommerce-MyAccount-navigation ul {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .woocommerce-account .woocommerce-MyAccount-navigation ul li a {
        padding: 12px 8px;
        font-size: 14px;
    }

    .woocommerce-account .woocommerce-MyAccount-navigation ul li:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

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

    .woocommerce-account .woocommerce-MyAccount-content table.woocommerce-orders-table,
    .woocommerce-account .woocommerce-MyAccount-content .woocommerce-orders-table tbody {
        display: block;
    }

    /* Retain column headings for assistive technology; cards use data-title labels. */
    .woocommerce-account .woocommerce-MyAccount-content .woocommerce-orders-table thead {
        display: table-header-group;
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }

    .woocommerce-account .woocommerce-MyAccount-content table.woocommerce-orders-table tbody tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-bottom: 16px;
        border: 1px solid #e2ceaa;
        background: #fff;
    }

    .woocommerce-account .woocommerce-MyAccount-content table.woocommerce-orders-table tbody tr:last-child {
        margin-bottom: 0;
    }

    .woocommerce-account .woocommerce-MyAccount-content table.woocommerce-orders-table tbody .woocommerce-orders-table__cell {
        display: block;
        min-width: 0;
        width: auto;
        padding: 12px;
        border: 0;
        background: transparent;
        font-size: 14px;
        font-weight: 400;
        text-align: left !important;
    }

    .woocommerce-account .woocommerce-MyAccount-content table.woocommerce-orders-table tbody .woocommerce-orders-table__cell::before {
        content: attr(data-title);
        display: block;
        float: none;
        margin-bottom: 4px;
        color: #9f7743;
        font-size: 13px;
        font-weight: 400;
        line-height: 1.4;
    }

    .woocommerce-account .woocommerce-MyAccount-content table.woocommerce-orders-table tbody .woocommerce-orders-table__cell-order-number {
        grid-column: 1 / -1;
        border-bottom: 1px solid #e2ceaa;
        background: #faf6eb;
        font-size: 16px;
    }

    .woocommerce-account .woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-total,
    .woocommerce-account .woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-actions {
        grid-column: 1 / -1;
    }

    .woocommerce-account .woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-actions .button {
        margin-top: 0;
    }

    .woocommerce-account .woocommerce-MyAccount-content .woocommerce-info .button {
        display: flex;
        float: none;
        width: 100%;
        margin: 12px 0 0;
    }
}
