/**
 * Shared List View Styles
 * Used by both Mission Control and MobileSentrix Command Center
 */

/* List Container */
.list-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 20px;
}

/* List Toolbar */
.list-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 16px;
}

.list-filters {
    display: flex;
    gap: 12px;
}

.filter-select {
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    outline: none;
    transition: all 0.2s var(--ease-out-expo);
    box-shadow: var(--shadow-sm);
}

.filter-select:hover {
    border-color: var(--border-light);
    background: var(--bg-hover);
}

.filter-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.list-count-label {
    color: var(--text-muted);
    font-size: 13px;
}

/* List Table */
.list-table-container {
    flex: 1;
    overflow: auto;
    border-radius: 14px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.list-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.list-table th {
    position: sticky;
    top: 0;
    background: var(--bg-tertiary);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
    z-index: 10;
}

.list-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}

.list-table th.sortable:hover {
    color: var(--text-primary);
}

.sort-icon {
    margin-left: 4px;
    opacity: 0.5;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.list-table th.sorted-asc .sort-icon {
    opacity: 1;
}

.list-table th.sorted-desc .sort-icon {
    opacity: 1;
    transform: rotate(180deg);
}

.list-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

.list-table tbody tr {
    cursor: pointer;
    transition: background 0.15s ease;
}

.list-table tbody tr:hover {
    background: var(--bg-hover);
}

.list-table tbody tr.selected {
    background: rgba(99, 102, 241, 0.08);
}

.list-table tbody tr.selected:hover {
    background: rgba(99, 102, 241, 0.12);
}

/* Column Widths */
.col-checkbox {
    width: 40px;
    text-align: center;
}

.col-title {
    min-width: 250px;
}

.col-status,
.col-priority {
    width: 100px;
}

.col-list {
    width: 120px;
}

.col-due {
    width: 100px;
}

.col-assignee {
    width: 100px;
}

.col-progress {
    width: 100px;
}

/* Task Title */
.list-task-title {
    font-weight: 500;
    color: var(--text-primary);
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
}

.status-badge.backlog {
    background: var(--bg-active);
    color: var(--text-muted);
}

.status-badge.scheduled {
    background: rgba(59, 130, 246, 0.2);
    color: var(--blue, #3b82f6);
}

.status-badge.todo {
    background: rgba(249, 115, 22, 0.2);
    color: var(--orange, #f97316);
}

.status-badge.in-progress {
    background: rgba(0, 209, 112, 0.2);
    color: var(--accent, #00d170);
}

.status-badge.blocked {
    background: rgba(239, 68, 68, 0.2);
    color: var(--red, #ef4444);
}

.status-badge.done,
.status-badge.completed {
    background: rgba(0, 209, 112, 0.3);
    color: var(--accent, #00d170);
}

/* Priority Badge */
.priority-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
}

.priority-badge.urgent {
    background: rgba(239, 68, 68, 0.2);
    color: var(--red, #ef4444);
}

.priority-badge.high {
    background: rgba(249, 115, 22, 0.2);
    color: var(--orange, #f97316);
}

.priority-badge.medium {
    background: rgba(245, 158, 11, 0.2);
    color: var(--yellow, #f59e0b);
}

.priority-badge.low {
    background: var(--bg-active);
    color: var(--text-muted);
}

/* List Tag */
.list-tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    color: white;
}

/* Progress Bar */
.list-progress {
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress-bar-mini {
    width: 60px;
    height: 6px;
    background: var(--bg-active);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-mini-fill {
    height: 100%;
    background: var(--accent, #00d170);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Task Checkbox */
.task-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-light);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.task-checkbox:hover {
    border-color: var(--accent, #00d170);
}

.task-checkbox.checked {
    background: var(--accent, #00d170);
    border-color: var(--accent, #00d170);
}

.task-checkbox.checked::after {
    content: '✓';
    color: white;
    font-size: 11px;
    font-weight: 700;
}

/* Bulk Action Bar */
.bulk-action-bar {
    display: none;
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-secondary);
    border: 1px solid var(--accent);
    border-radius: 14px;
    padding: 12px 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    align-items: center;
    gap: 12px;
    backdrop-filter: blur(12px);
}

.bulk-action-bar.visible {
    display: flex;
}

.bulk-count {
    font-weight: 700;
    color: var(--accent);
    font-size: 14px;
    white-space: nowrap;
}

.bulk-divider {
    width: 1px;
    height: 24px;
    background: var(--border);
}

.bulk-action-bar button {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.bulk-action-bar button:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
}

.bulk-action-bar button.bulk-complete {
    color: #34d399;
}

.bulk-action-bar button.bulk-todo {
    color: #60a5fa;
}

.bulk-action-bar button.bulk-archive {
    color: #fbbf24;
}

.bulk-action-bar button.bulk-delete {
    color: #f87171;
}

.bulk-action-bar button.bulk-cancel {
    color: var(--text-secondary);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .list-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .list-filters {
        flex-wrap: wrap;
    }
    
    .filter-select {
        flex: 1;
        min-width: 120px;
    }
    
    .list-table-container {
        overflow-x: auto;
    }
    
    .list-table {
        min-width: 800px;
    }
    
    .bulk-action-bar {
        left: 12px;
        right: 12px;
        transform: none;
        flex-wrap: wrap;
        justify-content: center;
    }
}
