/* Compatibility and responsive layer for the original C400 design on DLE 15.3. */
html {
	box-sizing: border-box;
	-webkit-text-size-adjust: 100%;
}

*,
*::before,
*::after { box-sizing: inherit; }

body {
	min-width: 0;
	overflow-x: hidden;
}

.cont-page {
	width: calc(100% - 32px);
	max-width: 1600px;
}

.c400-page { padding-top: 1px; }

.c400-skip-link {
	position: fixed;
	left: 16px;
	top: 10px;
	z-index: 10000;
	transform: translateY(-160%);
	padding: 9px 14px;
	border-radius: 4px;
	background: #fff;
	color: #333;
	box-shadow: 0 2px 12px rgba(0, 0, 0, .2);
}

.c400-skip-link:focus { transform: translateY(0); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	outline: 3px solid rgba(79, 193, 233, .75);
	outline-offset: 2px;
}

img,
video,
iframe,
embed,
object { max-width: 100%; }

img { height: auto; }

.full-content,
.short-text,
.comment-post,
.panel-body {
	overflow-wrap: anywhere;
}

.full-content iframe,
.full-content video,
.full-content table,
.page_static iframe,
.page_static table { max-width: 100%; }

.table-responsive { -webkit-overflow-scrolling: touch; }

.navbar { border-radius: 0 0 5px 5px; }

.navbar-brand { font-weight: 700; }

.navbar-nav > li > a {
	white-space: nowrap;
}

.c400-speedbar { margin-bottom: 12px; }

.c400-page-title h1 {
	margin-top: 0;
	font-size: 24px;
	line-height: 1.3;
}

.c400-welcome-panel,
.c400-slider-panel { margin-bottom: 15px; }

.c400-slider-panel { margin: 0; overflow: hidden; }

#owl-demo1 .item img {
	display: block;
	width: 100%;
	max-height: 520px;
	object-fit: cover;
}

#owl-demo { padding: 12px; }

.c400-mobile-search { margin: 0 0 15px; }

.c400-layout { display: flex; flex-wrap: wrap; }

.c400-main-column,
.c400-sidebar { float: none; }

.panel,
.alert,
.well { max-width: 100%; }

.shortstory .row,
.c400-story-row { display: flex; align-items: stretch; }

.shortstory img { width: 100%; }

.c400-story-body {
	display: flex;
	flex-direction: column;
}

.short-title {
	margin: 0 0 10px;
	font-size: clamp(18px, 1.1vw, 22px);
	font-weight: 400;
	line-height: 1.3;
	letter-spacing: -.01em;
}

.short-title .label {
	display: inline-block;
	margin: 0 7px 3px 0;
	padding: .34em .58em;
	font-size: 12px;
	line-height: 1;
	vertical-align: middle;
}

.short-text { font-size: 14px; line-height: 1.55; }

.c400-full-title {
	margin: 0 0 12px;
	font-size: clamp(22px, 1.55vw, 28px);
	font-weight: 400;
	line-height: 1.25;
	letter-spacing: -.01em;
}

.c400-full-title .label {
	display: inline-block;
	margin: 0 7px 3px 0;
	padding: .34em .58em;
	font-size: 12px;
	line-height: 1;
	vertical-align: middle;
}

.fullstory .infull {
	margin-bottom: 16px;
	font-size: 13px;
	line-height: 1.55;
}

.full-content { font-size: 15px; line-height: 1.6; }

.full-content h2 { font-size: 22px; }
.full-content h3 { font-size: 19px; }
.full-content h4 { font-size: 17px; }
.full-content h5,
.full-content h6 { font-size: 15px; }

.full-content { display: flow-root; }

/* DLE converts editor line breaks to <br>. Give empty lines visible paragraph spacing. */
.full-content br + br {
	display: block;
	content: "";
	margin-top: .8em;
	height: 0;
	line-height: 0;
}

/* A standalone [img=left/right] must finish before the following empty line. */
.full-content > img[style*="float"] + br {
	display: block;
	clear: both;
	content: "";
	margin: 0;
	height: 0;
	line-height: 0;
}

.full-content img[style*="float:left"],
.full-content img[style*="float: left"] {
	margin: 0 18px 12px 0;
}

.full-content img[style*="float:right"],
.full-content img[style*="float: right"] {
	margin: 0 0 12px 18px;
}

