/* Payment Integration Styles */

.payment-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.payment-modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.payment-modal-content {
    background: #fff;
    padding: 2em;
    border-radius: 12px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.payment-modal-overlay.visible .payment-modal-content {
    transform: scale(1);
}

.payment-modal-content h3 {
    margin-top: 0;
    margin-bottom: 0.5em;
    color: #333;
}

.payment-modal-content p {
    margin-bottom: 1.5em;
    color: #666;
}

.payment-modal-actions {
    display: flex;
    justify-content: center;
    gap: 1em;
}

/* Usage Indicator in Header */
.usage-indicator {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.usage-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.usage-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
}

.usage-item i {
    font-size: 0.8rem;
    opacity: 0.8;
}

.upgrade-btn {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #1a1a1a;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

.upgrade-btn.premium-active {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

/* Payment Modal */
.payment-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 20px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    margin: 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-header h2 i {
    color: #ffd700;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #f5f5f5;
    color: #333;
}

.modal-body {
    padding: 2rem;
}

/* Pricing Cards */
.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.pricing-card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.pricing-card.featured {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.pricing-card.featured .plan-features .feature i {
    color: #ffd700;
}

.badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #ffd700;
    color: #333;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.plan-header h3 {
    margin: 0 0 1rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.price {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #667eea;
}

.pricing-card.featured .price {
    color: #ffd700;
}

.plan-features {
    margin: 2rem 0;
    text-align: left;
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.feature i {
    color: #4CAF50;
    font-size: 1.1rem;
    width: 20px;
}

.select-plan-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.select-plan-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.pricing-card.featured .select-plan-btn {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #333;
}

/* Payment Processing */
.payment-processing {
    text-align: center;
    padding: 3rem 2rem;
}

.processing-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 2rem;
}

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

.payment-processing p {
    font-size: 1.2rem;
    color: #666;
    margin: 0;
}

/* Payment Success */
.payment-success {
    text-align: center;
    padding: 3rem 2rem;
}

.success-icon {
    font-size: 4rem;
    color: #4CAF50;
    margin-bottom: 1rem;
}

.payment-success h3 {
    margin: 0 0 1rem;
    color: #333;
    font-size: 1.8rem;
}

.payment-success p {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.continue-btn {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.continue-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

/* Notifications */
.notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: white;
    border-radius: 10px;
    padding: 1rem 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 400px;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notification.success {
    border-left: 4px solid #4CAF50;
}

.notification.success i {
    color: #4CAF50;
}

.notification.error {
    border-left: 4px solid #f44336;
}

.notification.error i {
    color: #f44336;
}

.notification.warning {
    border-left: 4px solid #ff9800;
}

.notification.warning i {
    color: #ff9800;
}

.notification.info {
    border-left: 4px solid #2196F3;
}

.notification.info i {
    color: #2196F3;
}

/* Responsive Design */
@media (max-width: 768px) {
    .usage-stats {
        gap: 0.5rem;
        padding: 0.4rem 0.8rem;
    }
    
    .usage-item {
        font-size: 0.8rem;
    }
    
    .upgrade-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-header,
    .modal-body {
        padding: 1.5rem;
    }
    
    .pricing-cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .pricing-card {
        padding: 1.5rem;
    }
    
    .notification {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .usage-stats {
        flex-direction: column;
        gap: 0.25rem;
        padding: 0.5rem;
    }
    
    .usage-item {
        font-size: 0.75rem;
    }
    
    .upgrade-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
    
    .price {
        font-size: 2.5rem;
    }
}

/* Stripe Elements Payment Form Styles */
.stripe-payment-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.stripe-modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.stripe-modal-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.stripe-modal-header h3 {
    margin: 0 0 0.5rem 0;
    color: #333;
}

.payment-amount {
    font-size: 1.5rem;
    font-weight: bold;
    color: #4CAF50;
}

#card-element {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    margin: 1rem 0;
    background: white;
}

#card-errors {
    color: #e74c3c;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.stripe-modal-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.stripe-modal-buttons button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.stripe-pay-btn {
    background: #4CAF50;
    color: white;
}

.stripe-pay-btn:hover {
    background: #45a049;
}

.stripe-pay-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.stripe-cancel-btn {
    background: #f44336;
    color: white;
}

.stripe-cancel-btn:hover {
    background: #da190b;
}

.payment-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: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}