/* Frontend styles for Stripe Forminator Integration */

/* Payment form container */
.sfi-payment-form {
    max-width: 500px;
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.sfi-payment-form h3 {
    margin-top: 0;
    margin-bottom: 25px;
    text-align: center;
    color: #333;
    font-size: 24px;
}

/* Stripe Elements styling */
.sfi-stripe-element {
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    background: #fff;
    transition: border-color 0.3s ease;
    margin-bottom: 20px;
}

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

.sfi-stripe-element--invalid {
    border-color: #e25950;
}

.sfi-stripe-element--complete {
    border-color: #28a745;
}

/* Payment method selection */
.sfi-payment-methods {
    margin-bottom: 25px;
}

.sfi-payment-methods h4 {
    margin-bottom: 15px;
    color: #333;
    font-size: 16px;
}

.sfi-payment-method {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
}

.sfi-payment-method:hover {
    border-color: #635bff;
    background: #f8f9ff;
}

.sfi-payment-method.selected {
    border-color: #635bff;
    background: #f8f9ff;
}

.sfi-payment-method input[type="radio"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
}

.sfi-payment-method-icon {
    width: 32px;
    height: 24px;
    margin-right: 12px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.sfi-payment-method-icon.card {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="24" fill="%23666"><rect width="32" height="24" rx="4" fill="%23f3f4f6"/><rect x="2" y="8" width="28" height="2" fill="%23666"/><rect x="2" y="12" width="12" height="2" fill="%23666"/></svg>');
}

.sfi-payment-method-icon.bizum {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="24" fill="%2300A0E6"><rect width="32" height="24" rx="4" fill="%2300A0E6"/><text x="16" y="16" text-anchor="middle" fill="white" font-family="Arial" font-size="8" font-weight="bold">Bizum</text></svg>');
}

.sfi-payment-method-label {
    flex-grow: 1;
    font-weight: 500;
    color: #333;
}

/* Payment amount display */
.sfi-payment-amount {
    text-align: center;
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
}

.sfi-payment-amount .amount {
    font-size: 36px;
    font-weight: bold;
    color: #0073aa;
    margin-bottom: 5px;
}

.sfi-payment-amount .currency {
    color: #666;
    font-size: 14px;
}

/* Payment button */
.sfi-pay-button {
    width: 100%;
    padding: 15px 20px;
    background: #635bff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sfi-pay-button:hover:not(:disabled) {
    background: #4f46e5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 91, 255, 0.25);
}

.sfi-pay-button:disabled {
    background: #a0a0a0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.sfi-pay-button.processing {
    background: #a0a0a0;
    cursor: not-allowed;
}

.sfi-pay-button.processing::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: #fff;
    border-radius: 50%;
    animation: sfi-spin 1s linear infinite;
    margin-left: 10px;
}

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

/* Error messages */
.sfi-error {
    color: #e25950;
    background: #fff5f5;
    border: 1px solid #feb2b2;
    border-radius: 6px;
    padding: 12px 15px;
    margin: 15px 0;
    font-size: 14px;
}

.sfi-success {
    color: #065f46;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 6px;
    padding: 12px 15px;
    margin: 15px 0;
    font-size: 14px;
}

/* Loading overlay */
.sfi-loading {
    position: relative;
}

.sfi-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 8px;
}

.sfi-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #e5e5e5;
    border-top-color: #635bff;
    border-radius: 50%;
    animation: sfi-spin 1s linear infinite;
    z-index: 11;
}

/* Secure payment indicator */
.sfi-security {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 15px;
    color: #666;
    font-size: 12px;
}

.sfi-security::before {
    content: '🔒';
    margin-right: 5px;
}

/* Payment success/cancel pages */
.sfi-payment-result {
    max-width: 600px;
    margin: 50px auto;
    padding: 40px 30px;
    text-align: center;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.sfi-payment-result .icon {
    font-size: 64px;
    margin-bottom: 25px;
}

.sfi-payment-result .success .icon {
    color: #28a745;
}

.sfi-payment-result .cancel .icon {
    color: #dc3545;
}

.sfi-payment-result h2 {
    margin-bottom: 15px;
    color: #333;
    font-size: 28px;
}

.sfi-payment-result p {
    margin-bottom: 20px;
    color: #666;
    font-size: 16px;
    line-height: 1.5;
}

.sfi-payment-result .transaction-id {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin: 20px 0;
    font-family: monospace;
    font-size: 14px;
    color: #495057;
}

/* Responsive design */
@media (max-width: 768px) {
    .sfi-payment-form {
        margin: 20px;
        padding: 20px;
    }
    
    .sfi-payment-amount .amount {
        font-size: 28px;
    }
    
    .sfi-payment-result {
        margin: 20px;
        padding: 30px 20px;
    }
    
    .sfi-payment-result h2 {
        font-size: 24px;
    }
    
    .sfi-payment-result .icon {
        font-size: 48px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .sfi-payment-form {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .sfi-payment-form h3 {
        color: #e2e8f0;
    }
    
    .sfi-stripe-element {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .sfi-payment-method {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .sfi-payment-method:hover {
        background: #553c9a;
        border-color: #635bff;
    }
    
    .sfi-payment-amount {
        background: #4a5568;
        color: #e2e8f0;
    }
}

/* Print styles */
@media print {
    .sfi-payment-form,
    .sfi-pay-button {
        display: none;
    }
} 