/* Stripe Specific Styles */

/* Stripe Loading Container Styles */
.stripe-loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px; /* Ensure enough space for spinner and text */
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin: auto;
    max-width: 400px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: opacity 0.3s ease-in-out;
}

.stripe-loading-container .spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #007bff; /* Blue spinner */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.stripe-loading-container .loading-text {
    font-size: 1.2rem;
    color: #555;
    font-weight: 500;
}

/* Stripe Pay Button Styles */
.pcs-stripe-pay-button {
    /* Define blue gradient colors for Stripe */
    --stripe-gradient-start: #63b3ed; /* Light blue */
    --stripe-gradient-mid: #4299e1;   /* Medium blue */
    --stripe-gradient-end: #3182ce;   /* Darker blue */

    display: block;
    width: 100%;
    max-width: 320px; /* Match PayPal buttons */
    padding: 15px 0;
    margin: 20px auto 0; /* Centered with top margin */
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
    color: #ffffff;
    
    background: linear-gradient(145deg, var(--stripe-gradient-start), var(--stripe-gradient-mid), var(--stripe-gradient-end), var(--stripe-gradient-start));
    background-size: 400% 400%;
    animation: gradient-scroll-blue 8s ease infinite; /* Reusing blue gradient animation */
    
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        0 0 0 0 rgba(66, 153, 225, 0.3); /* Stripe blue shadow */
    position: relative;
    overflow: hidden;
    letter-spacing: 0.025em;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.pcs-stripe-pay-button:hover {
    animation-play-state: paused;
    filter: brightness(1.1);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 
        0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -2px rgba(0, 0, 0, 0.05),
        0 0 0 3px rgba(66, 153, 225, 0.4); /* Stripe blue shadow */
}

.pcs-stripe-pay-button:active {
    transform: translateY(0);
    filter: brightness(1);
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        0 0 0 2px rgba(66, 153, 225, 0.5); /* Stripe blue shadow */
}

.pcs-stripe-pay-button:focus {
    outline: none;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        0 0 0 3px rgba(66, 153, 225, 0.5); /* Stripe blue shadow */
}

#stripe-pay-later-button {
    /* Define gray gradient colors for the fallback button */
    --fallback-gradient-start: #d1d5db; /* Light gray */
    --fallback-gradient-mid: #9ca3af;   /* Medium gray */
    --fallback-gradient-end: #6b7280;   /* Darker gray */

    background: linear-gradient(145deg, var(--fallback-gradient-start), var(--fallback-gradient-mid), var(--fallback-gradient-end), var(--fallback-gradient-start));
    background-size: 400% 400%;
    animation: gradient-scroll-gray 8s ease infinite; /* New gray gradient animation */
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        0 0 0 0 rgba(156, 163, 175, 0.3); /* Gray shadow */
}

#stripe-pay-later-button:hover {
    box-shadow: 
        0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -2px rgba(0, 0, 0, 0.05),
        0 0 0 3px rgba(156, 163, 175, 0.4); /* Gray shadow */
}

#stripe-pay-later-button:active {
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        0 0 0 2px rgba(156, 163, 175, 0.5); /* Gray shadow */
}

#stripe-pay-later-button:focus {
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        0 0 0 3px rgba(156, 163, 175, 0.5); /* Gray shadow */
}

/* Keyframes for a continuous scrolling gradient animation (Gray) */
@keyframes gradient-scroll-gray {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Hide Stripe form elements during loading */
.stripe-loading .payment-form #stripe-form-title,
.stripe-loading .payment-form #stripe-payment-element,
.stripe-loading .payment-form .d-grid.mt-3 {
    display: none !important;
}
