/* ============================================
    LF — WOOCOMMERCE ADDITIONS
    WooCommerce's own stylesheets are switched off on Cart and Checkout
    (inc/woocommerce.php), so everything WooCommerce prints there that the
    design does not draw is styled here: notices, field rows, validation,
    payment methods, terms, the order-received screen. Tokens only.
============================================ */

/* ---- Notices -------------------------------------------------------- */
.woocommerce-notices-wrapper:empty {
    display: none;
}

.lf-theme .woocommerce-message,
.lf-theme .woocommerce-info,
.lf-theme .woocommerce-error {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    margin: 0 0 1.25rem;
    padding: 0.875rem 1.125rem;
    border-radius: var(--lf-radius);
    background-color: var(--lf-surface);
    color: var(--lf-ink);
    font-size: var(--lf-fs-sm);
    list-style: none;
}

/* The design's "Coupon code applied successfully." line */
.lf-theme .woocommerce-message {
    color: var(--lf-green);
}

.lf-theme .woocommerce-message::before {
    content: "\F26B"; /* bi-check-circle-fill */
    font-family: "bootstrap-icons";
}

.lf-theme .woocommerce-error {
    display: block;
    color: var(--lf-red);
}

.lf-theme .woocommerce-error li + li {
    margin-top: 0.25rem;
}

.lf-theme .woocommerce-message .button,
.lf-theme .woocommerce-info .button,
.lf-theme .woocommerce-info a,
.lf-theme .woocommerce-message a {
    margin-left: auto;
    color: var(--lf-purple);
    font-weight: 700;
    text-decoration: underline;
}

/* ---- Cart: remove control on a line item ----------------------------- */
.lf-totals-item-remove .remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: var(--lf-radius-pill);
    color: var(--lf-grey-muted);
    font-size: 0.75rem;
}

.lf-totals-item-remove .remove:hover,
.lf-totals-item-remove .remove:focus-visible {
    background-color: var(--lf-bg);
    color: var(--lf-red);
}

.lf-totals-item-title a:hover {
    color: var(--lf-purple);
}

.lf-totals-item-title .variation,
.lf-totals-item-title dl {
    margin: 0.25rem 0 0;
    color: var(--lf-grey-muted);
    font-size: var(--lf-fs-xs);
}

/* Coupon row: "[Remove]" link next to the discount */
.woocommerce-remove-coupon {
    margin-left: 0.25rem;
    color: var(--lf-grey-muted);
    font-size: var(--lf-fs-xs);
    font-weight: 400;
}

.lf-cart-coupon .coupon-error-notice {
    flex-basis: 100%;
    margin: 0;
    color: var(--lf-red);
    font-size: var(--lf-fs-sm);
}

.lf-cart-express-buttons > * + * {
    margin-top: 0.75rem;
}

/* Shipping rows, only when a physical product is in the cart */
.lf-totals-shipping {
    width: 100%;
    margin-bottom: 0.75rem;
    color: var(--lf-grey);
    font-size: var(--lf-fs-sm);
}

.lf-totals-shipping th {
    padding-right: 1rem;
    font-weight: 400;
    vertical-align: top;
}

.lf-totals-shipping td {
    text-align: right;
}

.lf-totals-shipping ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* ---- Checkout: field rows -------------------------------------------- */
.lf-chk-fields {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .lf-chk-fields {
        grid-template-columns: 1fr 1fr;
    }

    .lf-chk-fields > .form-row-wide,
    .lf-chk-fields > .form-row:not(.form-row-first):not(.form-row-last) {
        grid-column: 1 / -1;
    }
}

.lf-theme .woocommerce form .form-row,
.lf-chk-fields .form-row {
    margin: 0;
}

.lf-chk-fields .woocommerce-input-wrapper {
    display: block;
}

.lf-theme .woocommerce form .required,
.lf-chk-fields .required {
    border: 0;
    color: var(--lf-red);
    text-decoration: none;
}

.lf-chk-fields .optional {
    color: var(--lf-grey-muted);
    font-weight: 400;
}

.lf-chk-fields select.lf-field {
    appearance: auto;
}

.lf-theme .woocommerce-invalid .lf-field {
    border-color: var(--lf-red);
}

.lf-theme .woocommerce-validated .lf-field {
    border-color: var(--lf-green);
}

.lf-theme .checkout-inline-error-message {
    margin: 0.375rem 0 0;
    color: var(--lf-red);
    font-size: var(--lf-fs-xs);
}

/* Shipping address block, when something in the cart ships */
.woocommerce-shipping-fields,
.woocommerce-additional-fields {
    margin-bottom: 2.5rem;
}

#ship-to-different-address {
    margin-bottom: 1rem;
    color: var(--lf-ink);
    font-size: 1.25rem;
}

