/* =========================================================
   DFPU CUSTOM CHECKOUT
   ========================================================= */

.dfpu-custom-checkout {
    background: #f7f7f7;
}

.dfpu-checkout-page {
    width: 100%;
    padding: 40px 20px 70px;
    box-sizing: border-box;
}

.dfpu-checkout-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
}


/* =========================================================
   HEADER
   ========================================================= */

.dfpu-checkout-header {
    margin-bottom: 30px;
}

.dfpu-checkout-header h1 {
    margin: 0 0 8px;
    font-size: 34px;
    line-height: 1.2;
    font-weight: 700;
}

.dfpu-checkout-header p {
    margin: 0;
    color: #777;
    font-size: 15px;
}


/* =========================================================
   MAIN TWO-COLUMN LAYOUT
   ========================================================= */

.dfpu-checkout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(360px, 0.9fr);
    gap: 28px;
    align-items: start;
}

.dfpu-checkout-left,
.dfpu-checkout-right {
    min-width: 0;
}


/* =========================================================
   CARDS
   ========================================================= */

.dfpu-checkout-card {
    background: #fff;
    border: 1px solid #e7e7e7;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.04);
}

.dfpu-card-header {
    padding: 24px 26px 18px;
    border-bottom: 1px solid #eeeeee;
}

.dfpu-card-header h2 {
    margin: 0 0 5px;
    font-size: 21px;
    line-height: 1.3;
    font-weight: 700;
}

.dfpu-card-header p {
    margin: 0;
    color: #777;
    font-size: 14px;
}

.dfpu-card-content {
    padding: 26px;
}


/* =========================================================
   WOOCOMMERCE FORM RESET
   ========================================================= */

.dfpu-checkout-form .form-row {
    margin-bottom: 18px;
    padding: 0;
}

.dfpu-checkout-form .form-row::after {
    content: "";
    display: table;
    clear: both;
}

.dfpu-checkout-form label {
    display: block;
    margin-bottom: 7px;
    font-size: 14px;
    font-weight: 600;
    color: #222;
}

.dfpu-checkout-form label .required {
    color: #d63638;
    text-decoration: none;
}


/* =========================================================
   INPUTS
   ========================================================= */

.dfpu-checkout-form input.input-text,
.dfpu-checkout-form select,
.dfpu-checkout-form textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;

    border: 1px solid #d9d9d9;
    border-radius: 8px;

    background: #fff;

    padding: 12px 14px;

    min-height: 46px;

    font-size: 15px;
    line-height: 1.4;

    color: #222;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.dfpu-checkout-form textarea {
    min-height: 110px;
    resize: vertical;
}

