/**
 * Stripe Checkout & Payment Styles
 * Professional payment UI for Ad Sparx
 */

/* Success Modal */
.stripe-success-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: 999999;
    animation: fadeIn 0.3s ease;
}

.stripe-success-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 217, 255, 0.3);
    border: 2px solid rgba(0, 217, 255, 0.3);
    animation: slideUp 0.5s ease;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #00d9ff, #00ff88);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: white;
    margin: 0 auto 20px;
    animation: scaleIn 0.5s ease 0.3s both;
    box-shadow: 0 10px 30px rgba(0, 217, 255, 0.5);
}

.stripe-success-content h2 {
    color: #00d9ff;
    font-size: 32px;
    margin-bottom: 10px;
    font-weight: 700;
}

.stripe-success-content > p {
    color: #fff;
    font-size: 18px;
    margin-bottom: 30px;
}

.success-details {
    background: rgba(0, 217, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid rgba(0, 217, 255, 0.2);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row span {
    color: #aaa;
    font-size: 14px;
}

.detail-row strong {
    color: #00d9ff;
    font-size: 16px;
}

.success-benefits {
    text-align: left;
    margin-bottom: 30px;
}

.success-benefits h3 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 15px;
    text-align: center;
}

.success-benefits ul {
    list-style: none;
    padding: 0;
}

.success-benefits li {
    color: #fff;
    padding: 8px 0;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.success-benefits li::before {
    content: '✓';
    color: #00ff88;
    font-weight: bold;
    margin-right: 10px;
    font-size: 18px;
}

/* Management Modal */
.stripe-management-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: 999999;
    animation: fadeIn 0.3s ease;
}

.stripe-management-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 217, 255, 0.3);
    border: 2px solid rgba(0, 217, 255, 0.3);
    position: relative;
    animation: slideUp 0.5s ease;
}

.stripe-management-content h2 {
    color: #00d9ff;
    font-size: 28px;
    margin-bottom: 30px;
    text-align: center;
}

.current-plan {
    background: rgba(0, 217, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid rgba(0, 217, 255, 0.2);
}

.current-plan h3 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 15px;
}

.plan-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.plan-info p {
    color: #fff;
    font-size: 14px;
    margin: 0;
}

.plan-badge {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.plan-badge.bronze {
    background: linear-gradient(135deg, #cd7f32, #b8860b);
    color: white;
}

.plan-badge.gold {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #1a1a2e;
}

.plan-badge.platinum {
    background: linear-gradient(135deg, #e5e4e2, #ffffff);
    color: #1a1a2e;
}

.status-active {
    color: #00ff88;
    font-weight: 600;
}

.management-actions {
    margin-top: 30px;
}

.management-actions h3 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 20px;
}

.action-btn {
    width: 100%;
    background: rgba(0, 217, 255, 0.1);
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: rgba(0, 217, 255, 0.2);
    border-color: rgba(0, 217, 255, 0.5);
    transform: translateX(5px);
}

.action-btn .icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 217, 255, 0.2);
    border-radius: 10px;
}

.action-btn div {
    flex: 1;
    text-align: left;
}

.action-btn strong {
    color: #fff;
    font-size: 16px;
    display: block;
    margin-bottom: 5px;
}

.action-btn small {
    color: #aaa;
    font-size: 13px;
}

.action-btn.danger {
    border-color: rgba(255, 77, 77, 0.3);
}

.action-btn.danger:hover {
    background: rgba(255, 77, 77, 0.1);
    border-color: rgba(255, 77, 77, 0.5);
}

.action-btn.danger .icon {
    background: rgba(255, 77, 77, 0.2);
}

/* Upgrade Modal */
.stripe-upgrade-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: 9999999;
    animation: fadeIn 0.3s ease;
}

.stripe-upgrade-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px;
    padding: 40px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 217, 255, 0.3);
    border: 2px solid rgba(0, 217, 255, 0.3);
    position: relative;
    animation: slideUp 0.5s ease;
}

.stripe-upgrade-content h2 {
    color: #00d9ff;
    font-size: 28px;
    margin-bottom: 30px;
    text-align: center;
}

.upgrade-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.upgrade-option {
    background: rgba(0, 217, 255, 0.05);
    border: 2px solid rgba(0, 217, 255, 0.2);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
}

.upgrade-option:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 217, 255, 0.5);
    box-shadow: 0 10px 30px rgba(0, 217, 255, 0.2);
}

.upgrade-option .plan-badge {
    margin-bottom: 15px;
}

.plan-price {
    color: #00d9ff;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    text-align: left;
}

.plan-features li {
    color: #fff;
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.plan-features li:last-child {
    border-bottom: none;
}

/* Close Button */
.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 77, 77, 0.2);
    border: 1px solid rgba(255, 77, 77, 0.3);
    color: #ff4d4d;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 77, 77, 0.3);
    transform: rotate(90deg);
}

/* Notification */
.stripe-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 217, 255, 0.9);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 9999999;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.3s ease;
}

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

.stripe-notification.success {
    background: rgba(0, 255, 136, 0.9);
}

.stripe-notification.error {
    background: rgba(255, 77, 77, 0.9);
}

.stripe-notification.info {
    background: rgba(0, 217, 255, 0.9);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .stripe-success-content,
    .stripe-management-content,
    .stripe-upgrade-content {
        padding: 30px 20px;
        max-height: 95vh;
    }
    
    .stripe-success-content h2 {
        font-size: 24px;
    }
    
    .success-icon {
        width: 60px;
        height: 60px;
        font-size: 36px;
    }
    
    .upgrade-options {
        grid-template-columns: 1fr;
    }
    
    .action-btn {
        padding: 12px 15px;
    }
    
    .action-btn .icon {
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
}

/* Pricing Page Integration */
.pricing-card .subscribe-btn {
    position: relative;
    overflow: hidden;
}

.pricing-card .subscribe-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.pricing-card .subscribe-btn:active::after {
    width: 300px;
    height: 300px;
}

/* Loading State */
.stripe-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

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

/* Manage Subscription Button in User Menu */
.user-menu .manage-subscription-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(0, 217, 255, 0.1);
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 8px;
    color: #00d9ff;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.user-menu .manage-subscription-btn:hover {
    background: rgba(0, 217, 255, 0.2);
    transform: translateX(5px);
}

.user-menu .manage-subscription-btn .icon {
    font-size: 18px;
}