/**
 * BridgeSync Stripe Billing Styles
 * 
 * CSS voor Stripe checkout en customer portal
 */

/* Pricing Table Styles */
.bridgesync-stripe-pricing {
    margin: 2rem 0;
}

.pricing-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.pricing-card {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 2rem;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.pricing-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.pricing-card.featured {
    border-color: #3b82f6;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.15);
    transform: scale(1.05);
}

.featured-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #3b82f6;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.pricing-header {
    text-align: center;
    margin-bottom: 2rem;
}

.pricing-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    margin: 1rem 0;
}

.currency {
    font-size: 1.25rem;
    font-weight: 600;
    color: #6b7280;
}

.amount {
    font-size: 3rem;
    font-weight: 800;
    color: #1f2937;
    margin: 0 0.25rem;
}

.period {
    font-size: 1rem;
    color: #6b7280;
}

.pricing-features {
    margin: 2rem 0;
}

.pricing-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pricing-features li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
    font-size: 0.95rem;
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-action {
    text-align: center;
    margin-top: 2rem;
}

.stripe-checkout-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-bottom: 0.5rem;
}

.stripe-checkout-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.stripe-checkout-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

.trial-note {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0.5rem 0 0 0;
}

/* Customer Portal Styles */
.bridgesync-customer-portal {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.bridgesync-customer-portal h2 {
    color: #1f2937;
    margin-bottom: 2rem;
    font-size: 2rem;
    font-weight: 700;
}

.no-subscriptions {
    text-align: center;
    padding: 3rem;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.no-subscriptions p {
    color: #6b7280;
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

.subscriptions-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.subscription-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.subscription-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.subscription-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f3f4f6;
}

.subscription-header h3 {
    color: #1f2937;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: capitalize;
}

.status-active {
    background: #dcfce7;
    color: #166534;
}

.status-trialing {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-past_due {
    background: #fed7d7;
    color: #c53030;
}

.status-canceled {
    background: #f3f4f6;
    color: #374151;
}

.subscription-details p {
    margin: 0.75rem 0;
    color: #374151;
}

.subscription-details strong {
    color: #1f2937;
}

.subscription-details code {
    background: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.875rem;
    color: #1f2937;
}

.copy-license {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    color: #374151;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    margin-left: 0.5rem;
    transition: all 0.2s ease;
}

.copy-license:hover {
    background: #e5e7eb;
}

.copy-license.copied {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.subscription-actions {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
    color: white;
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
    color: white;
}

.manage-subscription {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    color: #374151;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.manage-subscription:hover {
    background: #e5e7eb;
}

.manage-subscription:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Success/Cancel Pages */
.stripe-success-page,
.stripe-cancel-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.success-content,
.cancel-content {
    text-align: center;
    max-width: 600px;
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.success-icon,
.cancel-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.success-content h1,
.cancel-content h1 {
    color: #1f2937;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.lead {
    font-size: 1.25rem;
    color: #6b7280;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.next-steps {
    text-align: left;
    background: #f9fafb;
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.next-steps h3 {
    color: #1f2937;
    margin-bottom: 1rem;
}

.next-steps ol {
    color: #374151;
    line-height: 1.6;
}

.next-steps li {
    margin-bottom: 0.5rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* Admin Styles */
.stripe-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.stat-box {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    text-align: center;
}

.stat-box h3 {
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-number {
    color: #1f2937;
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .pricing-card.featured {
        transform: none;
    }
    
    .pricing-card.featured:hover {
        transform: translateY(-2px);
    }
    
    .subscription-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
    
    .amount {
        font-size: 2.5rem;
    }
    
    .success-content,
    .cancel-content {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .pricing-container,
    .bridgesync-customer-portal {
        padding: 0 0.5rem;
    }
    
    .pricing-card {
        padding: 1.5rem;
    }
    
    .subscription-card {
        padding: 1.5rem;
    }
    
    .success-content,
    .cancel-content {
        padding: 1.5rem;
    }
}
