/**
 * Forum board and account pages.
 *
 * Kept out of elements.css because it is only needed on /dien-dan/, a forum
 * page, or one of the four account pages — every other page would download it
 * for nothing.
 *
 * Everything is scoped to .vf-board or .vf-auth-*. Note the wrapper class is
 * "vf-board", not "vf-forum": that one already belongs to the home page's
 * forum-cards element.
 */

:root {
	--vf-line: #E4E4E4;

	/**
	 * Where anything sticky comes to rest.
	 *
	 * Flatsome's header is "has-sticky sticky-jump" and its stuck height is 70px
	 * (.stuck .header-main), so 90px clears it with a little air. Change it here
	 * and the sidebar and the topic rail both follow.
	 */
	--vf-sticky-top: 90px;
}

.vf-board .container {
	max-width: 1300px;
	margin: 0 auto;
	padding: 0 5px;
}

/**
 * Two columns that never collapse into a squeeze.
 *
 * The list column is the flexible one and carries min-width:0 — without it a
 * long unbroken topic title would push the sidebar off the page, because a flex
 * item's default minimum size is its own content.
 */
/**
 * Columns stretch to the same height on purpose.
 *
 * align-items:flex-start would shrink #secondary to exactly its content, and a
 * sticky child can only travel inside its parent's box — with no spare height
 * there is nothing to travel through, so it scrolls away as if sticky were
 * never set. Stretching gives it the whole length of the list to move down.
 * (The topic page's inner .bb-grid is the opposite case and overrides this:
 * there the sticky element is the flex item itself.)
 */
.vf-board .bb-grid {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 0 30px;
}

.vf-board #primary {
	flex: 1 1 0;
	min-width: 0;
}

.vf-board .bbpress-sidebar {
	flex: 0 0 300px;
	max-width: 300px;
	padding-top: 30px;
}

/**
 * The sidebar follows the page down.
 *
 * max-height plus overflow matters: this column can be taller than the window
 * once it carries a portrait banner and a widget or two, and a plain top-sticky
 * element that is taller than the viewport pins its bottom permanently below
 * the fold — unreachable. Capping it keeps everything scrollable, and the
 * scrollbar only appears when it is actually needed.
 *
 * The padding/negative-margin pair gives the widgets' drop shadow room: an
 * overflow container clips at its padding box, so without it the shadow would
 * be sliced off down both sides.
 */
.vf-board .bb-sticky-sidebar {
	position: sticky;
	top: var(--vf-sticky-top);
	max-height: calc(100vh - var(--vf-sticky-top) - 20px);
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 2px 10px 24px;
	margin: -2px -10px 0;
	scrollbar-width: thin;
	scrollbar-color: #c9ced6 transparent;
}

.vf-board .bb-sticky-sidebar::-webkit-scrollbar { width: 6px; }
.vf-board .bb-sticky-sidebar::-webkit-scrollbar-track { background: transparent; }

.vf-board .bb-sticky-sidebar::-webkit-scrollbar-thumb {
	background: #c9ced6;
	border-radius: 3px;
}

/* ------------------------------------------------------------ cover strip */

/**
 * The cover strip runs the full width of the window.
 *
 * It is a direct child of #content, above .container, so it needs no negative
 * margins or 100vw trick — those two both cause a horizontal scrollbar once a
 * vertical one appears, because 100vw counts the scrollbar and 100% does not.
 */
.vf-board > .bb-topic-banner {
	position: relative;
	width: 100%;
	height: 300px;
	margin: 0 0 48px;
	overflow: hidden;
	background: #1c2b3a;
}

.vf-board .bb-topic-banner::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	opacity: 0.45;
	background-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 4%, #000 100%);
}

.vf-board .bb-topic-banner .banner-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/**
 * The image bleeds edge to edge but the words must not: they line up with the
 * list below, so the header is centred to the same width as .container.
 */
.vf-board .bb-topic-banner .entry-header {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	bottom: 0;
	z-index: 2;
	width: 100%;
	max-width: 1300px;
	margin: 0;
	padding: 0 16px 24px;
}

.vf-board .bb-topic-banner .entry-title {
	margin: 0 0 8px;
	color: #fff;
	font-size: 36px;
	line-height: 1.5;
	font-weight: 300;
	letter-spacing: -0.02em;
}

.vf-board .bb-single-forum-count-topic-reply span {
	color: #fff;
	font-size: 16px;
	line-height: 24px;
	font-weight: 300;
	letter-spacing: -0.02em;
}

.vf-board .bb-single-forum-count-topic-reply .separate {
	padding: 0 15px;
	opacity: 0.6;
}

/* ------------------------------------------------- forum cards (board index) */

/**
 * A full-width row above the two columns, so it spans the list and the sidebar.
 */
.vf-board .loop-forums {
	flex: 0 0 100%;
	max-width: 100%;
	padding-top: 30px;
}

/**
 * The <ul> carries the .bb-grid class too, so it inherits that rule's
 * `gap: 0 30px`. Combined with the 12px padding gutters below, four 25% cards
 * plus three 30px gaps overflow the row and only three fit. The gutters here
 * are padding-based, so the gap has to go.
 */
.vf-board .bb-forums-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0;
	margin: 0 -12px 20px;
	padding: 0;
	list-style: none;
}

.vf-board .bb-forums-list > li {
	flex: 0 0 100%;
	max-width: 100%;
	margin-bottom: 24px;
	padding: 0 12px;
	list-style: none;
}

.vf-board .bb-cover-list-item {
	position: relative;
	height: 180px;
	overflow: hidden;
	background: #1c2b3a;
}

