/* Cart and checkout layout for the Antler order form. */
#order-standard_cart {
    --fh-checkout-card: #fff;
    --fh-checkout-fill: #f2f5f7;
    --fh-checkout-line: #a4b3be;
    --fh-checkout-text: #15232c;
    --fh-checkout-subtle: #495d6b;
    --fh-checkout-selected: #fff7d1;
    --fh-checkout-accent: #735700;
}

[data-background="dark"] #order-standard_cart,
#order-standard_cart[data-background="dark"] {
    --fh-checkout-card: #101921;
    --fh-checkout-fill: #192832;
    --fh-checkout-line: #536977;
    --fh-checkout-text: #f1f5f8;
    --fh-checkout-subtle: #bccbd5;
    --fh-checkout-selected: #28281f;
    --fh-checkout-accent: #ffda3d;
}

#order-standard_cart #orderSummary.fh-cart-summary {
    background: var(--fh-checkout-card) !important;
    border: 1px solid var(--fh-checkout-line) !important;
    border-radius: 14px;
    color: var(--fh-checkout-text) !important;
    padding: 0 !important;
    container-type: inline-size;
    overflow: visible;
}

#order-standard_cart #orderSummary.fh-cart-summary h2 {
    margin: 0;
    padding: 18px 20px;
    border-bottom: 1px solid var(--fh-checkout-line);
    border-radius: 13px 13px 0 0;
    background: var(--fh-checkout-fill) !important;
    color: var(--fh-checkout-text) !important;
    font-size: 18px;
    line-height: 1.35;
}

#order-standard_cart #orderSummary.fh-cart-summary .summary-container {
    padding: clamp(14px, 6cqi, 20px) !important;
    background: transparent !important;
    color: var(--fh-checkout-text) !important;
}

#order-standard_cart #orderSummary.fh-cart-summary :is(
    .subtotal span, .bordered-totals span, .recurring-totals span,
    .total-due-today > span, .product-name, .price
) {
    color: var(--fh-checkout-text) !important;
}

#order-standard_cart #orderSummary.fh-cart-summary .total-due-today {
    margin: 14px 0 0;
    padding: 16px 0 0 !important;
    border-top: 1px solid var(--fh-checkout-line);
    background: transparent !important;
}

#order-standard_cart #orderSummary.fh-cart-summary .total-due-today > .amt {
    font-size: clamp(1.45rem, 9cqi, 2rem);
    line-height: 1.25;
    overflow-wrap: anywhere;
}

#order-standard_cart #orderSummary .fh-cart-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 10px;
    margin-block: 16px 0;
}

#order-standard_cart #orderSummary .fh-cart-actions :is(#continueShopping, #checkout, #btnEmptyCart) {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 0;
    min-height: 46px;
    width: 100%;
    margin: 0 !important;
    padding: 10px 9px !important;
    border: 1px solid transparent;
    border-radius: 9px;
    box-shadow: none !important;
    font-size: max(14px, .92rem) !important;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: normal;
    text-align: center;
    text-transform: none;
    white-space: normal;
    overflow-wrap: normal;
}

#order-standard_cart #orderSummary .fh-cart-actions #continueShopping {
    border-color: var(--fh-checkout-line);
    background: var(--fh-checkout-fill) !important;
    color: var(--fh-checkout-text) !important;
}

#order-standard_cart #orderSummary .fh-cart-actions #continueShopping:only-child {
    grid-column: 1 / -1;
}

#order-standard_cart #orderSummary .fh-cart-actions #checkout {
    background: #ffda21 !important;
    color: #131c23 !important;
}

#order-standard_cart #orderSummary .fh-cart-actions #btnEmptyCart {
    grid-column: 1 / -1;
    justify-self: center;
    width: auto;
    min-height: 44px;
    background: transparent !important;
    color: var(--fh-checkout-subtle) !important;
    text-decoration: underline;
    text-underline-offset: 3px;
}

#order-standard_cart #orderSummary .fh-cart-actions i {
    position: static !important;
    flex: 0 0 auto;
    margin: 0 !important;
    color: inherit !important;
    font-size: .8em;
}

#order-standard_cart #orderSummary .fh-cart-actions :is(#continueShopping, #checkout):hover {
    border-color: var(--fh-checkout-accent);
    filter: brightness(1.07);
}

@container (min-width: 361px) {
    #order-standard_cart #orderSummary .fh-cart-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

#order-standard_cart #frmCheckout #btnCompleteOrder {
    width: 100%;
    min-height: 48px;
    white-space: normal;
}

#order-standard_cart #containerExistingAccountSelect.fh-account-choices {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, max(230px, calc(50% - 5px))), 1fr));
    gap: 10px;
    margin: 0 0 24px !important;
    padding: clamp(10px, 2vw, 18px) !important;
    background: var(--fh-checkout-card) !important;
    border: 1px solid var(--fh-checkout-line) !important;
}

