/* Keep inherited site-wide styles from hiding the storefront's purchase links. */
body.sw-store {
    --ink: #1D252C;
    --muted: #5C6870;
    --paper: #F7F8FA;
    --white: #FFFFFF;
    --line: #DDE5E7;
    --primary: #006D77;
    --primary-hover: #00545C;
    --accent: #C44724;
    --mist: #E8F0F0;
    --display: SwAnton, Impact, 'Arial Narrow', Arial, sans-serif;
    --body: Arial, Helvetica, sans-serif;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--body);
}

/* Keep WooCommerce's clearfix pseudo-elements and notices outside the account grid. */
body.sw-store.woocommerce-account .page-content > .woocommerce:has(.sw-account-layout) {
    display: block;
}
body.sw-store.woocommerce-account .page-content > .woocommerce:has(.sw-account-layout)::before,
body.sw-store.woocommerce-account .page-content > .woocommerce:has(.sw-account-layout)::after {
    display: none;
    content: none;
}
body.sw-store.woocommerce-account .sw-account-layout {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 40px;
    align-items: start;
    min-width: 0;
    width: 100%;
}
body.sw-store.woocommerce-account .sw-account-layout > .woocommerce-MyAccount-navigation,
body.sw-store.woocommerce-account .sw-account-layout > .woocommerce-MyAccount-content {
    float: none !important;
    clear: none;
    width: 100% !important;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    grid-row: 1;
}
body.sw-store.woocommerce-account .sw-account-layout > .woocommerce-MyAccount-navigation {
    grid-column: 1;
}
body.sw-store.woocommerce-account .sw-account-layout > .woocommerce-MyAccount-content {
    grid-column: 2;
}
@media (max-width: 700px) {
    body.sw-store.woocommerce-account .sw-account-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 25px;
    }
    body.sw-store.woocommerce-account .sw-account-layout > .woocommerce-MyAccount-content {
        grid-column: 1;
        grid-row: 2;
    }
}

/* Native commerce forms retain usable fields even without plugin base CSS. */
body.sw-store .page-content .woocommerce form .form-row label {
    display: block;
}
body.sw-store .page-content .woocommerce form .form-row input.input-text,
body.sw-store .page-content .woocommerce form .form-row textarea,
body.sw-store .page-content .woocommerce form .form-row select {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 12px;
    background-color: #FFFFFF;
    color: #1D252C;
    border: 1px solid #DDE5E7;
    border-radius: 0;
    font: 400 16px/1.5 Arial, Helvetica, sans-serif;
}
body.sw-store .page-content .woocommerce form .form-row .woocommerce-input-wrapper {
    display: block;
}
body.sw-store .page-content .woocommerce form .form-row label.checkbox,
body.sw-store .page-content .woocommerce form .form-row label.woocommerce-form__label-for-checkbox {
    display: inline;
}

/* Use readable notice symbols without depending on WooCommerce's icon font. */
body.sw-store .woocommerce-info::before,
body.sw-store .woocommerce-message::before,
body.sw-store .woocommerce-error::before {
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 700;
}
body.sw-store .woocommerce-info::before { content: 'i'; }
body.sw-store .woocommerce-message::before { content: '\2713'; }
body.sw-store .woocommerce-error::before { content: '!'; }

/* Supplier specification tables must fit the product page on narrow screens. */
body.sw-store .woocommerce-tabs .panel,
body.sw-store .product-full-specifications {
    min-width: 0;
    max-width: 100%;
}
body.sw-store .woocommerce-tabs .panel table,
body.sw-store .product-full-specifications table {
    width: 100% !important;
    max-width: 100%;
    table-layout: fixed;
}
body.sw-store .woocommerce-tabs .panel td,
body.sw-store .woocommerce-tabs .panel th,
body.sw-store .product-full-specifications td,
body.sw-store .product-full-specifications th {
    width: auto;
    overflow-wrap: anywhere;
    white-space: normal;
}

body.sw-store .woocommerce ul.products li.product > .sw-product-purchase {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    inset: auto !important;
    transform: none !important;
    grid-row: 6;
    grid-column: 1;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    width: 100%;
    min-height: 42px;
    height: auto;
    margin: 12px 0 0;
    padding: 12px 16px;
    border: 1px solid #006D77 !important;
    border-radius: 0 !important;
    background: #006D77 !important;
    color: #FFFFFF !important;
    font: 700 13px/1.3 Arial, Helvetica, sans-serif !important;
    text-align: center;
    text-decoration: none !important;
    box-shadow: none !important;
    clip: auto !important;
    clip-path: none !important;
    overflow: visible;
    pointer-events: auto !important;
}

body.sw-store .woocommerce ul.products li.product > .sw-product-purchase:hover {
    background: #00545C !important;
    border-color: #00545C !important;
}

body.sw-store .woocommerce ul.products li.product > .sw-product-purchase:focus-visible {
    outline: 3px solid #006D77 !important;
    outline-offset: 4px;
}