.dfpu-checkout-form input.input-text:focus,
.dfpu-checkout-form select:focus,
.dfpu-checkout-form textarea:focus {
    border-color: #222;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}


/* =========================================================
   FIRST / LAST NAME
   ========================================================= */

.dfpu-checkout-form .form-row-first,
.dfpu-checkout-form .form-row-last {
    width: calc(50% - 8px);
    box-sizing: border-box;
}

.dfpu-checkout-form .form-row-first {
    float: left;
    clear: none;
}

.dfpu-checkout-form .form-row-last {
    float: right;
    clear: none;
}


/* =========================================================
   SELECT2
   ========================================================= */

.dfpu-checkout-form
.select2-container {
    width: 100% !important;
}

.dfpu-checkout-form
.select2-container
.select2-selection--single {
    height: 46px;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    background: #fff;
}

.dfpu-checkout-form
.select2-container
.select2-selection__rendered {
    height: 44px;
    line-height: 44px;
    padding-left: 14px;
    font-size: 15px;
    color: #222;
}

.dfpu-checkout-form
.select2-container
.select2-selection__arrow {
    height: 44px;
    right: 8px;
}


/* =========================================================
   ORDER SUMMARY
   ========================================================= */

.dfpu-order-card {
    position: sticky;
    top: 25px;
}

.dfpu-order-card .dfpu-card-content {
    padding: 0;
}


/* =========================================================
   ORDER TABLE
   ========================================================= */

.dfpu-order-card
.shop_table {
    width: 100%;
    border: 0;
    border-collapse: collapse;
    margin: 0;
}

.dfpu-order-card
.shop_table thead th {
    padding: 17px 20px;
    border-bottom: 1px solid #eeeeee;

    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;

    color: #666;
}

.dfpu-order-card
.shop_table th.product-name {
    text-align: left;
}

.dfpu-order-card
.shop_table th.product-total {
    text-align: right;
}

.dfpu-order-card
.shop_table tbody td {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;

    font-size: 14px;
    vertical-align: top;
}

.dfpu-order-card
.shop_table td.product-total {
    text-align: right;
    white-space: nowrap;
}

.dfpu-order-card
.product-quantity {
    font-weight: 600;
    color: #777;
}


/* =========================================================
   TOTALS
   ========================================================= */

.dfpu-order-card
.shop_table tfoot th,
.dfpu-order-card
.shop_table tfoot td {
    padding: 14px 20px;
    border: 0;
}

.dfpu-order-card
.shop_table .cart-subtotal th,
.dfpu-order-card
.shop_table .cart-subtotal td {
    padding-top: 20px;
}

.dfpu-order-card
.shop_table .order-total th,
.dfpu-order-card
.shop_table .order-total td {
    padding-top: 18px;
    padding-bottom: 20px;

    border-top: 1px solid #e8e8e8;

    font-size: 18px;
    font-weight: 700;
}

.dfpu-order-card
.shop_table .order-total td {
    text-align: right;
}


/* =========================================================
   PAYMENT METHODS
   ========================================================= */

.dfpu-order-card
.wc_payment_methods {
    list-style: none;
    margin: 0;
    padding: 20px;
    border-top: 1px solid #eeeeee;
}

.dfpu-order-card
.wc_payment_method {
    margin: 0;
    padding: 14px 0;
    border-bottom: 1px solid #eeeeee;
}

.dfpu-order-card
.wc_payment_method:last-child {
    border-bottom: 0;
}

.dfpu-order-card
.wc_payment_method label {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    font-weight: 600;
}

.dfpu-order-card
.wc_payment_method input[type="radio"] {
    width: 17px;
    height: 17px;
    min-height: auto;
}

.dfpu-order-card
.payment_box {
    margin: 12px 0 0;
    padding: 12px 14px;

    border-radius: 8px;

    background: #f7f7f7;

    font-size: 13px;
    color: #666;
}

.dfpu-order-card
.payment_box p {
    margin: 0;
}


/* =========================================================
   ESEWA LOGO
   ========================================================= */

.dfpu-order-card
.wc_payment_method img {
    max-height: 30px;
    width: auto;
    object-fit: contain;
}


/* =========================================================
   PRIVACY / TERMS
   ========================================================= */

.dfpu-order-card
.woocommerce-terms-and-conditions-wrapper {
    padding: 0 20px;
}

.dfpu-order-card
.woocommerce-privacy-policy-text {
    margin: 0 0 15px;
    font-size: 12px;
    line-height: 1.6;
    color: #777;
}

.dfpu-order-card
.woocommerce-privacy-policy-text a {
    text-decoration: underline;
}


/* =========================================================
   PLACE ORDER BUTTON
   ========================================================= */

.dfpu-order-card
#place_order {
    display: block;

    width: calc(100% - 40px);

    margin: 10px 20px 22px;

    min-height: 52px;

    border: 0;
    border-radius: 9px;

    background: #111;
    color: #fff;

    font-size: 15px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.dfpu-order-card
#place_order:hover {
    background: #2a2a2a;
    transform: translateY(-1px);
}


/* =========================================================
   ORDER NOTES
   ========================================================= */

.dfpu-checkout-left
.woocommerce-additional-fields {
    width: 100%;
}

.dfpu-checkout-left
.woocommerce-additional-fields
.form-row {
    margin-bottom: 0;
}


/* =========================================================
   VALIDATION ERRORS
   ========================================================= */

.dfpu-checkout-form
.woocommerce-invalid
input,
.dfpu-checkout-form
.woocommerce-invalid
select {
    border-color: #d63638;
}

.dfpu-checkout-form
.woocommerce-validated
input,
.dfpu-checkout-form
.woocommerce-validated
select {
    border-color: #bdbdbd;
}

.dfpu-checkout-form
.woocommerce-error {
    margin: 0 0 20px;
    padding: 14px 16px;

    border-radius: 8px;

    background: #fff1f1;
    color: #b42318;

    list-style: none;
}


/* =========================================================
   RESPONSIVE - TABLET
   ========================================================= */

@media (max-width: 1000px) {

    .dfpu-checkout-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .dfpu-order-card {
        position: static;
    }

}


/* =========================================================
   RESPONSIVE - MOBILE
   ========================================================= */

