/**
 * SCREEN 2C TIERED UI STYLES
 * Styling for CHECK, AUDIT, and ENHANCE package views
 */

/* ============================================================================
   SCREEN 2C BASE CONTAINER
   ============================================================================ */

.screen-2c-tiered-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
}

/* ============================================================================
   TIER HEADERS
   ============================================================================ */

.tier-header {
    text-align: center;
    padding: 32px 24px;
    margin-bottom: 32px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.tier-header.check {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.03));
    border-color: rgba(59, 130, 246, 0.2);
}

.tier-header.audit {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.03));
    border-color: rgba(245, 158, 11, 0.2);
}

.tier-header.enhance {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.03));
    border-color: rgba(16, 185, 129, 0.2);
}

.tier-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: white;
    margin: 0 0 8px 0;
}

.tier-header.check h2 { color: #3b82f6; }
.tier-header.audit h2 { color: var(--vc-status-partial); }
.tier-header.enhance h2 { color: var(--vc-status-supported); }

.tier-header p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.tier-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
}

.tier-badge.check {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #3b82f6;
}

.tier-badge.audit {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--vc-status-partial);
}

.tier-badge.enhance {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--vc-status-supported);
}

/* ============================================================================
   UPSELL BANNER
   ============================================================================ */

.upsell-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: linear-gradient(135deg, rgba(67, 132, 255, 0.08), rgba(123, 66, 255, 0.08));
    border: 1px solid rgba(67, 132, 255, 0.2);
    border-radius: 12px;
    margin-bottom: 24px;
}

.upsell-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(67, 132, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.upsell-content {
    flex: 1;
}

.upsell-content strong {
    display: block;
    font-size: 15px;
    color: white;
    margin-bottom: 4px;
}

.upsell-content p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.upsell-button {
    padding: 12px 20px;
    background: linear-gradient(135deg, #4384ff 0%, #7b42ff 100%);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.upsell-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(67, 132, 255, 0.4);
}

@media (max-width: 768px) {
    .upsell-banner {
        flex-direction: column;
        text-align: center;
    }

    .upsell-button {
        width: 100%;
    }
}

/* ============================================================================
   ISSUES SUMMARY (AUDIT/ENHANCE)
   ============================================================================ */

.issues-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.issue-card {
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    text-align: center;
    transition: all 0.2s ease;
}

.issue-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.issue-card.critical {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.05);
}

.issue-card.warning {
    border-color: rgba(245, 158, 11, 0.3);
    background: rgba(245, 158, 11, 0.05);
}

.issue-card.info {
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(59, 130, 246, 0.05);
}

.issue-count {
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 8px;
}

.issue-card.critical .issue-count { color: var(--vc-status-unsupported); }
.issue-card.warning .issue-count { color: var(--vc-status-partial); }
.issue-card.info .issue-count { color: #3b82f6; }

.issue-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

/* ============================================================================
   FILTER BAR
   ============================================================================ */

.sources-filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-label {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
}

.filter-btn {
    padding: 8px 14px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.filter-btn.active {
    background: rgba(67, 132, 255, 0.15);
    border-color: rgba(67, 132, 255, 0.3);
    color: #4384ff;
}

.filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    font-size: 11px;
    margin-left: 6px;
}

.filter-btn.active .filter-count {
    background: rgba(67, 132, 255, 0.2);
}

/* ============================================================================
   BULK ACTIONS BAR (ENHANCE)
   ============================================================================ */

.bulk-actions-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(16, 185, 129, 0.03));
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.bulk-actions-bar .bulk-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--vc-status-supported);
    margin-right: auto;
}

.bulk-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--vc-status-supported);
    cursor: pointer;
    transition: all 0.2s ease;
}

.bulk-action-btn:hover {
    background: rgba(16, 185, 129, 0.2);
    transform: translateY(-1px);
}

.bulk-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.bulk-action-btn.primary {
    background: var(--vc-status-supported);
    border-color: var(--vc-status-supported);
    color: white;
}

.bulk-action-btn.primary:hover {
    background: #059669;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* ============================================================================
   AI SUGGESTIONS PANEL (ENHANCE)
   ============================================================================ */

.ai-suggestions-panel {
    padding: 20px;
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: 12px;
    margin-bottom: 24px;
}

.ai-suggestions-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.ai-suggestions-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--vc-status-supported), #059669);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.ai-suggestions-title {
    flex: 1;
}

.ai-suggestions-title h3 {
    font-size: 16px;
    font-weight: 600;
    color: white;
    margin: 0 0 2px 0;
}

.ai-suggestions-title p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

.ai-suggestion-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    margin-bottom: 10px;
}

.ai-suggestion-item:last-child {
    margin-bottom: 0;
}

.ai-suggestion-arrow {
    font-size: 18px;
    color: var(--vc-status-supported);
    padding-top: 2px;
}

.ai-suggestion-content {
    flex: 1;
}

.ai-suggestion-from {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 4px;
}

.ai-suggestion-to {
    font-size: 14px;
    color: white;
    font-weight: 500;
}

.ai-suggestion-apply {
    padding: 6px 12px;
    background: var(--vc-status-supported);
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-suggestion-apply:hover {
    background: #059669;
}

/* ============================================================================
   CHAIN VISUALIZATION
   ============================================================================ */

.chain-visualization {
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    margin-bottom: 24px;
}

.chain-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.chain-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: white;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chain-stats {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

/* ============================================================================
   SOURCES LIST
   ============================================================================ */

.sources-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sources-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.sources-list-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: white;
    margin: 0;
}

.sources-count {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

/* ============================================================================
   FOOTER ACTIONS
   ============================================================================ */

.screen-2c-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 32px;
    border-radius: 0 0 16px 16px;
}

.footer-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.2s ease;
}

.footer-back-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.25);
}

.footer-proceed-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #4384ff 0%, #7b42ff 100%);
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.footer-proceed-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(67, 132, 255, 0.4);
}

/* ============================================================================
   LOADING STATES
   ============================================================================ */

.sources-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    text-align: center;
}

.sources-loading .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #4384ff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.sources-loading p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

/* ============================================================================
   EMPTY STATE
   ============================================================================ */

.sources-empty {
    padding: 60px 24px;
    text-align: center;
}

.sources-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.sources-empty h3 {
    font-size: 18px;
    font-weight: 600;
    color: white;
    margin: 0 0 8px 0;
}

.sources-empty p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 768px) {
    .screen-2c-tiered-container {
        padding: 24px 16px;
    }

    .tier-header {
        padding: 24px 16px;
    }

    .tier-header h2 {
        font-size: 22px;
    }

    .issues-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .bulk-actions-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .bulk-actions-bar .bulk-label {
        text-align: center;
        margin-bottom: 12px;
        margin-right: 0;
    }

    .screen-2c-footer {
        flex-direction: column;
    }

    .footer-back-btn,
    .footer-proceed-btn {
        width: 100%;
        justify-content: center;
    }
}
