
/*
 * BlueSkyBD Digital Checkout
 * Reference-inspired WooCommerce / CartFlows checkout.
 */

:root {
    --bsb-deep: #21155f;
    --bsb-accent: #ef785f;
    --bsb-pay: #ff6500;
    --bsb-green: #429848;
    --bsb-soft: #f7f7f7;
    --bsb-border: #e8e8e8;
    --bsb-text: #202020;
}

/* Checkout canvas */
body.woocommerce-checkout {
    background: #fff;
}

body.woocommerce-checkout .page-title,
body.woocommerce-checkout .entry-title,
body.woocommerce-checkout .breadcrumbs,
body.woocommerce-checkout .woocommerce-breadcrumb {
    display: none !important;
}

body.woocommerce-checkout .woocommerce {
    width: min(1430px, calc(100% - 40px));
    max-width: 1430px;
    margin: 0 auto;
    padding-top: 58px;
    padding-bottom: 70px;
}

/* Success / added-to-cart notice */
body.woocommerce-checkout .woocommerce-message {
    border: 0 !important;
    border-radius: 12px !important;
    background: var(--bsb-green) !important;
    color: #fff !important;
    padding: 24px 28px 24px 82px !important;
    min-height: 74px;
    display: flex;
    align-items: center;
    font-weight: 700;
    box-shadow: none !important;
}

body.woocommerce-checkout .woocommerce-message::before {
    color: #fff !important;
    left: 28px !important;
    top: 50% !important;
    transform: translateY(-50%);
    font-size: 26px;
}

body.woocommerce-checkout .woocommerce-message a {
    color: #fff !important;
    text-decoration: underline;
    font-weight: 700;
}

/* Coupon row */
body.woocommerce-checkout .woocommerce-form-coupon-toggle {
    margin: 24px 0 32px !important;
}

body.woocommerce-checkout .woocommerce-info {
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    color: #181818 !important;
    font-size: 18px;
    font-weight: 700;
}

body.woocommerce-checkout .woocommerce-info::before {
    display: none !important;
}

body.woocommerce-checkout .woocommerce-info a {
    color: var(--bsb-accent) !important;
    text-decoration: underline;
}

body.woocommerce-checkout form.checkout_coupon {
    border: 1px solid var(--bsb-border) !important;
    border-radius: 12px !important;
    padding: 20px !important;
    margin-bottom: 28px !important;
}

/* Desktop 2-column checkout */
body.woocommerce-checkout form.checkout.woocommerce-checkout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr);
    grid-template-rows: auto 1fr;
    column-gap: 36px;
    row-gap: 0;
    align-items: start;
}

body.woocommerce-checkout form.checkout #customer_details {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 100% !important;
    margin: 0 !important;
    background: #fff;
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .09);
}

body.woocommerce-checkout form.checkout #customer_details .col-1 {
    width: 100% !important;
    float: none !important;
}

body.woocommerce-checkout form.checkout #customer_details .col-2,
body.woocommerce-checkout .woocommerce-shipping-fields,
body.woocommerce-checkout .woocommerce-additional-fields {
    display: none !important;
}

/* Billing inner card */
body.woocommerce-checkout .woocommerce-billing-fields {
    background: #fff;
    border-radius: 12px;
    padding: 13px 12px 15px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .07);
}

body.woocommerce-checkout .woocommerce-billing-fields > h3,
body.woocommerce-checkout #order_review_heading {
    color: var(--bsb-deep) !important;
    font-size: 27px !important;
    line-height: 1.2 !important;
    font-weight: 800 !important;
    letter-spacing: -.3px;
}

/* Field styling */
body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper {
    margin-top: 28px;
}

body.woocommerce-checkout .form-row {
    margin: 0 0 19px !important;
}

body.woocommerce-checkout .form-row label {
    display: block;
    color: var(--bsb-deep) !important;
    font-size: 18px !important;
    font-weight: 500 !important;
    margin: 0 0 11px !important;
    line-height: 1.4;
}

