.offline-safe-card-checkout-wrapper {
    max-width: 900px;
    margin: 30px auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.offline-safe-card-checkout-form {
    background: #fff;
    padding: 40px 50px;
    border-radius: 12px;
    box-shadow: 0 6px 30px rgba(0,0,0,0.12);
    border: 1px solid #e5e5e5;
    position: relative;
}

.offline-safe-card-checkout-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0073aa 0%, #005a87 100%);
    border-radius: 12px 12px 0 0;
}

.checkout-section {
    margin-bottom: 35px;
    padding: 25px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    transition: all 0.3s ease;
}

.checkout-section:hover {
    border-color: #0073aa;
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.1);
}

.checkout-section:last-child {
    margin-bottom: 0;
}

.checkout-section h3 {
    margin: 0 0 25px 0;
    font-size: 18px;
    color: #1a1a1a;
    font-weight: 700;
    padding-bottom: 12px;
    border-bottom: 3px solid #0073aa;
    display: block;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-row {
    margin-bottom: 15px;
}

.form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-row .required {
    color: #e74c3c;
}

.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="tel"],
.form-row select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #fafafa;
    box-sizing: border-box;
}

.form-row input:focus,
.form-row select:focus {
    outline: none;
    border-color: #0073aa;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.form-row input::placeholder {
    color: #999;
}

.form-row-first {
    float: left;
    width: 48%;
    margin-right: 4%;
}

.form-row-last {
    float: right;
    width: 48%;
}

.form-row-wide {
    clear: both;
    width: 100%;
}

.checkout-actions {
    margin-top: 30px;
    text-align: center;
}

.checkout-actions .button {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: #fff;
    padding: 18px 50px;
    font-size: 17px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 115, 170, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.checkout-actions .button:hover {
    background: linear-gradient(135deg, #005a87 0%, #004d73 100%);
    box-shadow: 0 6px 20px rgba(0, 115, 170, 0.4);
    transform: translateY(-2px);
}

.checkout-actions .button:active {
    transform: translateY(0);
}

.checkout-actions .button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

#offline-safe-card-messages {
    margin-top: 20px;
}

#offline-safe-card-messages .message {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 10px;
}

#offline-safe-card-messages .message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#offline-safe-card-messages .message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.offline-safe-card-error {
    padding: 20px;
    background: #f8d7da;
    color: #721c24;
    border-radius: 4px;
    text-align: center;
}

.order-review {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    margin-top: 20px;
}

.order-review-content {
    background: #fff;
    padding: 20px;
    border-radius: 6px;
}

.order-review table.shop_table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    background: transparent;
}

.order-review table.shop_table thead {
    background: #f8f9fa;
}

.order-review table.shop_table th,
.order-review table.shop_table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: middle;
}

