@import url('https://fonts.googleapis.com/css2?family=Dosis:wght@400;600');
:root {
	color-scheme: light dark;
}

/* color variables */
* {
	--green: #46f960;
	--halfGreen: #a6ffa6;
	--grey: #eeeeee;
	--halfGrey: #f7f7f7;
}

html,
body {
	margin: 0;
	padding: 0;
	text-align: center;
	font-size: 26px;
	font-family: "Dosis", "Source Sans Pro", Helvetica, sans-serif;
	touch-action: manipulation;
	user-select: none;
	overflow: hidden;
}

* {
	box-sizing: border-box;
}

a {
	text-decoration: none;
}
.relative {
	position: relative;
}
.text-left {
	text-align: left;
}
.text-center {
	text-align: center;
}
.text-right {
	text-align: right;
}
.bulletList {
	list-style: disc;
	padding-left: 24px;
	margin-bottom: 25px;
}

#template {
	display: none;
}

#app {
	position: fixed;
	width: 100%;
	height: 100%;
	display: flex;
	padding: 10px 15px 8vh 15px;
}

#gameContainer {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-items: center;
	width: 100%;
}

#header {
	width: 100%;
}
#header .helpLink,
#header .wordScore {
	flex-basis: 100px;
}

#hive {
	display: flex;
	flex-wrap: nowrap;
	margin: 0.5rem;
	width: 100%;
	margin-left: auto;
	margin-right: auto;
	position: relative;
	max-height: 654px;
	flex: 1 1 auto;
	/* overflow: hidden; */
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

#hive .cell {
	/* justify-content: center; */
	/* align-items: center; */
	border-radius: 50%;
	background-color: #eee;
	cursor: pointer;
	transition: all 0.2s ease-in-out;
	/* border: 4px solid #fff; */
	text-transform: uppercase;
	font-size: 1.4rem;
	height: min(30vw, 11vh);
	width: min(30vw, 11vh);
	position: relative;
	font-weight: 600;
	margin: 4px;
	max-height: 100%;
}

#hive .cell::after {
	content: attr(data-letter);
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-weight: 600;
}

}

#hive .cell.selected {
	background-color: #008080;
	color: #fff;
}

#hive .cell.main-letter {
	background-color: yellow;
	color: #000;
}

#hive .flex1 {
	display: flex;
	width: 100%;
	/* overflow: hidden; */
	height: auto;
	justify-content: center;
}


#definition {
	background: #333;
	position: absolute;
	color: #fff;
	width: calc(100% - 30px);
	left: 15px;
	padding: 15px 5px;
	border-radius: 10px;
	margin-top: -15px;
	z-index: 5;
}

#definition .arrow-up {
	position: absolute;
	top: -3px;
	left: 50%;
	transform: translate(-120%, -50%);
	width: 0;
	height: 0;
	border-left: 10px solid transparent;
	border-right: 10px solid transparent;
	border-bottom: 10px solid #333;
}

.flex1 {
	flex: 1 0 auto;
	/* position: relative; */
}

.word {
	display: inline-block;
	justify-content: center;
	/* margin: 0 0 1rem 0; */
	text-transform: uppercase;
	font-size: 1.8rem;
	word-break: break-all;
	overflow: hidden;
	flex-wrap: wrap;
	height: auto;
	border-radius: 15px;
	transition: opacity 0.2s ease-in-out;
	opacity: 1;
	font-weight: 600;
}

.word.accepted {
	background: #99ffa8;
	width: auto;
	margin-left: auto;
	margin-right: auto;
	transition: opacity 0.4s 2s ease-in-out;
	opacity: 0;
}

.word span.hidden {
	visibility: hidden;
	width: 0;
	margin-left: 0;
	margin-right: 0;
	padding-left: 0;
	padding-right: 0;
}

.word span {
	margin: 0rem;
	/* border-bottom: 2px solid #eee; */
	padding: 0.1rem;
}

.word span:last-child {
	border: none;
}

.word button {
	font-size: 1.2rem;
	background-color: #eee;
	border: none;
	border-radius: 0.5rem;
	margin-left: 1rem;
	cursor: pointer;
}

.word button:hover {
	background-color: #ddd;
}

button {
	font-size: 0.9rem;
	font-family: "Dosis", "Source Sans Pro", Helvetica, sans-serif;
	/* background-color: #008080; */
	color: #333;
	border: none;
	border-radius: 0.5rem;
	padding: 10px 15px;
	/* margin: 2rem 0; */
	cursor: pointer;
	transition: all 0.4s ease-in-out;
}

button:disabled {
	background-color: #fafafa;
	color: #ccc;
	cursor: not-allowed;
}

#help {
	position: fixed;
	top: 0;
	right: 0;
	width: 100%;
	height: 100%;
	/* border: 1px solid #eee; */
	text-align: left;
	padding: 70px 15px 15px 15px;
	overflow-y: auto;
	overflow-x: hidden;
	background-color: #fafafa;
}

#gameContainer>.buttons {
	display: flex;
	justify-content: space-between;
	gap: 15px;
	padding: 0 15px;
	max-width: 380px;
	width: 100%;
}

#submitButton {
	flex: 2;
	font-weight: 600;
}


#help .buttons {
	display: flex;
	justify-content: space-between;
	margin-bottom: 1rem;
	position: fixed;
	width: 100%;
	left: 0;
	padding: 15px;
	top: 0;
	background-color: #fff;
	border-bottom: 1px solid #eee;
}


ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

