.kanban-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0;
    overflow: hidden;
}

.kanban-section {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 60px;
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: border-color 0.2s, background-color 0.2s;
    overflow: hidden; /* Ensure content doesn't spill out */
}

.kanban-section.collapsed {
    min-height: 40px;
    flex-grow: 0 !important;
    height: 40px;
    overflow: hidden;
    padding: 0 15px; /* Remove vertical padding, keep horizontal */
    justify-content: center; /* Center header vertically */
}

.kanban-section.drag-over {
    background: rgba(255,255,255,0.08);
    border-color: var(--text-muted);
    box-shadow: inset 0 0 15px rgba(255,255,255,0.05);
}

.kanban-resizer {
    height: 6px;
    background: transparent;
    cursor: row-resize;
    flex-shrink: 0;
    margin: 2px 0;
    transition: background 0.2s;
    border-radius: 3px;
}
.kanban-resizer:hover { background: var(--accent-color); }

.kanban-list::-webkit-scrollbar { width: 4px; }
.kanban-list::-webkit-scrollbar-thumb { background: var(--accent-color); border-radius: 2px; }
.kanban-list::-webkit-scrollbar-track { background: transparent; }

.kanban-list {
    list-style: none;
    overflow-y: auto;
    flex: 1;
    padding: 0;
    min-height: 0; /* Crucial for flex child scrolling */
}

.kanban-section.collapsed .kanban-list {
    display: none;
}

.task-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    background: rgba(255,255,255,0.05);
    margin-bottom: 5px;
    border-radius: 6px;
    cursor: grab;
    position: relative;
}

.task-main-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.task-text-wrapper {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
}

.task-text { 
    font-size: 0.9rem; 
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: text; /* Indicates editable text */
    transition: color 0.2s;
    max-width: 100%;
}

.task-text:hover {
    color: #ffffff; /* Highlight on hover */
}

.task-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: transform 0.1s;
}
.icon-btn:hover { transform: scale(1.1); color: var(--text-color); }
.icon-btn img { width: 16px; height: 16px; filter: invert(0.8); }
.icon-btn:hover img { filter: invert(1); }

.timer-display {
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--text-muted);
    min-width: 40px;
    text-align: center;
}

.kanban-section[data-status="todo"] .task-controls { display: none; }
.kanban-section[data-status="todo"] .task-done-display { display: none; }

.kanban-section[data-status="working"] .task-controls { display: flex; }
.kanban-section[data-status="working"] .task-done-display { display: none; }

.kanban-section[data-status="done"] .task-controls { display: none; }
.kanban-section[data-status="done"] .task-done-display { display: block; }

.task-done-display {
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--text-muted);
    white-space: nowrap;
    display: none;
}

.task-priority-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    display: block;
    cursor: pointer;
    flex-shrink: 0;
}
.task-priority-icon:hover { opacity: 0.8; }

.task-delete { background: none; border: none; color: #ff4444; cursor: pointer; opacity: 0.5; display: flex; align-items: center; justify-content: center; }
.task-delete img { width: 16px; height: 16px; filter: invert(0.3) sepia(1) saturate(5) hue-rotate(320deg); }
.task-delete:hover { opacity: 1; }

.kanban-section[data-status="working"] .timer-btn {
    width: 24px;
    height: 24px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.kanban-section[data-status="working"] .timer-btn img {
    width: 12px;
    height: 12px;
}

.task-limit-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.7rem;
    margin-left: auto;
}
.task-limit-btn:hover { color: var(--text-color); }
.task-limit-btn img { width: 14px; height: 14px; filter: invert(0.5); margin-right: 4px; }
.task-limit-btn:hover img { filter: invert(1); }

.kanban-header {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    cursor: pointer; /* Indicate clickable */
    position: relative;
    padding-left: 0;
    transition: padding-left 0.2s ease;
}

/* Collapse Button */
.kanban-collapse-btn {
    position: absolute;
    left: 0;
    width: 20px;
    height: 20px;
    background: transparent;
    border: none;
    background-image: url('../assets/icons/collapse.svg');
    background-size: 12px;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.2s ease;
    filter: invert(0.5);
    cursor: pointer;
    border-radius: 4px;
    padding: 0;
}

/* Hover State: Show Arrow and Shift Title */
.kanban-header:hover {
    padding-left: 24px; /* Make space for arrow */
}

.kanban-header:hover .kanban-collapse-btn {
    opacity: 1;
    transform: translateX(0);
}

.kanban-collapse-btn:hover {
    background-color: rgba(255,255,255,0.3);
    filter: invert(0.8);
}

/* Collapsed State */
.kanban-section.collapsed .kanban-collapse-btn {
    transform: rotate(-90deg);
}

.kanban-section.collapsed .kanban-header:hover .kanban-collapse-btn {
    transform: rotate(-90deg) translateX(0);
}

.kanban-section.collapsed .kanban-header {
    margin-bottom: 0;
    height: auto; /* Let content define height */
}

.kanban-section.collapsed .kanban-header:hover {
    padding-left: 29px; /* 5px + 24px */
}

.header-count {
    color: var(--text-color);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: bold;
}

/* Drag Delete Zone */
#drag-delete-zone {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(190, 36, 36, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, background-color 0.2s ease;
    border-radius: 12px;
    backdrop-filter: blur(4px);
    border: 2px dashed rgba(255, 50, 50, 0.1);
}

#drag-delete-zone.active {
    opacity: 1;
    pointer-events: all;
}

#drag-delete-zone.hover {
    background: rgba(60, 10, 10, 0.3);
    border-color: rgba(255, 50, 50, 0.3);
}

#drag-delete-zone .delete-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 8px;
    opacity: 0.7;
    transition: transform 0.2s;
    
    /* Masking for color control */
    -webkit-mask: url('../assets/icons/trash.svg') no-repeat center;
    mask: url('../assets/icons/trash.svg') no-repeat center;
    -webkit-mask-size: contain;
    mask-size: contain;
    background-color: #ff4444; /* Change this to change icon color */
    
    filter: drop-shadow(0 0 10px rgba(255, 0, 0, 0.5));
}

#drag-delete-zone.hover .delete-icon {
    transform: scale(1.2) rotate(-10deg);
    opacity: 1;
}

#drag-delete-zone span {
    font-family: 'Stack Sans Text', sans-serif;
    font-size: 1rem;
    color: #e23c3c;
    font-weight: 500;
    letter-spacing: 0.5px;
}

#drag-delete-zone.hidden {
    display: none;
}

/* Dragging Ghost Styles - Simplify appearance */
.dragging-ghost {
    height: auto !important;
}

.dragging-ghost .task-controls,
.dragging-ghost .task-done-display {
    display: none !important;
}
