:root {
	--scroll-thumb: color-mix(in srgb,var(--muted) 48%,transparent);
	--scroll-thumb-hover: color-mix(in srgb,var(--muted) 78%,transparent);
	scrollbar-gutter: stable;
}
*, *::before, *::after {
	scrollbar-width: thin;
	scrollbar-color: var(--scroll-thumb) transparent;
}
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
	background: var(--scroll-thumb);
	border-radius: 12px;
	border: 1px solid transparent;
	background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background-color: var(--scroll-thumb-hover); }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
::-webkit-scrollbar-corner { background: transparent; }
html.dialog-open, body.dialog-open { overflow: hidden; overscroll-behavior: none; }
.overlay {
	padding: 24px 20px;
	overflow: hidden;
	overscroll-behavior: contain;
}
.dialog {
	display: flex;
	flex-direction: column;
	max-height: calc(100vh - 48px);
	max-height: calc(100dvh - 48px);
	min-height: 0;
	overflow: hidden;
}
.dialog-head, .dialog-foot { flex: 0 0 auto; }
.dialog-body { min-height: 0; overflow: auto; overscroll-behavior: contain; }
.dialog-foot { position: static; }

.search-select {
	box-sizing: border-box;
	padding: 3px 34px 3px 8px;
	align-items: center;
	gap: 6px;
}
.field .search-select .select-search, .search-select .select-search {
	min-width: 0;
	flex-basis: 100px;
	text-overflow: ellipsis;
}
.search-select:not(.is-multiple) .select-search { flex-basis: 0; }
.select-arrow {
	top: 50%;
	right: 7px;
	width: 24px;
	height: 28px;
	transform: translateY(-50%);
	font-size: 0;
	cursor: pointer;
}
.select-arrow::after {
	content: "";
	display: block;
	width: 7px;
	height: 7px;
	margin: -4px auto 0;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg);
}
.search-select.is-open .select-arrow::after { margin-top: 3px; transform: rotate(225deg); }
.select-menu {
	box-sizing: border-box;
	padding: 6px;
	border-radius: 10px;
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
	scroll-padding-block: 6px;
	font-size: 14px;
	line-height: 1.45;
	box-shadow: 0 12px 32px #0003;
}
.select-option {
	box-sizing: border-box;
	min-height: 38px;
	padding: 9px 12px;
	white-space: normal;
	overflow-wrap: anywhere;
}
.select-option.is-selected { font-weight: 600; }
.select-option.is-selected::after { float: right; margin-left: 10px; }
.toolbar > .search-select { width: min(240px,100%); flex: 0 1 240px; }

.automation-table { table-layout: fixed; min-width: 1050px; }
.automation-table th:first-child { width: 20%; }
.automation-table th:nth-child(2) { width: 18%; }
.automation-table th:nth-child(3) { width: 17%; }
.automation-table th:last-child { width: 200px; }
.automation-table th, .automation-table td { padding: 18px 16px; }
.automation-table td { vertical-align: top; overflow-wrap: anywhere; }
.automation-table td:last-child { padding-inline: 12px; vertical-align: middle; }
.automation-actions { display: flex; justify-content: flex-end; align-items: center; gap: 4px; }
.automation-actions > .row-actions { display: contents; }
.automation-actions .icon-btn { flex: 0 0 32px; width: 32px; height: 32px; }
.schedule-summary { display: grid; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.schedule-summary > .badge { justify-self: start; }
.schedule-summary-counts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px 14px; margin: 0; }
.schedule-summary-counts > div { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-width: 0; font-size: 12px; line-height: 1.45; }
.schedule-summary-counts dt { color: var(--muted); overflow-wrap: normal; }
.schedule-summary-counts dd { margin: 0; color: var(--text); font-weight: 600; white-space: nowrap; }
.schedule-metrics { grid-template-columns: repeat(5,minmax(0,1fr)); }
.schedule-metrics .run-metric { min-width: 0; }
.schedule-metrics .run-metric span { display: block; min-height: 2.8em; line-height: 1.4; }

@media (max-width: 1000px) {
	.schedule-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 600px) {
	.overlay { padding: 10px; }
	.dialog { max-height: calc(100vh - 20px); max-height: calc(100dvh - 20px); }
	.schedule-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
	.toolbar > .search-select { flex: 1 1 180px; }
}
@media (forced-colors: active) {
	* { scrollbar-color: auto; }
}