.full-content p { margin-bottom: 1em; }

.c400-story-actions,
.c400-comment-actions,
.c400-profile-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
}

.c400-story-controls {
	margin-top: auto;
	padding-top: 18px;
}

.c400-edit-reason {
	display: inline-block;
	width: auto;
	max-width: 100%;
	margin: 0 0 10px;
	padding: 5px 9px;
	border: 0;
	border-left: 2px solid #d8c17d;
	border-radius: 0;
	background: #faf9f4;
	box-shadow: none;
	color: #81775e;
	font-size: 12px;
	line-height: 1.4;
}

.c400-edit-reason b {
	color: #6f6754;
	font-weight: 600;
}

.c400-story-toolbar {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 20px;
	margin-top: 0;
	padding-top: 0;
}

.c400-story-actions {
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	gap: 10px;
}

.c400-rating {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: flex-end;
	margin: 0 0 0 auto;
}

.c400-rating-vote {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.c400-rating .btn {
	min-width: 24px;
	min-height: 24px;
	padding: 2px 6px;
	font-size: 11px;
	line-height: 18px;
}

.c400-rating-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	padding: 0;
	font-size: 11px;
	line-height: 1;
}

.c400-rating-score {
	min-width: 28px;
	font-size: 11px;
	line-height: 1;
	font-weight: 600;
	text-align: center;
}

.c400-story-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px 24px;
	min-height: 50px;
	padding: 12px 18px;
	font-size: 13px;
}

.c400-story-meta-main,
.c400-story-stats,
.c400-story-meta-item {
	display: flex;
	align-items: center;
}

.c400-story-meta-main {
	flex: 1 1 auto;
	flex-wrap: wrap;
	gap: 9px 0;
}

.c400-story-meta-item { gap: 6px; }

.c400-story-meta-main > .c400-story-meta-item + .c400-story-meta-item {
	margin-left: 18px;
	padding-left: 18px;
	border-left: 1px solid #d9dde2;
}

.c400-story-meta-label { color: #8a9199; }

.c400-story-stats {
	flex: 0 0 auto;
	gap: 18px;
	margin-left: auto;
}

.c400-story-stats a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.c400-comment {
	margin-bottom: 15px;
}

.c400-comment .thumbnail img {
	width: 100%;
	max-width: 110px;
	margin-inline: auto;
}

.c400-comment-images {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
	gap: 8px;
	margin-top: 12px;
}

.c400-comment-images img { border-radius: 4px; }

.c400-form-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 15px;
}

.c400-form-grid .form-group--wide { grid-column: 1 / -1; }

.c400-form-help { color: #777; font-size: 12px; }

.c400-server-links {
	display: grid;
	gap: 8px;
}

.c400-server-links .btn { white-space: normal; }

.c400-server-monitor-grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: flex-start;
	gap: 10px;
	margin-bottom: 18px;
}

.c400-server-monitor-grid iframe {
	display: block;
	flex: 0 0 170px;
	width: 170px;
	height: 200px;
	max-width: 100%;
	border: 0;
	background: #454441;
}

.c400-server-monitors .c400-server-links { margin-top: 18px; }

.c400-category-menu ul { margin-bottom: 0; }

.c400-category-menu ul ul {
	margin: 6px 0 0 14px;
	padding-left: 10px;
	border-left: 1px solid #ddd;
}

.c400-category-menu li + li { margin-top: 7px; }

