/*
 * TryDota users — module pages: forms, login/registration, profile, private messages,
 * add news, statistics, last comments.
 */

/* ---------- Notices ---------- */
.td-alert {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	margin: 0 0 15px;
	padding: 10px 14px;
	font-size: 14px;
	line-height: 1.5;
	color: #ddd;
	background: var(--td-bg-inset);
	border: 1px solid var(--td-border);
	border-left: 3px solid var(--td-muted-2);
}

.td-alert > .fa {
	margin-top: 3px;
	font-size: 16px;
}

.td-alert--error {
	border-left-color: #d9534f;
}

.td-alert--error > .fa {
	color: #e0605c;
}

.td-alert--success {
	border-left-color: #66bc29;
}

.td-alert--success > .fa {
	color: #66bc29;
}

.td-alert--info {
	border-left-color: var(--td-accent);
}

.td-alert--info > .fa {
	color: var(--td-accent);
}

.td-alert a {
	text-decoration: underline;
}

/* ---------- Forms ---------- */
.td-form {
	margin: 0;
}

.td-field {
	margin: 0 0 14px;
}

.td-field > label,
.td-field__label {
	display: block;
	margin-bottom: 5px;
	color: #c4c6c8;
	font-size: 14px;
}

.td-form input[type="text"],
.td-form input[type="email"],
.td-form input[type="password"],
.td-form input[type="url"],
.td-form select,
.td-form textarea {
	display: block;
	width: 100%;
	min-height: 38px;
	padding: 7px 10px;
	color: #d0d2d4;
	font-size: 15px;
	background: var(--td-bg-inset);
	border: 1px solid var(--td-border);
	border-radius: 0;
	-webkit-appearance: none;
	appearance: none;
}

.td-form select {
	padding-right: 30px;
	background-image: linear-gradient(45deg, transparent 50%, var(--td-muted) 50%), linear-gradient(135deg, var(--td-muted) 50%, transparent 50%);
	background-position: calc(100% - 16px) 16px, calc(100% - 11px) 16px;
	background-size: 5px 5px;
	background-repeat: no-repeat;
}

.td-form textarea {
	min-height: 120px;
	line-height: 1.5;
	resize: vertical;
}

.td-form input:focus,
.td-form select:focus,
.td-form textarea:focus {
	border-color: var(--td-accent-2);
	outline: none;
}

.td-form input[type="file"] {
	max-width: 100%;
	font-size: 14px;
	color: var(--td-text);
}

.td-form input[type="file"]::file-selector-button {
	margin-right: 10px;
	padding: 6px 12px;
	color: var(--td-text);
	background: var(--td-bg-head);
	border: 1px solid var(--td-border);
	cursor: pointer;
}

.td-field__hint {
	display: block;
	margin-top: 4px;
	color: var(--td-muted-2);
	font-size: 12px;
	line-height: 1.4;
}

.td-field--check label,
label.td-field--check {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--td-text);
	font-size: 14px;
	cursor: pointer;
}

.td-field--check input {
	width: 16px;
	height: 16px;
	margin: 0;
	accent-color: var(--td-accent);
}

.td-form__actions {
	margin: 18px 0 0;
}

.td-form .btn-block {
	display: block;
	width: 100%;
	padding-top: 9px;
	padding-bottom: 9px;
}

.td-form__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 20px;
}

.td-fieldset {
	margin: 10px 0 0;
	padding: 12px 15px 2px;
	border: 1px solid var(--td-border);
}

.td-fieldset legend {
	padding: 0 6px;
	color: #c4c6c8;
	font-size: 14px;
}

/* ---------- Login / registration ---------- */
.td-auth {
	max-width: 440px;
	margin: 10px auto 5px;
}

.td-auth__intro {
	font-size: 14px;
}

.td-auth__links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-top: 12px;
}

.td-auth__links .btn {
	flex: 1 1 0;
}

.td-auth__links .td-muted {
	flex: 0 0 auto;
	font-size: 14px;
}

.td-auth__buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

/* ---------- Profile ---------- */
.td-profile .panel-title .fa {
	color: var(--td-accent);
	margin-right: 4px;
}

.td-profile__main {
	display: flex;
	gap: 25px;
	align-items: flex-start;
}

.td-profile__avatar {
	flex: 0 0 auto;
	padding: 4px;
	background: var(--td-bg-card);
	border: 1px solid var(--td-border);
}

.td-profile__avatar img {
	display: block;
	width: 150px;
	height: 150px;
	object-fit: cover;
}

.td-profile__info {
	flex: 1 1 auto;
	min-width: 0;
}

