/**
 * Credit System Styles
 * Styles for credit badges, insufficient credits modal, and credit displays
 */

/* ============================================
   Credit Cost Badges on AI Features
   ============================================ */
.feature-cost-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #a855f7, #c084fc);
    color: white;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(168, 85, 247, 0.2);
}

.feature-cost-badge.insufficient {
    background: linear-gradient(135deg, #ef4444, #f87171);
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
    animation: pulse-warning 2s ease-in-out infinite;
}

@keyframes pulse-warning {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Disable buttons with insufficient credits */
button.insufficient-credits,
.action-card.insufficient-credits {
    opacity: 0.6;
    cursor: not-allowed;
    position: relative;
}

button.insufficient-credits::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.05);
    pointer-events: none;
}

/* ============================================
   Credit Balance Display
   ============================================ */
.credit-balance-display {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 12px;
    font-weight: 600;
    color: #a855f7;
}

.credit-balance-display svg {
    width: 20px;
    height: 20px;
}

.credit-balance {
    font-size: 1rem;
    font-weight: 700;
}

/* Low balance warning */
.credit-balance-display.low-balance {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* ============================================
   Insufficient Credits Modal
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 90%;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.modal-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-title svg {
    color: #ef4444;
}

.modal-close {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    border-radius: 8px;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
}

.modal-body {
    padding: 2rem;
}

/* ============================================
   AI Feature Cards with Credit Costs
   ============================================ */
.ai-feature-card {
    position: relative;
    padding: 1.5rem;
    background: white;
    border: 2px solid rgba(168, 85, 247, 0.1);
    border-radius: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.ai-feature-card:hover {
    border-color: rgba(168, 85, 247, 0.3);
    box-shadow: 0 8px 24px rgba(168, 85, 247, 0.15);
    transform: translateY(-2px);
}

.ai-feature-card .feature-cost {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #a855f7, #c084fc);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}

.ai-feature-card.insufficient-credits {
    opacity: 0.6;
    cursor: not-allowed;
    border-color: rgba(239, 68, 68, 0.2);
}

.ai-feature-card.insufficient-credits:hover {
    transform: none;
    box-shadow: none;
}

.ai-feature-card.insufficient-credits .feature-cost {
    background: linear-gradient(135deg, #ef4444, #f87171);
}

/* ============================================
   Credit Purchase Cards
   ============================================ */
.credit-package-card {
    background: white;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.3s ease;
    text-align: center;
}

.credit-package-card.featured {
    border-color: #a855f7;
    box-shadow: 0 8px 32px rgba(168, 85, 247, 0.2);
    position: relative;
}

.credit-package-card.featured::before {
    content: 'BEST VALUE';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #a855f7, #c084fc);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.credit-package-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .modal-container {
        max-width: 95%;
    }
    
    .modal-header {
        padding: 1rem 1.5rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .feature-cost-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }
}