.vf-board .bb-cover-wrap {
	display: block;
	position: absolute;
	inset: 0;
}

.vf-board .bb-cover-wrap img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/**
 * The card title sits on the image, so it needs its own contrast — a photo
 * cannot be relied on to be dark where the words land.
 */
.vf-board .bb-cover-wrap::after {
	content: "";
	position: absolute;
	inset: 0;
	background-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 0, #07121d 100%);
	opacity: 0.85;
}

.vf-board .bs-card-forum-details {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	padding: 24px 16px;
	color: #fff;
	pointer-events: none;
}

.vf-board .bs-card-forum-details a { pointer-events: auto; }

.vf-board .bs-forum-details h3 {
	margin: 0 0 4px;
	font-size: 24px;
	line-height: 1.25;
	font-weight: 300;
	letter-spacing: -0.02em;
}

.vf-board .bs-forum-details h3 a { color: #fff; }
.vf-board .bs-forum-details h3 a:hover { color: #fff; text-decoration: underline; }

.vf-board .bb-forum-content {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin-bottom: 6px;
	font-size: 14px;
	line-height: 1.35;
	font-weight: 300;
	color: #fff;
	opacity: 0.75;
}

.vf-board .bb-forum-count-topic-reply p {
	margin: 0;
	font-size: 16px;
	line-height: 24px;
	font-weight: 300;
	letter-spacing: -0.02em;
	color: #fff;
}

.vf-board .forums-meta:empty { display: none; }

@media (min-width: 544px) {
	.vf-board .bb-forums-list > li { flex: 0 0 50%; max-width: 50%; }
}

@media (min-width: 992px) {
	.vf-board .bb-forums-list > li { flex: 0 0 25%; max-width: 25%; }
}

/**
 * On a phone the cards become a side-swipe strip rather than a long stack —
 * eight forums down the page would bury the topic list entirely.
 *
 * The scroll container is a leaf here, never an ancestor of the sticky sidebar,
 * so it cannot break that.
 */
@media (max-width: 768px) {
	.vf-board .bb-forums-list {
		flex-wrap: nowrap;
		margin-right: -16px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
	}

	.vf-board .bb-forums-list > li {
		flex: 0 0 82vw;
		max-width: 82vw;
		padding-left: 0;
		scroll-snap-align: start;
	}
}

/* ----------------------------------------------------------- sort header */

.vf-board .header-sort-topic-forum {
	display: flex;
	align-items: center;
	gap: 0 40px;
	margin-bottom: 16px;
}

.vf-board .header-item {
	position: relative;
	display: flex;
	align-items: center;
}

.vf-board .header-item.box-topic-date {
	flex: 1;
}

.vf-board .header-item h6 {
	margin: 0;
	font-size: 14px;
	line-height: 16px;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: #151515;
}

.vf-board .header-item .filter-image {
	display: flex;
	align-items: center;
	gap: 5px;
	color: inherit;
}

.vf-board .header-item.is-active .filter-image { color: var(--vf-blue); }
.vf-board .header-item.is-active .filter-image svg path { stroke: var(--vf-blue); }

/* Arrow down for descending, up for ascending. */
.vf-board .header-item[data-order="desc"] .filter-image svg { transform: rotate(180deg); }

.vf-board .button-hover {
	position: absolute;
	top: calc(100% + 10px);
	left: 0;
	z-index: 20;
	display: none;
	padding: 4px 16px;
	background: #3C3C3C;
	color: #fff;
	white-space: nowrap;
}

.vf-board .button-hover p {
	margin: 0;
	font-size: 14px;
	line-height: 22px;
	font-weight: 600;
	letter-spacing: -0.02em;
}

.vf-board .header-item:hover .button-hover { display: block; }

.vf-board .header-sort-topic-forum-mobile { display: none; }

/* ------------------------------------------------------------------ rows */

.vf-board .bs-forums-items {
	list-style: none;
	margin: 0;
	padding: 0;
}

.vf-board .loop-topic-list { border-top: 1px solid var(--vf-line); }
.vf-board .loop-topic-list:last-child { border-bottom: 1px solid var(--vf-line); }

.vf-board .bs-item-wrap {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 27px 0;
}

.vf-board .bs-item-wrap > .flex {
	display: flex;
	flex: 1;
	min-width: 0;
}

.vf-board .item-avatar {
	position: relative;
	flex: 0 0 auto;
	margin-right: 20px;
}

.vf-board .item-avatar .avatar {
	display: block;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	object-fit: cover;
}

/* The name belongs to the meta line under the title, not beside the picture. */
.vf-board .item-avatar .bbp-author-name { display: none; }

.vf-board .bb-topic-status-wrapper {
	position: absolute;
	top: -2px;
	right: -8px;
	width: 24px;
	height: 24px;
	line-height: 0;
}

.vf-board .item {
	flex: 1;
	min-width: 0;
}

.vf-board .item-title { margin-bottom: 4px; }

.vf-board .item-title a {
	font-size: 20px;
	line-height: 30px;
	font-weight: 500;
	letter-spacing: -0.02em;
	color: #151515;
	word-break: break-word;
}

.vf-board .bs-item-wrap:hover .item-title a { color: var(--vf-blue); }

.vf-board .item-meta {
	display: flex;
	align-items: center;
	margin-top: 7px;
}

.vf-board .bs-replied {
	font-size: 14px;
	line-height: 20px;
	font-weight: 300;
	letter-spacing: -0.02em;
	color: #707070;
}

.vf-board .bbp-topic-freshness-author {
	font-weight: 600;
	color: var(--vf-dark-gray);
}

/* ------------------------------------------------------- counts and faces */

.vf-board .action.bs-forums-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex: 0 0 31%;
}

.vf-board .bs-voices-wrap { display: flex; }

.vf-board .bs-replies { margin-right: 48px; }

.vf-board .bs-replies p,
.vf-board .viewer p {
	margin: 0;
	font-size: 20px;
	line-height: 30px;
	font-weight: 500;
	letter-spacing: -0.02em;
	color: var(--vf-dark-gray);
}

.vf-board .bs-replies p.text-reply,
.vf-board .viewer p.text-viewer {
	font-size: 14px;
	line-height: 20px;
	font-weight: 300;
}

/**
 * The faces overlap, so the box gets a fixed size and the images are positioned
 * inside it. Negative margins would let a row with one replier sit at a
 * different width from a row with three, and the counts beside them would stop
 * lining up down the page.
 */
.vf-board .avatar-members {
	position: relative;
	flex: 0 0 73px;
	width: 73px;
	height: 33px;
}

.vf-board .avatar-members span {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	line-height: 0;
}

.vf-board .avatar-member-reply-1 { right: 40px; z-index: 3; }
.vf-board .avatar-member-reply-2 { right: 20px; z-index: 2; }
.vf-board .avatar-member-reply-3 { right: 0; z-index: 1; }

.vf-board .avatar-members img {
	display: block;
	width: 33px;
	height: 33px;
	border-radius: 50%;
	border: 1px solid #fff;
	object-fit: cover;
}

/* Mobile-only pieces of a row. */
.vf-board .avatar-members-mobile,
.vf-board .bs-voices-wrap-mobile { display: none; }

.vf-board .vf-forum-empty {
	padding: 40px 0;
	color: var(--vf-muted);
}

.vf-board .vf-forum-empty p { margin: 0; }

/* ------------------------------------------------------ load more, notice */

.vf-board .page-load-status {
	padding: 30px 0 10px;
	text-align: center;
}

.button-load-more-posts.loading {
	opacity: 0.7;
	pointer-events: none;
}

.vf-board .bbp-no-topic { margin: 30px 0 60px; }

.vf-board .bp-feedback {
	display: flex;
	align-items: stretch;
	border: 1px solid var(--vf-line);
	background: #fff;
}

.vf-board .bp-feedback .bp-icon {
	position: relative;
	flex: 0 0 34px;
	background: var(--vf-blue);
}

.vf-board .bp-feedback .bp-icon::before {
	content: "i";
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	font-style: italic;
}

.vf-board .bp-feedback p {
	margin: 0;
	padding: 14px 16px;
	font-size: 14px;
	line-height: 1.5;
	font-weight: 300;
}

/* Chỉ link nằm trong câu văn — "đăng nhập", "Đăng ký" — mới được gạch chân.
   Trước đây rule này nhắm mọi <a> trong khối, nên nó bắt luôn nút
   "Tạo thảo luận mới" bên dưới: nút bị chữ xanh gạch chân trên nền xanh, vì
   .vf-board .bp-feedback a (0,2,1) thắng .vf-new-topic-btn (0,1,0). */
.vf-board .bp-feedback p a {
	color: var(--vf-blue);
	text-decoration: underline;
}

/* --------------------------------------------------------------- sidebar */

.vf-board .bbpress-sidebar .widget {
	margin-bottom: 20px;
	padding: 26px 24px 24px;
	background: #fff;
	border: 0;
	border-radius: 0;
	box-shadow: 0 24px 24px rgba(0, 0, 0, 0.1);
}

.vf-board .bbpress-sidebar .widget_media_image { padding: 0; }
.vf-board .bbpress-sidebar .widget_media_image img { display: block; width: 100%; height: auto; }

.vf-board .leaderboard h5 {
	margin: 0 0 20px;
	font-size: 20px;
	line-height: 30px;
	font-weight: 500;
	letter-spacing: -0.02em;
	color: var(--vf-dark-gray);
}

.vf-board .statistics {
	width: 100%;
	margin: 0;
	border: 0;
	border-collapse: collapse;
}

.vf-board .statistics td {
	padding: 0;
	border: 0;
	vertical-align: middle;
}

.vf-board .statistics tr:not(:last-child) td { padding-bottom: 30px; }
.vf-board .statistics td.icon { width: 48px; text-align: right; }

.vf-board .statistics .number {
	display: block;
	font-size: 36px;
	line-height: 1;
	font-weight: 300;
	color: var(--vf-dark-gray);
}

.vf-board .statistics .desc {
	font-size: 14px;
	line-height: 20px;
	font-weight: 300;
	color: var(--vf-muted);
}

/* ----------------------------------------------------- mobile sort sheet */

.popup-sort-topic {
	position: fixed;
	inset: 0;
	z-index: 20002;
}

.popup-sort-topic[hidden] { display: none; }

.bb-modal-overlay-sort-topic {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.56);
}

