/* Payment Processing Styles - Consistent across all payment screens */

/* Payment Container */
.payment-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

/* Payment Plan Cards */
.plan-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.plan-card {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.plan-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.plan-card.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
}

.plan-card.current {
    border-color: #10B981;
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
}

.plan-card.selected::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 15px;
    right: 15px;
    color: #667eea;
    font-size: 1.2rem;
}

.plan-card.current::after {
    content: 'Current Plan';
    position: absolute;
    top: -10px;
    right: 20px;
    background: #10B981;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: none;
}

/* Plan Details */
.plan-name {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #2d3748;
}

.plan-price {
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.plan-price .currency {
    font-size: 1.2rem;
    vertical-align: top;
}

.plan-price .period {
    font-size: 1rem;
    color: #718096;
    font-weight: 400;
}

.plan-description {
    color: #718096;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

.plan-features li {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #4a5568;
}

.plan-features i {
    color: #10B981;
    margin-right: 0.5rem;
    width: 16px;
}

/* Trial Badge */
.trial-badge {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: inline-block;
}

.upgrade-badge {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: inline-block;
}

/* Payment Elements */
.payment-element {
    margin: 1.5rem 0;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f9fafb;
}

.payment-summary {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    color: #4a5568;
}

.summary-total {
    border-top: 1px solid #e2e8f0;
    padding-top: 0.5rem;
    margin-top: 0.5rem;
    font-weight: 700;
}

/* Buttons */
.plan-button {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.plan-button.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.plan-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.plan-button.upgrade {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.plan-button.upgrade:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.plan-button.downgrade {
    background: #F59E0B;
    color: white;
}

.plan-button.downgrade:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}

.plan-button.current {
    background: #10B981;
    color: white;
    cursor: not-allowed;
    opacity: 0.8;
}

.plan-button.free {
    background: #6B7280;
    color: white;
}

.plan-button.free:hover {
    background: #4B5563;
    transform: translateY(-2px);
}

.plan-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Privacy and Security Notices */
.privacy-notice {
    background: #ecfdf5;
    border: 1px solid #d1fae5;
    color: #065f46;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    font-size: 0.9rem;
}

.security-notice {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    font-size: 0.9rem;
}

/* Loading States */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Messages */
.success-message {
    background: #ecfdf5;
    border: 1px solid #d1fae5;
    color: #065f46;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.warning-message {
    background: #fefce8;
    border: 1px solid #fde047;
    color: #a16207;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Payment History */
.payment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
    background: white;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.payment-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.payment-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.payment-completed { background: #D1FAE5; color: #065F46; }
.payment-failed { background: #FEE2E2; color: #991B1B; }
.payment-pending { background: #FEF3C7; color: #92400E; }

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
}

.close:hover {
    color: #333;
}

/* Responsive Design */
@media (max-width: 768px) {
    .payment-container {
        padding: 1rem;
    }
    
    .plan-selection {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .plan-card {
        padding: 1rem;
    }
    
    .plan-price {
        font-size: 1.5rem;
    }
    
    .payment-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 1.5rem;
    }
}

/* Status Badges */
.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-active { background: #10B981; color: white; }
.status-trialing { background: #F59E0B; color: white; }
.status-canceled { background: #EF4444; color: white; }
.status-past_due { background: #F97316; color: white; }

/* Subscription Status */
.subscription-status {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.billing-controls {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.btn-portal {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-portal:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.5);
    transform: translateY(-2px);
    color: white;
} 