/* Credit Purchase Modal Styles */

.credit-purchase-modal {
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.credit-purchase-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border-radius: 8px 8px 0 0;
}

.credit-purchase-modal .modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.credit-purchase-modal .close-modal {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: white;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.credit-purchase-modal .close-modal:hover {
    opacity: 1;
}

.credit-purchase-modal .modal-body {
    padding: 30px;
}

.credit-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.credit-info p {
    margin: 0 0 10px 0;
    font-weight: 600;
    color: #333;
}

.credit-info ul {
    margin: 10px 0 0 0;
    padding-left: 20px;
}

.credit-info li {
    margin: 5px 0;
    color: #555;
}

.packages-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.credit-package {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    background: white;
}

.credit-package:hover {
    border-color: #4CAF50;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.15);
}

.credit-package.popular {
    border-color: #4CAF50;
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.2);
}

.package-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.package-header h3 {
    margin: 0 0 10px 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
}

.credits-count {
    font-size: 2rem;
    font-weight: 700;
    color: #4CAF50;
    margin-bottom: 15px;
}

.package-price {
    margin-bottom: 15px;
}

.package-price .price {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
}

.package-price .per-credit {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

.package-description {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 20px;
    font-style: italic;
}

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

.package-features li {
    padding: 5px 0;
    font-size: 0.9rem;
    color: #555;
    position: relative;
    padding-left: 20px;
}

.package-features li:before {
    content: '✅';
    position: absolute;
    left: 0;
    top: 5px;
}

.purchase-btn {
    width: 100%;
    padding: 15px 20px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.purchase-btn:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3);
}

.purchase-btn:active {
    transform: translateY(0);
}

.purchase-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.current-balance {
    background: #e8f5e8;
    border: 2px solid #4CAF50;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.current-credits {
    font-size: 1.1rem;
    color: #2e7d32;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .credit-purchase-modal {
        width: 95%;
        margin: 10px;
        max-height: 95vh;
    }
    
    .credit-purchase-modal .modal-body {
        padding: 20px 15px;
    }
    
    .credit-info {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .credit-info p {
        font-size: 14px;
    }
    
    .packages-container {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-bottom: 20px;
    }
    
    .credit-package {
        padding: 20px 15px;
        border-radius: 8px;
    }
    
    .package-price .price {
        font-size: 1.8rem;
    }
    
    .credits-count {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }
    
    .package-description {
        font-size: 13px;
        margin: 8px 0;
    }
    
    .package-badge {
        font-size: 11px;
        padding: 4px 12px;
    }
    
    /* Improve button sizing on mobile */
    .purchase-btn {
        padding: 12px 20px;
        font-size: 14px;
        margin-top: 15px;
        width: 100%;
        min-height: 44px; /* Touch-friendly */
    }
}

@media (max-width: 480px) {
    .credit-purchase-modal {
        width: 100%;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
        height: 100vh;
    }
    
    .credit-purchase-modal .modal-header {
        padding: 15px;
        border-radius: 0;
    }
    
    .credit-purchase-modal .modal-header h2 {
        font-size: 1.1rem;
    }
    
    .credit-purchase-modal .modal-body {
        padding: 15px 10px;
        height: calc(100vh - 120px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .credit-info {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .credit-info p {
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    .credit-info ul {
        padding-left: 16px;
    }
    
    .credit-info li {
        font-size: 12px;
        margin: 3px 0;
    }
    
    .packages-container {
        gap: 12px;
        margin-bottom: 15px;
    }
    
    .credit-package {
        padding: 15px 12px;
    }
    
    .package-price .price {
        font-size: 1.5rem;
    }
    
    .credits-count {
        font-size: 1.1rem;
    }
    
    .package-description {
        font-size: 12px;
        line-height: 1.3;
    }
    
    .purchase-btn {
        font-size: 13px;
        padding: 12px 16px;
    }
    
    .current-balance {
        padding: 12px;
        margin: 15px 0;
    }
    
    .current-credits {
        font-size: 1rem;
    }
}

/* Stripe Pricing Table Container */
.stripe-pricing-container {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.stripe-pricing-container stripe-pricing-table {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
}

/* Ensure modal is wide enough for Stripe table */
.credit-purchase-modal {
    max-width: 900px !important;
}