.order-review table.shop_table th {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.order-review table.shop_table tbody tr:hover {
    background: #f9f9f9;
}

.order-review table.shop_table tfoot tr.cart-subtotal th,
.order-review table.shop_table tfoot tr.cart-subtotal td {
    border-top: 2px solid #ddd;
    padding-top: 15px;
}

.order-review table.shop_table tfoot tr.order-total {
    background: #0073aa;
    color: #fff;
}

.order-review table.shop_table tfoot tr.order-total th,
.order-review table.shop_table tfoot tr.order-total td {
    border: none;
    padding: 15px;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.order-review .product-quantity {
    color: #666;
    font-size: 13px;
    margin-left: 5px;
}

/* Payment section specific styling */
.checkout-section.payment-details-section {
    background: linear-gradient(135deg, #fff9e6 0%, #fff5d6 100%);
    border: 2px solid #ffc107;
}

.checkout-section.payment-details-section h3 {
    color: #856404;
    border-bottom-color: #ffc107;
}

/* Product display improvements */
.order-review table.shop_table tbody td:first-child {
    font-weight: 500;
    color: #333;
}

.order-review table.shop_table tbody td:last-child {
    font-weight: 600;
    color: #0073aa;
}

/* Clear float helper */
.clear {
    clear: both;
}

/* Loading state */
.checkout-actions .button.processing {
    position: relative;
    color: transparent;
}

.checkout-actions .button.processing::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   OVERALL CHECKOUT PAGE STYLING
   (Theme-matched minimal styling)
   ============================================ */

/* Main checkout form container - keep default */
.woocommerce-checkout {
    /* Keep default layout */
}

/* Checkout form wrapper - keep default layout */
form.checkout {
    /* Keep default layout */
}

/* Section headings - theme matched */
.woocommerce-billing-fields h3,
#order_review h3,
.woocommerce-checkout-payment h3 {
    font-family: 'Satoshi', Arial, Helvetica, sans-serif !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    color: #333 !important;
    margin-bottom: 15px !important;
    padding-bottom: 10px !important;
    border-bottom: 2px solid #f7941d !important;
}

/* Billing fields section - keep default */
.woocommerce-billing-fields {
    /* Keep default */
}

/* Form fields styling - theme matched */
.woocommerce-billing-fields .form-row label,
.woocommerce-additional-fields .form-row label,
.woocommerce-shipping-fields .form-row label {
    font-family: 'Satoshi', Arial, Helvetica, sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #333 !important;
}

.woocommerce-billing-fields .form-row .required,
.woocommerce-additional-fields .form-row .required,
.woocommerce-shipping-fields .form-row .required {
    color: #e74c3c !important;
}

.woocommerce-billing-fields input[type="text"],
.woocommerce-billing-fields input[type="email"],
.woocommerce-billing-fields input[type="tel"],
.woocommerce-billing-fields input[type="password"],
.woocommerce-billing-fields select,
.woocommerce-billing-fields textarea,
.woocommerce-additional-fields input[type="text"],
.woocommerce-additional-fields textarea,
.woocommerce-shipping-fields input[type="text"],
.woocommerce-shipping-fields select,
.woocommerce-shipping-fields textarea {
    font-family: 'Satoshi', Arial, Helvetica, sans-serif !important;
    font-size: 14px !important;
    color: #666 !important;
    border: 1px solid #ccc !important;
    border-radius: 3px !important;
    padding: 8px 10px !important;
    transition: border-color 0.3s ease, color 0.3s ease !important;
    background-color: #fff !important;
}

.woocommerce-billing-fields input:focus,
.woocommerce-billing-fields select:focus,
.woocommerce-billing-fields textarea:focus,
.woocommerce-additional-fields input:focus,
.woocommerce-additional-fields textarea:focus,
.woocommerce-shipping-fields input:focus,
.woocommerce-shipping-fields select:focus,
.woocommerce-shipping-fields textarea:focus {
    outline: none !important;
    border-color: #f7941d !important;
    color: #111 !important;
    box-shadow: 0 0 0 2px rgba(247, 148, 29, 0.1) !important;
}

/* Order Review Section - keep default */
#order_review {
    /* Keep default */
}

/* Order Review Table - theme matched */
#order_review .shop_table {
    font-family: 'Satoshi', Arial, Helvetica, sans-serif !important;
}

#order_review .shop_table tfoot tr.order-total {
    background: #f7941d;
    color: #fff;
}

#order_review .shop_table tfoot tr.order-total th,
#order_review .shop_table tfoot tr.order-total td {
    font-family: 'Satoshi', Arial, Helvetica, sans-serif !important;
    font-size: 16px !important;
    color: #fff;
    font-weight: 600;
}

/* Checkbox styling - theme matched */
.woocommerce-billing-fields input[type="checkbox"],
.woocommerce-shipping-fields input[type="checkbox"] {
    cursor: pointer;
}

/* Shipping address checkbox - proper styling */
#ship-to-different-address {
    margin: 15px 0;
}

#ship-to-different-address label {
    font-family: 'Satoshi', Arial, Helvetica, sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer;
}

/* Shipping fields - WooCommerce handles show/hide via JavaScript */
/* Just ensure proper styling when visible */
.woocommerce-shipping-fields {
    margin-top: 20px;
}

/* Order notes - theme matched */
.woocommerce-additional-fields {
    /* Keep default */
}

.woocommerce-additional-fields textarea {
    font-family: 'Satoshi', Arial, Helvetica, sans-serif !important;
    font-size: 14px !important;
}

/* Place order button - theme matched */
#place_order {
    font-family: 'Satoshi', Arial, Helvetica, sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    background: #f7941d !important;
    color: #fff !important;
    border: 1px solid #f7941d !important;
    border-radius: 3px !important;
    padding: 10px 20px !important;
    transition: background 0.3s ease !important;
    cursor: pointer !important;
}