.form-popup-sort-topic {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 90%;
	max-width: 576px;
}

.form-popup-sort-topic form { margin: 0; }

.form-popup-sort-topic .form-container {
	max-height: 86vh;
	overflow-y: auto;
	padding: 24px 30px;
	background: #fff;
}

.form-sort-topic-title {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	margin-bottom: 24px;
}

.form-sort-topic-title h1 {
	margin: 0;
	font-size: 24px;
	line-height: 36px;
	font-weight: 300;
	letter-spacing: -0.02em;
	color: var(--vf-dark-gray);
}

.form-sort-topic-title .close-pop-up { cursor: pointer; line-height: 0; }

.popup-sort-topic .box-radio { margin-bottom: 20px; }

.popup-sort-topic .box-radio label {
	margin: 0 0 0 8px;
	font-size: 16px;
	line-height: 24px;
	font-weight: 300;
	letter-spacing: -0.02em;
	color: var(--vf-dark-gray);
}

.popup-sort-topic .btn {
	width: 100%;
	height: 48px;
	margin: 0;
	padding: 0 16px;
	border: 0;
	border-radius: 0;
	background: var(--vf-blue);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

body.vf-sort-open { overflow: hidden; }

/* ------------------------------------------------------------ responsive */

@media (max-width: 1200px) {
	.vf-board .action.bs-forums-meta { flex: 0 0 40%; }
	.vf-board .bs-replies { margin-right: 24px; }
}

@media (max-width: 991px) {
	.vf-board .bb-grid { gap: 0; }

	.vf-board #primary,
	.vf-board .bbpress-sidebar {
		flex: 0 0 100%;
		max-width: 100%;
	}

	.vf-board .bbpress-sidebar { padding-top: 0; }

	/* Stacked under the list, there is nothing left to stick to. */
	.vf-board .bb-sticky-sidebar {
		position: static;
		max-height: none;
		overflow: visible;
		padding: 0;
		margin: 0;
	}
}

@media (max-width: 576px) {
	.vf-board .container { padding: 0 16px; }

	.vf-board > .bb-topic-banner {
		height: auto;
		min-height: 224px;
		margin-bottom: 28px;
	}

	.vf-board .bb-topic-banner .entry-title { font-size: 24px; }

	/* The column headers do not fit; the sheet replaces them. */
	.vf-board .header-sort-topic-forum { display: none; }

	.vf-board .header-sort-topic-forum-mobile {
		display: flex;
		align-items: center;
		justify-content: space-between;
		margin-bottom: 12px;
	}

	.vf-board .header-sort-topic-forum-mobile h6 {
		margin: 0;
		font-size: 14px;
		line-height: 16px;
		font-weight: 600;
		letter-spacing: 0.05em;
		text-transform: uppercase;
		color: #151515;
	}

	.vf-board .header-sort-topic-forum-mobile .filter-image { cursor: pointer; line-height: 0; }

	.vf-board .bs-item-wrap { padding: 16px 0; }
	.vf-board .item-avatar { margin-right: 0; }
	.vf-board .item-avatar > .bbp-author-link { display: none; }
	.vf-board .bb-topic-status-wrapper { top: 2px; right: auto; left: 0; }
	.vf-board .bs-item-wrap.has-sticky .item-title { margin-left: 30px; }

	.vf-board .item-title a {
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		overflow: hidden;
		font-size: 16px;
		line-height: 24px;
		font-weight: 400;
		color: var(--vf-dark-gray);
	}

	/* The wide counts column is replaced by the compact line under the title. */
	.vf-board .action.bs-forums-meta { display: none; }

	.vf-board .item-meta {
		align-items: center;
		margin-top: 8px;
	}

	.vf-board .avatar-members-mobile {
		display: flex;
		align-items: center;
		flex: 0 0 auto;
		padding-right: 12px;
	}

	.vf-board .avatar-members-mobile .avatar {
		width: 24px;
		height: 24px;
		border-radius: 50%;
	}

	.vf-board .avatar-members-mobile .bbp-author-name {
		display: block;
		max-width: 100px;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
		padding-left: 10px;
		font-size: 12px;
		font-weight: 600;
		color: #3C3C3C;
	}

	.vf-board .box-information.mobile {
		display: flex;
		align-items: center;
		justify-content: space-between;
		width: 100%;
		min-width: 0;
	}

	.vf-board .bs-replied {
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
		margin-right: 12px;
		font-size: 12px;
		line-height: 20px;
	}

	.vf-board .bs-replied .bbp-topic-freshness-author { display: none; }

	.vf-board .bs-voices-wrap-mobile {
		display: flex;
		align-items: center;
		flex: 0 0 auto;
		gap: 12px;
	}

	.vf-board .bs-voices-wrap-mobile .bs-replies,
	.vf-board .bs-voices-wrap-mobile .viewer {
		display: flex;
		align-items: center;
		gap: 4px;
		margin: 0;
	}

	.vf-board .bs-voices-wrap-mobile .text-reply { line-height: 0; }

	.vf-board .bs-voices-wrap-mobile .number-replies,
	.vf-board .bs-voices-wrap-mobile .number-view {
		margin: 0;
		font-size: 14px;
		line-height: 1;
		font-weight: 300;
		color: var(--vf-dark-gray);
	}

	.vf-board .bs-voices-wrap-mobile .text-viewer { display: none; }
}

/* ==========================================================================
   Account pages
   ========================================================================== */

.vf-auth-card {
	max-width: 480px;
	margin: 40px auto 64px;
	padding: 32px;
	background: #fff;
	border: 1px solid var(--vf-line);
}

.vf-auth-title {
	margin: 0 0 8px;
	font-size: 28px;
	line-height: 1.3;
	font-weight: 300;
	letter-spacing: -0.02em;
	color: var(--vf-dark-gray);
}

.vf-auth-lead {
	margin: 0 0 24px;
	font-size: 14px;
	line-height: 1.6;
	font-weight: 300;
	color: var(--vf-muted);
}

.vf-auth-notice {
	margin-bottom: 16px;
	padding: 12px 16px;
	border-left: 3px solid var(--vf-blue);
	background: #f4f7fd;
	font-size: 14px;
	line-height: 1.6;
	font-weight: 300;
}

.vf-auth-notice--error {
	border-left-color: #d63638;
	background: #fdf3f3;
}

.vf-auth-notice--success {
	border-left-color: #207f4c;
	background: #f1f8f4;
}

.vf-auth-notice a { color: var(--vf-blue); text-decoration: underline; }

.vf-auth-form { margin: 0; }

.vf-auth-form .vf-field { margin: 0 0 18px; }

.vf-auth-form label {
	display: block;
	margin-bottom: 6px;
	font-size: 14px;
	font-weight: 500;
	color: var(--vf-dark-gray);
}

.vf-auth-form input[type="text"],
.vf-auth-form input[type="email"],
.vf-auth-form input[type="password"] {
	width: 100%;
	height: 44px;
	margin: 0;
	padding: 0 14px;
	border: 1px solid var(--vf-line);
	border-radius: 4px;
	box-shadow: none;
	font-size: 15px;
	font-weight: 300;
}

.vf-auth-form input:focus {
	border-color: var(--vf-blue);
	box-shadow: 0 0 0 2px rgba(20, 100, 244, 0.15);
}

.vf-auth-form .vf-field--inline {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.vf-auth-form .vf-field--inline label {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-weight: 300;
}

.vf-auth-form .vf-field--inline input[type="checkbox"] { margin: 0; }

.vf-auth-form .vf-hint {
	display: block;
	margin-top: 4px;
	font-size: 12px;
	color: var(--vf-muted);
}

.vf-auth-link { font-size: 14px; color: var(--vf-blue); }

.vf-auth-submit {
	width: 100%;
	height: 48px;
	margin: 8px 0 0;
	padding: 0 16px;
	border: 0;
	border-radius: 4px;
	background: var(--vf-blue);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	cursor: pointer;
}

.vf-auth-submit:hover { background: #0f52cc; color: #fff; }

.vf-auth-foot {
	margin: 20px 0 0;
	text-align: center;
	font-size: 14px;
	font-weight: 300;
	color: var(--vf-muted);
}

.vf-auth-foot a { color: var(--vf-blue); }

/* Bots fill in everything; people never see this. */
.vf-auth-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ==========================================================================
   One topic
   ==========================================================================

   The listing rules above are reused for the shell (grid, sidebar, sort sheet,
   load-more), so this section is mostly overrides: a topic row is a column of
   blocks, not the single flex line a listing row is.
   ========================================================================== */

.vf-topic .site-main { padding-top: 24px; }

/* Content splits again: the replies, and the narrow jump rail beside them. */
.vf-topic #bbpress-forums > .bb-grid {
	display: flex;
	align-items: flex-start;
	gap: 0 24px;
}

.vf-topic .replies-content {
	flex: 1 1 0;
	min-width: 0;
}

.vf-topic .bs-single-topic-sidebar {
	flex: 0 0 150px;
	max-width: 150px;
	position: sticky;
	top: var(--vf-sticky-top);
}

/* -------------------------------------------------------------- breadcrumb */

.vf-topic .bbp-breadcrumb p {
	margin: 0 0 20px;
	font-size: 13px;
	font-weight: 300;
	line-height: 1.6;
	color: var(--vf-muted);
}

.vf-topic .bbp-breadcrumb a { color: var(--vf-muted); }
.vf-topic .bbp-breadcrumb a:hover { color: var(--vf-blue); }
.vf-topic .bbp-breadcrumb-sep { padding: 0 4px; }
.vf-topic .bbp-breadcrumb-current { color: var(--vf-dark-gray); }

/* ------------------------------------------------------------ opening post */

/**
 * The listing gives every .bs-item-wrap a single centred flex line. A topic's
 * opening post stacks instead, so both are undone here rather than by giving
 * the shared pieces different class names.
 */
.vf-topic .bs-item-wrap.topic-lead {
	display: block;
	gap: 0;
	padding: 0;
	border: 0;
}

.vf-topic .bbp-lead-topic {
	list-style: none;
	margin: 0 0 8px;
	padding: 0;
}

.vf-topic .forum-label a {
	display: inline-block;
	margin-bottom: 12px;
	padding: 4px 12px;
	background: rgba(20, 100, 244, 0.08);
	color: var(--vf-blue);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.vf-topic .bb-reply-topic-title {
	margin: 0;
	font-size: 32px;
	line-height: 1.35;
	font-weight: 300;
	letter-spacing: -0.02em;
	color: var(--vf-dark-gray);
}

/* Undo the listing's flex row for every .item-meta on this page. */
.vf-topic .item-meta {
	display: block;
	margin-top: 0;
}

.vf-topic .author-header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 20px 0 24px;
}

.vf-topic .author-header .item-avatar { margin: 0; }

.vf-topic .author-header .avatar {
	display: block;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	object-fit: cover;
}

.vf-topic .custom-box-item-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 12px;
	min-width: 0;
}

/* Name gets its own line; standing and date share the next one. */
.vf-topic .box-author-role { flex: 0 0 100%; }

.vf-topic .box-author-role h3 {
	margin: 0;
	font-size: 16px;
	line-height: 1.4;
	font-weight: 600;
	color: var(--vf-dark-gray);
}

.vf-topic .create-date,
.vf-topic .date-reply {
	font-size: 13px;
	font-weight: 300;
	color: var(--vf-muted);
}

.vf-role {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 2px 8px;
	border-radius: 3px;
	background: #eef1f5;
	color: #5b6675;
	font-size: 12px;
	font-weight: 600;
	line-height: 18px;
}

.vf-role--admin { background: rgba(20, 100, 244, 0.1); color: var(--vf-blue); }
.vf-role--mod { background: rgba(32, 127, 76, 0.1); color: #207f4c; }

/* ---------------------------------------------------------------- content */

.vf-topic .bbp-topic-content {
	font-size: 16px;
	line-height: 1.75;
	font-weight: 300;
	color: var(--vf-dark-gray);
}

.vf-topic .bbp-topic-content > *:first-child { margin-top: 0; }
.vf-topic .bbp-topic-content > *:last-child { margin-bottom: 0; }

.vf-topic .bbp-topic-content img,
.vf-topic .bbp_reply_content img {
	max-width: 100%;
	height: auto;
}

.vf-topic .bbp-topic-content a,
.vf-topic .bbp_reply_content a { color: var(--vf-blue); }

/* --------------------------------------------------------- like and share */

.vf-topic .custom-box-like-share {
	display: flex;
	align-items: center;
	gap: 24px;
	margin: 28px 0 0;
	padding: 16px 0;
	border-top: 1px solid var(--vf-line);
	border-bottom: 1px solid var(--vf-line);
}

.vf-topic .vf-replies-heading {
	margin: 28px 0 12px;
	font-size: 20px;
	line-height: 30px;
	font-weight: 500;
	letter-spacing: -0.02em;
	color: var(--vf-dark-gray);
}

.vf-topic .must-log-in {
	margin: 0 0 24px;
	padding: 14px 16px;
	background: #f6f8fb;
	border-left: 3px solid var(--vf-blue);
	font-size: 14px;
	font-weight: 300;
	color: var(--vf-dark-gray);
}

.vf-topic .must-log-in a { color: var(--vf-blue); text-decoration: underline; }

/* ------------------------------------------------------------- reply form */

.vf-topic .v3s-form-reply { margin: 0 0 32px; }

.vf-topic .vf-reply-box {
	display: flex;
	gap: 12px;
	align-items: flex-start;
}

.vf-topic .vf-reply-box__avatar .avatar {
	display: block;
	width: 44px;
	height: 44px;
	border-radius: 50%;
}

.vf-topic .vf-reply-box__form { flex: 1; min-width: 0; }
.vf-topic .vf-reply-form { margin: 0; }

.vf-topic .comment-form-comment { margin: 0 0 10px; }

.vf-topic .comment-form-comment textarea {
	width: 100%;
	min-height: 96px;
	padding: 12px 14px;
	border: 1px solid var(--vf-line);
	border-radius: 6px;
	font-size: 15px;
	font-weight: 300;
	line-height: 1.6;
}

.vf-topic .comment-form-comment textarea:focus {
	border-color: var(--vf-blue);
	box-shadow: 0 0 0 2px rgba(20, 100, 244, 0.12);
}

.vf-topic .form-submit { margin: 0; }

.vf-topic .form-submit .submit {
	min-height: 42px;
	padding: 0 24px;
	border: 1px solid var(--vf-blue);
	border-radius: 6px;
	background: var(--vf-blue);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	text-transform: none;
	letter-spacing: -0.01em;
}

/* ----------------------------------------------------------- reply header */

.vf-topic .box-title-reply {
	display: flex;
	align-items: center;
	margin-bottom: 12px;
}

.vf-topic .box-title-reply .header-item { flex: 1; }

/* ------------------------------------------------------------- reply list */

.vf-topic .bb-single-reply-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.vf-topic .bb-single-reply-list > li { border-top: 1px solid var(--vf-line); }
.vf-topic .bb-single-reply-list > li:last-child { border-bottom: 1px solid var(--vf-line); }

.vf-topic .bs-reply-list-item { padding: 20px 0; }

.vf-topic .bs-reply-header {
	display: flex;
	align-items: center;
	gap: 12px;
}

.vf-topic .bs-reply-header .item-avatar { flex: 0 0 auto; margin: 0; }

.vf-topic .bs-reply-header .avatar {
	display: block;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
}

/**
 * Name on the first line, standing and timestamp on the second. The .break
 * element is what forces the wrap — it is a full-width zero-height flex item,
 * so no markup outside this list has to know about the layout.
 */
.vf-topic .list-reply-wrapper {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 2px 12px;
	min-width: 0;
}

.vf-topic .list-reply-wrapper h3 {
	margin: 0;
	font-size: 15px;
	line-height: 1.4;
	font-weight: 600;
	color: var(--vf-dark-gray);
}

.vf-topic .break {
	flex: 0 0 100%;
	height: 0;
	margin: 0;
}

.vf-topic .bbp-after-author-hook .point-user { display: flex; }

.vf-topic .list-reply-content {
	margin-top: 10px;
	padding-left: 56px;
	font-size: 15px;
	line-height: 1.7;
	font-weight: 300;
	color: var(--vf-dark-gray);
}

.vf-topic .bbp_reply_content > *:first-child { margin-top: 0; }
.vf-topic .bbp_reply_content > *:last-child { margin-bottom: 0; }

/**
 * Threading.
 *
 * The indent is what carries the meaning — it is the only thing on screen that
 * says "this answers that". The left border makes the column visible so a deep
 * thread does not read as a list that has drifted rightwards.
 */
.vf-topic .bb-single-reply-list .children {
	list-style: none;
	margin: 0;
	padding: 0 0 0 40px;
	border-left: 2px solid var(--vf-line);
}

.vf-topic .bb-single-reply-list .children > li { border-top: 1px solid var(--vf-line); }
.vf-topic .bb-single-reply-list .children > li:last-child { border-bottom: 0; }

/* Nested replies sit tighter than the conversations they hang from. */
.vf-topic .children .bs-reply-list-item { padding: 16px 0; }
.vf-topic .children .bs-reply-header .avatar { width: 36px; height: 36px; }
.vf-topic .children .list-reply-content { padding-left: 48px; }

.vf-topic .vf-reply-actions { margin-top: 10px; }

.vf-topic .comment-reply-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--vf-blue);
}

