button,
input,
textarea,
select {
	font: inherit;
}

button {
	border: 1px solid var(--border);
	background: var(--panel2);
	color: var(--text);
	border-radius: 8px;
	padding: 8px 11px;
	cursor: pointer;
}

button:hover {
	border-color: #667086;
}

button.primary {
	background: var(--accent);
	border-color: var(--accent);
	color: white;
}

button.primary:hover {
	background: var(--accent2);
}

button.danger {
	color: #ffb1b1;
}

button.small {
	padding: 5px 8px;
	font-size: 12px;
}

input,
textarea,
select {
	background: #11151c;
	color: var(--text);
	border: 1px solid var(--border);
	border-radius: 8px;
}

input,
select {
	padding: 8px;
}

textarea {
	width: 100%;
	min-height: 116px;
	resize: vertical;
	padding: 10px;
}

label.check {
	display: inline-flex;
	gap: 7px;
	align-items: center;
	color: var(--muted);
}

label.check input {
	width: auto;
}

.command-list {
	display: grid;
	gap: .6rem;
}

.command-item {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: .5rem;
	align-items: start;
	padding: .25rem;
	border: 1px solid transparent;
	border-radius: 10px;
	transition: border-color .2s, background-color .2s;
}

.command-item textarea {
	min-height: 64px;
	white-space: pre-wrap;
  	field-sizing: content;
}

.command-actions {
	display: flex;
	gap: .5rem;
}

.command-highlight {
	border-color: var(--accent);
	background: rgba(139, 124, 255, .16);
}

.command-notice {
	position: fixed;
	right: 1rem;
	bottom: 1rem;
	z-index: 10;
	display: flex;
	gap: .75rem;
	align-items: center;
	padding: .75rem;
	background: linear-gradient(120deg, #8428a8, #db2876, #e87824);
	border: 1px solid #ffb5e8;
	border-radius: 10px;
	box-shadow: 0 0 24px rgba(236, 54, 164, .65);
	animation: notice-pulse 1.2s ease-in-out infinite alternate;
}

@keyframes notice-pulse {
	from { filter: brightness(1); transform: scale(1); }
	to { filter: brightness(1.25); transform: scale(1.025); }
}

.command-notice[hidden] {
	display: none;
}

@media (prefers-reduced-motion: reduce) {
	.command-notice {
		animation: none;
	}
}

.note-dialog {
	width: min(34rem, calc(100% - 2rem));
	color: var(--text);
	background: var(--panel);
	border: 1px solid var(--border);
	border-radius: 1rem;
	box-shadow: 0 16px 48px rgba(0, 0, 0, .6);
}

.note-dialog::backdrop {
	background: rgba(5, 7, 12, .75);
	backdrop-filter: blur(3px);
}

.note-dialog form {
	display: grid;
	gap: .8rem;
}

.note-dialog textarea {
	min-height: 5rem;
}

.dialog-actions {
	display: flex;
	justify-content: flex-end;
	gap: .5rem;
}

@media screen and (max-width: 600px) {
	.command-item {
		grid-template-columns: 1fr;
	}
}

/*
 * =================================
 * Toggle switch
 * https://www.erikkroes.nl/blog/accessible-html-toggle-button-switch/
 * =================================
*/

/* Formatting */
button[role="switch"] {
	padding: 0;
	height: 1.5rem;
	border-radius: 1rem;
	display: inline-block;
}

button[role="switch"] span {
	color: white;
	padding: 0.1rem;
	pointer-events: none;
	border-radius: 2rem;
	display: inline-block;
	width: 1.5rem;
}

button[role="switch"][aria-checked="false"] :last-child {
	padding-left: .2em;
}

/* Background changing */
button[role="switch"][aria-checked="true"] {
	background-color: var(--accent);
}

button[role="switch"][aria-checked="false"] {
	background-color: var(--panel2);
}



button[role="switch"][aria-checked="true"] :last-child,
[role="switch"][aria-checked="false"] :first-child {
	background: var(--accent2);
	color: var(--accent2)
}