/* Subscription Status */
.subscription-status-active { background: #7ad03a; color: #fff; padding: 4px 8px; border-radius: 3px; }
.subscription-status-cancelled { background: #e2401c; color: #fff; padding: 4px 8px; border-radius: 3px; }
.subscription-status-on-hold { background: #999; color: #fff; padding: 4px 8px; border-radius: 3px; }

/* Subscription Table */
.my_account_subscriptions { width: 100%; margin: 20px 0; }
.my_account_subscriptions th, .my_account_subscriptions td { padding: 12px; text-align: left; }

/* Modal */
.crb-modal { display: none; position: fixed; z-index: 9999; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); }
.crb-modal-content { background: #fff; margin: 10% auto; padding: 20px; width: 80%; max-width: 500px; border-radius: 5px; }
.crb-modal-close { float: right; font-size: 28px; cursor: pointer; }

/* CRB PayFast Gateway - Prominent Visibility */
.wc_payment_method.payment_method_crb_payfast {
    border: 2px solid #0073aa !important;
    padding: 15px !important;
    margin: 10px 0 !important;
    background: #f0f8ff !important;
    border-radius: 4px !important;
}

.wc_payment_method.payment_method_crb_payfast label {
    font-weight: bold !important;
    font-size: 16px !important;
    color: #333 !important;
}

.payment_box.payment_method_crb_payfast {
    background: #fff !important;
    padding: 15px !important;
    margin-top: 10px !important;
    border-top: 1px solid #ddd !important;
}

.crb-payfast-notice {
    color: #0073aa !important;
    font-weight: bold !important;
    margin: 10px 0 !important;
    padding: 10px !important;
    background: #f0f8ff !important;
    border-left: 4px solid #0073aa !important;
}

/* Hide misleading "no payment methods" warning on WooCommerce Blocks checkout when our gateway is present */
body.woocommerce-checkout .wc-block-components-notices__container .wc-block-components-notice-banner.is-error:has-text("no payment methods available") {
    display: none !important;
}

/* Alternative: Hide all payment method error notices on checkout when CRB gateway is injected */
body.woocommerce-checkout:has(#payment.crb-js-injected) .wc-block-components-notices__container .wc-block-components-notice-banner.is-error {
    display: none !important;
}

/* ============================================
   My Account - Subscriptions Page Styles
   ============================================ */

/* Subscriptions Table */
.crb-subscriptions-table {
    width: 100%;
    margin: 20px 0;
}

.crb-subscriptions-table th,
.crb-subscriptions-table td {
    padding: 12px;
    text-align: left;
    vertical-align: middle;
}

.crb-subscriptions-table td small {
    display: block;
    color: #666;
    font-size: 0.85em;
    margin-top: 3px;
}

/* Subscription Status Badges */
.crb-subscription-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
}

.crb-status-active {
    background: #c6e1c6;
    color: #2e7d32;
}

.crb-status-pending {
    background: #fff3cd;
    color: #856404;
}

.crb-status-on-hold {
    background: #e0e0e0;
    color: #616161;
}

.crb-status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.crb-status-expired {
    background: #f5f5f5;
    color: #757575;
}

/* View Subscription Page */
.crb-subscription-back-link {
    margin-bottom: 20px;
}

.crb-subscription-back-link a {
    color: #666;
    text-decoration: none;
}

.crb-subscription-back-link a:hover {
    color: #333;
    text-decoration: underline;
}

.crb-subscription-details,
.crb-subscription-items,
.crb-subscription-payments,
.crb-subscription-billing-address,
.crb-subscription-actions {
    margin: 30px 0;
}

.crb-subscription-details h3,
.crb-subscription-items h3,
.crb-subscription-payments h3,
.crb-subscription-billing-address h3,
.crb-subscription-actions h3 {
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.crb-subscription-details-table th {
    width: 200px;
    font-weight: 600;
}

.crb-billing-period {
    display: block;
    color: #666;
    font-size: 0.85em;
    margin-top: 3px;
}

/* Payment History Table */
.crb-payments-table {
    width: 100%;
}

.crb-payment-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.8em;
    font-weight: 600;
}

.crb-payment-completed {
    background: #c6e1c6;
    color: #2e7d32;
}

.crb-payment-failed {
    background: #f8d7da;
    color: #721c24;
}

.crb-payment-pending {
    background: #fff3cd;
    color: #856404;
}

/* Cancel Button */
.crb-cancel-subscription {
    background: #dc3545 !important;
    border-color: #dc3545 !important;
    color: #fff !important;
}

.crb-cancel-subscription:hover {
    background: #c82333 !important;
    border-color: #bd2130 !important;
}

.crb-subscription-actions .description {
    color: #666;
    font-size: 0.9em;
    font-style: italic;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .crb-subscriptions-table thead {
        display: none;
    }

    .crb-subscriptions-table tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 4px;
    }

    .crb-subscriptions-table td {
        display: block;
        text-align: right;
        padding: 10px 15px;
        border-bottom: 1px solid #eee;
    }

    .crb-subscriptions-table td:before {
        content: attr(data-title);
        float: left;
        font-weight: 600;
    }

    .crb-subscriptions-table td:last-child {
        border-bottom: none;
    }

    .crb-subscription-details-table th {
        width: auto;
    }
}

/* ============================================
   Cart UI Rework v1.2.9
   Remove Divi hover icons, consistent buttons
   ============================================ */

/* -----------------------------------------
   1. Remove Divi Button Hover Icon Animation
   ----------------------------------------- */

/* Hide the :after pseudo-element that contains the hover icon */
.woocommerce a.button:after,
.woocommerce button.button:after,
.woocommerce input.button:after,
.woocommerce a.button.alt:after,
.woocommerce button.button.alt:after,
.woocommerce input.button.alt:after,
.woocommerce #respond input#submit:after,
.woocommerce #respond input#submit.alt:after,
.woocommerce-page a.button:after,
.woocommerce-page button.button:after,
.et_pb_button:after {
    display: none !important;
    content: none !important;
    opacity: 0 !important;
}

/* Remove extra padding that was added for the icon */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
    padding-right: 20px !important;
}