.c400-cs-link { color: #ffeb3b; }

.c400-pm-menu,
.c400-pm-status,
.c400-pm-list,
.c400-pm-compose { margin-bottom: 15px; }

.c400-pm-status {
	display: grid;
	gap: 5px;
}

.c400-pm-status .progress { margin-bottom: 0; }

.c400-comment-head {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
}

.c400-comment-avatar {
	width: 42px;
	height: 42px;
	object-fit: cover;
}

.c400-signature {
	margin-top: 18px;
	padding-top: 10px;
	border-top: 1px solid #ddd;
	color: #777;
}

.c400-profile-popup dt,
.c400-profile-popup dd { margin-bottom: 6px; }

.c400-profile-tabs {
	margin: -10px -15px;
	border-bottom: 0;
}

.c400-profile-photo {
	width: min(100%, 210px);
	margin-bottom: 12px;
}

.c400-profile-info { min-height: 40px; }

.c400-userinfo fieldset + fieldset { margin-top: 16px; }

.c400-login-photo { max-width: 180px; }

.c400-login .profile {
	display: block;
	min-height: 0;
	margin-bottom: 0;
}

.c400-login-actions > div { margin-top: 12px; }

.c400-login-actions .btn-group {
	display: flex;
	width: 100%;
}

.c400-login-actions .btn-group > .btn:first-child {
	flex: 1 1 auto;
}

.c400-login-actions .btn-group > .dropdown-toggle {
	flex: 0 0 auto;
}

.c400-login-links,
.sociallogin { margin-top: 18px; }

.c400-footer-panel {
	margin: 5px -15px 0;
}

.c400-footer-panel > .panel-heading {
	background: #434a54;
	border-color: #434a54;
	color: #ddd;
	font-family: NautilusPompilius, Arial, sans-serif;
}

.c400-footer-panel > .panel-body {
	background: #525963;
	color: #ddd;
}

@media (min-width: 1200px) {
	.c400-main-column { width: 75%; }
	.c400-sidebar { width: 25%; }
}

@media (max-width: 1199px) {
	.cont-page { width: calc(100% - 24px); }
	.navbar-nav > li > a { padding-right: 10px; padding-left: 10px; }
}

@media (max-width: 991px) {
	.c400-main-column,
	.c400-sidebar { width: 100%; }
	.c400-sidebar { margin-top: 10px; }
	.c400-server-monitor-grid iframe { display: block; }
}

@media (max-width: 767px) {
	.cont-page {
		width: 100%;
		padding-right: 10px;
		padding-left: 10px;
	}

	.navbar { margin-right: -10px !important; margin-left: -10px !important; }
	.navbar-toggle { min-width: 44px; min-height: 44px; }
	.navbar-nav .open .dropdown-menu > li > a { white-space: normal; }

	.c400-layout { display: block; }
	.shortstory .row,
	.c400-story-row { display: block; }
	.shortstory .col-xs-4,
	.shortstory .col-xs-8,
	.c400-story-image,
	.c400-story-body {
		width: 100%;
		float: none;
	}

	.shortstory .col-xs-4,
	.c400-story-image { margin-bottom: 12px; }
	.shortstory .col-xs-4 img,
	.c400-story-image img { max-height: 340px; object-fit: contain; }
	.c400-story-toolbar {
		align-items: center;
		gap: 12px;
		padding-top: 0;
	}
	.c400-story-controls { padding-top: 14px; }
	.c400-story-actions { gap: 7px; }
	.c400-rating {
		width: 100%;
		justify-content: flex-end;
	}
	.c400-story-meta {
		align-items: flex-start;
		gap: 10px;
		padding: 11px 12px;
	}
	.c400-story-meta-main {
		width: 100%;
		gap: 7px 14px;
	}
	.c400-story-meta-main > .c400-story-meta-item + .c400-story-meta-item {
		margin-left: 0;
		padding-left: 0;
		border-left: 0;
	}
	.c400-story-stats {
		width: 100%;
		justify-content: flex-end;
	}

	.panel-body { padding: 12px; }
	.panel-footer { padding: 10px 12px; }
	.short-title { font-size: 18px; }
	.c400-full-title { font-size: 22px; }
	.short-text { font-size: 14px; }
	.full-content { font-size: 15px; }
	.c400-form-grid { grid-template-columns: 1fr; }
	.c400-form-grid .form-group--wide { grid-column: auto; }
	.c400-pm-menu { display: block; }
	.c400-pm-menu > .btn-group {
		display: block;
		width: 100%;
	}
	.c400-pm-menu > .btn-group > .btn {
		width: 100%;
		border-radius: 0;
	}
	.c400-profile-popup .dl-horizontal dt {
		float: none;
		width: auto;
		text-align: left;
	}
	.c400-profile-popup .dl-horizontal dd { margin-left: 0; }
	.comment-list .col-xs-2,
	.comment-list .col-xs-10 { width: 100%; float: none; }
	.comment-list .thumbnail { max-width: 120px; }
	.c400-footer-panel { margin-right: -10px; margin-left: -10px; }
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
	}

	[data-aos] { transform: none !important; opacity: 1 !important; }
}
