/* ============================================
   NoteView - Kanban View
   ============================================ */

.kanban-view {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
}

.kanban-board {
    display: flex;
    gap: 1rem;
    min-height: 0;
    flex: 1;
    overflow-x: auto;
    padding-bottom: 1rem;
}

.kanban-column {
    flex: 0 0 280px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

.kanban-column h4 {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
}

.kanban-column .blocks {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.kanban-column.drag-over {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-light);
}

.kanban-view .block {
    margin-bottom: 0;
    cursor: grab;
    background: var(--bg-primary);
    flex-shrink: 0;
}

.kanban-card {
    border-radius: var(--radius-sm);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transition: all 0.15s ease;
}

.kanban-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-light);
}

.kanban-card-content {
    padding: 0.8rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
}

.kanban-task-text {
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--text-primary);
    word-break: break-word;
}

/* Priority badge colors */
.kanban-badge.badge-priority[data-priority='urgent'] {
    border-color: rgba(239, 68, 68, 0.3);
    background-color: rgba(239, 68, 68, 0.05);
    color: #ef4444;
    font-weight: 700;
}

.kanban-badge.badge-priority[data-priority='high'] {
    border-color: rgba(249, 115, 22, 0.3);
    background-color: rgba(249, 115, 22, 0.05);
    color: #f97316;
    font-weight: 600;
}

.kanban-badge.badge-priority[data-priority='medium'] {
    border-color: rgba(59, 130, 246, 0.3);
    background-color: rgba(59, 130, 246, 0.05);
    color: #3b82f6;
}

.kanban-badge.badge-priority[data-priority='low'] {
    border-color: rgba(148, 163, 184, 0.3);
    background-color: rgba(148, 163, 184, 0.05);
    color: #94a3b8;
}

/* Task hierarchy nesting */
.kanban-card--nested {
    border-left: 2px solid var(--border-light);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.kanban-card--nested .kanban-task-text {
    font-size: 0.8rem;
}

.kanban-card--nested .kanban-card-content {
    padding: 0.6rem 0.8rem;
}

/* Action buttons — hidden by default, shown on card hover */
.kanban-action-btns {
    display: none;
    gap: 2px;
    align-items: center;
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background: var(--bg-primary, #fff);
    border-radius: var(--radius-sm);
    padding: 1px;
    box-shadow: var(--shadow-sm);
}

.kanban-card:hover .kanban-action-btns {
    display: inline-flex;
}

.kanban-action-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted, #94a3b8);
    padding: 2px 4px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
}

.kanban-action-btn:hover {
    color: var(--accent);
    background: var(--bg-hover, #f1f5f9);
}

/* Badge cursor */
.kanban-badge {
    cursor: pointer;
}

/* Floating due date picker */
.kanban-due-menu {
    background: var(--bg-primary, #fff);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 160px;
}

.kanban-due-clear:hover {
    color: var(--danger, #ef4444);
}

/* Floating priority picker */
.kanban-priority-menu {
    background: var(--bg-primary, #fff);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    padding: 4px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 120px;
}

.kanban-priority-option {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px 10px;
    text-align: left;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 4px;
    font-family: inherit;
}

.kanban-priority-option:hover {
    background: var(--bg-hover, #f1f5f9);
}

@media (max-width: 768px) {
    .kanban-column {
        flex: 0 0 250px;
    }

    .kanban-action-btns {
        display: inline-flex;
    }
}
