/* Sync Dashboard Styles */

.sync-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.sync-controls .btn {
    min-width: 120px;
}

.auto-sync-toggle {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.auto-sync-toggle input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.sync-status-panel {
    margin-bottom: 20px;
}

.sync-status-panel h4 {
    margin-bottom: 10px;
    color: #333;
}

.video-details-panel {
    border-top: 1px solid #ddd;
    padding-top: 20px;
}

.video-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.stat-item {
    padding: 8px 12px;
    background: #f0f0f0;
    border-radius: 5px;
    font-size: 14px;
}

.stat-item.success {
    background: #d4edda;
    color: #155724;
}

.stat-item.warning {
    background: #fff3cd;
    color: #856404;
}

.stat-item.info {
    background: #d1ecf1;
    color: #0c5460;
}

.stat-item.danger {
    background: #f8d7da;
    color: #721c24;
}

.progress-bar-container {
    width: 100%;
    height: 30px;
    background: #e9ecef;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 20px;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    min-width: 40px;
}

.video-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
}

.video-detail-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.video-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    transition: all 0.2s;
}

.video-item:hover {
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.video-item.status-completed {
    border-left: 4px solid #28a745;
}

.video-item.status-pending {
    border-left: 4px solid #ffc107;
}

.video-item.status-downloading,
.video-item.status-transcribing,
.video-item.status-embedding {
    border-left: 4px solid #17a2b8;
    background: #f0f8ff;
}

.video-item.status-error {
    border-left: 4px solid #dc3545;
    background: #fff5f5;
}

.video-title {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-status {
    font-size: 12px;
    color: #666;
    text-align: right;
    min-width: 100px;
}

.video-status .error {
    color: #dc3545;
    font-style: italic;
}

/* Dark mode support */
.dark-mode .sync-controls {
    background: #2a2a2a;
}

.dark-mode .video-list {
    background: #1a1a1a;
    border-color: #444;
}

.dark-mode .video-item {
    background: #2a2a2a;
    border-color: #444;
}

.dark-mode .video-item:hover {
    box-shadow: 0 2px 5px rgba(255,255,255,0.1);
}

.dark-mode .stat-item {
    background: #333;
    color: #e0e0e0;
}

.dark-mode .progress-bar-container {
    background: #333;
}

.dark-mode .video-title,
.dark-mode .video-status {
    color: #e0e0e0;
}
/* Video List with Action Buttons */
.video-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    margin: 8px 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #f9f9f9;
}

.video-item.status-completed {
    border-color: #28a745;
    background: #f8fff8;
}

.video-item.status-error {
    border-color: #dc3545;
    background: #fff8f8;
}

.video-item.status-pending {
    border-color: #ffc107;
    background: #fffef8;
}

.video-item.status-downloading,
.video-item.status-transcribing,
.video-item.status-embedding {
    border-color: #007bff;
    background: #f8fbff;
}

.video-content {
    flex: 1;
    min-width: 0;
}

.video-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-status {
    font-size: 14px;
    color: #666;
}

.video-status .error {
    color: #dc3545;
    font-style: italic;
}

.video-status .progress {
    color: #007bff;
    font-weight: 500;
}

.video-actions {
    flex-shrink: 0;
    margin-left: 16px;
}

.video-action-btn {
    min-width: 80px;
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.video-action-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.video-action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-sm {
    font-size: 12px;
    padding: 6px 12px;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

/* Dark mode support */
.dark-mode .video-item {
    background: #2a2a2a;
    border-color: #444;
}

.dark-mode .video-title {
    color: #e0e0e0;
}

.dark-mode .video-status {
    color: #b0b0b0;
}