#order-standard_cart #containerExistingAccountSelect.fh-account-choices > div {
    width: 100%;
    max-width: none;
    min-width: 0;
    padding: 0;
}

#order-standard_cart #containerExistingAccountSelect.fh-account-choices > div:nth-child(odd):nth-last-child(2),
#order-standard_cart #containerExistingAccountSelect.fh-account-choices > div:last-child {
    grid-column: 1 / -1;
}

#order-standard_cart #containerExistingAccountSelect .account {
    height: 100%;
    margin: 0;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: transparent !important;
    box-shadow: none !important;
}

#order-standard_cart #paymentGatewaysContainer.fh-payment-section {
    container-type: inline-size;
    padding: clamp(14px, 3vw, 24px) !important;
    background: var(--fh-checkout-card) !important;
    border: 1px solid var(--fh-checkout-line) !important;
}

#order-standard_cart #paymentGatewaysContainer .fh-payment-choices {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

@container (max-width: 370px) {
    #order-standard_cart #paymentGatewaysContainer .fh-payment-choices {
        grid-template-columns: minmax(0, 1fr);
    }
}

#order-standard_cart :is(#paymentGatewaysContainer, #containerExistingAccountSelect) .fh-checkout-choice {
    display: flex !important;
    align-items: center;
    gap: 10px;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 50px;
    height: 100%;
    margin: 0 !important;
    padding: 11px 13px !important;
    border: 1px solid var(--fh-checkout-line) !important;
    border-radius: 9px;
    background: var(--fh-checkout-fill) !important;
    box-shadow: none !important;
    color: var(--fh-checkout-text) !important;
    font-size: .92rem;
    line-height: 1.45;
    white-space: normal;
    cursor: pointer;
}

#order-standard_cart #containerExistingAccountSelect .fh-checkout-choice:has(.address) {
    align-items: flex-start;
}

#order-standard_cart #containerExistingAccountSelect .fh-checkout-choice .address {
    display: block;
    min-width: 0;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: inherit !important;
    overflow-wrap: anywhere;
}

#order-standard_cart #containerExistingAccountSelect .fh-checkout-choice .address .small {
    color: var(--fh-checkout-subtle) !important;
}

#order-standard_cart #containerExistingAccountSelect .fh-checkout-choice .address .label {
    display: inline-block;
    float: none;
    margin-inline-start: 6px;
}

#order-standard_cart .fh-payment-name {
    min-width: 0;
    overflow-wrap: anywhere;
}

#order-standard_cart .fh-payment-name .gateway-icon-cc {
    display: inline-block;
    margin-inline-end: 4px;
}

#order-standard_cart :is(#paymentGatewaysContainer, #containerExistingAccountSelect) .fh-checkout-choice:has(input:checked) {
    border-color: var(--fh-checkout-accent) !important;
    background: var(--fh-checkout-selected) !important;
}

#order-standard_cart .fh-checkout-choice:has(input:disabled) {
    opacity: .70;
    cursor: not-allowed;
}

#order-standard_cart :is(
    .fh-checkout-choice, #applyCreditContainer .radio, #creditCardInputFields .radio-inline,
    #frmCheckout .fh-form-choice
) > :is([class^="iradio_"], [class^="icheckbox_"]) {
    display: block !important;
    position: relative !important;
    inset: auto !important;
    float: none !important;
    transform: none !important;
    flex: 0 0 22px !important;
    width: 22px !important;
    height: 22px !important;
    margin: 0 !important;
    vertical-align: middle;
}

#order-standard_cart :is(
    .fh-checkout-choice, #applyCreditContainer .radio, #creditCardInputFields .radio-inline,
    #frmCheckout .fh-form-choice
) > :is(input[type="checkbox"], input[type="radio"]) {
    position: static !important;
    float: none !important;
    flex: 0 0 21px;
    width: 21px !important;
    height: 21px !important;
    margin: 0 !important;
    accent-color: var(--fh-checkout-accent);
}

#order-standard_cart .fh-checkout-choice:focus-within,
#order-standard_cart #orderSummary .fh-cart-actions :focus-visible,
#order-standard_cart #frmCheckout #btnCompleteOrder:focus-visible {
    outline: 2px solid var(--fh-checkout-accent) !important;
    outline-offset: 3px;
}

#order-standard_cart :is(#applyCreditContainer, #creditCardInputFields) label:has(:is(input[type="radio"], input[type="checkbox"])),
#order-standard_cart #frmCheckout .fh-form-choice {
    display: flex !important;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 44px;
    line-height: 1.55;
}

#order-standard_cart #frmCheckout .fh-form-choice {
    display: grid !important;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    padding: 10px 12px;
}

#order-standard_cart #frmCheckout .fh-form-choice > .fh-choice-input {
    margin-block-start: 2px !important;
    min-height: 21px;
    min-width: 21px;
}

#order-standard_cart #frmCheckout .fh-form-choice .fh-choice-content label {
    display: inline;
    min-height: 0;
    padding: 0;
    line-height: 1.55;
}