.td-profile__facts {
	margin: 0 0 12px;
	padding: 0;
	list-style: none;
	font-size: 15px;
}

.td-profile__facts li {
	padding: 5px 0;
	border-bottom: 1px dashed var(--td-border);
	overflow-wrap: anywhere;
}

.td-profile__facts li > span:first-child {
	display: inline-block;
	min-width: 210px;
	color: var(--td-muted-2);
}

.td-profile__facts strong {
	color: #ddd;
}

.td-profile__about {
	margin: 0 0 12px;
	padding: 10px 12px;
	background: var(--td-bg-inset);
	border: 1px solid var(--td-border);
	overflow-wrap: anywhere;
}

.td-profile__about p:last-child {
	margin-bottom: 0;
}

.td-profile__legacy {
	font-size: 14px;
}

.td-profile__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.js .td-profile-edit:not(.is-open):not(:target) {
	display: none;
}

.td-avatar-edit {
	display: flex;
	gap: 12px;
	align-items: flex-start;
}

.td-avatar-edit img {
	flex: 0 0 64px;
	width: 64px;
	height: 64px;
	object-fit: cover;
	border: 1px solid var(--td-border);
}

.td-avatar-edit > div {
	min-width: 0;
}

.td-plist {
	margin: 0;
	padding: 0;
	list-style: none;
}

.td-plist__item {
	display: flex;
	gap: 12px;
	align-items: center;
	padding: 8px 0;
	border-bottom: 1px solid var(--td-border);
}

.td-plist__item:first-child {
	padding-top: 0;
}

.td-plist__thumb {
	flex: 0 0 110px;
}

.td-plist__img {
	display: block;
	width: 110px;
	height: 62px;
	object-fit: cover;
}

.td-plist__img.td-thumb--placeholder {
	object-fit: contain;
	background: var(--td-bg-inset);
}

.td-plist__body {
	min-width: 0;
}

.td-plist__title {
	display: block;
	color: #c4c6c8;
	font-size: 15px;
	line-height: 1.35;
	overflow-wrap: anywhere;
}

.td-plist__title:hover {
	color: var(--td-accent-2);
}

.td-plist__meta {
	display: block;
	margin-top: 3px;
	color: var(--td-muted-2);
	font-size: 12px;
}

.td-profile-list__more {
	margin: 12px 0 0;
}

.td-clist .td-comment {
	margin-bottom: 10px;
}

.td-clist .text-muted {
	margin-right: 6px;
}

.td-clist__post {
	display: inline-block;
	font-size: 13px;
	overflow-wrap: anywhere;
}

.td-clist__post .fa {
	color: var(--td-muted-2);
}

/* ---------- Private messages ---------- */
.td-pm__tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 15px;
}

.td-pm__badge {
	display: inline-block;
	min-width: 18px;
	margin-left: 3px;
	padding: 0 5px;
	border-radius: 9px;
	background: #fff;
	color: var(--td-accent);
	font-size: 11px;
	font-weight: 700;
	line-height: 18px;
}

.btn-secondary .td-pm__badge {
	background: var(--td-accent);
	color: #fff;
}

.td-pm__table {
	width: 100%;
	font-size: 14px;
	border-collapse: collapse;
}

.td-pm__table th {
	padding: 8px;
	color: var(--td-muted);
	font-weight: 400;
	text-align: left;
	background: var(--td-bg-head);
}

.td-pm__table td {
	padding: 8px;
	vertical-align: middle;
	border-bottom: 1px solid var(--td-border);
}

.td-pm__table tr.is-unread td {
	background: rgba(236, 79, 0, .06);
}

.td-pm__table tr.is-unread .td-pm__subject a {
	color: #fff;
	font-weight: 700;
}

.td-pm__cb {
	width: 34px;
	text-align: center !important;
}

.td-pm__cb input {
	accent-color: var(--td-accent);
}

.td-pm__subject a {
	color: #c4c6c8;
	overflow-wrap: anywhere;
}

.td-pm__subject .fa {
	color: var(--td-accent);
}

.td-pm__subject small {
	display: block;
	font-size: 12px;
}

.td-pm__date {
	width: 150px;
	color: var(--td-muted-2);
	white-space: nowrap;
}

.td-pm__who {
	width: 190px;
}

.td-ulink {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--td-text);
}

.td-ulink img {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	object-fit: cover;
}

.td-pm__bulk {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	margin-top: 12px;
}

.td-pm__bulk select {
	min-height: 34px;
	padding: 5px 8px;
	color: var(--td-text);
	font-size: 14px;
	background: var(--td-bg-inset);
	border: 1px solid var(--td-border);
}

