


/**
 * @file account.css
 * @description Styles for WooCommerce My Account pages.
 *
 * @package     dmc-bridge-child
 * @author      CodeGeek
 * @since       1.0.0
 */

/*
 * Edit Address page (/my-account/edit-address/)
 * Resets default spacing on the address form heading and the saved address
 * block, and suppresses the extra blank lines WooCommerce renders between
 * certain address fields as consecutive <br> elements.
 */
.page.woocommerce-edit-address {

    .woocommerce-MyAccount-content {
        h2 {
            margin-top: 0;
        }
        & > *:first-child {
            margin-top: 0;
        }
        & > *:last-child {
            margin-bottom: 0;
        }
    }

    .woocommerce-Address-title {
        padding: 0 !important;

        h3 {
            margin-top: 0;
        }
    }

    address {
        margin-top: 1rem;

        /* Hide the 2nd and 4th <br> elements inside the address block. */
        br:nth-of-type(2),
        br:nth-of-type(4) {
            display: none;
        }
    }
}

/*
 * View Order page (/my-account/view-order/<id>/)
 * Removes the bottom margin from the order details table and prevents
 * numeric/date cells from wrapping onto multiple lines.
 */
.page.woocommerce-view-order {
    .woocommerce-table--order-details {
        margin-bottom: 0;

        td:not(.woocommerce-table__product-name) {
            white-space: nowrap;
        }
    }
}

/*
 * Payment Methods page (/my-account/payment-methods/)
 * Removes the default top/bottom margin from the info notice shown when
 * no saved payment methods are on file.
 */
.page.woocommerce-payment-methods {
    .woocommerce-info {
        margin: 0;
    }
}
