/* ForgeTasks - vt- prefix to avoid collisions */

/* Container */
.vt-container {
	display: flex;
	flex-direction: column;
	height: 100%;
	font-size: 15px;
}

/* Header */
.vt-header {
	display: flex;
	align-items: center;
	padding: 8px 12px;
	border-bottom: 1px solid var(--background-modifier-border);
	gap: 8px;
}

.vt-header-title {
	flex: 1;
	font-weight: 600;
	font-size: 14px;
}

.vt-header-button {
	background: none;
	border: 1px solid var(--background-modifier-border);
	border-radius: 4px;
	color: var(--text-normal);
	cursor: pointer;
	padding: 4px 8px;
	font-size: 12px;
}

.vt-header-button:hover {
	background: var(--background-modifier-hover);
}

.vt-header-button.vt-active {
	background: var(--interactive-accent);
	color: var(--text-on-accent);
	border-color: var(--interactive-accent);
}

/* Filter bar */
.vt-filter-bar {
	padding: 8px 12px;
	border-bottom: 1px solid var(--background-modifier-border);
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.vt-filter-row {
	display: flex;
	align-items: center;
	gap: 4px;
	flex-wrap: wrap;
}

.vt-filter-label {
	font-size: 11px;
	color: var(--text-muted);
	min-width: 50px;
}

.vt-filter-chip {
	background: var(--background-secondary);
	border: 1px solid var(--background-modifier-border);
	border-radius: 12px;
	padding: 2px 8px;
	font-size: 11px;
	cursor: pointer;
	color: var(--text-muted);
}

.vt-filter-chip:hover {
	background: var(--background-modifier-hover);
}

.vt-filter-chip.vt-filter-active {
	background: var(--interactive-accent);
	color: var(--text-on-accent);
	border-color: var(--interactive-accent);
}

.vt-filter-select {
	background: var(--background-secondary);
	border: 1px solid var(--background-modifier-border);
	border-radius: 4px;
	padding: 2px 6px;
	font-size: 11px;
	color: var(--text-normal);
	flex: 1;
}

.vt-filter-search {
	background: var(--background-secondary);
	border: 1px solid var(--background-modifier-border);
	border-radius: 4px;
	padding: 4px 8px;
	font-size: 12px;
	color: var(--text-normal);
	width: 100%;
}

.vt-filter-search::placeholder {
	color: var(--text-faint);
}

/* Task list */
.vt-task-list {
	flex: 1;
	overflow-y: auto;
	padding: 4px 0;
}

/* Section */
.vt-section {
	margin-bottom: 4px;
}

.vt-section-header {
	display: flex;
	align-items: center;
	padding: 6px 12px;
	cursor: pointer;
	user-select: none;
	gap: 6px;
}

.vt-section-header:hover {
	background: var(--background-modifier-hover);
}

.vt-section-arrow {
	font-size: 10px;
	color: var(--text-muted);
	transition: transform 0.15s ease;
	display: inline-block;
}

.vt-section-arrow:not(.vt-collapsed) {
	transform: rotate(90deg);
}

.vt-section-title {
	font-weight: 600;
	font-size: 14px;
	color: var(--text-normal);
}

.vt-section-count {
	font-size: 11px;
	color: var(--text-muted);
	margin-left: auto;
}

.vt-section-content {
	padding: 0 8px;
}

.vt-empty-section {
	padding: 8px 12px;
	color: var(--text-faint);
	font-size: 12px;
	font-style: italic;
}

/* Task card */
.vt-task-card {
	padding: 8px 10px;
	margin: 2px 0;
	border-radius: 6px;
	border: 1px solid var(--background-modifier-border);
	background: var(--background-primary);
	cursor: pointer;
	transition: background 0.1s ease;
}

.vt-task-card:hover {
	background: var(--background-modifier-hover);
}

.vt-task-child {
	border-left: 2px solid var(--interactive-accent);
	border-top-left-radius: 0;
	border-bottom-left-radius: 0;
}

.vt-task-parent {
	font-size: 12px;
	color: var(--text-muted);
	font-weight: 600;
	margin-bottom: 3px;
}

.vt-task-card-header {
	display: flex;
	align-items: center;
	gap: 6px;
}

.vt-status-toggle {
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
	font-size: 14px;
	line-height: 1;
	color: var(--text-muted);
	flex-shrink: 0;
}

.vt-status-toggle:hover {
	color: var(--interactive-accent);
}

.vt-checkbox {
	font-size: 15px;
}

.vt-task-title {
	flex: 1;
	font-size: 15px;
	color: var(--text-normal);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.vt-task-child.vt-child-done .vt-task-title {
	text-decoration: line-through;
	color: var(--text-muted);
}

.vt-edit-button {
	background: none;
	border: none;
	cursor: pointer;
	padding: 0 2px;
	font-size: 12px;
	line-height: 1;
	color: var(--text-faint);
	flex-shrink: 0;
	opacity: 0;
	transition: opacity 0.1s ease;
}

.vt-task-card:hover .vt-edit-button {
	opacity: 1;
}

.vt-edit-button:hover {
	color: var(--interactive-accent);
}

.vt-priority-badge {
	font-weight: 700;
	font-size: 12px;
	flex-shrink: 0;
}

.vt-task-card-meta {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 4px;
	flex-wrap: wrap;
}

.vt-due-date {
	font-size: 11px;
	color: var(--text-muted);
}

.vt-due-date.vt-overdue {
	color: var(--text-error);
	font-weight: 600;
}

.vt-due-date.vt-due-today {
	color: var(--color-orange);
	font-weight: 600;
}

.vt-due-date.vt-due-soon {
	color: var(--color-yellow);
	font-weight: 500;
}

.vt-project-pill {
	font-size: 10px;
	background: var(--background-secondary);
	border-radius: 8px;
	padding: 1px 6px;
	color: var(--text-muted);
}

.vt-subtask-progress {
	font-size: 11px;
	color: var(--text-muted);
	font-family: var(--font-monospace);
}

/* Create modal */
.vt-create-modal {
	padding: 8px;
}

.vt-create-modal h3 {
	margin-top: 0;
	margin-bottom: 12px;
}

/* Code block */
.vt-codeblock {
	font-size: 15px;
}

.vt-codeblock-empty {
	color: var(--text-faint);
	font-style: italic;
	padding: 4px 0;
}

.vt-codeblock-list {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.vt-codeblock-row {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 4px 6px;
	border-radius: 4px;
	cursor: pointer;
}

.vt-codeblock-row:hover {
	background: var(--background-modifier-hover);
}

.vt-codeblock-status {
	flex-shrink: 0;
	color: var(--text-muted);
}

.vt-codeblock-title {
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.vt-codeblock-priority {
	font-weight: 700;
	font-size: 12px;
	flex-shrink: 0;
}

.vt-codeblock-due {
	font-size: 11px;
	color: var(--text-muted);
	flex-shrink: 0;
}

.vt-codeblock-due.vt-overdue {
	color: var(--text-error);
	font-weight: 600;
}

.vt-codeblock-due.vt-due-today {
	color: var(--color-orange);
	font-weight: 600;
}

.vt-codeblock-due.vt-due-soon {
	color: var(--color-yellow);
	font-weight: 500;
}

.vt-codeblock-parent {
	font-size: 10px;
	border: 1px solid var(--background-modifier-border);
	border-radius: 8px;
	padding: 1px 6px;
	color: var(--text-muted);
	flex-shrink: 0;
}

.vt-codeblock-project {
	font-size: 10px;
	background: var(--background-secondary);
	border-radius: 8px;
	padding: 1px 6px;
	color: var(--text-muted);
	flex-shrink: 0;
}

/* ========== View Mode Toggle ========== */

.vt-view-toggle {
	display: flex;
	gap: 2px;
	margin-left: auto;
}

.vt-view-toggle-btn {
	background: transparent;
	border: 1px solid var(--background-modifier-border);
	border-radius: 4px;
	padding: 2px 6px;
	cursor: pointer;
	color: var(--text-muted);
	font-size: 14px;
	line-height: 1;
}

.vt-view-toggle-btn:hover {
	background: var(--background-modifier-hover);
}

.vt-view-toggle-btn.vt-active {
	background: var(--interactive-accent);
	color: var(--text-on-accent);
	border-color: var(--interactive-accent);
}

/* ========== Kanban Board ========== */

.vt-kanban {
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 8px;
}

.vt-kanban-toolbar {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 4px 4px 8px;
	font-size: 12px;
	flex-shrink: 0;
}

.vt-kanban-toolbar-item {
	display: flex;
	align-items: center;
	gap: 4px;
	color: var(--text-muted);
	cursor: pointer;
}

.vt-kanban-toolbar-label {
	color: var(--text-muted);
	font-size: 11px;
}

.vt-kanban-toolbar-select {
	background: var(--background-secondary);
	border: 1px solid var(--background-modifier-border);
	border-radius: 4px;
	padding: 2px 6px;
	font-size: 11px;
	color: var(--text-normal);
}

.vt-kanban-columns {
	display: flex;
	gap: 8px;
	flex: 1;
	overflow-x: auto;
	min-height: 0;
}

.vt-kanban-column {
	flex: 1;
	min-width: 180px;
	display: flex;
	flex-direction: column;
	background: var(--background-secondary);
	border-radius: 6px;
	overflow: hidden;
}

.vt-kanban-column-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 10px;
	font-weight: 600;
	font-size: 12px;
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	border-bottom: 1px solid var(--background-modifier-border);
}

.vt-kanban-column-count {
	font-weight: 400;
	font-size: 11px;
	background: var(--background-modifier-border);
	border-radius: 8px;
	padding: 0 6px;
	color: var(--text-faint);
}

.vt-kanban-column-body {
	flex: 1;
	overflow-y: auto;
	padding: 6px;
}

.vt-kanban-column.vt-drag-over {
	background: var(--background-modifier-hover);
}

.vt-kanban-empty {
	color: var(--text-faint);
	font-size: 12px;
	text-align: center;
	padding: 16px 8px;
}

/* Kanban Card */

.vt-kanban-card {
	background: var(--background-primary);
	border: 1px solid var(--background-modifier-border);
	border-radius: 6px;
	padding: 8px 10px;
	margin-bottom: 6px;
	cursor: grab;
}

.vt-kanban-card:hover {
	background: var(--background-modifier-hover);
}

.vt-kanban-card:active {
	cursor: grabbing;
}

.vt-kanban-card-header {
	display: flex;
	align-items: flex-start;
	gap: 4px;
}

.vt-kanban-card-title {
	flex: 1;
	font-size: 15px;
	font-weight: 500;
	color: var(--text-normal);
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.vt-kanban-card-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-top: 4px;
	font-size: 11px;
}

/* Kanban Sub-group */

.vt-kanban-subgroup {
	margin-bottom: 8px;
}

.vt-kanban-subgroup-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 4px 6px;
	font-size: 11px;
	font-weight: 600;
	color: var(--text-muted);
	border-bottom: 1px solid var(--background-modifier-border);
	margin-bottom: 4px;
}

.vt-kanban-subgroup-count {
	font-weight: 400;
	font-size: 10px;
	color: var(--text-faint);
}

/* Compact mode (sidebar) */

.vt-kanban.vt-kanban-compact {
	padding: 4px;
}

.vt-kanban.vt-kanban-compact .vt-kanban-toolbar {
	padding: 2px 2px 4px;
	gap: 8px;
	font-size: 11px;
}

.vt-kanban.vt-kanban-compact .vt-kanban-columns {
	gap: 4px;
}

.vt-kanban.vt-kanban-compact .vt-kanban-column {
	min-width: 120px;
}

.vt-kanban.vt-kanban-compact .vt-kanban-column-header {
	padding: 6px 8px;
	font-size: 11px;
}

.vt-kanban.vt-kanban-compact .vt-kanban-card {
	padding: 6px 8px;
	margin-bottom: 4px;
}

.vt-kanban.vt-kanban-compact .vt-kanban-card-title {
	font-size: 14px;
}

/* ========== Matrix View ========== */

.vt-matrix {
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 8px;
}

.vt-matrix-toolbar {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 4px 4px 8px;
	font-size: 12px;
	flex-shrink: 0;
}

.vt-matrix-toolbar-item {
	display: flex;
	align-items: center;
	gap: 4px;
	color: var(--text-muted);
	cursor: pointer;
}

.vt-matrix-grid {
	display: grid;
	gap: 1px;
	flex: 1;
	overflow: auto;
	min-height: 0;
	background: var(--background-modifier-border);
	border: 1px solid var(--background-modifier-border);
	border-radius: 6px;
}

.vt-matrix-corner {
	background: var(--background-primary);
}

.vt-matrix-empty {
	color: var(--text-faint);
	font-size: 12px;
	text-align: center;
	padding: 24px 8px;
	font-style: italic;
}

.vt-matrix-col-header {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2px 4px;
	font-weight: 600;
	font-size: 10px;
	line-height: 1;
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	background: var(--background-secondary);
}

.vt-matrix-row-header {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2px 4px;
	font-weight: 600;
	font-size: 10px;
	line-height: 1;
	color: var(--text-muted);
	background: var(--background-secondary);
	white-space: nowrap;
}

.vt-matrix-cell {
	background: var(--background-primary);
	padding: 6px;
	min-height: 80px;
	overflow-y: auto;
	position: relative;
}

.vt-matrix-cell.vt-drag-over {
	background: var(--background-modifier-hover);
}

.vt-matrix-cell-count {
	position: absolute;
	top: 4px;
	right: 6px;
	font-size: 10px;
	color: var(--text-faint);
	font-weight: 400;
}

/* Matrix compact mode (sidebar) */

.vt-matrix.vt-matrix-compact {
	padding: 4px;
}

.vt-matrix.vt-matrix-compact .vt-matrix-toolbar {
	padding: 2px 2px 4px;
	gap: 8px;
	font-size: 11px;
}

.vt-matrix.vt-matrix-compact .vt-matrix-grid {
	gap: 1px;
}

.vt-matrix.vt-matrix-compact .vt-matrix-col-header {
	padding: 4px 4px;
	font-size: 10px;
}

.vt-matrix.vt-matrix-compact .vt-matrix-row-header {
	padding: 4px 4px;
	font-size: 10px;
}

.vt-matrix.vt-matrix-compact .vt-matrix-cell {
	padding: 4px;
	min-height: 60px;
}

.vt-matrix.vt-matrix-compact .vt-kanban-card {
	padding: 4px 6px;
	margin-bottom: 2px;
}

.vt-matrix.vt-matrix-compact .vt-kanban-card-title {
	font-size: 13px;
	-webkit-line-clamp: 1;
}

/* ========== Inline Editing ========== */

.vt-inline-editable {
	cursor: pointer;
	border-radius: 3px;
	padding: 0 2px;
	transition: background 0.1s ease;
}

.vt-inline-editable:hover {
	background: var(--background-modifier-hover);
}

.vt-inline-edit-input {
	background: var(--background-primary);
	border: 1px solid var(--interactive-accent);
	border-radius: 3px;
	color: var(--text-normal);
	font-family: inherit;
	outline: none;
	padding: 1px 4px;
}

.vt-inline-edit-input.vt-task-title {
	font-size: inherit;
	flex: 1;
	min-width: 0;
}

.vt-inline-edit-input.vt-kanban-card-title {
	font-size: 15px;
	font-weight: 500;
	flex: 1;
	min-width: 0;
	width: 100%;
}

.vt-inline-edit-input.vt-due-date {
	font-size: 11px;
	width: 120px;
}

.vt-inline-edit-input:focus {
	box-shadow: 0 0 0 1px var(--interactive-accent);
}

.vt-priority-badge.vt-inline-editable {
	cursor: pointer;
	transition: transform 0.1s ease;
}

.vt-priority-badge.vt-inline-editable:hover {
	transform: scale(1.2);
}

/* ========== Status Management UI (Settings) ========== */

.vt-status-list .setting-item {
	border-bottom: 1px solid var(--background-modifier-border);
	padding: 4px 0;
}