.td-pm__message {
	margin-bottom: 12px;
}

.td-pm__title {
	margin: 0 0 6px;
	color: #ddd;
	font-size: 18px;
	overflow-wrap: anywhere;
}

.td-pm__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 18px;
	font-size: 13px;
}

.td-pm__body {
	font-size: 15px;
	overflow-wrap: anywhere;
}

.td-pm__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.td-pm__inline {
	margin: 0;
}

.td-pm__orig {
	margin: 0 0 14px;
	padding: 8px 12px;
	font-size: 14px;
	background: var(--td-bg-inset);
	border-left: 3px solid var(--td-border);
	overflow-wrap: anywhere;
}

.td-pm__orig .td-muted {
	display: block;
	margin-bottom: 4px;
	font-size: 12px;
}

.td-pm__empty {
	padding: 20px 0;
	text-align: center;
}

/* ---------- Add news editor ---------- */
.td-editor__bar {
	display: flex;
	flex-wrap: wrap;
	gap: 2px;
	padding: 4px;
	background: var(--td-bg-head);
	border: 1px solid var(--td-border);
	border-bottom: 0;
}

.td-editor__bar button {
	width: 34px;
	height: 30px;
	color: var(--td-text);
	background: transparent;
	border: 1px solid transparent;
	cursor: pointer;
}

.td-editor__bar button:hover,
.td-editor__bar button:focus-visible {
	color: #fff;
	background: var(--td-bg-card);
	border-color: var(--td-border);
}

/* ---------- Statistics ---------- */
.td-stats .panel-heading {
	font-size: 15px;
}

.td-stats .panel-heading .fa {
	color: var(--td-accent);
	margin-right: 3px;
}

.td-stats__row {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0 15px;
}

.td-stats__list {
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 14px;
}

.td-stats__list li {
	padding: 8px 12px;
	background: var(--td-bg-body);
	border: 1px solid var(--td-border);
}

.td-stats__list li + li {
	border-top: 0;
}

.td-stats__list b {
	display: inline-block;
	min-width: 90px;
	color: #c4c6c8;
}

.td-stats__table {
	width: 100%;
	font-size: 13px;
}

.td-stats__table td {
	padding: 6px 4px;
	border-top: 1px solid var(--td-border);
}

.td-stats__table tr:first-child td {
	border-top: 0;
}

.td-stats__table td:last-child {
	color: #ddd;
	text-align: right;
	white-space: nowrap;
}

.td-stats__table .fa {
	color: var(--td-muted-2);
}

.td-table-scroll {
	overflow-x: auto;
	scrollbar-width: thin;
	scrollbar-color: #444a4a transparent;
}

.td-stats__top {
	width: 100%;
	min-width: 640px;
	font-size: 13px;
}

.td-stats__top th {
	padding: 7px 6px;
	color: var(--td-muted);
	font-weight: 400;
	text-align: center;
	background: var(--td-bg-head);
}

.td-stats__top th:first-child,
.td-stats__top td:first-child {
	text-align: left;
}

.td-stats__top td {
	padding: 7px 6px;
	text-align: center;
	border-bottom: 1px solid var(--td-border);
}

/* ---------- Last comments ---------- */
.td-lastcomments__filter {
	font-size: 14px;
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
	.td-stats__row {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 767px) {
	.td-form__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.td-profile__main {
		flex-direction: column;
		align-items: center;
		gap: 15px;
	}

	.td-profile__info {
		width: 100%;
	}

	.td-profile__avatar img {
		width: 120px;
		height: 120px;
	}

	.td-profile__facts li > span:first-child {
		display: block;
		min-width: 0;
		font-size: 13px;
	}

	.td-plist__thumb {
		flex-basis: 84px;
	}

	.td-plist__img {
		width: 84px;
		height: 48px;
	}

	.td-pm__table thead {
		display: none;
	}

	.td-pm__table,
	.td-pm__table tbody,
	.td-pm__table tr,
	.td-pm__table td {
		display: block;
		width: auto;
	}

	.td-pm__table tr {
		position: relative;
		padding: 8px 8px 8px 38px;
		border-bottom: 1px solid var(--td-border);
	}

	.td-pm__table td {
		padding: 0;
		border: 0;
	}

	.td-pm__table td.td-pm__cb {
		position: absolute;
		top: 10px;
		left: 8px;
		width: auto;
	}

	.td-pm__table td.td-pm__who,
	.td-pm__table td.td-pm__date {
		display: inline-block;
		margin-top: 4px;
		margin-right: 10px;
		font-size: 13px;
	}
}
