body#checkout .additional-information:has(#airwallex-card-container),
body#checkout .additional-information:has(#airwallex-apm-container) {
    margin: 0 !important;
}

#airwallex-card-container {
    margin: 15px 0;
}

#airwallex-card-container #airwallex-card-logos img {
    margin-bottom: 5px;
    margin-right: 5px;
}

#airwallex-card-element {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    min-height: 45px;
}

#airwallex-error-container {
    display: none;
    margin-top: 10px;
}

div#airwallex-card-logos img,
div.airwallex-payment-methods-display img {
    display: inline-block;
    height: 24px;
    border-radius: 3px;
}

.airwallex-field-group {
    margin-bottom: 8px;
}

.airwallex-field-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #374151;
    font-size: 12px;
}

.airwallex-field-container {
    border-radius: 5px;
    padding: 5px 10px;
    box-shadow: #E8EAED 0 0 0 1px;
    min-height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    max-width: 320px;
    margin-top: 5px;
}

.awx-focus-input {
    box-shadow: #612fff 0 0 0 2px;
}

.awx-focus-input-danger {
    box-shadow: #d70418 0 0 0 2px;
}

.airwallex-field-row {
    display: flex;
    gap: 12px;
    max-width: 320px;
}

.airwallex-field-half {
    flex: 1;
}

#airwallex-loading {
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #374151;
}

#airwallex-loading .airwallex-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #f3f4f6;
    border-top: 2px solid #612fff;
}

.airwallex-spinner,
.airwallex-spinner-border {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: airwallex-spin 1s linear infinite;
}

.airwallex-spinner-border {
    margin: 0 auto 15px;
}

@keyframes airwallex-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.airwallex-loading-backdrop {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    max-width: 300px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.airwallex-loading-content {
    text-align: center;
}

.airwallex-loading-text {
    color: #555;
    font-size: 14px;
    font-weight: 500;
    margin: 0;
}

.airwallex-loading-spinner {
    margin-bottom: 15px;
}

#airwallex-loading-overlay,
.airwallex-payment-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: 8px;
    opacity: 0.4;
}

.airwallex-payment-loading {
    border-radius: 6px;
    z-index: 100;
}

.airwallex-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.airwallex-alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
    display: flex;
    align-items: center;
}

.airwallex-alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.airwallex-alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.airwallex-alert-content {
    display: flex;
    align-items: center;
}

.airwallex-success-icon,
.airwallex-error-icon {
    margin-right: 10px;
    flex-shrink: 0;
    color: #28a745;
}

.airwallex-success-text,
.airwallex-error-text {
    flex: 1;
    font-weight: 500;
}

.airwallex-apm-description {
    margin-bottom: 15px;
}

.airwallex-description-text {
    margin: 0 0 10px 0;
    color: #6c757d;
    font-size: 14px;
    line-height: 1.4;
}

.airwallex-payment-methods-display {
    margin-top: 10px;
    margin-bottom: 6px;
}

