/* ----------------------------------------------------------------------------------
  General WooCommerce checkout styling (preserved as-is)
---------------------------------------------------------------------------------- */
.woocommerce-info {
    background: white !important;
    margin-top: 20px !important;
}

.woocommerce-checkout #order_review_heading {
    display: none !important;
}

/* Select2 full width */
.woocommerce-js form .form-row .select2-container {
    width: 100% !important;
}

/* Checkout Fields: borders and focus states */
.woocommerce-checkout input[type="text"],
.woocommerce-checkout input[type="email"],
.woocommerce-checkout input[type="tel"],
.woocommerce-checkout textarea {
    border: 1px solid #d1d1d1;
}

.woocommerce-checkout .optional {
    display: none;
}

.woocommerce-checkout input:focus,
.woocommerce-checkout textarea:focus {
    border-color: #00ff00;
}

/* Select2 field styling (single & multiple) */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    border: 1px solid #d1d1d1;
    border-radius: 4px;
}

.select2-container--default .select2-selection--single:focus,
.select2-container--default .select2-selection--multiple:focus {
    border-color: #00ff00;
}

/* Height for phone/email & Aelia currency selector */
.woocommerce-checkout #billing_phone,
.woocommerce-checkout #billing_email,
.woocommerce-checkout span[aria-labelledby="select2-billing_phone_code-container"] {
    height: 48.5px !important;
}

.woocommerce-checkout .checkout_currency .wc_aelia_cs_currency_selector {
    position: relative;
    width: 100%;
    max-width: 158px;
    margin-top: 10px;
    padding: 5px 0 !important;
    font-size: 15px;
    background: white;
    border: 1px solid #d1d1d1;
}

/* Wrappers & additional field styling */
.woocommerce-billing-fields__field-wrapper,
.extra_traveler,
.woocommerce-checkout #additional_How_do_you_know_about_us_field {
    background-color: white;
    padding: 20px;
    border: 1px solid #505050;
    border-radius: 15px;
}

.woocommerce-checkout .product-name-variable,
.woocommerce-checkout .product-total-variable {
    border-bottom: 0;
}

.woocommerce-billing-fields#contact_details {
    display: none;
}

.billing-name-row.extra-traveler div p label,
.extra-traveler-product-nationality div p label {
    margin-bottom: 7px;
}

.woocommerce-checkout .woocommerce-additional-fields {
    margin-top: 20px;
}

/* Styling for the default #order_review wrapper */
#order_review_heading,
#order_review {
    background: white;
    border: 1px solid #4B4F58 !important;
}

#order_review_heading {
    border-radius: 15px 15px 0 0;
    border-bottom: 0 !important;
}

#order_review_heading .wc_aelia_cs_currency_selector.dropdown_selector {
    position: relative;
    width: 100%;
    max-width: 158px;
    font-size: 15px;
    background: white;
    float: right;
}

#order_review_heading .wc_aelia_cs_currency_selector .selected_currency:before {
    top: 21px;
}

#order_review {
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.woocommerce-js .select2-container--default .select2-selection--single #select2-billing_phone_code-container.select2-selection__rendered {
    line-height: 28px;
}

/* Mobile privacy policy adjustment */
@media (max-width:512px) {
    .woocommerce-privacy-policy-text {
        padding-bottom: 50px !important;
    }
}

/* ----------------------------------------------------------------------------------
  Order Review: Legacy card styling (preserved for compatibility)
---------------------------------------------------------------------------------- */
.woocommerce-order-review-card {
    background-color: #fff;
    border-radius: 8px;
    margin-bottom: 20px;
}

.woocommerce-checkout .order-review-coupon .woocommerce-form-coupon-toggle {
    display: none;
}

.order-review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    margin-top: 20px;
}

.woocommerce-checkout .order-review-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600 !important;
    color: #021B32 !important;
}

.order-edit-link {
    font-size: 0.875rem;
    color: #021B32;
    text-decoration: none;
    font-weight: 600;
    padding: 4px 8px;
    border: 1px solid #E9EBED;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    padding: 0px 25px;
}

