
html {
	height: 100%;
}

body {
	overflow-y: scroll;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

@include media-breakpoint-down(lg) {
	body:not(.page-user-chats) {
		min-height: 100vh;
		.layout-container {
			min-height: 100vh;
		}
	}
}

// fixes chrome font boosting :/ https://stackoverflow.com/questions/13430897/how-to-override-font-boosting-in-mobile-chrome
body * {
	max-height:1000000px;
	text-size-adjust: none;
	-webkit-text-size-adjust: none;
	-moz-text-size-adjust: none;
}

hr {
	border-top-color: var(--bs-border-color);
	opacity: 1;
}

.ff-base { font-family: $font-family-base !important; }
.ff-sans { font-family: $font-family-sans-serif !important; }
.ff-secondary { font-family: $font-family-secondary; }
.tracking-tight { letter-spacing: -0.02em; }

.caret {
	&::after {
		border: none;
		font-family: "FontAwesome";
		content: "\f078";
	}
}

.placeholder-wave {
	opacity: 0.5;
}

.bg-card-cap {
	--bs-bg-opacity: 1;
	background-color: $card-cap-bg!important;
}

body:not(.page-user) {
	#content {
		transition: opacity 150ms linear;
		&.ajaxifying {
			-moz-opacity: 0;
			opacity: 0;
		}
	}
}
.page-user {
	#content {
		transition: opacity 150ms linear;
		&.ajaxifying .account-content {
			transition: opacity 150ms linear;
			-moz-opacity: 0;
			opacity: 0;
		}
	}
}

.sticky-tools {
	position: sticky;
	z-index: 3;
	top: 0;
	padding: 0.25rem 0;
}

.flex-basis-md-200 {
	@include media-breakpoint-up(md) {
		flex-basis: 200px!important;
	}
}

.markdown-highlight {
	@extend .shadow-sm;
	@extend .border;
}

[component="chat/message/body"], [component="post/content"] {
	img:not(.emoji) {
		@extend .shadow-sm;
		padding: $spacer * 0.5;
		margin: $spacer * 0.5 0;
		border: 1px solid $border-color;
		background-color: $light;
		border-radius: $border-radius-sm;
	}
	.img-fluid {
		max-height: 500px;
		width: auto;
	}
}

[component="chat/message/body"],
[component="post/content"],
[component="topic/teaser"] .post-content,
[component="category/posts"] .post-content,
.post-queue.posts-list .post-content {
	a { text-decoration: underline;}
}

details.content-warning {
	border: 1px solid var(--bs-border-color);
	border-radius: $border-radius;
	margin-bottom: $spacer;

	> summary {
		display: block;
		padding: 0.5rem 0.75rem;
		background-color: var(--bs-warning-bg-subtle, #fff3cd);
		color: var(--bs-warning-text-emphasis, #664d03);
		border: none;
		border-radius: $border-radius;
		cursor: pointer;
		font-size: 0.875rem;
		line-height: 1.5;
		list-style: none;

		&::-webkit-details-marker {
			display: none;
		}

		&::before {
			content: "⚠ ";
		}

		&::after {
			content: "";
			display: inline-block;
			margin-left: 0.5em;
			width: 0.4em;
			height: 0.4em;
			border-right: 1px solid currentColor;
			border-bottom: 1px solid currentColor;
			transform: rotate(-45deg);
			transition: transform 0.2s;
		}
	}

	&[open] > summary {
		border-bottom: 1px solid var(--bs-border-color);
		border-bottom-left-radius: 0;
		border-bottom-right-radius: 0;

		&::after {
			transform: rotate(45deg);
		}
	}

	> :not(summary) {
		padding: 0.75rem;
	}
}