#buzzers-active {
	padding-inline: 4px;

	&.true {
		background-color: green;
	}
	&.false {
		background-color: grey;
	}
}

@media (prefers-color-scheme: light) {
	body {
		background-color: whitesmoke;
	}
	.card,
	form {
		background-color: rgb(245, 245, 255);
		border: solid 1px #d7d3d3;
		& > fieldset {
			border-color: #0c0c0c4d;
		}
	}
}
@media (prefers-color-scheme: dark) {
	body,
	button {
		background-color: #040404;
		color: #bbddc4;
	}
	#sync-state {
		color: black;
	}

	.card,
	form {
		background-color: rgb(24, 24, 25);
		border: solid 1px #222222;
		& > fieldset {
			border-color: #0c0c0c4d;
		}
	}

	button {
		border-style: solid;
		border-color: rgb(53, 53, 53);
		background-color: rgb(53, 53, 53);

		&:hover {
			border-bottom-color: var(--c-accent, yellow);
		}

		&:active {
			background-color: black;
			color: rgb(120, 120, 120);
		}
	}

	a:link {
		color: orange;
	}
	a:visited {
		color: rgb(180, 117, 0);
	}
	a:active {
		color: rgb(81, 124, 123);
	}

	.sub-text {
		color: rgb(139, 139, 139);
	}
}

a {
	transition-property: color, filter;
	transition-duration: 0.3s;
	transition-timing-function: ease-out;
}

a:hover {
	filter: brightness(1.4);
}

label:has(input[type="checkbox"]:checked, input[type="radio"]:checked) {
	text-decoration: underline;
	color: var(--c-accent, yellow);
}
label:has(input[type="checkbox"]) {
	cursor: pointer;
	& input {
		cursor: pointer;
	}
}
label:has(input:disabled) {
	cursor: not-allowed;
	& > input:disabled {
		pointer-events: none;
		cursor: not-allowed;
	}
}
fieldset:disabled {
	background: repeating-linear-gradient(
		45deg,
		#7d7d7d28 0px,
		#7d7d7d28 10px,
		transparent 10px,
		transparent 20px
	);
	opacity: 0.4;
	cursor: not-allowed;
}
button:hover {
	cursor: pointer;
}

form {
	&[data-state="idle"] {
		border-bottom: solid 5px skyblue;
	}
	&[data-state="success"] {
		border-bottom: solid 5px green;
		& > .response-message {
			border-color: green;
		}
	}
	&[data-state="error"] {
		border-bottom: solid 5px red;
		& > .response-message {
			border-color: red;
		}
	}

	/* ? non native attributes must be in brackets */
	&[disabled] {
		border-top: dashed 4px grey;
		cursor: not-allowed;
		opacity: 0.6;
	}
}

form {
	display: grid;
	padding: 1rem;
	gap: 1rem;
	transition-duration: 500ms;
	transition-property: border-color, color;
	transition-timing-function: ease-out;
	max-width: 50rem;
	border: solid rgba(128, 128, 128, 0.253) 1px;
	box-shadow: rgba(0, 0, 0, 0.081) 3px 3px 8px;
	position: relative;

	& > label {
		display: grid;
		gap: 0.2rem;

		&:has(input[type="hidden"]) {
			display: none;
		}
	}
	& label:has(input[type="radio"]) {
		display: flex;
	}
	& > .response-message {
		border-left-width: 5px;
		border-left-style: solid;
		padding-inline: 1rem;
		transition-duration: 500ms;
		transition-property: border-color, color;
		transition-timing-function: ease-out;
	}
	& > .response-message:empty {
		visibility: hidden;
	}
}

.btn {
  display: inline-block;
  padding: 0.3rem 0.5rem;
  border-radius: 9px;
	border: solid 2px var(--c-accent, orange);
}

button.delete {
	position: absolute;
	top: 0;
	right: 0;
	&:hover {
		background-color: red;
		color: white;
	}
}
.block {
	display: block;
}

