/*

This CSS file will be included with your plugin, and
available in the app when your plugin is enabled.

If your plugin does not need CSS, delete this file.

*/

.setting-item.column {
	flex-direction: column;
	align-items: stretch;
}

.setting-item.column .setting-item-control {
	margin-top: var(--size-4-2);
}

.setting-item.column .setting-item-control > input {
	width: 100%;
}

/* Settings modal shell */
.task-list-kanban-settings-modal-container {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	width: min(1120px, calc(100vw - 48px));
	max-width: 1120px;
}

.task-list-kanban-settings-modal {
	display: flex;
	flex-direction: column;
	flex: 1;
	overflow: hidden;
}

.settings-scroll-wrapper {
	flex: 1;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	min-height: 0;
}

/* Settings header */
.settings-header {
	display: flex;
	align-items: center;
	gap: 12px;
	padding-bottom: 14px;
	margin-bottom: 0;
	border-bottom: 1px solid var(--background-modifier-border);
}

.settings-header h1 {
	margin: 0;
	flex: 0 0 auto;
}

.settings-header-status {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 24px;
	flex-wrap: wrap;
}

.settings-status-pill {
	--settings-pill-color: var(--text-muted);
	--settings-pill-background: transparent;
	--settings-pill-border: transparent;

	display: none;
	align-items: center;
	max-width: min(520px, calc(100vw - 180px));
	padding: 3px 10px;
	border-radius: 999px;
	color: var(--settings-pill-color);
	background: var(--settings-pill-background);
	border: 1px solid var(--settings-pill-border);
	font-size: var(--font-ui-smaller);
	font-weight: 600;
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.settings-status-pill.is-visible {
	display: inline-flex;
}

.settings-status-pill-validation {
	--settings-pill-color: var(--text-error);
	--settings-pill-background: rgba(var(--background-modifier-error-rgb), 0.14);
	--settings-pill-border: color-mix(in srgb, var(--background-modifier-error) 75%, transparent);
}

.settings-status-pill-dirty {
	--settings-pill-color: var(--text-accent);
	--settings-pill-background: color-mix(in srgb, var(--interactive-accent) 12%, transparent);
	--settings-pill-border: color-mix(in srgb, var(--interactive-accent) 35%, transparent);
}

.settings-button-bar {
	flex-shrink: 0;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 0 0;
	border-top: 1px solid var(--background-modifier-border);
}

.task-list-kanban-confirm-modal {
	min-width: min(420px, calc(100vw - 64px));
}

.task-list-kanban-confirm-modal h2 {
	margin-top: 0;
}

.confirm-modal-actions {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 18px;
}

.settings-body {
	display: grid;
	grid-template-columns: 180px minmax(0, 1fr);
	gap: 24px;
	flex: 1;
	min-height: 0;
	padding-top: 18px;
}

.settings-nav {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 2px 0 12px;
	overflow-y: auto;
	min-height: 0;
	border-right: 1px solid var(--background-modifier-border);
}

.settings-nav button {
	justify-content: flex-start;
	width: calc(100% - 14px);
	height: auto;
	min-height: 32px;
	padding: 6px 10px;
	border-radius: var(--radius-s);
	color: var(--text-muted);
	background: transparent;
	box-shadow: none;
	font-size: var(--font-ui-small);
	font-weight: 600;
	text-align: left;
}

.settings-nav button:hover,
.settings-nav button:focus-visible {
	color: var(--text-normal);
	background: var(--background-modifier-hover);
}

.settings-content {
	overflow-y: auto;
	overflow-x: hidden;
	min-height: 0;
	padding: 0 2px 12px 0;
	scroll-behavior: smooth;
}

.settings-section {
	padding-bottom: 22px;
	scroll-margin-top: 10px;
}

.settings-section + .settings-section {
	padding-top: 20px;
	border-top: 1px solid var(--background-modifier-border);
}

.settings-section-header {
	margin-bottom: 14px;
}

.settings-section-header h2 {
	margin: 0 0 4px;
	font-size: 1.35em;
}

.settings-section-header .setting-item-description {
	margin: 0;
	max-width: 760px;
	color: var(--text-muted);
}

.settings-section-body > .setting-item:first-child {
	border-top: 0;
}

.settings-subsection {
	margin-top: 12px;
}

/* Column editor layout */
.column-editor-section {
	margin-bottom: 0;
}

.column-editor-intro {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
}

.column-editor-intro .setting-item-description {
	margin: 0;
	color: var(--text-muted);
}

.column-editor-controls button {
	height: 30px;
	padding: 4px 10px;
	font-size: var(--font-ui-smaller);
}

.column-editor-list {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: 0;
}

.column-editor-row {
	display: flex;
	position: relative;
	align-items: center;
	gap: 8px;
	padding: 8px;
	border: 1px solid var(--background-modifier-border);
	border-radius: var(--radius-s);
	background: var(--background-primary);
	transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
	overflow: visible;
	min-width: 0;
}

.column-editor-row.is-bookend {
	align-items: center;
}

.column-editor-row-content {
	flex: 1 1 auto;
	min-width: 0;
}

.column-editor-row:hover {
	border-color: color-mix(in srgb, var(--background-modifier-border) 55%, var(--text-muted));
	background: color-mix(in srgb, var(--background-primary) 92%, var(--background-modifier-hover));
}

.column-editor-row:focus-within {
	border-color: var(--background-modifier-border-focus);
	box-shadow: 0 0 0 1px color-mix(in srgb, var(--background-modifier-border-focus) 45%, transparent);
}

.column-editor-row.is-drop-target {
	box-shadow: none;
}

.column-editor-row.is-dragging {
	opacity: 0.4;
}

.column-editor-row.is-drop-before::before,
.column-editor-row.is-drop-after::before {
	content: "";
	position: absolute;
	left: 8px;
	right: 8px;
	height: 2px;
	background: var(--interactive-accent);
	pointer-events: none;
}

.column-editor-row.is-drop-before::after,
.column-editor-row.is-drop-after::after {
	content: "";
	position: absolute;
	left: 4px;
	width: 10px;
	height: 10px;
	border-radius: 999px;
	background: var(--interactive-accent);
	pointer-events: none;
}

.column-editor-row.is-drop-before::before {
	top: -2px;
}

.column-editor-row.is-drop-before::after {
	top: -6px;
}

.column-editor-row.is-drop-after::before {
	bottom: -2px;
}

.column-editor-row.is-drop-after::after {
	bottom: -6px;
}

.column-editor-handle,
.column-editor-handle-spacer {
	width: 20px;
	height: 20px;
	flex: 0 0 20px;
}

.column-editor-handle {
	cursor: grab;
	color: var(--text-muted);
	font-size: 14px;
	line-height: 1;
	opacity: 0.7;
	padding: 0;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transform: translateY(0);
}

.column-editor-handle:active {
	cursor: grabbing;
}

.column-editor-fields {
	display: flex;
	gap: 10px;
	min-width: 0;
}

.column-editor-summary {
	display: grid;
	grid-template-columns: minmax(180px, 1fr) 24px minmax(150px, auto);
	align-items: center;
	gap: 8px;
	min-width: 0;
	width: 100%;
}

.column-editor-row.is-bookend .column-editor-summary {
	grid-template-columns: minmax(180px, 1fr) minmax(150px, auto);
}

.column-editor-pill {
	display: inline-flex;
	align-items: center;
	min-height: 24px;
	max-width: 180px;
	padding: 2px 8px;
	border-radius: var(--radius-s);
	color: var(--text-muted);
	background: var(--background-secondary);
	border: 1px solid var(--background-modifier-border);
	font-size: var(--font-ui-smaller);
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.column-editor-popover-anchor {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
}

.column-editor-match-anchor {
	justify-content: flex-start;
}

.column-editor-popover {
	position: absolute;
	top: calc(100% + 8px);
	z-index: 20;
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 10px;
	border: 1px solid var(--background-modifier-border);
	border-radius: var(--radius-s);
	background: var(--background-primary);
	box-shadow: var(--shadow-s);
}

.column-editor-color-popover {
	left: 50%;
	width: 230px;
	transform: translateX(-50%);
}

.column-editor-match-popover {
	right: 0;
	width: min(360px, calc(100vw - 64px));
}

.column-editor-popover-field {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.column-editor-summary-button {
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
	box-shadow: none;
}

.column-editor-summary-button:hover,
.column-editor-summary-button:focus-visible {
	color: var(--text-normal);
	background: var(--background-modifier-hover);
}

.column-editor-fields.column-editor-fields-inline {
	align-items: center;
	flex: 1 1 auto;
	flex-wrap: wrap;
	width: 100%;
	padding: 1px 0 2px;
}

.column-editor-field {
	display: flex;
	align-items: center;
	gap: 6px;
	min-width: 0;
	flex: 0 1 auto;
}

.column-editor-fields.column-editor-fields-inline .column-editor-field {
	align-self: center;
}

.column-editor-field input,
.column-editor-field select {
	margin: 0;
}

.column-editor-field .setting-input,
.column-editor-field select {
	height: 34px;
}

.column-editor-field-label {
	flex: 1 1 220px;
	min-width: 180px;
}

.column-editor-field-label .setting-input {
	width: 100%;
	text-overflow: ellipsis;
}

.column-editor-field-label .setting-input:focus {
	text-overflow: clip;
}

.column-editor-field-tag {
	flex: 1 1 260px;
	min-width: 0;
	position: relative;
	overflow: visible;
}

.column-editor-tag-select-host {
	display: flex;
	width: 100%;
	min-width: 0;
	max-width: 100%;
	overflow: visible;
}

.column-editor-field-match,
.column-editor-field-visibility,
.column-editor-field-status {
	flex: 0 1 auto;
}

.column-editor-field-match select {
	width: auto;
	min-width: 0;
	padding-left: 10px;
	padding-right: 28px;
}

.column-editor-field-visibility select {
	min-width: 150px;
}

.column-editor-field-status select {
	min-width: 120px;
}

.column-editor-field-status .setting-input {
	width: 84px;
}

.column-editor-field-status .setting-input:not(.is-visible) {
	display: none;
}

.column-editor-inline-label {
	flex: 0 0 auto;
	color: var(--text-muted);
	font-size: var(--font-ui-smaller);
	font-weight: 600;
	white-space: nowrap;
	letter-spacing: 0.01em;
}

.column-editor-field-color .setting-input {
	width: 96px;
}

.column-editor-color-swatch {
	width: 18px;
	height: 18px;
	border-radius: 999px;
	border: 1px solid var(--background-modifier-border);
	appearance: none;
	-webkit-appearance: none;
	background-color: var(--column-editor-swatch-color, transparent) !important;
	background-image: repeating-conic-gradient(
		from 45deg,
		var(--background-primary) 0deg 90deg,
		var(--background-secondary) 90deg 180deg
	);
	background-blend-mode: overlay;
	flex: 0 0 18px;
	padding: 0;
	cursor: pointer;
	box-shadow: none;
}

.column-editor-summary-swatch {
	justify-self: center;
}

.column-editor-color-swatch.has-color {
	border-color: color-mix(in srgb, var(--background-modifier-border) 40%, var(--text-normal));
	background-image: none;
}

.column-editor-color-picker {
	position: absolute;
	opacity: 0;
	pointer-events: none;
	width: 0;
	height: 0;
	padding: 0;
	border: 0;
}

.column-editor-rename-option {
	display: none;
	align-items: center;
	gap: 6px;
	color: var(--text-muted);
	font-size: var(--font-ui-smaller);
	white-space: nowrap;
	flex: 0 0 auto;
	cursor: pointer;
	user-select: none;
	padding: 2px 0;
}

.column-editor-rename-option input,
.column-editor-rename-option label {
	cursor: pointer;
}

.column-editor-remove-rail {
	display: flex;
	align-items: center;
	justify-content: center;
	margin-left: auto;
	flex: 0 0 20px;
	width: 20px;
}

.column-editor-remove-rail > button {
	width: 20px;
	height: 20px;
	padding: 0;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--text-faint);
	opacity: 0.75;
	transition: color 140ms ease, background-color 140ms ease, opacity 140ms ease;
}

.column-editor-remove-rail > button:hover {
	color: var(--text-muted);
	background: var(--background-modifier-hover);
	opacity: 1;
}

.column-editor-controls {
	display: flex;
	justify-content: flex-start;
	margin-top: 12px;
}

/* Responsive layout */
@media (max-width: 900px) {
	.task-list-kanban-settings-modal-container {
		width: min(920px, calc(100vw - 24px));
	}

	.settings-body {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.settings-nav {
		position: sticky;
		top: 0;
		z-index: 4;
		flex-direction: row;
		gap: 6px;
		overflow-x: auto;
		padding: 0 0 10px;
		border-right: 0;
		border-bottom: 1px solid var(--background-modifier-border);
		background: var(--background-primary);
	}

	.settings-nav button {
		width: auto;
		flex: 0 0 auto;
		white-space: nowrap;
	}

	.column-editor-summary {
		grid-template-columns: minmax(160px, 1fr) auto auto;
	}
}

@media (max-width: 720px) {
	.column-editor-row {
		align-items: flex-start;
	}

	.column-editor-intro,
	.column-editor-summary,
	.column-editor-fields.column-editor-fields-inline,
	.column-editor-field {
		flex-direction: column;
		align-items: stretch;
	}

	.column-editor-intro {
		align-items: stretch;
	}

	.column-editor-summary {
		display: flex;
	}

	.column-editor-row.is-bookend .column-editor-summary {
		display: flex;
	}

	.column-editor-fields.column-editor-fields-inline {
		gap: 12px;
	}

	.column-editor-field-label,
	.column-editor-field-tag,
	.column-editor-field-match,
	.column-editor-field-visibility,
	.column-editor-field-status,
	.column-editor-field-color {
		flex: 1 1 auto;
	}

	.column-editor-field-tag,
	.column-editor-tag-select-host {
		width: 100%;
	}

	.column-editor-popover-anchor,
	.column-editor-popover,
	.column-editor-popover-field {
		width: 100%;
	}

	.column-editor-popover {
		position: static;
		transform: none;
		margin-top: 8px;
	}

	.column-editor-field-match select,
	.column-editor-field-visibility select,
	.column-editor-field-status select,
	.column-editor-field-status .setting-input,
	.column-editor-field-color .setting-input {
		width: 100%;
	}

	.column-editor-pill {
		max-width: 100%;
	}
}