@media (max-width: 700px) {

    .dfpu-checkout-page {
        padding: 25px 14px 50px;
    }

    .dfpu-checkout-header {
        margin-bottom: 22px;
    }

    .dfpu-checkout-header h1 {
        font-size: 28px;
    }

    .dfpu-checkout-grid {
        display: block;
    }

    .dfpu-checkout-card {
        margin-bottom: 18px;
        border-radius: 11px;
    }

    .dfpu-card-header {
        padding: 19px 18px 15px;
    }

    .dfpu-card-header h2 {
        font-size: 19px;
    }

    .dfpu-card-content {
        padding: 18px;
    }

    .dfpu-checkout-form .form-row-first,
    .dfpu-checkout-form .form-row-last {
        width: 100%;
        float: none;
    }

    .dfpu-checkout-form input.input-text,
    .dfpu-checkout-form select,
    .dfpu-checkout-form textarea {
        font-size: 16px;
    }

    .dfpu-order-card
    .shop_table tbody td {
        padding: 13px 15px;
    }

    .dfpu-order-card
    .shop_table thead th {
        padding: 14px 15px;
    }

    .dfpu-order-card
    .shop_table tfoot th,
    .dfpu-order-card
    .shop_table tfoot td {
        padding-left: 15px;
        padding-right: 15px;
    }

    .dfpu-order-card
    .wc_payment_methods {
        padding: 15px;
    }

    .dfpu-order-card
    .woocommerce-terms-and-conditions-wrapper {
        padding: 0 15px;
    }

    .dfpu-order-card
    #place_order {
        width: calc(100% - 30px);
        margin-left: 15px;
        margin-right: 15px;
    }

}


/* =========================================================
   VERY SMALL PHONES
   ========================================================= */

@media (max-width: 400px) {

    .dfpu-checkout-page {
        padding-left: 10px;
        padding-right: 10px;
    }

    .dfpu-card-content {
        padding: 15px;
    }

    .dfpu-card-header {
        padding-left: 15px;
        padding-right: 15px;
    }

    .dfpu-order-card
    .shop_table tbody td {
        font-size: 13px;
    }

}

/* =========================================================
   NATIVE WOOCOMMERCE CHECKOUT POLISH
   ========================================================= */

.woocommerce-checkout .woocommerce-billing-fields h3,
.woocommerce-checkout .woocommerce-additional-fields h3,
.woocommerce-checkout #order_review_heading {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
}

.woocommerce-checkout .form-row {
    margin-bottom: 18px;
}

.woocommerce-checkout label {
    font-weight: 600;
    margin-bottom: 7px;
}

.woocommerce-checkout .required {
    color: #d63638;
}

.woocommerce-checkout input.input-text,
.woocommerce-checkout select,
.woocommerce-checkout textarea {
    border: 1px solid #d8d8d8;
    border-radius: 8px;
    min-height: 46px;
    padding: 11px 13px;
    box-sizing: border-box;
    background: #fff;
}

.woocommerce-checkout textarea {
    min-height: 100px;
}

.woocommerce-checkout input.input-text:focus,
.woocommerce-checkout select:focus,
.woocommerce-checkout textarea:focus {
    border-color: #222;
    box-shadow: 0 0 0 3px rgba(0,0,0,.06);
    outline: none;
}


/* Phone field */

#billing_phone_field {
    width: 100%;
}


/* District */

#billing_district_field {
    width: 100%;
}


/* Order summary */

.woocommerce-checkout #order_review {
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.woocommerce-checkout .shop_table {
    border: 0;
}

.woocommerce-checkout .shop_table th,
.woocommerce-checkout .shop_table td {
    padding: 14px 18px;
}

.woocommerce-checkout .order-total th,
.woocommerce-checkout .order-total td {
    font-size: 18px;
    font-weight: 700;
}


/* Payment */

.woocommerce-checkout #payment {
    margin-top: 20px;
    border-radius: 12px;
    overflow: hidden;
}

.woocommerce-checkout #payment ul.payment_methods {
    padding: 20px;
}

.woocommerce-checkout #payment .place-order {
    padding: 20px;
}

.woocommerce-checkout #place_order {
    width: 100%;
    min-height: 50px;
    border-radius: 8px;
    font-weight: 700;
}


/* Mobile */

@media (max-width: 768px) {

    .woocommerce-checkout .form-row-first,
    .woocommerce-checkout .form-row-last {
        width: 100%;
        float: none;
    }

    .woocommerce-checkout .col2-set,
    .woocommerce-checkout #order_review_heading,
    .woocommerce-checkout #order_review {
        width: 100%;
        float: none;
    }

    .woocommerce-checkout #order_review {
        margin-top: 20px;
    }

}