.order-edit-link:hover {
    background-color: #f0f0f0;
    text-decoration: none;
}

/* Original order review items styling (still available if used elsewhere) */
.order-review-items .order-item {
    display: flex;
    align-items: flex-start;
    padding: 20px 0;
    border-bottom: 1px solid #E9EBED;
}


.order-review-items .item-image {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    margin-right: 12px;
    border-radius: 4px;
    overflow: hidden;
}

.order-review-items .item-image img {
    display: block;
    width: 100%;
    height: auto;
    padding: 4px;
    background: #F5F5F5;
}

.order-review-items .item-info {
    flex: 1 1 auto;
}

.order-review-items .item-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 3px;
    color: #333333;
    display: flex;
    gap: 3px;
}

.order-review-items .item-qty {
    margin-left: 4px;
    font-weight: normal;
    color: #666666;
}

.order-review-items .item-meta {
    font-size: 0.8rem;
    color: #777777;
    line-height: 1.3;
}

.order-review-items .item-price {
    flex: 0 0 auto;
    margin-left: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    color: #212121;
}

.order-review-totals {
    margin-top: 15px;
    padding-bottom: 12px;
}

.order-review-totals .total-row {
    display: flex;
    justify-content: space-between;
    padding: 0;
    font-size: 0.9rem;
    color: #656A76;
}

.order-review-totals .total-row.order-total {
    font-size: 1rem;
    font-weight: 700;
    color: #1C1E22;
    margin-top: 12px;
    padding: 12px 0;
    border-top: 1px solid #E9EBED;
    border-bottom: 1px solid #E9EBED;
}

/* Show variation attributes on their own line */
.item-meta.variation-attributes {
    font-size: 0.8rem;
    color: #777;
    margin-top: 2px;
}

/* Mobile tweaks for legacy card */
@media (max-width: 767px) {
    .woocommerce-order-review-card {
        padding: 15px;
    }

    .order-review-items .item-image {
        flex-basis: 40px;
        width: 40px;
        height: 40px;
    }

    .order-review-header h3 {
        font-size: 1.1rem;
    }

    .order-review-items .item-title,
    .order-review-items .item-price {
        font-size: 0.9rem;
    }
}

/* ----------------------------------------------------------------------------------
  New Order Review Table (preserve style, retain Woo markup)
---------------------------------------------------------------------------------- */
.custom-order-review-table {
    width: 100%;
    background-color: #fff;
    border: 1px solid #4B4F58 !important;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border-collapse: collapse;
}

.custom-order-review-table thead {
    display: none;
}

.custom-order-review-table tbody tr {
    border-bottom: 1px solid #f4f4f4;
}

.custom-order-review-table tbody tr:last-child {
    border-bottom: none;
}

.custom-order-review-table td,
.custom-order-review-table th {
    padding: 12px 8px;
    vertical-align: top;
}

.custom-order-review-table tfoot tr {
    border-top: 1px solid #f4f4f4;
}

.custom-order-review-table tfoot .order-total th,
.custom-order-review-table tfoot .order-total td {
    font-weight: 700;
    color: #111;
}

.custom-order-review-table tfoot .cart-subtotal,
.custom-order-review-table tfoot .fee,
.custom-order-review-table tfoot .tax-rate,
.custom-order-review-table tfoot .tax-total {
    font-size: 0.9rem;
    color: #444;
}

/* Item layout inside the new table */
.custom-order-review-table .item-container {
    display: flex;
    align-items: flex-start;
}

.custom-order-review-table .item-image {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    margin-right: 12px;
    border-radius: 4px;
    overflow: hidden;
}

.custom-order-review-table .item-image img {
    display: block;
    width: 100%;
    height: auto;
}

.custom-order-review-table .item-info {
    flex: 1 1 auto;
}

.custom-order-review-table .item-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 3px;
    color: #333333;
}