body.woocommerce-checkout .form-row .required {
    color: #e02727 !important;
}

body.woocommerce-checkout .form-row input.input-text,
body.woocommerce-checkout .form-row textarea,
body.woocommerce-checkout .form-row select,
body.woocommerce-checkout .select2-container .select2-selection--single {
    width: 100% !important;
    height: 52px !important;
    min-height: 52px !important;
    border: 1px solid #d9d9d9 !important;
    border-radius: 17px !important;
    background: #fff !important;
    box-shadow: none !important;
    padding: 0 16px !important;
    font-size: 16px !important;
    color: #222 !important;
    outline: none !important;
}

body.woocommerce-checkout .form-row input.input-text:focus,
body.woocommerce-checkout .form-row textarea:focus {
    border-color: #aaa !important;
    box-shadow: 0 0 0 2px rgba(33, 21, 95, .06) !important;
}

/* Right panel heading */
body.woocommerce-checkout form.checkout #order_review_heading {
    grid-column: 2;
    grid-row: 1;
    width: 100% !important;
    margin: 0 !important;
    padding: 42px 36px 26px !important;
    text-align: center;
    background: var(--bsb-soft);
    border-radius: 14px 14px 0 0;
}

/* Right panel body */
body.woocommerce-checkout form.checkout #order_review {
    grid-column: 2;
    grid-row: 2;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 36px 36px !important;
    background: var(--bsb-soft);
    border-radius: 0 0 14px 14px;
}

/* Order table */
body.woocommerce-checkout #order_review table.shop_table {
    width: 100% !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 14px !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    overflow: hidden;
    background: #fff !important;
    padding: 24px 28px !important;
    box-shadow: 0 5px 16px rgba(0, 0, 0, .05);
}

body.woocommerce-checkout #order_review table.shop_table th,
body.woocommerce-checkout #order_review table.shop_table td {
    border: 0 !important;
    border-bottom: 1px solid #dedede !important;
    padding: 18px 0 !important;
    font-size: 16px;
}

body.woocommerce-checkout #order_review table.shop_table thead th {
    color: var(--bsb-deep) !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    text-transform: uppercase;
    padding-top: 3px !important;
}

body.woocommerce-checkout #order_review table.shop_table thead th:last-child,
body.woocommerce-checkout #order_review table.shop_table td:last-child {
    text-align: right;
}

body.woocommerce-checkout #order_review table.shop_table tbody td.product-name {
    color: #656565;
    font-weight: 700;
}

body.woocommerce-checkout #order_review table.shop_table tfoot th {
    color: var(--bsb-deep) !important;
    font-weight: 800 !important;
    font-size: 17px !important;
}

body.woocommerce-checkout #order_review table.shop_table tfoot .order-total th,
body.woocommerce-checkout #order_review table.shop_table tfoot .order-total td {
    border-bottom: 0 !important;
}

body.woocommerce-checkout #order_review table.shop_table .amount {
    color: #6a6a6a;
}

body.woocommerce-checkout #order_review table.shop_table tfoot .cart-subtotal .amount,
body.woocommerce-checkout #order_review table.shop_table tfoot .order-total .amount {
    color: var(--bsb-accent) !important;
}

body.woocommerce-checkout #order_review table.shop_table tfoot .order-total .amount {
    font-size: 22px !important;
    font-weight: 500 !important;
}

/* Payment area */
body.woocommerce-checkout #payment {
    margin-top: 18px !important;
    background: transparent !important;
    border-radius: 0 !important;
}

body.woocommerce-checkout #payment ul.payment_methods {
    border: 0 !important;
    border-bottom: 1px solid #dedede !important;
    padding: 8px 0 20px !important;
    margin: 0 0 24px !important;
}

body.woocommerce-checkout #payment ul.payment_methods li {
    color: var(--bsb-deep) !important;
    font-size: 17px;
    line-height: 1.5;
}