/* Coupon toggle + form on Checkout */
.checkout_coupon {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.checkout_coupon .form-row-first {
    flex: 1 1 14rem;
    margin: 0;
}

.checkout_coupon .form-row-last {
    margin: 0;
}

.checkout_coupon .input-text {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--lf-bg);
    border-radius: var(--lf-radius);
    background-color: var(--lf-surface);
}

.checkout_coupon .button {
    padding: 0.75rem 1.5rem;
    border: 0;
    border-radius: var(--lf-radius-pill);
    background-color: var(--lf-purple);
    color: var(--lf-white);
    font-weight: 700;
}

/* ---- Checkout: payment ---------------------------------------------- */
.lf-theme #payment .wc_payment_methods {
    margin: 0 0 1.5rem;
    padding: 0;
    list-style: none;
}

.lf-theme #payment .wc_payment_method {
    padding: 0.875rem 1rem;
    border: 1px solid var(--lf-bg);
    border-radius: var(--lf-radius);
    background-color: var(--lf-surface);
}

.lf-theme #payment .wc_payment_method + .wc_payment_method {
    margin-top: 0.75rem;
}

.lf-theme #payment .wc_payment_method > input[type="radio"] {
    margin-right: 0.5rem;
    accent-color: var(--lf-purple);
}

.lf-theme #payment .wc_payment_method > label {
    color: var(--lf-ink);
    font-size: var(--lf-fs-sm);
    font-weight: 700;
}

.lf-theme #payment .wc_payment_method > label img {
    max-height: 1.5rem;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.lf-theme #payment .payment_box {
    margin-top: 0.875rem;
    color: var(--lf-grey);
    font-size: var(--lf-fs-sm);
}

.lf-theme #payment .payment_box p:last-child {
    margin-bottom: 0;
}

.lf-theme #payment .payment_box fieldset {
    margin: 0;
    padding: 0;
    border: 0;
}

.lf-theme #payment .place-order {
    margin: 0;
}

/* Terms + privacy, in the design's order and sizes */
.lf-theme .woocommerce-terms-and-conditions-wrapper {
    margin-top: 1.5rem;
}

.lf-theme .woocommerce-privacy-policy-text p {
    margin-top: 0.75rem;
    margin-bottom: 0;
    color: var(--lf-grey);
    font-size: var(--lf-fs-xs);
    line-height: 1.7;
}

.lf-theme .woocommerce-privacy-policy-text a,
.lf-theme .woocommerce-terms-and-conditions-link {
    color: var(--lf-purple);
    text-decoration: underline;
}

.lf-theme .woocommerce-form__label-for-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    color: var(--lf-grey);
    font-size: var(--lf-fs-sm);
}

.lf-theme .woocommerce-form__label-for-checkbox input[type="checkbox"] {
    margin-top: 0.2rem;
    accent-color: var(--lf-purple);
}

.lf-theme .woocommerce-terms-and-conditions {
    max-height: 16rem;
    margin-bottom: 1rem;
    padding: 1rem;
    overflow: auto;
    border-radius: var(--lf-radius);
    background-color: var(--lf-surface);
    font-size: var(--lf-fs-sm);
}

/* ---- Order received / order pay ------------------------------------- */
.lf-theme .woocommerce-order-overview {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    margin: 1.5rem 0;
    padding: 1.5rem;
    border-radius: var(--lf-radius-lg);
    background-color: var(--lf-surface);
    list-style: none;
}

.lf-theme .woocommerce-order-overview li {
    color: var(--lf-grey);
    font-size: var(--lf-fs-xs);
    text-transform: uppercase;
}

.lf-theme .woocommerce-order-overview strong {
    display: block;
    color: var(--lf-ink);
    font-size: var(--lf-fs-sm);
    text-transform: none;
}

.lf-theme .woocommerce-thankyou-order-received {
    color: var(--lf-green);
    font-size: var(--lf-fs-lead);
    font-weight: 700;
}

.lf-theme .woocommerce-order h2 {
    margin-top: 2rem;
    color: var(--lf-ink);
    font-size: 1.25rem;
}

.lf-theme .shop_table {
    width: 100%;
    margin-bottom: 1.5rem;
    border-collapse: collapse;
    font-size: var(--lf-fs-sm);
}

.lf-theme .shop_table th,
.lf-theme .shop_table td {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--lf-bg);
    text-align: left;
    vertical-align: top;
}

.lf-theme .shop_table tfoot th {
    color: var(--lf-grey);
    font-weight: 400;
}

.lf-theme .woocommerce-customer-details address {
    padding: 1.25rem;
    border-radius: var(--lf-radius);
    background-color: var(--lf-surface);
    font-style: normal;
}
