#app_drawer_underlay {
	position: fixed;
	height: 100%;
	width: 100%;
	background: var(--underlay);
	z-index: 40;
}

#app_drawer {
	display: flex;
	height: 100%;
	width: 80%;
	max-width: 396px;
	padding: 16px;
	border-top-left-radius: 12px;
	border-bottom-left-radius: 12px;
	z-index: 50;
	transition-duration: 200ms;
	background: var(--drawer-bg);
}

#modal_wrapper {
	position: fixed;
	top: 0;
	left: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	animation-name: fadeIn;
	animation-duration: 150ms;
	animation-timing-function: ease;
	width: 100%;
}

#modal_wrapper.closing {
	animation-name: fadeOut;
	animation-duration: 150ms;
	animation-timing-function: ease;
}

#modal_wrapper.closing > #modal {
	animation-name: zoomOut;
	animation-duration: 150ms;
	animation-timing-function: ease;
}

#modal_wrapper .underlay {
	position: fixed;
	background: var(--underlay);
	height: 100%;
	width: 100%;
	z-index: -1;
}

#modal_wrapper #modal {
	margin: 8px var(--default-spacing);
	width: calc(100% - var(--default-spacing));
	max-width: 668px;
	overflow-x: hidden;
	overflow-y: auto;
	z-index: 1000;
	max-height: calc(100% - 6rem);
}

#modal form {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

#modal .form-actions {
	display: flex;
	align-items: stretch;
	gap: 8px;
}

.form-actions button[type="submit"] {
	padding: 6px 12px;
	border-radius: 4px;
	background: var(--accent-color);
	border-bottom: 4px solid var(--accent-color-border);
	color: white;
}

.form-actions button[type="submit"]:hover {
	background: var(--accent-color-border);
}

.form-actions button[type="reset"] {
	padding: 6px 12px;
	border-radius: 4px;
	background: none;
	border: 1px solid var(--default-border-color);
	border-bottom: 4px solid var(--default-border-color);
	color: var(--foreground);
}

.form-actions button[type="reset"]:hover {
	background: var(--nav-hover-bg);
}

.line-clamp-2 {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
	text-overflow: ellipsis;
}

.pill {
	display: inline-block;
	padding: 2px 5px;
	font-weight: 900;
	font-size: 0.75rem;
	border-radius: 5px;
	border: var(--pill-border);
	line-height: 0.75rem;
	white-space: nowrap;
}

.pill.admin {
	background: var(--admin-color);
	color: var(--foreground);
}

.text-royalty {
	color: var(--royalty-color);
}

.pill.pro {
	background: var(--pro-color);
	color: var(--foreground);
}

.table-responsive {
	display: block;
	width: 100%;
	overflow-x: auto;
}

.flag {
	border: var(--default-border);
}

img.avatar {
	border-radius: 100%;
	border: var(--default-border);
}

nav#navbar img.avatar {
	max-width: 32px;
	max-height: 32px;
	overflow: hidden;
}

table {
	max-width: 100%;
	width: 100%;
	border-collapse: collapse;
	cursor: default;
}

table thead {
	border-bottom: 2px solid var(--default-border-color);
}

table tbody tr:hover {
	background: var(--table-row-hover);
}

table tbody tr td,
table thead tr th {
	text-align: left;
	padding: 8px 10px;
}

table tbody tr td {
	border-bottom: var(--default-border);
}

table caption {
	padding: 4px 0;
	caption-side: bottom;
	text-align: right;
	font-size: 0.9rem;
	color: var(--muted);
}

table tr.clickable {
	cursor: pointer;
}

.card.news {
	border-style: dashed;
	padding: 6px;
	position: relative;
	overflow: hidden;
	font-size: 0.9rem;
}

.card.news span:first-of-type {
	color: var(--accent-color-light);
}

.card.news::before {
	content: "";
	position: absolute;
	top: -80px;
	left: 50%;
	transform: translateX(-50%);
	width: 80%;
	height: 300px;
	background: radial-gradient(circle at 50% 0%, var(--accent-color));
	border-radius: 50%;
	filter: blur(40px);
	opacity: 0.05;
	pointer-events: none;
}

img.avatar {
	border-radius: 100%;
	aspect-ratio: 1 / 1;
}

footer#footer {
	margin-top: auto;
	text-align: center;
	width: 100%;
	color: var(--footer-fg);
	background: var(--footer-bg);
	border-top: var(--footer-border);
	font-size: 0.95rem;
	padding: 8px 0;
}

input.opened {
	border-bottom-left-radius: 0 !important;
	border-bottom-right-radius: 0 !important;
}

ol {
	list-style-type: none;
	margin: 0;
	padding: 0;
}

ol.dropdown {
	position: fixed;
	z-index: 1000;
	display: flex;
	flex-direction: column;
	border: 1px solid var(--default-border-hover-color);
	background: var(--background);
	box-shadow: 0 5px 5px 0 #00000030;
	border-bottom-left-radius: 8px;
	border-bottom-right-radius: 8px;
	max-height: 19rem;
	overflow-y: auto;
}

ol li:first-child {
	border-top: 0;
}

ol li {
	border-top: 1px solid var(--default-border-hover-color);
}

ol.dropdown button {
	padding: 8px;
	width: 100%;
	color: var(--foreground);
	font-weight: 500;
}

ol.dropdown li:last-child button {
	border-bottom-left-radius: 7px;
	border-bottom-right-radius: 7px;
}

ol.dropdown button:active,
ol.dropdown button:focus,
ol.dropdown button:hover {
	background: var(--accent-color);
	color: white;
}

button.heart {
	color: #ff4d70;
	border-radius: 100%;
	padding: 8px;
}

button.heart:hover {
	background: #ff4d7010;
}

button.ticket {
	color: #ff9717;
	border-radius: 100%;
	padding: 8px;
}

button.ticket:hover {
	background: #ff971710;
}

svg#map {
	aspect-ratio: 16/10;
}

svg#map g#ct_towns path {
	pointer-events: all;
}

svg#map g#ct_towns path.completed {
	fill: #0751cf80 !important;
}

svg#map g#ct_towns path.completed:hover {
	fill: #0751cfff !important;
}

.tooltip {
	position: absolute;
	background: rgba(0, 0, 0, 0.85);
	color: #fff;
	padding: 4px 8px;
	border-radius: 4px;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.2s;
}

@keyframes fadeIn {
	0% {
		opacity: 0;
	}

	100% {
		opacity: 1;
	}
}

@keyframes fadeOut {
	0% {
		opacity: 1;
	}

	100% {
		opacity: 0;
	}
}

@keyframes zoomIn {
	0% {
		transform: scale(0.9);
	}

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

@keyframes zoomOut {
	0% {
		transform: scale(1);
	}

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