/**
 * Stripe Payment Form Styles
 * Styles for the new Stripe.js payment form with 3D Secure support
 */

/* Stripe Card Element Container */
.bst-stripe-card-element {
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background-color: #fff;
    margin-bottom: 20px;
    transition: border-color 0.2s ease;
}

.bst-stripe-card-element:hover {
    border-color: #9ca3af;
}

.bst-stripe-card-element:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Card Errors Display */
.bst-card-errors {
    color: #ef4444;
    font-size: 14px;
    margin-top: -15px;
    margin-bottom: 15px;
    min-height: 20px;
}

/* Payment Messages */
.bst-payment-message {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.bst-payment-message--error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.bst-payment-message--success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.bst-payment-message--loading {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.bst-payment-message--info {
    background-color: #e0e7ff;
    color: #3730a3;
    border: 1px solid #c7d2fe;
}

/* Submit Button Loading Spinner */
.bst-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: bst-spin 0.6s linear infinite;
}

@keyframes bst-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Submit Button Styles */
#submit-payment {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#submit-payment:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Secure Badge */
.bst-secure-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
    padding: 8px;
    color: #6b7280;
    font-size: 13px;
    text-align: center;
}

.bst-secure-badge svg {
    color: #10b981;
    flex-shrink: 0;
}

/* Stripe Wrapper Specific Styles */
.bst-mt-stripe-wrapper .bst-mt-payment-form {
    max-width: 500px;
    margin: 0 auto;
}

.bst-mt-stripe-wrapper .bst-mt-product-details {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.bst-mt-stripe-wrapper h4 {
    margin-bottom: 20px;
    color: #111827;
    font-size: 18px;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .bst-mt-stripe-wrapper .bst-mt-payment-form {
        max-width: 100%;
    }

    .bst-stripe-card-element {
        padding: 10px 12px;
    }

    .bst-payment-message {
        font-size: 13px;
        padding: 10px 12px;
    }

    .bst-secure-badge {
        font-size: 12px;
    }
}

/* Dark Mode Support (Optional) */
/* @media (prefers-color-scheme: dark) {
    .bst-stripe-card-element {
        background-color: #1f2937;
        border-color: #374151;
    }

    .bst-mt-stripe-wrapper .bst-mt-product-details {
        background: #1f2937;
        border-color: #374151;
    }

    .bst-mt-stripe-wrapper h4 {
        color: #f9fafb;
    }
} */

/* Accessibility Improvements */
.bst-stripe-card-element:focus-within {
    outline: 2px solid transparent;
    outline-offset: 2px;
}

.bst-card-errors[role="alert"]:not(:empty) {
    animation: bst-shake 0.3s ease-in-out;
}

@keyframes bst-shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}
