/* Payment Page Styles */

.payment-section {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
}

.payment-header {
    text-align: center;
    margin-bottom: 3rem;
}

.payment-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
}

.payment-header p {
    font-size: 1.1rem;
    color: #64748b;
}

.payment-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Plan Selection */
.plan-selection {
    margin-bottom: 3rem;
}

.plan-selection h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 2rem;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.single-plan-container {
    max-width: 500px;
    margin: 0 auto;
}

.single-plan-container .plan-card {
    margin-bottom: 2rem;
}

.plan-description {
    text-align: center;
    color: #64748b;
    font-size: 1rem;
    margin-top: 0.5rem;
}

.plan-guarantee {
    margin-top: 1.5rem;
    text-align: center;
}

.guarantee-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #f0fdf4;
    color: #059669;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid #bbf7d0;
    font-size: 0.875rem;
    font-weight: 500;
}

.plan-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.plan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.plan-card.featured {
    border-color: #007acc;
    transform: scale(1.05);
}

.plan-card.selected {
    border-color: #007acc;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #007acc, #0056b3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    z-index: 10;
}

.plan-header {
    text-align: center;
    margin-bottom: 2rem;
    margin-top: 2rem;
    padding-top: 0.5rem;
}

.plan-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
}

.plan-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
}

.plan-price .currency {
    font-size: 1.25rem;
    font-weight: 500;
    color: #64748b;
}

.plan-price .amount {
    font-size: 3rem;
    font-weight: 700;
    color: #007acc;
}

.plan-price .period {
    font-size: 1rem;
    color: #64748b;
}

.plan-features ul {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
}

.plan-features li {
    padding: 0.75rem 0;
    color: #475569;
    font-size: 0.95rem;
    border-bottom: 1px solid #e2e8f0;
}

.plan-features li:last-child {
    border-bottom: none;
}

.plan-select-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #007acc, #0056b3);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.plan-select-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 122, 204, 0.3);
}

/* Payment Form */
.payment-form-container {
    max-width: 900px;
    margin: 0 auto;
}

.payment-form {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.form-section {
    margin-bottom: 2rem;
}

.form-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #007acc;
    box-shadow: 0 0 0 3px rgba(0, 122, 204, 0.1);
}

.coupon-input {
    display: flex;
    gap: 0.5rem;
}

.coupon-input input {
    flex: 1;
}

.form-help {
    display: block;
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.25rem;
    font-style: italic;
}

.billing-header {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 2rem 0 1rem 0;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.btn-secondary {
    padding: 0.75rem 1rem;
    background: #f1f5f9;
    color: #475569;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

/* Order Summary */
.order-summary {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.order-summary h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item.discount {
    color: #059669;
}

.summary-divider {
    height: 1px;
    background: #cbd5e1;
    margin: 1rem 0;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    padding-top: 1rem;
}

/* Payment Methods */
.payment-methods h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
}

.payment-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.payment-tab {
    flex: 1;
    padding: 1rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 80px;
}

.payment-tab:hover {
    border-color: #007acc;
}

.payment-tab.active {
    border-color: #007acc;
    background: #f0f9ff;
}

.payment-tab img {
    height: 24px;
    object-fit: contain;
}

.payment-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.25rem;
}

.payment-tab span {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.payment-tab.active span {
    color: #007acc;
}

.payment-method-content {
    margin-bottom: 2rem;
}

/* Stripe Elements */
.stripe-form {
    margin-bottom: 1rem;
}

.stripe-element {
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    transition: border-color 0.3s ease;
}

.stripe-element:focus-within {
    border-color: #007acc;
    box-shadow: 0 0 0 3px rgba(0, 122, 204, 0.1);
}

.error-message {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Payment Button */
.payment-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #007acc, #0056b3);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.payment-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 122, 204, 0.3);
}

.payment-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Security Notice */
.security-notice {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 2rem;
}

.security-icons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: #059669;
    font-weight: 600;
}

.security-notice p {
    color: #065f46;
    font-size: 0.875rem;
    margin: 0;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header h2 {
    color: #1e293b;
    margin-bottom: 1rem;
    text-align: center;
}

.modal-body {
    margin-bottom: 2rem;
}

.license-info {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.license-info label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.license-key-display {
    display: flex;
    gap: 0.5rem;
}

.license-key-display input {
    flex: 1;
    padding: 0.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.875rem;
}

.next-steps {
    margin-top: 1.5rem;
}

.next-steps h4 {
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.next-steps ol {
    padding-left: 1.5rem;
    color: #475569;
}

.next-steps li {
    margin-bottom: 0.25rem;
}

.modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .payment-section {
        padding: 100px 0 60px;
    }
    
    .payment-header h1 {
        font-size: 2rem;
    }
    
    .plans-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .plan-card.featured {
        transform: none;
    }
    
    .payment-form {
        padding: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .payment-tabs {
        flex-direction: column;
    }
    
    .modal-content {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .modal-footer {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .payment-header h1 {
        font-size: 1.75rem;
    }
    
    .plan-price .amount {
        font-size: 2.5rem;
    }
    
    .payment-form {
        padding: 1rem;
    }
    
    .coupon-input {
        flex-direction: column;
    }
}

/* Animation for smooth transitions */
.payment-form-container {
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Success states */
.success {
    border-color: #10b981 !important;
    background: #f0fdf4;
}

.error {
    border-color: #ef4444 !important;
    background: #fef2f2;
}

/* Loading states */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}
