:root {

	--font-size: 18px;
	font-size: var(--font-size);

	--border-color: #FDE4C4;
	--border-color-highlight: #EECDAD;
	--text-color: var(--earthy-500);
	--background-color: var(--sun-kissed-paper);
}

body {
	background-image: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.7)), url(../images/EinarDock_Desktop_Wallpaper.png);
	position: absolute;
	height: 100%;
	background-repeat: no-repeat;
	background-position: center;
	background-size: cover;
	overflow: hidden;
	box-sizing: border-box;
}

h1 {
	font-size: 200%;
}

h2 {
	font-size: 150%;
}

.main {
	padding: 20px 20px;
	overflow: hidden;
	margin: 0 auto;
	max-width: 960px;
}

.header {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.5em;
	color: #fff;
	text-shadow: 0 0 15px rgba(0,0,0,.8);
}

.header-status {
	display: flex;
	flex-direction: column;
	text-align: right;
}

#ingame-time {
	display: inline;
	margin-right: 10px;
}

.header-actions-container {
	display: flex;
	flex-direction: column;
	gap: 10px;
	color: var(--text-color);
	padding-top: 10px;
	margin-top: auto;
	padding-bottom: 7px;
}

.header-actions-container > * {
	align-self: flex-end;
}

#palia-times-container {
	display: flex;
	flex-direction: column;
	gap: 0.7em 0;
	margin-top: 20px;
	height: calc(100vh - 160px);
	overflow-y: auto;
	padding: 10px 0;
}

#palia-times-container > div {
	width: 100%;
	border-radius: 5px;
	padding: 10px 10px;
	background-color: var(--background-color);
	height: fit-content;
}

#palia-times-container > div span {
	color: var(--text-color);
}

#palia-times-container > div:hover {
	-webkit-filter: brightness(102%);
	-webkit-transition: 0.2s -webkit-filter linear;
	-moz-transition: 0.2s -moz-filter linear;
	-moz-transition: 0.2s filter linear;
	-ms-transition: 0.2s -ms-filter linear;
	-o-transition: 0.2s -o-filter linear;
	transition: 0.2s filter linear, 0.2s -webkit-filter linear;
	border-color: var(--border-color-highlight);
}

#palia-times-container label {
	cursor: pointer;
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	-khtml-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

span.time-enabled {
	visibility: hidden;
}

input[type="checkbox"][id^="checked"]:checked ~ span.time-enabled {
	visibility: visible;
}

button.time-voice-preview {
	all: unset;
	cursor: pointer;
	margin-left: 10px;
}

.custom-message {
	margin-top: 10px;
}

.primary-button {
	background: var(--primary-btn);
	border-color: var(--primary-btn-border);
	display: flex;
	align-items: center;
	gap: 0 0.2em;
	justify-content: center;
}

.primary-button:hover {
	background: var(--primary-btn-hover);
	border-color: var(--primary-btn-hover);
}

.secondary-button {
	background: var(--sun-kissed-paper);
	border-color: var(--secondary-btn-border);
}

.secondary-button:hover {
	background: var(--sun-kissed-paper);
	border-color: var(--secondary-btn-hover);
}

#add-time-button {
	z-index: 1;
}

#add-time-dialog {
	left: 0;
	right: 0;
	margin-right: auto;
	margin-left: auto;
	margin-top: 20%;
	border-radius: 8px;
	background-color: var(--background-color);
	background-size: cover;
	background-repeat: no-repeat;
	color: var(--text-color);
	padding: 20px 20px;
	width: calc(100vw - 40px);
	max-width: 920px;
}

#add-time-dialog::backdrop {
	background-color: #000000;
	filter: opacity(0.9) brightness(0.15) grayscale(0.9) blur(2px);
}

.add-time-header {
	display: flex;
	margin-bottom: 10px;
	font-size: 110%;
}

.add-time-header > span {
	flex: 1;
}

.add-time-items > div:nth-child(n+2) {
	margin-top: 15px;
}

.add-time-dropdown {
	appearance: none;
	border: none;
	font-family: inherit;
	outline: none;
	border: 2px solid var(--border-color);
	font-size: 120%;
	border-radius: 2px;
	padding: 0 5px;
	color: #000;
}