#place_order:hover {
    background: #e67e00 !important;
    border-color: #e67e00 !important;
}

#place_order:focus {
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(247, 148, 29, 0.3) !important;
}

#place_order:disabled {
    background: #ccc !important;
    border-color: #ccc !important;
    cursor: not-allowed !important;
}

/* Terms and conditions - keep default */
.woocommerce-terms-and-conditions-wrapper {
    /* Keep default */
}

/* Payment methods list - keep default layout */
.woocommerce-checkout-payment {
    /* Keep default */
}

.wc_payment_methods {
    /* Keep default */
}

.wc_payment_methods li {
    /* Keep default */
}

/* ============================================
   DEFAULT WOOCOMMERCE CHECKOUT PAGE STYLING
   ============================================ */

/* Payment method box styling - theme matched */
.payment_box.payment_method_offline_safe_card {
    background: #fff9e6 !important;
    border: 1px solid #f7941d !important;
    border-radius: 3px !important;
    padding: 15px !important;
    margin: 10px 0 !important;
}

/* Card form fields - theme matched */
.payment_method_offline_safe_card .wc-credit-card-form {
    background: transparent !important;
}

.payment_method_offline_safe_card .wc-credit-card-form .form-row label {
    font-family: 'Satoshi', Arial, Helvetica, sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #333 !important;
    text-align: left !important;
}

.payment_method_offline_safe_card .wc-credit-card-form .form-row .required {
    color: #e74c3c !important;
}

.payment_method_offline_safe_card .wc-credit-card-form input[type="text"] {
    font-family: 'Satoshi', Arial, Helvetica, sans-serif !important;
    font-size: 14px !important;
    color: #666 !important;
    border: 1px solid #ccc !important;
    border-radius: 3px !important;
    padding: 8px 10px !important;
    transition: border-color 0.3s ease, color 0.3s ease !important;
}

.payment_method_offline_safe_card .wc-credit-card-form input[type="text"]:focus {
    outline: none !important;
    border-color: #f7941d !important;
    color: #111 !important;
    box-shadow: 0 0 0 2px rgba(247, 148, 29, 0.1) !important;
}

/* Description text - theme matched */
.payment_method_offline_safe_card .payment_box p {
    font-family: 'Satoshi', Arial, Helvetica, sans-serif !important;
    font-size: 14px !important;
    color: #666 !important;
    text-align: left !important;
    margin-bottom: 10px !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Main checkout container */
    .woocommerce-checkout {
        padding: 20px 15px;
    }
    
    /* Form layout - stack on mobile */
    form.checkout {
        flex-direction: column;
        gap: 20px;
    }
    
    /* Remove sticky on mobile */
    #order_review {
        position: static;
    }
    
    /* Billing fields */
    .woocommerce-billing-fields {
        padding: 20px 15px;
    }
    
    .woocommerce-billing-fields .form-row-first,
    .woocommerce-billing-fields .form-row-last {
        float: none !important;
        width: 100% !important;
        margin-right: 0 !important;
    }
    
    /* Order review */
    #order_review {
        padding: 20px 15px;
    }
    
    /* Section headings */
    .woocommerce-billing-fields h3,
    #order_review h3,
    .woocommerce-checkout-payment h3 {
        font-size: 18px !important;
    }
    
    /* Payment section */
    .woocommerce-checkout-payment {
        padding: 20px 15px;
    }
    
    /* Custom checkout form */
    .offline-safe-card-checkout-form {
        padding: 25px 20px;
    }
    
    .form-row-first,
    .form-row-last {
        float: none;
        width: 100%;
        margin-right: 0;
    }
    
    .checkout-section {
        padding: 20px 15px;
    }
    
    .checkout-section h3 {
        font-size: 16px;
    }
    
    /* Payment card fields */
    .payment_method_offline_safe_card .wc-credit-card-form .form-row-first,
    .payment_method_offline_safe_card .wc-credit-card-form .form-row-last {
        float: none !important;
        width: 100% !important;
        margin-right: 0 !important;
    }
    
    /* Place order button */
    #place_order {
        padding: 15px 20px !important;
        font-size: 16px !important;
    }
}

