/* =============================================================================
   WooCommerce Block Checkout — Green Pill Buttons with Dashicons
   Targets: Place Order (checkout) + Proceed to Checkout (cart)
   ============================================================================= */

/* -----------------------------------------------------------------------------
   Shared base — applied to both buttons
   ----------------------------------------------------------------------------- */
.wc-block-components-checkout-place-order-button,
.wc-block-cart__submit-button {
    background-color: #16a34a !important;
    border: 2px solid #16a34a !important;
    border-radius: 999px !important;          /* full pill */
    color: #ffffff !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    letter-spacing: 0.4px !important;
    padding: 14px 32px !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    cursor: pointer !important;
    box-shadow: 0 2px 12px rgba(22, 163, 74, 0.30) !important;
    transition:
        background-color 0.2s ease,
        border-color    0.2s ease,
        box-shadow      0.2s ease,
        transform       0.15s ease !important;
    text-decoration: none !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Shine sweep on hover */
.wc-block-components-checkout-place-order-button::after,
.wc-block-cart__submit-button::after {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    background: linear-gradient(
        105deg,
        transparent 40%,
        rgba(255,255,255,0.18) 50%,
        transparent 60%
    ) !important;
    transform: translateX(-100%) !important;
    transition: transform 0.45s ease !important;
    pointer-events: none !important;
}

.wc-block-components-checkout-place-order-button:hover::after,
.wc-block-cart__submit-button:hover::after {
    transform: translateX(100%) !important;
}

/* Hover state */
.wc-block-components-checkout-place-order-button:hover:not(:disabled),
.wc-block-cart__submit-button:hover:not(:disabled) {
    background-color: #15803d !important;
    border-color:     #15803d !important;
    box-shadow: 0 6px 20px rgba(22, 163, 74, 0.40) !important;
    transform: translateY(-1px) !important;
}

/* Pressed / active */
.wc-block-components-checkout-place-order-button:active:not(:disabled),
.wc-block-cart__submit-button:active:not(:disabled) {
    transform: translateY(0) !important;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.30) !important;
}

/* Disabled / loading */
.wc-block-components-checkout-place-order-button:disabled,
.wc-block-cart__submit-button:disabled {
    opacity: 0.65 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* Focus ring — accessibility */
.wc-block-components-checkout-place-order-button:focus-visible,
.wc-block-cart__submit-button:focus-visible {
    outline: 3px solid #4ade80 !important;
    outline-offset: 3px !important;
}

/* Hide our icon during WooCommerce's own loading spinner */
.wc-block-components-checkout-place-order-button.wc-block-components-button--loading::before,
.wc-block-cart__submit-button.wc-block-components-button--loading::before {
    display: none !important;
}

/* =============================================================================
   Place Order button — lock / checkmark Dashicon
   ============================================================================= */
.wc-block-components-checkout-place-order-button::before {
    font-family: 'Dashicons' !important;
    content: '\f43c' !important;   /* dashicons-yes-alt  ✓ in filled circle */
    font-size: 22px !important;
    line-height: 1 !important;
    display: inline-block !important;
    flex-shrink: 0 !important;
    position: relative !important;
    z-index: 1 !important;
}

/* Keep button text above the shine pseudo-element */
.wc-block-components-checkout-place-order-button span,
.wc-block-cart__submit-button span {
    position: relative !important;
    z-index: 1 !important;
}

/* =============================================================================
   Proceed to Checkout button — shopping cart Dashicon
   ============================================================================= */
.wc-block-cart__submit-button::before {
    font-family: 'Dashicons' !important;
    content: '\f174' !important;   /* dashicons-cart */
    font-size: 22px !important;
    line-height: 1 !important;
    display: inline-block !important;
    flex-shrink: 0 !important;
    position: relative !important;
    z-index: 1 !important;
}

/* =============================================================================
   Classic checkout fallback (non-block)
   ============================================================================= */
#place_order,
.woocommerce-cart .checkout-button {
    background-color: #16a34a !important;
    border-color:     #16a34a !important;
    border-radius:    999px !important;
    color:            #ffffff !important;
    font-weight:      700 !important;
    letter-spacing:   0.4px !important;
    box-shadow: 0 2px 12px rgba(22, 163, 74, 0.30) !important;
    transition: background-color 0.2s, box-shadow 0.2s, transform 0.15s !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    justify-content: center !important;
}

#place_order:hover,
.woocommerce-cart .checkout-button:hover {
    background-color: #15803d !important;
    border-color:     #15803d !important;
    box-shadow: 0 6px 20px rgba(22, 163, 74, 0.40) !important;
    transform: translateY(-1px) !important;
}