#wordList {
	margin-bottom: 10px;
	padding: 0 15px;
	/* border-top: 1px solid #d1d1d1; */
	border-bottom: 1px solid #d1d1d1;
	display: flex;
	overflow: auto;
	align-items: center;
	/* font-size: 1.8rem; */
	margin-left: -15px;
	margin-right: -15px;
	height: 2.5rem;
	gap: 10px;
	/* margin-top: 6px; */
}

/* 
#wordList::before{
	content: attr(data-score);
	position: fixed;
	font-size: 0.8rem;
	top: 12px;
	left: 50%;
	transform: translate(-50%, -50%);
} */
#wordList .pill {
	animation: bounce-in 0.8s ease-in-out;
}


.pill {
	display: inline-block;
	border-radius: 10px;
	padding: 4px 10px;
	/* font-size: 1.7rem; */
	cursor: pointer;
	/* transition: all 0.2s ease-in-out; */
	text-transform: uppercase;
	border: 1px solid #bbb;
	color: #333;
}

.pill.found {
	background-color: var(--green);
	/* animation-delay: 0 !important; */
	animation: gelatine 0.5s !important;
	/* animation-delay: 0ms; */
}

.pill.found.halfPoint {
	background-color: var(--halfGreen);
	border-color: #00000000;
}

.pill.hint {
	letter-spacing: 0.1rem;
	background-color: var(--grey);
}

.pill.hint.halfPoint {
	background-color: var(--halfGrey);
	border-color: #00000000;
}

.pill.missed {
	background-color: #eee;
}

#scoreBar {
	width: calc(100% + 30px);
	margin-left: -15px;
	margin-right: -15px;
	position: relative;
	text-align: left;
	display: flex;
	flex-direction: row;
	justify-content: flex-start;
	align-items: center;
	background: #f1f1f1;
	margin-top: 6px;
}

#scoreBar>div {
	height: 5px;
	width: 0;
	top: 0;
	transition: width 800ms cubic-bezier(0.42, 0, 0.72, 1.36);
}
#scoreBar_full {
	background: var(--green);
	/* border-right: 2px solid #aaa; */
}
#scoreBar_half {
	background: var(--halfGreen);
}
#scoreBar_pointer {
	background: #333;
	border-radius: 50%;
	width: 14px !important;
	height: 14px !important;
	margin-top: -7px;
	margin-bottom: -7px;
	border: 2px solid var(--green);
}
#wordList h2 {
	/* font-size: 2rem; */
	margin-bottom: 1rem;
}

#wordList ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

#wordList li {
	/* font-size: 1.2rem; */
	margin: 0.5rem 0;
}

.flex {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
}

.yesterdayWords {
	justify-content: flex-start;
	gap: 5px;
	flex-wrap: wrap;
}

.game-over {
	text-align: center;
}

.game-over h2 {
	/* font-size: 3rem; */
	margin-bottom: 1rem;
}

.game-over p {
	/* font-size: 2rem; */
	margin-bottom: 2rem;
}

.game-over button {
	/* font-size: 2rem; */
	background-color: #008080;
	color: #fff;
	border: none;
	border-radius: 0.5rem;
	padding: 1rem 2rem;
	margin: 2rem 0;
	cursor: pointer;
}

.game-over button:hover {
	background-color: #006666;
}

.error {
	height: 1.3rem;
}

button {
	-webkit-user-select: none;
	user-select: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* positioning hack */
.tippy-popper {
	top: 5%;
}

.tippy-tooltip {
	top: 0 !important;
	bottom: 0 !important;

}

.spinner-inline {
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 10px solid #f3f3f3;
	border-top: 10px solid #3498db;
	border-radius: 50%;
	animation: spin 2s linear infinite;
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}

	100% {
		transform: rotate(360deg);
	}
}

@keyframes gelatine {

	from,
	to {
		transform: scale(1, 1);
	}

	25% {
		transform: scale(0.9, 1.1);
	}

	50% {
		transform: scale(1.1, 0.9);
	}

	75% {
		transform: scale(0.95, 1.05);
	}
}

@keyframes bounce-in {
	0% {
		opacity: 0;
		transform: scale(.3);
	}

	50% {
		opacity: 1;
		transform: scale(1.05);
	}

	70% {
		transform: scale(.9);
	}

	100% {
		transform: scale(1);
	}
}

@media (prefers-color-scheme: dark) {
	html {
		background-color: #000;
		color: #f5f5f5;
	}
		* {
			--green: #46f960;
			--halfGreen: #a6ffa6;
			--grey: #eeeeee;
			--halfGrey: #aeaeae;
		}

	.pill {
		background-color: #69ae73;
	}

	.pill.hint,
	.pill.missed {
		background-color: var(--grey);
	}


	#hive .cell {
		background-color: #333;
		/* border-color: #0000; */
	}

	#hive .cell.main-letter {
		background-color: rgb(169, 169, 0);
		color: #000;
		border-color: #000;
	}

	button {
		background-color: #333;
		color: #f5f5f5;
	}

	button:disabled {
		background-color: #1d1d1d;
		color: #545454;
	}

	#help {
		background-color: #111;
		color: #f5f5f5;
	}

	#help .buttons {
		background-color: #333;
	}

	a {
		color: #f5f5f5;
	}

	.word.accepted {
		background-color: #69ae73;
	}

}