spin-loader {
	position: relative;
	display: block;
	margin: 0 auto;
	width: var(--spinner-size, 40px);
	height: var(--spinner-size, 40px);
}

spin-loader::before {
	content: "";
	display: block;
	padding-top: 100%;
}

spin-loader svg {
	animation: rotate 2s linear infinite;
	height: 100%;
	transform-origin: center center;
	width: 100%;
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	margin: auto;
}

spin-loader svg circle {
	fill: none;
	stroke-miterlimit: 10px;
	stroke-dasharray: 1, 200;
	stroke-dashoffset: 0;
	animation: dash 1.5s ease-in-out infinite;
	stroke-linecap: round;
	stroke-width: var(--spinner-width, 4px);
	stroke: var(--spinner-color, gray);
}

@keyframes rotate {
	100% {
		transform: rotate(360deg);
		-webkit-transform: rotate(360deg);
	}
}

@keyframes dash {
	0% {
		stroke-dasharray: 1, 200;
		stroke-dashoffset: 0;
	}

	50% {
		stroke-dasharray: 89, 200;
		stroke-dashoffset: -35px;
	}

	100% {
		stroke-dasharray: 89, 200;
		stroke-dashoffset: -124px;
	}
}


action-button {
	--spinner-size: 35px;
	--spinner-color: white;
	--spinner-width: 5px;
	--button-width: 100%;
	--button-height: 48px;
	--button-padding: 10px 15px;
	--button-radius: 5px;
}

action-button button,
action-button a {
	display: flex;
	justify-content: center;
	align-items: center;
	width: var(--button-width);
	height: var(--button-height);
	color: white;
	font-weight: 500;
	border: 2px solid transparent;
	background-color: transparent;
	transition: border-color 0.125s ease-in-out, background-color 0.125s ease-in-out, opacity 0.125s ease-in-out;

	padding: var(--button-padding);
	font-size: 14px;
	border-radius: var(--button-radius);
	cursor: pointer;
}

action-button.loading button,
action-button.loading a {
	cursor: wait;
}

action-button button[disabled],
action-button .button[disabled] a {
	opacity: 0.5;
	cursor: not-allowed;
}

action-button.primary button,
action-button.primary a {
	background-color: var(--primary-color);
}

action-button.secondary button,
action-button.secondary a {
	background-color: rgba(255, 255, 255, 0.1);
	color: white;
}

action-button.ternary button,
action-button.ternary a {
	color: var(--primary-color);
}

action-button.ghost button,
action-button.ghost a {
	border-color: var(--primary-color);
	color: var(--primary-color);
}




toggle-switch-input {
	--switch-width: 50px;
	--switch-height: 25px;
	--switch-padding: 2px;
	--switch-background: var(--background-color, #ccc);
	--switch-color: #fff;
	--switch-checked-background: var(--primary-color, #007bff);
	--switch-checked-color: #fff;

	display: flex;
}

toggle-switch-input input {
	display: none;
}

toggle-switch-input span {
	display: block;
	position: relative;
	width: var(--switch-width);
	height: var(--switch-height);
	background: var(--switch-background);
	border-radius: 100px;
	cursor: pointer;
	transition: background-color 0.3s;
}

toggle-switch-input span:before {
	content: "";
	display: block;
	position: absolute;
	left: 0;
	width: calc(var(--switch-height) - var(--switch-padding) * 2);
	height: calc(var(--switch-height) - var(--switch-padding) * 2);
	margin: var(--switch-padding);
	background: var(--switch-color);
	border-radius: 100%;
	transition: left 0.3s;
}

toggle-switch-input input:checked+span {
	background: var(--switch-checked-background);
}

toggle-switch-input input:checked+span:before {
	left: calc(var(--switch-width) - var(--switch-height));
	background: var(--switch-checked-color);
}





tag-list-input {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;

	width: 100%;
	margin: 5px 0;
	border: 1px solid var(--border-color);
	border-radius: 5px;
	background-color: var(--background-color);
}

tag-list-input ul>item-list {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px;
}

tag-list-input ul>item-list:not(:empty) {
	padding: 5px;
}

tag-list-input ul li {
	display: flex;
	align-items: center;
	padding: 2px 4px;
	border-radius: 2px;
	background-color: var(--primary-color);
	color: white;
}

tag-list-input ul li span {
	font-size: 13px;
	font-weight: 300;
	margin: 0 4px;
}

tag-list-input ul li button {
	display: flex;
	width: 12px;
	height: 12px;
}

tag-list-input ul li button svg {
	width: 100%;
	height: 100%;
}

tag-list-input input.tag-input {
	margin: 0;
	transition: border-color 0.3s ease;
}

tag-list-input input.tag-input.error {
	border-color: #ff0000;
	animation: shake 0.5s ease-in-out both;
}

@keyframes shake {

	0%,
	100% {
		transform: translateX(0);
	}

	20%,
	60% {
		transform: translateX(-5px);
	}

	40%,
	80% {
		transform: translateX(5px);
	}
}



form-input {
	display: flex;
	flex-direction: row;
	align-items: center;
	width: 100%;
}

validated-form-input {
	display: flex;
	flex-direction: row;
	align-items: center;
	width: 100%;
}

validated-form-input input:has(.availability) {
	padding-right: 55px;
}

validated-form-input .availability {
	display: none;
	max-width: 0;
	margin-left: -40px;
}

validated-form-input .availability.visible {
	display: block;
}

validated-form-input .availability .indicator {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
}

validated-form-input .availability .indicator>* {
	--spinner-size: 20px;
	--spinner-color: var(--text-color);
	width: 20px;
	height: 20px;
}

validated-form-input .availability.available svg {
	color: rgb(69, 188, 102);
}

validated-form-input .availability svg {
	color: rgb(255, 69, 36);
}



list-view-dialog {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	height: 100%;
	max-height: 80svh;
	padding: 15px;
	overflow: auto;
}

list-view-dialog h2 {
	margin-bottom: 15px;
	font-size: 16px;
	font-weight: 600;
}

list-view-dialog .search {
	width: 100%;
	margin-bottom: 15px;
	padding: 10px 15px;
	border-radius: 10px;
	background-color: var(--background-color);
}

list-view-dialog .search .icon {
	display: flex;
	justify-content: center;
	align-items: center;
	opacity: 0.8;
}

list-view-dialog .search .icon svg {
	width: 20px;
	height: 20px;
}

list-view-dialog .search input {
	flex: 1;
	margin: 0 10px;
}

list-view-dialog .search button.paste {}

list-view-dialog .search button.paste .icon {}

list-view-dialog .search button.paste .icon svg {
	width: 20px;
	height: 20px;
}

list-view-dialog item-list {
	display: flex;
	flex-direction: column;
	gap: 20px;
	width: 100%;
}

list-view-dialog .empty {}