/* ============================================================
   Task row (list view) — base, section headers, focus root,
   inline title/focus buttons, drag handle cursor
   ============================================================ */

.task-row {
    transition: background-color 0.1s ease;
    border-bottom: 1px solid #f1f5f9;
    position: relative;
}
#view-area[data-view="list"] .task-row {
    padding-top: var(--list-row-padding-y, 12px);
    padding-bottom: var(--list-row-padding-y, 12px);
}
.task-row:hover { background-color: #f8fafc; }
.task-row[draggable="true"] { cursor: grab; }
.task-row.task-row-keyboard-active {
    background: #eff6ff;
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.28);
}
.task-row-section-header {
    border-bottom: none !important;
    background: var(--view-area-bg);
    box-shadow: none;
    transition:
        background-color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}
.task-row-section-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--view-area-bg);
    pointer-events: none;
    z-index: 3;
}
.task-row-section-header::after {
    content: none;
}
.task-row-section-header > * {
    position: relative;
    z-index: 2;
}
.task-row-section-header:hover {
    background: #fbfdff;
    box-shadow: none;
}
.task-row-section-header.task-row-keyboard-active {
    background: rgba(239, 246, 255, 0.9);
    box-shadow:
        inset 0 0 0 1px rgba(59, 130, 246, 0.22);
}
.task-row-section-header + .task-row {
    border-top: none;
}
.task-section-header-cell {
    min-height: 50px;
    gap: 0.7rem;
}
.task-section-header-title {
    min-width: 0;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.025em;
    color: #64748b;
    text-transform: uppercase;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 0 1 auto;
}
.section-insert-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.6rem;
    border: 1px solid rgba(203, 213, 225, 0.85);
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(8px);
    color: #475569;
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transform: translateY(2px);
    transition: all 0.15s ease;
}
.task-row:hover .section-insert-btn,
.task-row.task-row-keyboard-active .section-insert-btn,
.task-row:focus-within .section-insert-btn {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.section-insert-btn:hover {
    color: #0f172a;
    border-color: rgba(148, 163, 184, 0.72);
    background: rgba(255, 255, 255, 1);
}
.task-row-section-header .task-drag-handle {
    color: #94a3b8;
    border: 1px solid transparent;
    background: transparent;
}
.task-row-section-header:hover .task-drag-handle,
.task-row-section-header.task-row-keyboard-active .task-drag-handle {
    color: #475569;
    border-color: rgba(203, 213, 225, 0.88);
    background: rgba(255, 255, 255, 0.86);
}
.task-row-focus-root {
    background: linear-gradient(180deg, #f8fbff 0%, #f1f5f9 100%);
}
.task-row-focus-root:hover {
    background: linear-gradient(180deg, #f3f8ff 0%, #e8f0fb 100%);
}
.task-row-dragging {
    opacity: 0.55;
    cursor: grabbing;
}
.task-inline-title-input {
    flex: 1 1 140px;
    min-width: 140px;
}
.task-row-title {
    flex: 1 1 140px;
    min-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.task-focus-inline-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid transparent;
    border-radius: 9999px;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}
.task-focus-inline-btn:hover {
    color: #2563eb;
    border-color: rgba(59, 130, 246, 0.18);
    background: rgba(239, 246, 255, 0.95);
}
.task-focus-inline-btn-active {
    color: #2563eb;
    border-color: rgba(59, 130, 246, 0.2);
    background: rgba(239, 246, 255, 0.95);
}
.task-drag-handle { cursor: grab; }
.task-row-dragging .task-drag-handle { cursor: grabbing; }

.task-name-header-cell {
    min-width: 360px;
}
