/* The classic WooCommerce forms own their layout, validation and order submission. */
body:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account, .page-id-775) {
    --pc-order-ink: #1d2b30;
    --pc-order-accent: #233c40;
    --pc-order-quiet: #49565a;
    --pc-order-rule: #c9ceca;
    --pc-order-paper: #faf9f5;
    --pc-order-fault: #922f28;
    --pc-order-focus: #97511e;
}

body:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account, .page-id-775) #main .container_wrap_first {
    color: var(--pc-order-ink);
    background-color: var(--pc-order-paper);
}

body:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account, .page-id-775) #main .woocommerce,
body.page-id-775 #main .entry-content-wrapper {
    color: var(--pc-order-ink);
    font: 400 1rem/1.55 Roboto, Arial, sans-serif;
    overflow-wrap: break-word;
}

body:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account, .page-id-775) #main :is(.woocommerce, .entry-content-wrapper) :is(h1, h2, h3, legend) {
    color: var(--pc-order-ink);
    font-family: "Open Sans", Arial, sans-serif;
    letter-spacing: -0.025em;
    line-height: 1.18;
    text-transform: none;
    overflow-wrap: anywhere;
}

body:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) #main .woocommerce :is(h2, h3) {
    margin-block: 1.1em 0.55em;
}

/* Field and validation colours stay distinct, including after browser autofill. */
body:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) #main .woocommerce :is(.form-row, .woocommerce-form-row) label {
    color: var(--pc-order-ink);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
}

body:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) #main .woocommerce :is(input.input-text, select, textarea),
body:is(.woocommerce-checkout, .page-id-775) #main :is([name^="sd["], [name="nameofpersontemp"], [name="nameofperson"]) {
    box-sizing: border-box;
    max-width: 100%;
    min-height: 44px;
    padding: 0.6em 0.75em;
    border: 1px solid #85908e;
    border-radius: 3px;
    background-color: #fff;
    color: var(--pc-order-ink);
    box-shadow: none;
    font: inherit;
    line-height: 1.35;
}

body:is(.woocommerce-checkout, .woocommerce-account) #main .woocommerce textarea {
    min-height: 6rem;
}

body:is(.woocommerce-checkout, .woocommerce-account) #main .woocommerce .select2-selection--single {
    min-height: 44px;
    height: auto;
    padding: 6px 4px;
    border: 1px solid #85908e;
    border-radius: 3px;
    background-color: #fff;
}

body:is(.woocommerce-checkout, .woocommerce-account) #main .woocommerce .select2-selection__arrow {
    top: 50%;
    transform: translateY(-50%);
}

body:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) #main .woocommerce .form-row.woocommerce-invalid :is(.input-text, select, .select2-selection),
body:is(.woocommerce-checkout, .page-id-775) #main [aria-invalid="true"] {
    border-color: var(--pc-order-fault);
    box-shadow: inset 3px 0 var(--pc-order-fault);
}

body:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account, .page-id-775) #main :is(a, button, input, textarea, select, [tabindex], summary):focus-visible {
    outline: 3px solid var(--pc-order-focus) !important;
    outline-offset: 3px;
}

/* Cart, final order review and order history share the same figures and rules. */
body:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) #main .woocommerce table.shop_table {
    width: 100%;
    max-width: 100%;
    margin-block: 0.75rem 1.5rem;
    border: 1px solid var(--pc-order-rule);
    border-spacing: 0;
    background-color: #fff;
    color: var(--pc-order-ink);
    font-size: 0.98rem;
}

body:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) #main .woocommerce table.shop_table :is(td, th) {
    padding: clamp(0.6rem, 1.3vw, 1.05rem);
    border-color: var(--pc-order-rule);
    vertical-align: middle;
    line-height: 1.48;
    letter-spacing: normal;
    text-transform: none;
}

body:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) #main .woocommerce table.shop_table thead th {
    background-color: #eaece7;
    color: var(--pc-order-ink);
    font-weight: 600;
}

body:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) #main .woocommerce :is(.product-name, .woocommerce-table__product-name) {
    overflow-wrap: anywhere;
}

body:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) #main .woocommerce .amount {
    color: inherit;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

body:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) #main .woocommerce .order-total :is(td, th) {
    border-top: 2px solid var(--pc-order-ink);
    background-color: #eef0eb;
    color: var(--pc-order-ink);
    font-weight: 700;
}

body.woocommerce-cart #main .woocommerce .product-thumbnail img {
    width: 72px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

body:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) #main .woocommerce :is(.woocommerce-info, .woocommerce-message, .woocommerce-error) {
    padding: 1em 1em 1em 3em;
    border: 1px solid var(--pc-order-rule);
    border-inline-start: 4px solid var(--pc-order-accent);
    background-color: #f1f4ef;
    color: var(--pc-order-ink);
}

body:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) #main .woocommerce .woocommerce-error {
    background-color: #fff4f1;
    border-color: var(--pc-order-fault);
    color: #672b26;
}

body:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) #main .woocommerce :is(.checkout-button, #place_order, .woocommerce-Button, .woocommerce-form-login__submit, .woocommerce-form-register__submit, .return-to-shop .button),
body.page-id-775 #main .entry-content-wrapper form :is(button[type="submit"], input[type="submit"]) {
    box-sizing: border-box;
    min-height: 46px;
    padding: 0.75rem 1.25rem;
    border: 1px solid var(--pc-order-accent);
    border-radius: 3px;
    background: var(--pc-order-accent);
    color: #fff;
    font: 600 1rem/1.35 Roboto, Arial, sans-serif;
    letter-spacing: normal;
    text-align: center;
    text-decoration: none;
    text-transform: none;
    white-space: normal;
}

body:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) #main .woocommerce :is(.checkout-button, #place_order, .woocommerce-Button, .woocommerce-form-login__submit, .woocommerce-form-register__submit, .return-to-shop .button):hover {
    background: #162b2e;
    color: #fff;
}

body:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) #main .woocommerce :is(.button:disabled, button:disabled, .button[aria-disabled="true"]) {
    opacity: 0.64;
    cursor: not-allowed;
}

body.woocommerce-checkout #main .woocommerce #payment {
    border: 1px solid var(--pc-order-rule);
    border-radius: 4px;
    background-color: #fff;
    color: var(--pc-order-ink);
}

body.woocommerce-checkout #main .woocommerce #payment :is(.payment_box, .woocommerce-privacy-policy-text, .form-row.terms) {
    font-size: 0.96rem;
    line-height: 1.55;
}

body.woocommerce-checkout #main .woocommerce #payment .payment_box {
    background: #eef0eb;
    color: var(--pc-order-ink);
}

body.woocommerce-checkout #main .woocommerce #payment .payment_box::before {
    border-bottom-color: #eef0eb;
}

body:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) #main .woocommerce :is(.woocommerce-privacy-policy-text, .woocommerce-terms-and-conditions-wrapper, .woocommerce-form__label-for-checkbox, .woocommerce-info, .woocommerce-error) a {
    color: var(--pc-order-accent);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

body.woocommerce-account #main .woocommerce-MyAccount-navigation ul {
    padding: 0;
    list-style: none;
}

body.woocommerce-account #main .woocommerce-MyAccount-navigation li {
    margin: 0;
    border-bottom: 1px solid var(--pc-order-rule);
}

body.woocommerce-account #main .woocommerce-MyAccount-navigation a {
    display: block;
    padding: 0.7rem 0.85rem;
    color: var(--pc-order-ink);
}

body.woocommerce-account #main .woocommerce-MyAccount-navigation :is(.is-active a, a[aria-current="page"]) {
    border-inline-start: 3px solid var(--pc-order-accent);
    background-color: #eaece7;
    font-weight: 700;
}

@media (max-width: 767px) {
    html:has(body:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account, .page-id-775)),
    body:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account, .page-id-775) {
        min-width: 0 !important;
        width: 100% !important;
    }

    body:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account, .page-id-775) #main :is(.container, .content, form, .woocommerce) {
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    body:is(.woocommerce-checkout, .woocommerce-account) #main .woocommerce :is(.form-row-first, .form-row-last) {
        float: none;
        width: 100%;
        margin-inline: 0;
    }

    body:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) #main .woocommerce :is(.col2-set .col-1, .col2-set .col-2, .cart_totals, .woocommerce-MyAccount-navigation, .woocommerce-MyAccount-content) {
        box-sizing: border-box;
        float: none;
        width: 100%;
        max-width: 100%;
        margin-inline: 0;
    }

    body:is(.woocommerce-checkout, .woocommerce-account) #main .woocommerce :is(input.input-text, select, textarea),
    body:is(.woocommerce-checkout, .page-id-775) #main :is([name^="sd["], [name="nameofpersontemp"], [name="nameofperson"]) {
        font-size: 16px;
    }

    body.woocommerce-cart #main .woocommerce table.cart td.actions .coupon {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.5rem;
        width: 100%;
    }

    body.woocommerce-cart #main .woocommerce table.cart td.actions .coupon :is(.input-text, .button) {
        flex: 1 1 10rem;
        min-width: 0;
        min-height: 44px;
        width: auto;
        max-width: 100%;
        margin: 0;
    }

    body:is(.woocommerce-cart, .woocommerce-checkout) #main .woocommerce :is(.checkout-button, #place_order) {
        display: block;
        width: 100%;
        max-width: 100%;
    }
}
