/* Loading state for Stripe Payment Element */
.stripe-payment-element-loading {
    display: none; /* Hidden by default */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    min-height: 200px;
    text-align: center;
}

.stripe-payment-element-loading p {
    margin-top: 15px;
    color: #666;
    font-size: 14px;
}

/* Spinner animation */
.stripe-payment-element-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* Hide Payment Element initially when loading */
#stripe-payment-element-container #stripe-payment-element {
    min-height: 200px;
}

/* Hide Payment Element when loading is visible */
#stripe-payment-element-container.loading #stripe-payment-element {
    display: none;
}

#stripe-payment-element-container.loading .stripe-payment-element-loading {
    display: flex;
}

/* Submit button spinner */
.zippy-input-submit {
    position: relative;
}

.zippy-submit-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

.zippy-input-submit input[type="submit"]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Payment method tabs (Credit Card / PayPal) */
.zippy-checkout-tabs {
    margin-top: 12px;
}

.zippy-checkout-tablist {
    display: flex;
    width: 100%;
    gap: 6px;
    margin: 20px 0;
    border-radius: 14px;
}

.zippy-checkout-tab {
    appearance: none;
    flex: 1 1 0;
    border: 0;
    background: transparent;
    padding: 12px 10px;
    margin: 0;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    color: rgba(0, 0, 0, 0.72);
    text-align: center;
    transition: background 120ms ease, box-shadow 120ms ease, color 120ms ease;
}

.zippy-checkout-tab.is-active {
    background: #fff;
    color: rgba(0, 0, 0, 0.9);
    box-shadow: 0 1px 2px rgba(0,0,0,0.08), 0 8px 20px rgba(0,0,0,0.06);
}

.zippy-checkout-panel {
    width: 100%;
}

.zippy-paypal-buttons-container {
    padding-top: 6px;
}

.zippy-checkout-panel[hidden] {
    display: none;
}

/* Hide the standard submit button when PayPal tab is active (PayPal buttons handle submission) */
.zippy-checkout-paypal-active .zippy-input-submit {
    display: none;
}