.add-time-hour {
	text-align: right;
}

.add-time-message-text-container {
	margin-top: 7px;
}

.time-header {
	display: flex;
	align-items: center;
}

.time-header-label {
	display: flex;
	align-items: center;
}

.time-header-label-text {
	margin-left: 7px;
}

.time-enabled {
	margin-left: 10px;
}

textarea {
	width: 100%;
	border-color: var(--border-color);
	border-style: solid;
	padding: 5px;
	font-family: inherit;
	resize: vertical;
	height: calc(var(--font-size) + 10px);
}

.add-time-actions {
	margin-top: 20px;
	display: flex;
}

.delete-time {
	all: unset;
	margin-left: auto;
	cursor: pointer;
}

#voices-container {
	grid-column: 2;
	display: flex;
	flex-direction: column;
}

#voices-dropdown {
	margin-left: auto;
	text-align: right;
	color: var(--earthy-500);
	border-color: var(--vs-colors--lightest);
	font-family: 'Merriweather', serif;
	font-size: 69%;
}

#voices-dropdown>option {
	text-align: right;
	direction: rtl;
}

dialog {
	border: 0;
}

#settings-dialog {
	left: 0;
	right: 0;
	margin-right: auto;
	margin-left: auto;
	margin-top: 20%;
	border-radius: 8px;
	background-color: var(--background-color);
	background-size: cover;
	background-repeat: no-repeat;
	color: var(--text-color);
	min-width: 300px;
	padding: 20px 20px;
}

#settings-dialog::backdrop {
	background-color: #000000;
	filter: opacity(0.9) brightness(0.15) grayscale(0.9) blur(2px);
}

.settings-header {
	display: flex;
	flex-direction: row;
	margin-bottom: 10px;
	align-items: center;
}

.settings-header > span {
	font-size: 120%;
}

.settings-hits {
	display: flex;
	align-items: center;
	margin-left: auto;
}

.settings-close-button {
	align-self: flex-end;
	margin-left: 8px;
}

.settings-item {
	margin-top: 15px;
	cursor: pointer;
}

.settings-item label > span {
	margin-left: 10px;
}

.settings-item > .settings-news-label > span {
	margin-left: 0;
	cursor: pointer;
}

#news-shown:checked ~ .news-show-text {
	display: none;
}
#news-shown:checked ~ .news-hide-text {
	display: inline;
}
#news-shown:checked ~ #news-container {
	display: block;
}

#news-shown:not(:checked) ~ #news-container {
	display: none;
}

#news-shown:not(:checked) ~ .news-show-text {
	display: inline;
}

#news-shown:not(:checked) ~ .news-hide-text {
	display: none;
}

#news-container > a {
	font-size: 69%;
}

a:visited, a:link {
	color: inherit;
}

button {
	background-color: var(--background-color);
	border-width: 2px;
	border-style: solid;
	border-radius: 4px;
	color: var(--earthy-500);
	font-family: inherit;
	padding: 2px 5px;
	font-size: 90%;
	cursor: pointer;
}

@media (max-width: 820px) {
	:root {
		font-size: 16px;
	}

	#palia-times-container {
		height: calc(100vh - 180px);
		grid-auto-flow: row;
	}

	#ingame-time {
		margin-right: 0;
	}

	.ingame-time-label {
		display: none;
	}

	#add-time-dialog {
		min-width: 80%;
	}
}

@media (max-width: 540px) {
	body {
		background-image: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.7)), url(../images/EinarDock_Mobile_Wallpaper.png);
	}

	#palia-times-container {
		height: calc(100vh - 200px);
		grid-auto-flow: row;
	}

	.add-time-actions > button {
		margin-left: auto;
	}

	#add-time-button {
		position: absolute;
		bottom: 1.2rem;
		right: 1rem;
		border-radius: 50%;
		aspect-ratio: 1/1;
		/* width: 40px; */
		height: 50px;
		width: 50px;
	}

	#add-time-button span {
		font-size: 250%;
	}

	.add-time-button-text-desktop {
		display: none;
	}
}