/* Monetization System Styles */

/* Monetization Tabs */
.monetization-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 1rem;
}

.monetization-tabs .tab-button {
    padding: 0.75rem 1.5rem;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 600;
    color: #64748b;
    border-bottom: 3px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    position: relative;
    border-radius: 8px 8px 0 0;
}

.monetization-tabs .tab-button.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
}

.monetization-tabs .tab-button:hover {
    color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    transform: translateY(-1px);
}

/* Monetization Tab Content */
.monetization-tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.monetization-tab-content.active {
    display: block;
}

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

/* Monetization Actions */
.monetization-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    border: 2px solid #e2e8f0;
}

.monetization-actions .btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.monetization-actions .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.monetization-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.monetization-actions .btn-secondary {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #64748b;
    border: 2px solid #cbd5e1;
}

.monetization-actions .btn-secondary:hover {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    transform: translateY(-1px);
}

/* Coin Package Cards */
.coin-packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.coin-package-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.coin-package-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.coin-package-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.15);
    border-color: #667eea;
}

.coin-package-card:hover::before {
    transform: scaleX(1);
}

.coin-package-card.popular::before {
    transform: scaleX(1);
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.coin-package-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.coin-package-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.coin-package-badge {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.coin-package-badge.popular {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.coin-package-details {
    margin-bottom: 1.5rem;
}

.coin-amount {
    font-size: 2rem;
    font-weight: 800;
    color: #667eea;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.coin-amount::before {
    content: '🪙';
    font-size: 1.5rem;
}

.episode-equivalent {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.pricing-breakdown {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.pricing-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.pricing-row:last-child {
    margin-bottom: 0;
    font-weight: 700;
    color: #1e293b;
    border-top: 1px solid #e2e8f0;
    padding-top: 0.5rem;
}

.pricing-label {
    color: #64748b;
    font-size: 0.9rem;
}

.pricing-value {
    font-weight: 600;
    color: #1e293b;
}

.coin-package-actions {
    display: flex;
    gap: 0.75rem;
}

.coin-package-actions .btn {
    flex: 1;
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.coin-package-actions .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.coin-package-actions .btn-secondary {
    background: #f1f5f9;
    color: #64748b;
    border: 2px solid #e2e8f0;
}

.coin-package-actions .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Subscription Tier Cards */
.subscription-tiers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.subscription-tier-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.subscription-tier-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.subscription-tier-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

.subscription-tier-card:hover::before {
    transform: scaleX(1);
}

.subscription-tier-card.main-tier {
    border-color: #f59e0b;
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.15);
}

.subscription-tier-card.main-tier::before {
    transform: scaleX(1);
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.subscription-tier-header {
    text-align: center;
    margin-bottom: 2rem;
}

.tier-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.tier-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.tier-badge.entry-level {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    color: white;
}

.tier-badge.most-popular {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.tier-badge.exclusive {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
}

.pricing-display {
    text-align: center;
    margin-bottom: 2rem;
}

.weekly-price {
    font-size: 2.5rem;
    font-weight: 900;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.monthly-equivalent {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.gst-breakdown {
    background: #f8fafc;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #64748b;
}

.tier-features {
    margin-bottom: 2rem;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    color: #374151;
}

.features-list li::before {
    content: '✓';
    color: #10b981;
    font-weight: 700;
    font-size: 1.1rem;
}

.tier-actions {
    display: flex;
    gap: 1rem;
}

.tier-actions .btn {
    flex: 1;
    padding: 1rem;
    border-radius: 12px;
    font-weight: 700;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tier-actions .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.tier-actions .btn-secondary {
    background: #f1f5f9;
    color: #64748b;
    border: 2px solid #e2e8f0;
}

/* Coin Rewards Table */
.coin-rewards-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.coin-rewards-table th,
.coin-rewards-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.coin-rewards-table th {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    font-weight: 700;
    color: #374151;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.coin-rewards-table tr:hover {
    background: #f8fafc;
}

.reward-type {
    font-weight: 600;
    color: #1e293b;
}

.coin-amount {
    font-weight: 700;
    color: #667eea;
    font-size: 1.1rem;
}

.enabled-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.enabled-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.enabled-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.enabled-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .enabled-slider {
    background-color: #10b981;
}

input:checked + .enabled-slider:before {
    transform: translateX(26px);
}

.frequency-badge {
    background: #e0f2fe;
    color: #0369a1;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.limit-info {
    color: #64748b;
    font-size: 0.85rem;
}

/* Payment Gateway Cards */
.payment-gateways-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.payment-gateway-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
}

.payment-gateway-card.awaiting-connection {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.payment-gateway-card.awaiting-connection::before {
    content: 'Awaiting Real Connection';
    position: absolute;
    top: -1px;
    right: -1px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0 16px 0 16px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gateway-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.gateway-logo {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
}

.gateway-info h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
}

.gateway-info p {
    margin: 0.25rem 0 0 0;
    color: #64748b;
    font-size: 0.9rem;
}

.gateway-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #10b981;
}

.status-indicator.awaiting {
    background: #f59e0b;
}

.status-indicator.disabled {
    background: #ef4444;
}

.status-text {
    font-weight: 600;
    color: #374151;
}

.gateway-config {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.config-field {
    margin-bottom: 1rem;
}

.config-field:last-child {
    margin-bottom: 0;
}

.config-label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.config-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.config-input:focus {
    outline: none;
    border-color: #667eea;
}

.config-input:disabled {
    background: #f1f5f9;
    color: #64748b;
    cursor: not-allowed;
}

.connection-note {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    color: #92400e;
    font-size: 0.9rem;
}

.gateway-actions {
    display: flex;
    gap: 1rem;
}

.gateway-actions .btn {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.gateway-actions .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.gateway-actions .btn-secondary {
    background: #f1f5f9;
    color: #64748b;
    border: 2px solid #e2e8f0;
}

.gateway-actions .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Transaction History */
.transaction-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-label {
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.filter-select {
    padding: 0.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
}

.transaction-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.transaction-table th,
.transaction-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.transaction-table th {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    font-weight: 700;
    color: #374151;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.transaction-table tr:hover {
    background: #f8fafc;
}

.transaction-id {
    font-family: monospace;
    font-size: 0.85rem;
    color: #64748b;
}

.transaction-type {
    font-weight: 600;
    color: #1e293b;
}

.transaction-amount {
    font-weight: 700;
    color: #059669;
}

.transaction-amount.negative {
    color: #dc2626;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.success {
    background: #dcfce7;
    color: #166534;
}

.status-badge.pending {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.failed {
    background: #fee2e2;
    color: #991b1b;
}

.transaction-actions {
    display: flex;
    gap: 0.5rem;
}

.transaction-actions .btn {
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.transaction-actions .btn-primary {
    background: #667eea;
    color: white;
    border: none;
}

.transaction-actions .btn-secondary {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .monetization-tabs {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .monetization-tabs .tab-button {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .coin-packages-grid,
    .subscription-tiers-grid,
    .payment-gateways-grid {
        grid-template-columns: 1fr;
    }
    
    .transaction-filters {
        flex-direction: column;
    }
    
    .transaction-table {
        font-size: 0.85rem;
    }
    
    .transaction-table th,
    .transaction-table td {
        padding: 0.75rem 0.5rem;
    }
}

/* Monetization Info and Notes */
.monetization-note {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
    text-align: center;
}

.monetization-note p {
    margin: 0 0 1rem 0;
    color: #92400e;
    font-weight: 600;
}

.monetization-note .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.monetization-note .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.coin-packages-info,
.subscription-tiers-info {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #0ea5e9;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.coin-packages-info h4,
.subscription-tiers-info h4 {
    margin: 0 0 0.5rem 0;
    color: #0c4a6e;
    font-size: 1.25rem;
    font-weight: 700;
}

.coin-packages-info p,
.subscription-tiers-info p {
    margin: 0;
    color: #0369a1;
    font-size: 0.95rem;
}

/* Loading States */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: #64748b;
    font-size: 1.1rem;
}

.loading::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 0.75rem;
}

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