.custom-order-review-table .item-meta {
    font-size: 0.8rem;
    color: #777777;
    line-height: 1.3;
}

/* Responsive tweaks for new table */
@media (max-width: 767px) {

    .custom-order-review-table td,
    .custom-order-review-table th {
        padding: 12px 6px;
    }

    .custom-order-review-table .item-image {
        flex: 0 0 40px;
        width: 40px;
        height: 40px;
    }

    .custom-order-review-table .item-title,
    .custom-order-review-table .product-total {
        font-size: 0.9rem;
    }
}

/* ----------------------------------------------------------------------------------
  Payment Methods (preserved + FA checkmarks)
---------------------------------------------------------------------------------- */
.woocommerce-checkout .payment_methods {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.woocommerce-checkout .payment_methods li {
    margin: 0.75rem 0;
}

/* Hide real radio input */
.woocommerce-checkout .payment_methods input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

/* Labels with custom circle */
.woocommerce-checkout .payment_methods li label:not([for="airwallex-save"]) {
    position: relative;
    padding-left: 28px;
    display: inline-flex;
    align-items: center;
    font-size: 15px;
    color: #021B32;
    cursor: pointer;
}

/* Empty circle */
.woocommerce-checkout .payment_methods li label:not([for="airwallex-save"])::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid #9b9ca1;
    background-color: #f5f5f5;
}

/* Font Awesome check when selected */
.woocommerce-checkout .payment_methods input[type="radio"]:checked+label::before {
    content: "\f00c";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: #ffffff;
    background-color: #05559F;
    border-color: #05559F;
    line-height: 18px;
    text-align: center;
    font-size: 12px;
}

/* Recommended badge only for Bank Transfer (BACS) */
.woocommerce-checkout .wc_payment_method.payment_method_bacs label::after {
    content: "Recommended";
    display: inline-block;
    margin-left: 8px;
    font-size: 12px;
    color: #fff;
    background-color: #05559F;
    border-radius: 12px;
    padding: 0 8px;
    font-weight: 600;
}


/* Payment box styling */
.woocommerce-checkout .payment_box {
    margin-top: 8px;
    padding: 16px;
    background-color: #f5f5f5;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    color: #083156;
    font-size: 14px;
}

.woocommerce-checkout .payment_box p {
    margin: 0 0 0.5rem;
}

/* Slight size adjustment on mobile */
@media (max-width: 480px) {
    .woocommerce-checkout .payment_methods label {
        font-size: 15px;
    }

    .woocommerce-checkout .payment_methods label::before {
        width: 16px;
        height: 16px;
        line-height: 16px;
    }
}

#add_payment_method #payment div.payment_box,
.woocommerce-cart #payment div.payment_box,
.woocommerce-checkout #payment div.payment_box {
    font-size: 14px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    line-height: 1.5;
    background-color: #E9EBED !important;
    color: #021B32;
    font-weight: 500;
}

#order_review #airwallex-card {
    border-radius: 12px;
}


/* Card container – set a light background, border, and radius */
.woocommerce-privacy-policy-text {
    background-color: #f8fbff;
    border: 1px solid #e4e9f3;
    border-radius: 15px;
    padding: 0px 18px;
    margin: 0 0 28px 0;
    font-size: 14px;
    color: #021B32;
}

/* Each entry row (icon + text) */
.order-info-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 0;
}

/* Separator line between rows */
.order-info-item+.order-info-item {
    border-top: 1px solid #e4e9f3;
}

/* Style the icon span */
.order-info-icon {
    font-size: 22px;
    color: #05559F;
    /* blue to match your branding */
    margin-right: 14px;
    line-height: 1;
    margin-top: 3px;
    /* nudge down to align vertically with text */
}

/* Heading text */
.order-info-content strong {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #021B32;
}

/* Description text */
.order-info-content p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.4;
    color: #5e6a79;
    /* medium grey */
}

/* Optional: make icons a bit smaller on very narrow screens */
@media (max-width: 480px) {
    .order-info-icon {
        font-size: 20px;
    }
}