/* © 2026 Mark Kats. Все права защищены. Копирование и переработка запрещены. */

.shd-prompt-filters {
	--shd-activity-filter-bg: rgba(255, 255, 255, 0.075);
	--shd-activity-filter-border: #474b50;
	--shd-activity-panel-bg:
		linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)), rgba(14, 16, 20, 0.98);
	--shd-activity-panel-border: #43474c;
	--shd-activity-panel-shadow: none;
	--shd-activity-input-bg: #1b1b1b;
	--shd-activity-input-border: #43474c;
	--shd-activity-input-text: #fff;
	--shd-activity-label-text: rgba(255, 255, 255, 0.78);
	color: #eaecf0;
	font:
		12px / 1.35 'Artifakt Element',
		system-ui,
		-apple-system,
		'Segoe UI',
		sans-serif;
}

html[data-ui-theme='light'] .shd-prompt-filters {
	--shd-activity-filter-bg: rgba(232, 238, 244, 0.82);
	--shd-activity-filter-border: rgba(31, 41, 55, 0.24);
	--shd-activity-panel-bg: linear-gradient(180deg, rgba(232, 236, 241, 0.96), rgba(222, 227, 233, 0.98)), #e3e7ed;
	--shd-activity-panel-border: rgba(31, 41, 55, 0.16);
	--shd-activity-panel-shadow: 0 0 0 1px rgba(15, 23, 42, 0.07), 0 8px 22px rgba(15, 23, 42, 0.11);
	--shd-activity-input-bg: #e8edf2;
	--shd-activity-input-border: rgba(31, 41, 55, 0.16);
	--shd-activity-input-text: rgb(29, 31, 37);
	--shd-activity-label-text: rgb(83, 89, 101);
	color: rgb(29, 31, 37);
}

.shd-prompt-filters-wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 6px;
	margin: 0 0 8px;
}

.shd-prompt-filters-wrap > .shd-prompt-filters {
	flex: 0 1 auto;
	width: fit-content;
	max-width: 100%;
	box-sizing: border-box;
}

.shd-prompt-filters-wrap--embedded {
	margin-bottom: 0;
}

.shd-prompt-filters-wrap--fluid {
	width: 100%;
	margin-bottom: 0;
}

.shd-prompt-filters-wrap--fluid > .shd-prompt-filters {
	width: 100%;
}

.shd-prompt-filters {
	display: flex;
	align-items: flex-end;
	flex-wrap: wrap;
	gap: 6px;
	padding: 7px;
	border: 1px solid var(--shd-activity-filter-border);
	border-radius: var(--ui-radius);
	background: var(--shd-activity-filter-bg);
}

.shd-prompt-filters--embedded {
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
}



.shd-prompt-filters .tasks-date-filter > summary.pb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	height: 28px;
	min-height: 28px;
	padding: 0 7px;
	border: 1px solid var(--ui-border);
	border-radius: 8px;
	background: var(--ui-surface-soft);
	color: var(--ui-text);
	cursor: pointer;
	font: inherit;
	white-space: nowrap;
	box-sizing: border-box;
	transition:
		background-color 0.14s ease,
		border-color 0.14s ease,
		color 0.14s ease,
		box-shadow 0.14s ease,
		opacity 0.14s ease;
}

.shd-prompt-filters .tasks-date-filter[open] > summary.pb-btn,
.shd-prompt-filters .tasks-date-filter > summary.pb-btn.is-active {
	border-color: var(--ui-tab-active-border);
	background: var(--ui-tab-active-bg);
	color: var(--ui-tab-active-text);
}



.shd-prompt-filters--admin-pages {
	align-items: center;
	gap: 6px;
	flex-wrap: nowrap;
	max-width: 100%;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
}

.shd-prompt-filters--admin-pages > .shd-activity-filter {
	flex: 0 0 auto;
	flex-direction: row;
	align-items: center;
	min-width: 0;
}