.vf-topic .comment-reply-link::before {
	content: "";
	width: 14px;
	height: 14px;
	background: currentColor;
	/* a small reply arrow, so the link reads as an action not a heading */
	-webkit-mask: no-repeat center/14px url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 9V5l-7 7 7 7v-4.1c5 0 8.5 1.6 11 5.1-1-5-4-10-11-11z'/%3E%3C/svg%3E");
	mask: no-repeat center/14px url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 9V5l-7 7 7 7v-4.1c5 0 8.5 1.6 11 5.1-1-5-4-10-11-11z'/%3E%3C/svg%3E");
}

.vf-topic .comment-reply-link:hover { color: #0f52cc; text-decoration: underline; }

/* The heading and cancel link that appear once the form is moved under a reply. */
.vf-topic .vf-reply-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 10px;
}

.vf-topic .vf-reply-head:empty { display: none; }

.vf-topic .vf-reply-head #reply-title {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	color: var(--vf-dark-gray);
}

.vf-topic #cancel-comment-reply-link {
	font-size: 13px;
	color: var(--vf-muted);
	text-decoration: underline;
}

/* Moved under a comment, the form needs to look like it belongs there. */
.vf-topic .children #respond,
.vf-topic .bb-single-reply-list #respond {
	margin: 12px 0 16px;
	padding: 16px;
	background: #f7f9fc;
	border: 1px solid var(--vf-line);
	border-radius: 6px;
}