body.woocommerce-checkout #payment ul.payment_methods li img {
    max-height: 44px !important;
    width: auto !important;
    margin-left: 12px !important;
    vertical-align: middle;
}

body.woocommerce-checkout #payment div.payment_box {
    background: #fff !important;
    border-radius: 10px !important;
    color: #333 !important;
}

body.woocommerce-checkout #payment div.payment_box::before {
    border-bottom-color: #fff !important;
}

body.woocommerce-checkout #payment .place-order {
    padding: 0 !important;
    margin: 0 !important;
}

/* Pay button */
body.woocommerce-checkout #place_order,
body.woocommerce-checkout button#place_order,
body.woocommerce-checkout .wcf-btn-small,
body.woocommerce-checkout .wcf-submit-coupon {
    width: 100% !important;
    min-height: 57px !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: var(--bsb-pay) !important;
    color: #fff !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    text-transform: none !important;
    box-shadow: none !important;
    transition: transform .15s ease, opacity .15s ease;
}

body.woocommerce-checkout #place_order:hover {
    opacity: .93;
    transform: translateY(-1px);
}

/* Privacy / terms under the payment box */
body.woocommerce-checkout .woocommerce-privacy-policy-text,
body.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper {
    font-size: 13px;
    line-height: 1.55;
    color: #666;
}

/* CartFlows compatibility */
body.woocommerce-checkout .wcf-embed-checkout-form,
body.woocommerce-checkout .wcf-embed-checkout-form .woocommerce {
    max-width: 100% !important;
}

body.woocommerce-checkout .wcf-embed-checkout-form .woocommerce-message {
    background: var(--bsb-green) !important;
}

/* Tablet / mobile */
@media (max-width: 900px) {
    body.woocommerce-checkout .woocommerce {
        width: min(100% - 24px, 720px);
        padding-top: 28px;
        padding-bottom: 45px;
    }

    body.woocommerce-checkout form.checkout.woocommerce-checkout {
        display: block !important;
    }

    body.woocommerce-checkout form.checkout #customer_details {
        margin-bottom: 26px !important;
    }

    body.woocommerce-checkout form.checkout #order_review_heading {
        border-radius: 14px 14px 0 0;
        padding: 30px 20px 20px !important;
    }

    body.woocommerce-checkout form.checkout #order_review {
        border-radius: 0 0 14px 14px;
        padding: 0 18px 20px !important;
    }

    body.woocommerce-checkout #order_review table.shop_table {
        padding: 18px !important;
    }
}

@media (max-width: 520px) {
    body.woocommerce-checkout .woocommerce {
        width: calc(100% - 18px);
    }

    body.woocommerce-checkout .woocommerce-message {
        padding: 18px 16px 18px 50px !important;
        min-height: 62px;
        font-size: 14px;
        border-radius: 10px !important;
    }

    body.woocommerce-checkout .woocommerce-message::before {
        left: 17px !important;
        font-size: 21px;
    }

    body.woocommerce-checkout .woocommerce-info {
        font-size: 15px;
    }

    body.woocommerce-checkout form.checkout #customer_details {
        padding: 9px;
    }

    body.woocommerce-checkout .woocommerce-billing-fields {
        padding: 11px 9px 8px;
    }

    body.woocommerce-checkout .woocommerce-billing-fields > h3,
    body.woocommerce-checkout #order_review_heading {
        font-size: 22px !important;
    }

    body.woocommerce-checkout .form-row label {
        font-size: 16px !important;
    }

    body.woocommerce-checkout .form-row input.input-text {
        height: 50px !important;
        min-height: 50px !important;
        border-radius: 14px !important;
    }

    body.woocommerce-checkout #order_review table.shop_table th,
    body.woocommerce-checkout #order_review table.shop_table td {
        font-size: 14px;
        padding: 15px 0 !important;
    }

    body.woocommerce-checkout #place_order {
        min-height: 54px !important;
    }
}