/* -----------------------------------------
   2. Base Button Style - Dark Navy
   ----------------------------------------- */

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce a.button.view,
.woocommerce .woocommerce-button,
.woocommerce-page a.button,
.woocommerce .button {
    background-color: #1a2a3a !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 25px !important;
    padding: 12px 25px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    font-size: 12px !important;
    letter-spacing: 0.5px !important;
    transition: background-color 0.3s ease, transform 0.2s ease !important;
    text-decoration: none !important;
    display: inline-block !important;
    cursor: pointer !important;
    line-height: 1.5 !important;
}

/* Hover state - Subtle lift effect */
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce a.button.view:hover,
.woocommerce .woocommerce-button:hover,
.woocommerce-page a.button:hover,
.woocommerce .button:hover {
    background-color: #2d4a5e !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    text-decoration: none !important;
}

/* -----------------------------------------
   3. Primary CTA Buttons - Orange
   (Place Order, Pay, Add to Cart)
   ----------------------------------------- */

.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce #respond input#submit.alt,
#place_order,
.wc-block-components-checkout-place-order-button,
.woocommerce .cart button[name="update_cart"],
.single_add_to_cart_button,
.woocommerce-orders-table__cell-order-actions a.pay,
.woocommerce-orders-table__cell-order-actions .pay {
    background-color: #e67e22 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 25px !important;
    padding: 14px 30px !important;
    font-size: 13px !important;
}

.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover,
.woocommerce #respond input#submit.alt:hover,
#place_order:hover,
.wc-block-components-checkout-place-order-button:hover,
.single_add_to_cart_button:hover,
.woocommerce-orders-table__cell-order-actions a.pay:hover,
.woocommerce-orders-table__cell-order-actions .pay:hover {
    background-color: #d35400 !important;
    transform: translateY(-2px) !important;
}

/* -----------------------------------------
   4. Cancel Button - Outlined Red
   ----------------------------------------- */

.woocommerce-orders-table__cell-order-actions a.cancel,
.woocommerce-orders-table__cell-order-actions .cancel {
    background-color: transparent !important;
    color: #dc3545 !important;
    border: 2px solid #dc3545 !important;
}

.woocommerce-orders-table__cell-order-actions a.cancel:hover,
.woocommerce-orders-table__cell-order-actions .cancel:hover {
    background-color: #dc3545 !important;
    color: #ffffff !important;
}

/* -----------------------------------------
   5. My Account Order Actions - Spacing
   ----------------------------------------- */

.woocommerce-orders-table__cell-order-actions a.button,
.woocommerce-orders-table__cell-order-actions .button {
    margin: 3px 5px 3px 0 !important;
    padding: 10px 20px !important;
    min-width: 80px !important;
    text-align: center !important;
}

/* -----------------------------------------
   6. Return to Cart Link - Outlined Button
   ----------------------------------------- */

