/* Custom Cart Totals Widget Styles */

/* Main widget container */
#custom-cart-totals-widget {
    display: block !important;
    width: 100%;
}

.custom-cart-totals {
    display: block !important;
    width: 100%;
}

/* CRITICAL: Target Elementor wrapper to ensure visibility */
.elementor-widget-wrap > .elementor-element.elementor-widget-custom_cart_totals,
.elementor-widget-wrap > .elementor-element.elementor-widget-custom_cart_totals.elementor-widget__width-inherit {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    visibility: visible !important;
    float: none !important;
    box-sizing: border-box;
    flex-basis: 100% !important;
    flex-grow: 0 !important;
    flex-shrink: 0 !important;
}

/* Ensure widget container also takes full width */
.elementor-widget-custom_cart_totals .elementor-widget-container {
    display: block !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Estimated Total Row */
.custom-cart-totals .estimated-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Shared Estimated Total styles */
.custom-cart-totals .estimated-total-label,
.custom-cart-totals .estimated-total-amount {
    font-family: Arial, sans-serif !important;
    font-size: 21px !important;
    font-weight: 700 !important; /* Bold */
    line-height: 1.5 !important;
    color: #000000 !important; /* Black */
}

/* Amount-specific override */
.custom-cart-totals .estimated-total-amount {
    text-align: right;
}

/* Shipping Notice */
.custom-cart-totals .cart-totals-shipping-notice {
    font-family: Arial, sans-serif !important;
    font-size: 14px !important;
    font-weight: 400 !important; /* Normal */
    line-height: 1.5 !important;
    color: #000000 !important; /* Black */
    width: 100%;
}

/* Checkout Button */
.custom-cart-totals .wc-proceed-to-checkout {
    width: 100%;
    margin-top: 20px;
    display: block !important;
    visibility: visible !important;
}

.custom-cart-totals .wc-proceed-to-checkout .button,
.custom-cart-totals .wc-proceed-to-checkout .checkout-button {
    /* Typography */
    font-family: Arial, sans-serif !important;
    font-size: 16px !important;
    font-weight: 700 !important; /* Bold */
    line-height: 1.5 !important;
    color: #ffffff !important; /* White text */
    
    /* Background */
    background-color: #000000 !important; /* Black background */
    
    /* Border */
    border: none !important;
    border-radius: 50px !important; /* Pill style */
    
    /* Spacing */
    padding: 12px 24px !important; /* 12px top/bottom, 24px left/right */
    margin: 20px 0 0 0 !important;
    
    /* Layout */
    width: 100% !important;
    display: block !important;
    visibility: visible !important;
    cursor: pointer !important;
    text-align: center !important;
    text-decoration: none !important;
    
    /* Remove default button styles */
    outline: none !important;
    box-shadow: none !important;
    transition: none !important;
}

/* Responsive - Mobile: Keep row layout with label left, amount right */
@media (max-width: 768px) {
    .custom-cart-totals .estimated-total-row {
        flex-direction: row !important; /* Keep row, not column */
        justify-content: space-between !important; /* Label left, amount right */
        align-items: center !important;
        gap: 0 !important; /* No gap needed */
    }
    
    /* Shared mobile font-size */
    .custom-cart-totals .estimated-total-label,
    .custom-cart-totals .estimated-total-amount {
        font-size: 18px !important; /* 18px on mobile */
    }
    
    /* Amount-specific mobile override */
    .custom-cart-totals .estimated-total-amount {
        text-align: right !important; /* Right-align on mobile */
    }
}

/* RTL Support */
.rtl .custom-cart-totals .estimated-total-row {
    flex-direction: row-reverse;
}

.rtl .custom-cart-totals .estimated-total-amount {
    text-align: left;
}
