/* ================================================================
   SOURCE TYPE TOGGLE (Primary/Secondary Tabs)
   ================================================================ */

.cs-source-type-toggle {
    margin-bottom: 32px;
    margin-top: 24px;
}

.cs-toggle-header {
    margin-bottom: 20px;
    text-align: center;
}

.cs-toggle-title {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px 0;
}

.cs-toggle-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

.cs-toggle-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.cs-toggle-tab {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.cs-toggle-tab:hover:not(:disabled) {
    background: #f3f4f6;
    border-color: #4F46E5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
}

.cs-toggle-tab.cs-toggle-active {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
    border-color: #4F46E5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.cs-toggle-tab:disabled,
.cs-toggle-tab.cs-toggle-empty {
    opacity: 0.5;
    cursor: not-allowed;
}

.cs-toggle-tab:disabled:hover,
.cs-toggle-tab.cs-toggle-empty:hover {
    transform: none;
    box-shadow: none;
    border-color: #e5e7eb;
}

.cs-toggle-tab-icon {
    font-size: 32px;
    flex-shrink: 0;
    line-height: 1;
}

.cs-toggle-tab-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.cs-toggle-tab-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    display: block;
}

.cs-toggle-tab-count {
    font-size: 14px;
    font-weight: 500;
    color: #4F46E5;
    display: block;
}

.cs-toggle-tab-desc {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
    display: block;
}

/* Secondary Info Banner */
.cs-secondary-info {
    padding: 16px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    margin-bottom: 24px;
}

.cs-info-badge {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 13px;
    color: #1e40af;
    line-height: 1.6;
}

.cs-info-badge svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: #3b82f6;
}

/* ================================================================
   SECONDARY CATEGORY ICONS
   ================================================================ */

.cs-icon-processing {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.15) 0%, rgba(99, 102, 241, 0.15) 100%);
    border: 2px solid rgba(79, 70, 229, 0.3);
}

.cs-icon-processing svg {
    color: #4F46E5;
}

/* Processing animation for Extracting category */
.cs-count-processing {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ================================================================
   SECONDARY SOURCE CONTENT SECTIONS
   ================================================================ */

.cs-secondary-verified-container,
.cs-secondary-extracting-container,
.cs-secondary-access-container {
    padding: 24px;
}

.cs-section-header {
    margin-bottom: 24px;
}

.cs-section-title {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
}

.cs-section-desc {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

/* Info Banner for Extracting */
.cs-info-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.cs-info-processing {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.cs-info-banner svg {
    flex-shrink: 0;
    color: #3b82f6;
}

/* ================================================================
   SECONDARY SOURCE LIST
   ================================================================ */

.cs-secondary-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cs-secondary-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    transition: all 0.2s ease;
}

.cs-secondary-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Status-specific styling */
.cs-source-verified {
    border-left: 3px solid var(--vc-status-supported);
}

.cs-source-extracting {
    border-left: 3px solid #4F46E5;
    background: #fafafa;
}

.cs-source-access {
    border-left: 3px solid #f59e0b;
}

.cs-secondary-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.cs-secondary-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #f3f4f6;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    flex-shrink: 0;
}

.cs-secondary-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    flex-wrap: wrap;
}

.cs-secondary-ref {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

.cs-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.cs-status-success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.cs-status-processing {
    background: rgba(79, 70, 229, 0.1);
    color: #4F46E5;
    animation: pulse 2s ease-in-out infinite;
}

.cs-status-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.cs-secondary-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cs-secondary-url {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #f9fafb;
    border-radius: 6px;
}

.cs-secondary-url svg {
    flex-shrink: 0;
    color: #6b7280;
}

.cs-secondary-link {
    color: #4F46E5;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cs-secondary-link:hover {
    text-decoration: underline;
}

.cs-secondary-context,
.cs-secondary-claim {
    font-size: 13px;
    line-height: 1.5;
    color: #374151;
    padding: 10px 12px;
    background: #f9fafb;
    border-radius: 6px;
}

.cs-secondary-context strong,
.cs-secondary-claim strong {
    color: #111827;
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

.cs-secondary-card-footer {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
    display: flex;
    justify-content: flex-end;
}

.cs-btn-small {
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.cs-btn-secondary {
    background: #f3f4f6;
    color: #6b7280;
}

.cs-btn-secondary:hover {
    background: #e5e7eb;
    color: #374151;
}

/* ================================================================
   BRIGHTDATA INFO BOX
   ================================================================ */

.cs-brightdata-info {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid var(--vc-status-partial);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.cs-brightdata-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.cs-brightdata-icon {
    font-size: 32px;
    line-height: 1;
}

.cs-brightdata-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: #78350f;
    margin: 0 0 4px 0;
}

.cs-brightdata-header p {
    font-size: 13px;
    color: #92400e;
    margin: 0;
    line-height: 1.4;
}

.cs-brightdata-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
}

.cs-brightdata-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cs-stat-label {
    font-size: 12px;
    color: #92400e;
    font-weight: 500;
}

.cs-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #78350f;
}

.cs-brightdata-toggle {
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
}

.cs-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.cs-checkbox-label input[type="checkbox"] {
    margin-top: 2px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #4F46E5;
}

.cs-checkbox-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cs-checkbox-text strong {
    font-size: 14px;
    color: #78350f;
    font-weight: 600;
}

.cs-checkbox-text small {
    font-size: 12px;
    color: #92400e;
}

/* ================================================================
   EMPTY STATES
   ================================================================ */

.cs-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.cs-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.cs-empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 8px 0;
}

.cs-empty-state p {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    max-width: 400px;
}

/* ================================================================
   RESPONSIVE DESIGN
   ================================================================ */

@media (max-width: 768px) {
    .cs-toggle-tabs {
        grid-template-columns: 1fr;
    }
    
    .cs-toggle-tab {
        padding: 16px;
    }
    
    .cs-toggle-tab-icon {
        font-size: 28px;
    }
    
    .cs-brightdata-details {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .cs-secondary-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .cs-toggle-title {
        font-size: 20px;
    }
    
    .cs-toggle-subtitle {
        font-size: 13px;
    }
    
    .cs-section-title {
        font-size: 18px;
    }
    
    .cs-brightdata-header {
        flex-direction: column;
        gap: 12px;
    }
}

/* ================================================================
   ANIMATIONS & TRANSITIONS
   ================================================================ */

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cs-secondary-card {
    animation: slideIn 0.3s ease forwards;
}

.cs-secondary-card:nth-child(1) { animation-delay: 0.05s; }
.cs-secondary-card:nth-child(2) { animation-delay: 0.1s; }
.cs-secondary-card:nth-child(3) { animation-delay: 0.15s; }
.cs-secondary-card:nth-child(4) { animation-delay: 0.2s; }
.cs-secondary-card:nth-child(5) { animation-delay: 0.25s; }