.shd-prompt-filters--admin-pages > .shd-activity-filter > label {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.shd-prompt-filters--admin-pages > .shd-activity-filter > .shd-activity-filter__input {
	width: 32px;
	min-width: 32px;
	height: 28px;
}

.shd-prompt-filters--integration {
	display: grid;
	grid-template-columns: repeat(7, minmax(120px, 1fr));
	align-items: flex-end;
	gap: 8px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
}

.shd-prompt-filters--integration > label {
	display: flex;
	flex-direction: column;
	min-width: 0;
	margin-top: 0;
	color: var(--cg-text-faint, var(--ui-text-dim));
	font-size: 11px;
	opacity: 0.92;
}

.shd-prompt-filters--integration > label > select,
.shd-prompt-filters--integration > label > input,
.shd-prompt-filters--integration > .shd-activity-filter__input {
	box-sizing: border-box;
	width: 100%;
	height: 28px;
	min-height: 28px;
	padding: 0 8px;
	border: 1px solid var(--cg-field-stroke, var(--ui-border));
	border-radius: 8px;
	background: var(--cg-field-bg, var(--ui-surface));
	color: var(--cg-field-text, var(--ui-text));
	font: 400 12px/1.2 'Artifakt Element', system-ui, sans-serif;
	outline: none;
	margin-top: 0;
}

.shd-prompt-filters--integration > label > select:focus,
.shd-prompt-filters--integration > label > input:focus,
.shd-prompt-filters--integration > .shd-activity-filter__input:focus {
	border-color: var(--cg-focus, var(--ui-border-strong));
	box-shadow: 0 0 0 2px var(--cg-focus-ring, transparent);
}

.shd-prompt-filters--integration .only-selected-wrap {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: flex-end;
	gap: 2px;
	min-width: 0;
	margin-top: 0;
	white-space: nowrap;
}

.shd-prompt-filters--integration .only-selected-wrap > span {
	color: var(--cg-text-faint, var(--ui-text-dim));
	font-size: 11px;
	opacity: 0.92;
	line-height: 1;
}

.shd-prompt-filters--integration .btn-filter {
	align-self: flex-end;
	order: 0;
	white-space: nowrap;
}

@media (max-width: 760px) {
	.shd-prompt-filters--admin-pages {
		width: 100%;
		flex-wrap: wrap;
	}
}

@media (max-width: 900px) {
	.shd-prompt-filters--integration {
		grid-template-columns: repeat(3, minmax(120px, 1fr));
		gap: 8px;
	}
}

@media (max-width: 720px) {
	.shd-prompt-filters--integration {
		grid-template-columns: 1fr 1fr;
		gap: 8px;
	}

	.shd-prompt-filters--integration .btn-filter {
		grid-column: 1 / -1;
		justify-self: start;
	}

	.shd-prompt-filters--integration > label {
		min-width: 0;
	}

	.shd-prompt-filters--integration > label:has(#q) {
		grid-column: 1 / 2;
	}

	.shd-prompt-filters--integration .only-selected-wrap {
		width: 99%;
		padding: 0 2px;
	}


}

.shd-prompt-filters--compact
	> .shd-activity-filter:not(.shd-activity-filter--actions):not(.shd-activity-filter--checkbox):not(
		.shd-activity-filter--wide
	) {
	flex: 0 0 110px;
	width: 110px;
	min-width: 110px;
}

.shd-prompt-filters--compact > .shd-activity-filter--checkbox {
	flex: 0 0 auto;
	width: max-content;
	min-width: 0;
}

.shd-activity-filter {
	display: flex;
	flex: 0 1 124px;
	flex-direction: column;
	gap: 3px;
	min-width: 112px;
	margin: 0;
	color: var(--shd-activity-label-text);
	font-size: 11px;
	line-height: 1.1;
}

.shd-activity-filter--wide {
	flex: 1 1 0;
	width: auto;
	min-width: 0;
}

.shd-activity-filter > input[type='checkbox'] {
	flex: 0 0 var(--shd-checkbox-size, 16px);
	width: var(--shd-checkbox-size, 16px);
	min-width: var(--shd-checkbox-size, 16px);
	max-width: var(--shd-checkbox-size, 16px);
	height: var(--shd-checkbox-size, 16px);
	min-height: var(--shd-checkbox-size, 16px);
	max-height: var(--shd-checkbox-size, 16px);
	align-self: flex-start;
	margin: 0;
}

.shd-activity-filter:has(> input[type='checkbox']) {
	min-height: 42px;
}

.shd-prompt-filters .tasks-date-filter {
	position: relative;
	align-self: flex-end;
	flex: 0 0 auto;
}

.shd-prompt-filters .tasks-date-filter summary {
	list-style: none;
	user-select: none;
}

.shd-prompt-filters .tasks-date-filter summary::-webkit-details-marker {
	display: none;
}

.shd-prompt-filters .tasks-date-panel {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	z-index: 220;
	display: grid;
	grid-template-columns: repeat(2, minmax(126px, 1fr));
	gap: 6px;
	min-width: 336px;
	padding: 6px;
	border: 1px solid var(--shd-activity-panel-border);
	border-radius: var(--ui-radius);
	background: var(--shd-activity-panel-bg);
	box-shadow: var(--shd-activity-panel-shadow);
	box-sizing: border-box;
}

.shd-prompt-filters .tasks-date-panel label {
	display: flex;
	flex: 1 1 124px;
	flex-direction: column;
	gap: 3px;
	min-width: 112px;
	margin: 0;
	color: var(--shd-activity-label-text);
	font-size: 11px;
	line-height: 1.1;
}

.shd-prompt-filters .tasks-date-presets {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 4px;
}

.shd-prompt-filters .tasks-date-presets .pb-btn {
	width: 100%;
	min-width: 0;
	padding: 0 8px;
	font-size: 10px;
}

.shd-prompt-filters .tasks-date-panel input,
.shd-activity-filter__input {
	width: 100%;
	min-width: 0;
	height: 28px;
	padding: 0 8px;
	border: 1px solid var(--shd-activity-input-border);
	border-radius: var(--ui-radius);
	background: var(--shd-activity-input-bg);
	color: var(--shd-activity-input-text);
	font:
		400 12px/1.2 'Artifakt Element',
		system-ui,
		sans-serif;
	box-sizing: border-box;
}

.shd-activity-filter > button.shd-activity-filter__input {
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	text-align: left;
}

.shd-activity-filter--actions {
	flex: 0 0 auto;
	flex-direction: row;
	gap: 4px;
	flex-wrap: nowrap;
	justify-content: flex-end;
	align-items: center;
	align-self: end;
	min-width: auto;
}

.shd-activity-filter--actions:has(> .shd-activity-filter__label) {
	flex-direction: column;
	gap: 3px;
	align-items: flex-start;
}

.shd-activity-filter__label {
	color: var(--shd-activity-label-text);
	font: inherit;
}

.shd-activity-filter--actions .pb-btn:only-child {
	width: 100%;
}

.agents-filter-panel > .shd-activity-filter:not(.shd-activity-filter--actions) {
	flex: 0 0 110px;
	width: 110px;
	min-width: 110px;
}

.agents-filter-panel--secondary > .shd-activity-filter:not(.shd-activity-filter--actions) {
	flex-basis: 82px;
	width: 82px;
	min-width: 82px;
}

.agents-filter-panel--main .shd-activity-filter--actions .pb-btn:only-child {
	width: fit-content;
}

@media (max-width: 980px) {
	.shd-prompt-filters .tasks-date-panel {
		right: 0;
		left: auto;
		min-width: min(336px, calc(100vw - 24px));
		grid-template-columns: 1fr;
	}

	.shd-prompt-filters .tasks-date-presets {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.shd-prompt-filters--compact
		> .shd-activity-filter:not(.shd-activity-filter--actions):not(.shd-activity-filter--checkbox):not(
			.shd-activity-filter--wide
		),
	.shd-prompt-filters--compact > .shd-activity-filter--wide {
		flex: 1 1 100%;
		width: auto;
		min-width: 0;
	}

	.shd-prompt-filters--compact > .shd-activity-filter--checkbox {
		flex: 1 1 100%;
		width: 100%;
		min-width: 0;
	}

	.shd-prompt-filters-wrap {
		display: grid;
		grid-template-columns: minmax(0, 1fr);
	}

	.shd-prompt-filters .tasks-date-panel {
		right: 0;
		left: auto;
		width: min(336px, calc(100vw - 34px));
		min-width: 0;
	}
}