@media (max-width: 576px) {
	.vf-topic .bb-single-reply-list .children { padding-left: 16px; }
	.vf-topic .children .list-reply-content { padding-left: 0; }
}

.vf-topic .vf-no-replies {
	padding: 24px 0 32px;
	font-size: 15px;
	font-weight: 300;
	color: var(--vf-muted);
}

/* ---------------------------------------------------------------- rail */

.vf-topic .scrubber {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 16px 12px;
	border-left: 1px solid var(--vf-line);
}

.vf-topic .scrubber a {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 500;
	color: var(--vf-muted);
}

.vf-topic .scrubber a:hover { color: var(--vf-blue); }

.vf-topic .reply-timeline-container .handle {
	font-size: 12px;
	font-weight: 600;
	color: var(--vf-dark-gray);
}

.vf-topic .reply-timeline-container .desc {
	display: block;
	font-size: 11px;
	font-weight: 300;
	color: var(--vf-muted);
}

/* -------------------------------------------------------------- sidebar */

.vf-topic .bb-topic-reply-link-wrap { margin: 0 0 20px; }

.vf-topic .bb-topic-reply-link-wrap a {
	display: block;
	padding: 12px 20px;
	background: var(--vf-blue);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	text-align: center;
}

.vf-topic .bb-topic-reply-link-wrap a:hover { background: #0f52cc; color: #fff; }
.vf-topic .bb-topic-reply-link-wrap.mobile-only { display: none; }

.vf-topic .widget_recent_discussions .widget-title {
	margin: 0 0 16px;
	font-size: 20px;
	line-height: 30px;
	font-weight: 500;
	letter-spacing: -0.02em;
	color: var(--vf-dark-gray);
}

.vf-topic .widget_recent_discussions ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.vf-topic .widget_recent_discussions li {
	padding: 14px 0;
	border-bottom: 1px solid var(--vf-line);
}

.vf-topic .widget_recent_discussions li:last-child { padding-bottom: 0; border-bottom: 0; }

.vf-topic .widget_recent_discussions .topic-title a {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 15px;
	line-height: 1.45;
	font-weight: 500;
	color: var(--vf-dark-gray);
}

.vf-topic .widget_recent_discussions .topic-title a:hover { color: var(--vf-blue); }

.vf-topic .topic-content {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px;
	margin-top: 6px;
	font-size: 12px;
	font-weight: 300;
	color: var(--vf-muted);
}

.vf-topic .topic-author-reply .bbp-author-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.vf-topic .topic-author-reply .avatar {
	width: 20px;
	height: 20px;
	border-radius: 50%;
}

.vf-topic .topic-author-reply .bbp-author-name {
	font-weight: 600;
	color: var(--vf-dark-gray);
}

/* ----------------------------------------------------------- responsive */

@media (max-width: 991px) {
	/* The rail is a convenience, not content — it goes first on narrow screens. */
	.vf-topic .bs-single-topic-sidebar { display: none; }
}

@media (max-width: 576px) {
	.vf-topic .bb-reply-topic-title { font-size: 24px; }
	.vf-topic .custom-box-like-share { gap: 16px; }
	.vf-topic .list-reply-content { padding-left: 0; }

	.vf-topic .bb-topic-reply-link-wrap.mobile-only {
		display: block;
		margin: 24px 0 0;
	}
}

/* ------------------------------------------------------------ báo cáo */

.vf-topic .vf-reply-actions {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}

.vf-report { position: relative; }

.vf-report__open {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
	min-height: 0;
	min-width: 0;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.4;
	color: var(--vf-muted);
	cursor: pointer;
	text-transform: none;
	letter-spacing: 0;
}

.vf-report__open:hover { background: none; color: #d63638; }
.vf-report__open:disabled { color: var(--vf-muted); opacity: 0.6; cursor: default; }

/**
 * The panel is positioned, not inline: an inline block would push every reply
 * below it down the page the moment somebody opened it.
 */
.vf-report__panel {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	z-index: 10;
	width: 280px;
	padding: 14px;
	background: #fff;
	border: 1px solid var(--vf-line);
	border-radius: 6px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}

.vf-report__panel[hidden] { display: none; }

.vf-report__title {
	margin: 0 0 10px;
	font-size: 13px;
	font-weight: 600;
	color: var(--vf-dark-gray);
}

.vf-report__reason {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 6px;
	font-size: 13px;
	font-weight: 300;
	color: var(--vf-dark-gray);
	cursor: pointer;
}

.vf-report__reason input { margin: 0; }

.vf-report__note {
	width: 100%;
	margin: 8px 0 10px;
	padding: 8px 10px;
	border: 1px solid var(--vf-line);
	border-radius: 4px;
	font-size: 13px;
	font-weight: 300;
}

.vf-report__actions { display: flex; gap: 8px; }

.vf-report__send,
.vf-report__cancel {
	min-height: 0;
	padding: 7px 14px;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 600;
	text-transform: none;
	letter-spacing: 0;
	line-height: 1.2;
}

.vf-report__send { background: #d63638; border: 1px solid #d63638; color: #fff; }
.vf-report__send:hover { background: #b32d2e; color: #fff; }
.vf-report__cancel { background: none; border: 1px solid var(--vf-line); color: var(--vf-muted); }

.vf-report__done,
.vf-report__error {
	margin: 0;
	font-size: 13px;
	font-weight: 300;
}

.vf-report__done { color: #207f4c; }
.vf-report__error { margin-top: 8px; color: #d63638; }

@media (max-width: 576px) {
	.vf-report__panel { left: auto; right: 0; width: min(280px, 78vw); }
}

/* Khối "Tạo thảo luận mới" dưới danh sách chủ đề, cho thành viên đã đăng nhập.
   Dùng lại nền của .bbp-no-topic để giống hệt khối dành cho khách. */
.bbp-new-topic .bp-feedback {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}

.bbp-new-topic .bp-feedback p {
	margin: 0;
	flex: 1 1 auto;
}

/* Nút chính, nên dùng xanh thương hiệu như mọi nút chính khác của site.
   Màu cyan cũ là màu duy nhất kiểu đó trong cả hai tệp CSS.

   text-decoration được đặt lại ngay tại đây, không dựa vào việc rule ở trên đã
   thu hẹp phạm vi: đây là nút, và nút thì không bao giờ gạch chân — dù sau này
   có ai thêm một rule link nào khác vào khối. */
.vf-new-topic-btn {
	display: inline-block;
	padding: 9px 20px;
	border-radius: 999px;
	background: var(--vf-blue);
	color: #fff;
	font-weight: 600;
	font-size: 14px;
	line-height: 1.4;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.2s;
}

.vf-new-topic-btn:hover,
.vf-new-topic-btn:focus {
	background: #0f52cc;
	color: #fff;
	text-decoration: none;
}

.vf-new-topic-note {
	flex: 1 1 100%;
	font-size: 13px;
	color: #767676;
}

/* Trả lời bị giữ lại vì chứa nhiều liên kết — xem inc/forum/setup.php. */
.vf-reply-held {
	margin: 0 0 16px;
	padding: 12px 16px;
	border-left: 3px solid #d9a300;
	background: #fff8e5;
	border-radius: 4px;
	font-size: 14px;
	line-height: 1.6;
}

.vf-reply-held strong {
	display: block;
	margin-bottom: 2px;
}

/* ------------------------------------------------- lời mời tham gia, đầu list */

/**
 * The one-line invitation above the topic list. See vf_forum_join_bar() in
 * inc/forum/listing.php for why it exists at the top as well as the bottom.
 *
 * Deliberately quieter than the box under the list: one sentence, two buttons,
 * no icon. It is the same offer, made where the decision is actually taken.
 */
.vf-join {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 16px;
	margin: 0 0 16px;
	padding: 14px 18px;
	border: 1px solid var(--vf-line);
	border-radius: 8px;
	background: #f4f8ff;
}

.vf-join__text {
	margin: 0;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.4;
	color: #101010;
}

.vf-join__actions {
	display: flex;
	flex-shrink: 0;
	gap: 8px;
}

.vf-join__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 38px;
	padding: 0 18px;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
	text-decoration: none;
	transition: background-color 0.2s, color 0.2s;
}

.vf-join__btn--fill {
	border: 1px solid var(--vf-blue, #1464f4);
	background: var(--vf-blue, #1464f4);
	color: #fff;
}

.vf-join__btn--fill:hover,
.vf-join__btn--fill:focus {
	background: #0f52cc;
	border-color: #0f52cc;
	color: #fff;
}

.vf-join__btn--outline {
	border: 1px solid var(--vf-blue, #1464f4);
	background: #fff;
	color: var(--vf-blue, #1464f4);
}

.vf-join__btn--outline:hover,
.vf-join__btn--outline:focus {
	background: var(--vf-blue, #1464f4);
	color: #fff;
}

/* Below this the sentence and the buttons stop sharing a line; the buttons take
   half each rather than huddling at one end of an empty row. */
@media (max-width: 599px) {
	.vf-join {
		flex-direction: column;
		align-items: stretch;
		padding: 14px;
	}

	.vf-join__actions { width: 100%; }
	.vf-join__actions .vf-join__btn { flex: 1 1 0; padding: 0 8px; }
}
