/* Payment Components CSS */

/* Stripe Payment Form Styles */
.stripe-payment-wrapper {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
}

.stripe-payment-form {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #32325d;
    font-size: 14px;
}

.form-label i {
    margin-right: 8px;
    color: #6c757d;
}

.card-element-container {
    padding: 12px 16px;
    border: 1px solid #cfd7df;
    border-radius: 4px;
    background-color: #fff;
    transition: border-color 0.15s ease;
}

.card-element-container:focus-within {
    border-color: #635bff;
    box-shadow: 0 0 0 2px rgba(99, 91, 255, 0.1);
}

.form-text {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
}

.error-message {
    color: #dc3545;
    font-size: 14px;
    margin-top: 10px;
    padding: 8px 12px;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
}

.alert {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}

.alert i {
    margin-right: 8px;
}

/* Security Badges */
.security-notice {
    margin: 16px 0;
    text-align: center;
}

.security-badges {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.badge-security {
    background-color: #28a745;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.badge-security i {
    margin-right: 4px;
}

/* Payment Submit Button */
.payment-submit-btn {
    width: 100%;
    padding: 12px 24px;
    background: linear-gradient(135deg, #635bff 0%, #5a52e8 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.payment-submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #5a52e8 0%, #524bd9 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(99, 91, 255, 0.3);
}

.payment-submit-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.payment-submit-btn i.fa-spinner {
    animation: spin 1s linear infinite;
}

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

/* Payment Amount Handler */
.payment-amount-summary {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.amount-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #32325d;
}

.amount-breakdown {
    margin-bottom: 16px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.breakdown-item:last-child {
    border-bottom: none;
}

.item-name {
    font-weight: 500;
    color: #495057;
}

.item-amount {
    font-weight: 600;
    color: #32325d;
}

.item-amount.discount {
    color: #28a745;
}

.amount-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0 0 0;
    border-top: 2px solid #dee2e6;
    font-size: 18px;
    font-weight: 700;
}

.total-label {
    color: #32325d;
}

.total-amount {
    color: #635bff;
}

.payment-context-info {
    margin-top: 12px;
    text-align: center;
}

.payment-amount-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 20px;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e9ecef;
    border-top: 2px solid #635bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Payment Method Form */
.payment-method-form-wrapper {
    margin-bottom: 24px;
}

.existing-payment-method {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.existing-payment-method h4 {
    margin-bottom: 16px;
    color: #32325d;
    font-size: 16px;
}

.payment-method-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    padding: 16px;
}

.card-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-info i {
    font-size: 24px;
    color: #635bff;
}

.card-brand {
    font-weight: 600;
    color: #32325d;
}

.card-last4 {
    font-family: 'Courier New', monospace;
    color: #6c757d;
}

.card-expiry {
    color: #6c757d;
    font-size: 14px;
}

.payment-method-form h4 {
    margin-bottom: 20px;
    color: #32325d;
    font-size: 18px;
}

.secure-card-form {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 24px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .stripe-payment-wrapper {
        padding: 16px;
    }
    
    .stripe-payment-form,
    .secure-card-form {
        padding: 16px;
    }
    
    .payment-method-card {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .card-info {
        flex-wrap: wrap;
    }
    
    .security-badges {
        justify-content: center;
    }
}

/* Utility Classes */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-primary {
    background-color: #635bff;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: #5a52e8;
}

.btn-outline-primary {
    border-color: #635bff;
    color: #635bff;
    background-color: transparent;
}

.btn-outline-primary:hover:not(:disabled) {
    background-color: #635bff;
    color: white;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background-color: #5a6268;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
}

.text-muted {
    color: #6c757d;
}

.mt-2 {
    margin-top: 8px;
}