.wc-backward,
a.wc-backward,
.woocommerce a.wc-backward,
.woocommerce-checkout .return-to-shop a {
    display: inline-block !important;
    color: #1a2a3a !important;
    background-color: transparent !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    padding: 12px 25px !important;
    border: 2px solid #1a2a3a !important;
    border-radius: 25px !important;
    transition: all 0.3s ease !important;
    font-size: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.wc-backward:hover,
a.wc-backward:hover,
.woocommerce a.wc-backward:hover,
.woocommerce-checkout .return-to-shop a:hover {
    background-color: #1a2a3a !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
}

/* Add arrow before Return to Cart text */
.wc-backward:before,
a.wc-backward:before {
    content: "\2190  " !important;
    font-size: 14px !important;
}

/* -----------------------------------------
   7. Checkout Log In Link - High Visibility
   ----------------------------------------- */

/* Classic checkout login toggle */
.woocommerce-form-login-toggle .woocommerce-info a,
.woocommerce-checkout .showlogin,
.woocommerce-checkout a.showlogin {
    color: #e67e22 !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    border-bottom: 2px solid #e67e22 !important;
    padding-bottom: 2px !important;
    transition: all 0.2s ease !important;
}

.woocommerce-form-login-toggle .woocommerce-info a:hover,
.woocommerce-checkout .showlogin:hover,
.woocommerce-checkout a.showlogin:hover {
    color: #d35400 !important;
    border-bottom-color: #d35400 !important;
}

/* WooCommerce Blocks checkout login link */
.wc-block-checkout__login-prompt a,
.wc-block-components-form .wc-block-components-text-input + a,
.wp-block-woocommerce-checkout a[href*="account"] {
    color: #e67e22 !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    text-decoration: none !important;
    border-bottom: 2px solid #e67e22 !important;
    padding-bottom: 2px !important;
    transition: all 0.2s ease !important;
}

.wc-block-checkout__login-prompt a:hover {
    color: #d35400 !important;
    border-bottom-color: #d35400 !important;
}

/* -----------------------------------------
   8. WooCommerce Blocks Button Overrides
   ----------------------------------------- */

.wc-block-components-button,
.wp-block-button__link,
.wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button {
    background-color: #e67e22 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 25px !important;
    padding: 14px 30px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    font-size: 13px !important;
    letter-spacing: 0.5px !important;
    transition: background-color 0.3s ease, transform 0.2s ease !important;
    cursor: pointer !important;
}

.wc-block-components-button:hover,
.wp-block-button__link:hover,
.wc-block-cart__submit-button:hover,
.wc-block-components-checkout-place-order-button:hover {
    background-color: #d35400 !important;
    transform: translateY(-2px) !important;
    cursor: pointer !important;
}

/* -----------------------------------------
   10. Universal Cursor Fix
   ----------------------------------------- */

/* Ensure pointer cursor on all clickable elements */
button,
input[type="submit"],
input[type="button"],
a.button,
.button,
[role="button"] {
    cursor: pointer !important;
}

/* -----------------------------------------
   11. Specific Page Button Cursor Fixes
   (Login, Subscriptions, Orders, Add to Cart)
   ----------------------------------------- */

/* Login page buttons */
.woocommerce-form-login button,
.woocommerce-form-login input[type="submit"],
.woocommerce-form-login .button,
.woocommerce form.login button,
.woocommerce form.login input[type="submit"],
.woocommerce-account .woocommerce-form-login__submit,
.wp-block-woocommerce-customer-account-block button,
form.woocommerce-form-login button.woocommerce-button {
    cursor: pointer !important;
}

/* Subscriptions page buttons */
.crb-subscriptions-table a.button,
.crb-subscriptions-table button,
.crb-subscription-actions button,
.crb-subscription-actions a.button,
.crb-cancel-subscription,
.woocommerce-account .woocommerce-MyAccount-content button,
.woocommerce-account .woocommerce-MyAccount-content a.button {
    cursor: pointer !important;
}

/* Orders page buttons */
.woocommerce-orders-table a.button,
.woocommerce-orders-table button,
.woocommerce-orders-table__cell-order-actions a,
.woocommerce-orders-table__cell-order-actions button,
.woocommerce-order-details a.button,
.woocommerce-order-details button {
    cursor: pointer !important;
}

/* Add to Cart buttons */
.single_add_to_cart_button,
.add_to_cart_button,
button.single_add_to_cart_button,
button.add_to_cart_button,
.woocommerce button.single_add_to_cart_button,
.product button.single_add_to_cart_button,
.products .add_to_cart_button,
.wc-block-components-product-button button,
.wc-block-grid__product-add-to-cart button,
.wp-block-button__link.add_to_cart_button {
    cursor: pointer !important;
}

/* WooCommerce Blocks specific buttons */
.wc-block-cart button,
.wc-block-checkout button,
.wc-block-components-button,
.wc-block-components-checkout-place-order-button,
.wc-block-cart__submit-button {
    cursor: pointer !important;
}

/* -----------------------------------------
   9. Responsive Adjustments
   ----------------------------------------- */

@media screen and (max-width: 768px) {
    .woocommerce a.button,
    .woocommerce button.button,
    .woocommerce input.button,
    .woocommerce .button {
        padding: 10px 20px !important;
        font-size: 11px !important;
    }

    .woocommerce-orders-table__cell-order-actions a.button,
    .woocommerce-orders-table__cell-order-actions .button {
        display: block !important;
        width: 100% !important;
        margin: 5px 0 !important;
    }

    .wc-backward,
    a.wc-backward {
        display: block !important;
        text-align: center !important;
        margin-bottom: 15px !important;
    }
}