.airwallex-payment-logos {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.airwallex-payment-logo {
    width: 40px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.airwallex-payment-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.airwallex-placeholder-logo {
    width: 40px;
    height: 24px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    color: #6c757d;
}

.airwallex-and-more {
    font-size: 12px;
    color: #6c757d;
    align-self: center;
    white-space: nowrap;
}

.airwallex-apm-page {
    margin-top: 30px;
    margin-bottom: 50px;
}

.airwallex-page-title {
    margin-bottom: 2rem;
    font-size: 1.75rem;
    font-weight: 600;
    color: #333;
    padding: 0 15px;
}

.airwallex-order-summary,
.airwallex-payment-section {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.airwallex-summary-title,
.airwallex-payment-title {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

#airwallex-order-review-heading {
    margin: 0 0 1.5rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #f8f9fa;
    padding-bottom: 0.75rem;
}

.airwallex-shop-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.airwallex-shop-table th,
.airwallex-shop-table td {
    text-align: left;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.airwallex-shop-table th {
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.airwallex-shop-table tfoot th,
.airwallex-shop-table tfoot td {
    padding: 1rem 0;
    font-weight: 600;
}

.airwallex-total-row th,
.airwallex-total-row td {
    font-size: 1.1rem;
    border-top: 2px solid #333;
    color: #333;
}

.airwallex-price-amount {
    font-weight: 600;
}

.airwallex-order-items {
    margin-bottom: 20px;
}

.airwallex-order-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.airwallex-order-item:last-child {
    border-bottom: none;
}

.airwallex-product-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.airwallex-product-thumbnail {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #e1e1e1;
}

.airwallex-product-details {
    flex: 1;
}

.airwallex-product-quantity {
    display: block;
    font-size: 0.875rem;
    color: #666;
    margin-top: 0.25rem;
}

.airwallex-item-image {
    width: 60px;
    height: 60px;
    margin-right: 15px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.airwallex-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.airwallex-placeholder-image {
    width: 100%;
    height: 100%;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #6c757d;
}

.airwallex-item-details {
    flex: 1;
    min-width: 0;
}

.airwallex-item-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
    word-wrap: break-word;
}

.airwallex-item-quantity {
    font-size: 14px;
    color: #666;
}

.airwallex-item-price {
    font-weight: 600;
    color: #333;
    margin-left: 15px;
}

.airwallex-order-totals {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #dee2e6;
}

.airwallex-total-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
}

.airwallex-total-line:last-child {
    margin-bottom: 0;
}

.airwallex-total-final {
    font-weight: 600;
    font-size: 16px;
    color: #333;
    border-top: 1px solid #333;
    padding-top: 10px;
    margin-top: 10px;
}

.airwallex-total-label {
    color: #555;
}

.airwallex-total-value {
    font-weight: 500;
    color: #333;
}

#airwallex-apm-container {
    position: relative;
}

.airwallex-payment-container {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 1.5rem;
    min-height: 300px;
    position: relative;
}

@media (max-width: 991.98px) {
    .airwallex-order-summary {
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    .airwallex-apm-page {
        margin-top: 20px;
        margin-bottom: 30px;
    }

    .airwallex-page-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .airwallex-order-summary,
    .airwallex-payment-section,
    .airwallex-payment-container {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .airwallex-summary-title,
    .airwallex-payment-title {
        font-size: 16px;
    }

    .airwallex-order-item {
        flex-wrap: wrap;
    }

    .airwallex-item-image {
        margin-right: 10px;
    }

    .airwallex-item-price {
        margin-left: 0;
        width: 100%;
        text-align: right;
        margin-top: 5px;
    }

    .airwallex-total-line {
        font-size: 13px;
    }

    .airwallex-total-final {
        font-size: 15px;
    }

    .airwallex-payment-logos {
        gap: 6px;
    }

    .airwallex-payment-logo {
        width: 35px;
        height: 20px;
    }

    .airwallex-placeholder-logo {
        width: 35px;
        height: 20px;
        font-size: 9px;
    }

    .airwallex-product-info {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .airwallex-product-thumbnail {
        align-self: flex-start;
    }

    .airwallex-shop-table th,
    .airwallex-shop-table td {
        padding: 0.5rem 0;
    }
}

@media (max-width: 480px) {
    .airwallex-cart-item,
    .airwallex-order-item {
        padding: 10px 0;
    }

    .airwallex-product-thumbnail,
    .airwallex-item-image {
        width: 50px;
        height: 50px;
    }

    .airwallex-product-details strong,
    .airwallex-item-name {
        font-size: 14px;
    }

    .airwallex-product-quantity,
    .airwallex-item-quantity {
        font-size: 12px;
    }
}

.airwallex-express-checkout {
    width: 100%;
}

.product-actions .airwallex-express-checkout {
    width: 100%;
}

.product-add-to-cart ~ .airwallex-express-checkout {
    width: 100%;
}

.cart-detailed-actions .airwallex-express-checkout {
    margin-top: 10px;
}

@media (max-width: 768px) {
    .airwallex-express-checkout {
        margin: 15px 0;
    }
}

#airwallex-apple-pay-element {
    margin: 10px 0;
}

#airwallex-currency-conversion {
    padding-top: 0;
    padding-bottom: 50px;
}

.airwallex-exchange-rate {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #6c757d;
}

.airwallex-you-pay {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
}

.airwallex-shop-table .airwallex-currency-conversion-row th {
    text-align: right;
    text-transform: none;
    letter-spacing: normal;
    border-top: none;
}

.airwallex-shop-table .airwallex-currency-conversion-row .airwallex-exchange-rate {
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: normal;
    margin-bottom: 0.25rem;
}

.airwallex-shop-table .airwallex-currency-conversion-row .airwallex-you-pay {
    font-size: 1.25rem;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
}
