.task-block-container {
    width: 100%;
    min-height: 60px;
    /* Reduced min-height since it might just trigger a modal or show a single row */
    /* background-color: var(--bg-secondary, #f8f9fa); */
    border: 1px dashed var(--border, #e1e4e8);
    /* Thinner border for the container */
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    /* Align stretch for the row */
    justify-content: center;
    padding: 8px;
    /* Reduced padding */
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.task-table-row.no-drag,
.task-block-container .task-table-row {
    cursor: default !important;
}

.task-block-container.unlinked {
    min-height: 120px;
    align-items: center;
    padding: 2rem;
    gap: 1.5rem;
    border-width: 2px;
}

.task-block-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Copied from tasks_board.css for consistent Task Row styling */

.task-table-row {
    display: flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 6px;
    background: var(--bg-secondary);
    gap: 12px;
    margin-bottom: 3px;
    /* cursor: grab; Removed grab cursor for block view unless reordering is implemented */
    transition: all 0.15s ease;
    border: 1px solid var(--border-docs);
    box-shadow: 1px 1px 2px #1a1a1a1c;
    width: 100%;
    /* Ensure it fills the block */
}

.task-table-row:hover {
    background: var(--unicorn-color);
    /* Assuming this var exists or fallback */
    background: rgba(255, 255, 255, 0.03);
    /* Fallback */
    border-color: var(--accent);
    border-color: var(--accent);
    border-style: dashed;
}

.task-table-row.row-active-z {
    z-index: 1000;
    position: relative;
    border-color: var(--accent);
    /* Highlight it too */
}

.theme-unicorn .task-table-row:hover {
    background: rgba(255, 255, 255, 0.08);
}


.table-cell-check {
    width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.task-checkbox {
    width: 16px;
    height: 16px;
    border: 2px solid var(--text-secondary, #94a3b8);
    border-radius: 10px;
    /* cursor: pointer; */
    transition: all 0.2s ease;
    position: relative;
    /* Removed hover pointer since it's just display in block for now, or maybe make interactive later */
}

.table-cell-name {
    flex: 5;
    font-size: 13px;
    color: var(--text-primary, #e2e8f0);
}

.table-cell-type {
    width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.task-type-badge {
    font-size: 14px;
    line-height: 1;
}

.table-cell-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 5;
}

.task-item {
    border-left: 1px solid var(--border-docs);
    padding-left: 17px;
}

.task-badge {
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 500;
    min-width: 70px;
    border-radius: 4px;
    /* Added for badge look */
}

.task-assignee,
.task-due {
    font-size: 11px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 50px;
}

.table-cell-actions {
    width: 24px;
    display: flex;
    justify-content: flex-end;
}

.task-row-delete {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    opacity: 0;
    transition: all 0.15s;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.task-table-row:hover .task-row-delete {
    opacity: 1;
}

.task-row-delete:hover {
    color: var(--accent-color, #818cf8);
    /* Highlight for anchor */
    background: rgba(129, 140, 248, 0.1);
}

/* Priority Styles */

.priority-urgent {
    background: rgba(239, 68, 68, 0.15);
    color: #f33d3d;
}

.priority-high {
    background: rgba(249, 115, 22, 0.15);
    color: #f79e40;
}

.priority-medium {
    background: rgba(234, 179, 8, 0.15);
    color: #bfa72b;
}

.priority-low {
    background: rgba(34, 197, 94, 0.15);
    color: #59956e;
}

/* Task Selector Styling */
.task-list-selector {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 4px;
}

.task-selector-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.task-selector-item:hover {
    background: var(--bg-hover, rgba(255, 255, 255, 0.05));
    border-color: var(--border-hover, rgba(255, 255, 255, 0.2));
}

.task-selector-item.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: rgba(0, 0, 0, 0.2);
    border-color: transparent;
}

.task-selector-item.disabled:hover {
    background: rgba(0, 0, 0, 0.2);
    border-color: transparent;
}

.task-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.task-name {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.linked-badge {
    font-size: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 600;
}

/* Scrollbar for selector */
.task-list-selector::-webkit-scrollbar {
    width: 4px;
}

.task-list-selector::-webkit-scrollbar-track {
    background: transparent;
}

.task-list-selector::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

/* Task Select Modal with Filters */
.task-select-modal {
    max-width: 560px;
    width: 90vw;
}

.task-select-filters {
    padding: 12px 16px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.task-filter-text {
    width: 100%;
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-primary);
    color: var(--text-primary);
}

.task-filter-text::placeholder {
    color: var(--text-secondary);
}

.task-filter-row {
    display: flex;
    gap: 8px;
}

.task-filter-select {
    flex: 1;
    padding: 6px 8px;
    font-size: 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-primary);
    color: var(--text-primary);
}

.task-selector-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.task-selector-info .task-name {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.task-project-label {
    font-size: 10px;
    color: var(--text-secondary);
    opacity: 0.7;
}

.task-block-project-select {
    padding: 6px 8px;
    font-size: 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-primary);
    color: var(--text-primary);
    max-width: 200px;
}