.card {
	border-radius: 3px;
	box-shadow: rgba(0, 0, 0, 0.27) 3px 3px 3px;
	margin: 0;
	padding: 1rem;

	/* & :first-child {
		margin-top: 0;
		text-transform: capitalize;
	} */

	& a {
		text-decoration: none;

		&:hover h3 {
			text-decoration: underline dotted;
		}
	}
}

.sub-text {
	margin-top: 0;
}
.vote-field {
	display: flex;
	align-items: center;
	justify-content: space-between;

	& .inputs {
		display: flex;
		gap: 0.2rem;
		align-items: center;

		& button {
			font-size: 1.5rem;
			padding: 0.6rem;
		}
	}
}

.grid-list {
	display: grid;
	gap: 1rem;
}
.grid-tiles {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 20rem));
}

.grid {
	display: grid;
}
.gap-m {
	gap: 1rem;
}
/* TODO media query that collaps to 1 column. or use grid-template-columns */
.col-2 {
	grid-template-columns: 1fr 1fr;
}
.col-3 {
	grid-template-columns: 1fr 1fr 1fr;
}
.col--1-2-1 {
	grid-template-columns: 1fr 2fr 1fr;
}

#sync-state {
	background-color: rgb(177, 177, 177);
	border-radius: 30%;
	width: 20px;
	display: grid;
	place-items: center;
	position: absolute;
	top: 10px;
	right: 10px;
	/* place-content: center; */
	/* width: 10px; */
	transition-property: background-color;
	transition-duration: 400ms;

	&[data-sync-state="connecting"] {
		background-color: rgb(112, 112, 124);
	}
	&[data-sync-state="paused"] {
		background-color: rgb(171, 210, 168);
	}
	&[data-sync-state="syncing"] {
		background-color: rgb(1, 181, 1);
	}
	&[data-sync-state="connected"] {
		background-color: rgb(136, 141, 226);
	}
	&[data-sync-state="error"] {
		background-color: rgb(196, 63, 63);
	}
}

/** ANIMATION */
.anim-fade-in {
	opacity: 0;
	animation: fadeIn 1s ease-in forwards;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.gradient-box-3 {
	position: relative;
	width: 200px;
	height: 200px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 12px;
	overflow: hidden;
}

.gradient-box-3::before {
	content: "";
	position: absolute;
	width: 100%;
	aspect-ratio: 1/1;
	background: conic-gradient(transparent, transparent, transparent, #00ff1c);
	animation: rotate 2s linear infinite;
	z-index: -1;
}

.gradient-box-3::after {
	content: "";
	position: absolute;
	inset: 4px;
	background: #20472e;
	border-radius: 8px;
	z-index: -1;
}

.gradient-box-3 > div,
.gradient-box-3 > span {
	position: relative;
	z-index: 1;
	color: #fff;
	font-weight: 600;
}

@keyframes rotate {
	to {
		transform: rotate(360deg);
	}
}

.emoji-thumbnail {
	& .delete-btn {
		transition: opacity, scale 300ms;
		scale: 0.7;
		transform-origin: 25% 25%;
		opacity: 0;
	}
	&:hover .delete-btn {
		opacity: 1;
		scale: 1;
	}
}

details > summary {
	cursor: pointer;
}

/** LAYOUTS */
.layout-width-normal {
	max-width: 60em;
	margin-inline: auto;
}
.layout-width-wide {
	max-width: 100em;
	margin-inline: auto;
}

@media screen and (width < 1200px) {
	.col--1-2-1 {
		grid-template-columns: 1fr;

		& > ul,
		& > div > div {
			grid-row: unset;
			grid-column: unset;
		}
	}
}

table.simple {
	border-collapse: collapse;
	& td {
		padding-inline: 1rem;
		padding-block: 0.3rem;
	}

	& tr {
		border-bottom: solid rgba(128, 128, 128, 0.506) 1px;
	}
	& tr:last-child {
		border-bottom: none;
	}
}

hr {
  margin-block: 2rem;
}