/* styles/monetization.css - Monetization and commission system styles */

/* Commission Modal Styles */
.commission-modal,
.payment-success-modal,
.analytics-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.commission-modal .modal-content,
.payment-success-modal .modal-content,
.analytics-modal .modal-content {
    background: #ffffff;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

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

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

.modal-header h3 {
    color: #1f2937;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
}

.modal-header i {
    color: #3b82f6;
    font-size: 1.25rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

/* Commission Breakdown Styles */
.breakdown-section {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.breakdown-section h4 {
    color: #1f2937;
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
    background: #ffffff;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.breakdown-item:hover {
    background: #f8fafc;
    border-color: #d1d5db;
}

.breakdown-item:last-child {
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 0;
}

.breakdown-item.commission {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

.breakdown-item.commission:hover {
    background: #fee2e2;
    border-color: #fca5a5;
}

.breakdown-item.total {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 2px solid #3b82f6;
    margin-top: 1rem;
    padding: 1.25rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e40af;
}

.breakdown-item.total:hover {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    border-color: #2563eb;
}

.breakdown-item .amount {
    font-family: 'Monaco', 'Menlo', monospace;
    font-weight: 700;
    font-size: 1rem;
}

.breakdown-item.total .amount {
    font-size: 1.2rem;
    color: #1e40af;
}

.breakdown-item span:first-child {
    font-weight: 600;
    color: #374151;
}

.breakdown-item.total span:first-child {
    color: #1e40af;
}

/* Tier Section Styles */
.tier-section {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.tier-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.tier-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.tier-badge.silver {
    background: linear-gradient(135deg, #c0c0c0, #a8a8a8);
    color: #1f2937;
}

.tier-badge.gold {
    background: linear-gradient(135deg, #ffd700, #ffb347);
    color: #1f2937;
}

.tier-stats {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.9rem;
    color: #6b7280;
}

/* Payment Methods Styles */
.payment-methods {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.method-card {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.method-card:hover:not(.disabled) {
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.method-card.selected {
    border-color: #3b82f6;
    background: #eff6ff;
}

.method-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f9fafb;
}

.method-icon {
    font-size: 2rem;
    color: #3b82f6;
    margin-bottom: 0.5rem;
}

.method-name {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.method-fee {
    font-size: 0.8rem;
    color: #6b7280;
}

.recommended {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #10b981;
    color: white;
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    font-weight: 600;
}

/* Payment Success Styles */
.success-header {
    text-align: center;
    padding: 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.success-header i {
    font-size: 4rem;
    color: #10b981;
    margin-bottom: 1rem;
}

.success-header h3 {
    color: #1f2937;
    margin: 0;
    font-size: 1.5rem;
}

.payment-details {
    padding: 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
}

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

.transaction-id {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9rem;
    background: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.next-steps {
    padding: 1.5rem 2rem;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    text-align: center;
    color: #6b7280;
}

/* Modal Actions */
.modal-actions {
    padding: 1.5rem 2rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.btn-primary,
.btn-secondary {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-size: 0.95rem;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

/* Commission Calculator Styles */
[data-calculator="commission"] {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

.calculator-header {
    margin-bottom: 1.5rem;
}

.calculator-header h3 {
    color: #1f2937;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.calculator-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

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

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

.input-group input,
.input-group select {
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #3b82f6;
}

.calc-result {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #e5e7eb;
}

.calc-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.calc-item:last-child {
    border-bottom: none;
}

.calc-item.total {
    border-top: 2px solid #d1d5db;
    margin-top: 0.5rem;
    padding-top: 1rem;
    font-weight: 600;
    color: #1f2937;
}

/* Analytics Styles */
.analytics-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    padding: 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.stat-card {
    text-align: center;
    background: #f8fafc;
    padding: 1.5rem 1rem;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 500;
}

.analytics-details {
    padding: 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.analytics-details p {
    margin: 0.5rem 0;
    color: #374151;
}

/* Commission Button Styles */
[data-action="calculate-commission"],
[data-action="process-payment"],
[data-action="view-analytics"] {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

[data-action="calculate-commission"]:hover,
[data-action="process-payment"]:hover,
[data-action="view-analytics"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .commission-modal .modal-content,
    .payment-success-modal .modal-content,
    .analytics-modal .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-header,
    .breakdown-section,
    .tier-section,
    .payment-methods {
        padding: 1rem 1.5rem;
    }
    
    .methods-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .calculator-inputs {
        grid-template-columns: 1fr;
    }
    
    .analytics-summary {
        grid-template-columns: 1fr;
        padding: 1rem 1.5rem;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .tier-info {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .commission-modal .modal-content,
    .payment-success-modal .modal-content,
    .analytics-modal .modal-content {
        background: #1f2937;
        color: #f9fafb;
    }
    
    .modal-header {
        border-bottom-color: #374151;
    }
    
    .breakdown-section,
    .tier-section,
    .payment-methods {
        border-bottom-color: #374151;
    }
    
    .breakdown-item {
        border-bottom-color: #374151;
    }
    
    .method-card {
        border-color: #374151;
        background: #111827;
    }
    
    .method-card:hover:not(.disabled) {
        border-color: #3b82f6;
        background: #1e293b;
    }
    
    .calc-result {
        background: #111827;
        border-color: #374151;
    }
    
    .stat-card {
        background: #111827;
        border-color: #374151;
    }
}