@import url("forum_shared.css?v=20261009d");
@import url("bbcode.css?v=20261009c");
@import url("../poll/poll.css");

.popup_forum {	
	background-image:url(../../images/general/forum/popup_forum.png);
}
.popup_clan { background-position:0px 0px; }
.popup_forumsearch { background-position:-29px 0px; }
.popup_forumoptions { background-position:-58px 0px; }
.popup_forumlastpost { background-position:-87px 0px; }

.post_edits {
	font-size: 0.82rem;
	line-height: 1.4;
	color: var(--muted);
}

.post_edits a {
	color: var(--muted);
}

.post_edits a:hover {
	color: var(--accent);
}

.post_number {
	display: inline-block;
	margin-left: 6px;
	padding: 0;
	font-size: 0.75rem;
	font-weight: 500;
	line-height: 1;
	letter-spacing: 0.02em;
	color: var(--muted);
	opacity: 0.72;
	vertical-align: middle;
	user-select: none;
}

.post_comment_field {
	margin: 5px; 
	padding: 10px; 
	border: 1px solid var(--border);
	background-color: var(--inset);
	border-radius: var(--radius);
}

/* Poll comment embed */
.forum_poll_comment {
	padding: 6px 2px 2px;
	text-align: left;
}

.forum_poll_comment .poll_panel {
	margin: 0;
}

.forum_poll_comment > .poll_panel > .poll_panel {
	margin: 0 0 14px;
	padding: 0;
	background: transparent;
	border: 0;
	box-shadow: none;
	border-radius: 0;
}

.forum_poll_comment .poll_detail_topic a {
	color: var(--text);
}

.forum_poll_comment .poll_detail_topic a:hover {
	color: var(--accent);
}

.forum_poll_comment .poll_form_actions {
	margin-top: 4px;
}

/* --- Thread posts --- */

.forum_posts {
	border-collapse: separate !important;
	border-spacing: 0 !important;
}

.forum_posts > tbody > tr.forum_post_spacer > td {
	height: 10px;
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
	line-height: 0;
	font-size: 0;
}

.forum_posts > tbody > tr.forum_post_head > td,
.forum_posts > tbody > tr.forum_post_body > td {
	border-bottom: 0 !important;
	vertical-align: top;
}

.forum_posts > tbody > tr.forum_post_head > td {
	padding: 12px 14px 10px !important;
	background: var(--surface-2);
	border-top: 1px solid var(--border);
	border-bottom: 1px solid var(--border) !important;
}

.forum_posts > tbody > tr.forum_post_body > td {
	padding: 12px 14px 16px !important;
	background: var(--surface);
	border-bottom: 1px solid var(--border) !important;
}

.forum_posts > tbody > tr.forum_post_head > td:first-child,
.forum_posts > tbody > tr.forum_post_body > td:first-child {
	border-left: 1px solid var(--border);
	width: 200px !important;
	max-width: 220px;
}

.forum_posts > tbody > tr.forum_post_head > td:last-child,
.forum_posts > tbody > tr.forum_post_body > td:last-child {
	border-right: 1px solid var(--border);
}

.forum_posts > tbody > tr.forum_post_head > td:first-child {
	border-radius: var(--radius) 0 0 0;
}

.forum_posts > tbody > tr.forum_post_head > td:last-child {
	border-radius: 0 var(--radius) 0 0;
}

.forum_posts > tbody > tr.forum_post_body > td:first-child {
	border-radius: 0 0 0 var(--radius);
	background: var(--inset);
	border-right: 1px solid var(--border);
}

.forum_posts > tbody > tr.forum_post_body > td:last-child {
	border-radius: 0 0 var(--radius) 0;
}

.forum_posts > tbody > tr.forum_post_head:hover > td,
.forum_posts > tbody > tr.forum_post_body:hover > td {
	background-color: inherit;
}

/* Author row: flag + nick + pm, no wrap */
.forum_post_author {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
	max-width: 100%;
}

.forum_post_flag {
	flex: 0 0 auto;
	width: 16px !important;
	height: auto !important;
	max-width: 16px !important;
	border-radius: 2px;
}

.forum_post_nick {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-weight: 650;
	color: var(--text);
	line-height: 1.3;
}

.forum_post_nick:hover {
	color: var(--accent);
}

.forum_post_psms {
	flex: 0 0 auto;
	line-height: 0;
}

.forum_post_date {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	font-size: 0.86rem;
	color: var(--muted);
	line-height: 1.4;
}

.forum_post_date img[src*="forum/post.gif"] {
	display: none;
}

.forum_post_date .post_edits {
	flex: 1 1 100%;
}

.forum_post_actions {
	white-space: nowrap;
}

/* Sidebar */
.forum_post_sidebar_inner {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	min-width: 0;
}

.forum_post_roles {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	max-width: 100%;
}

.forum_role,
.forum_badge {
	display: inline-flex;
	align-items: center;
	max-width: 100%;
	padding: 3px 8px;
	border: 1px solid var(--border);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.04);
	color: var(--muted);
	font-size: 0.72rem;
	font-weight: 650;
	letter-spacing: 0.02em;
	line-height: 1.2;
	white-space: nowrap;
}

.forum_role--admin {
	border-color: rgba(255, 176, 32, 0.45);
	background: rgba(255, 176, 32, 0.1);
	color: var(--orange);
}

.forum_badge--unread {
	flex: 0 0 auto;
	border-color: rgba(61, 214, 140, 0.45);
	background: rgba(61, 214, 140, 0.12);
	color: var(--green);
	letter-spacing: 0.03em;
}

.forum_badge--mod {
	border-color: rgba(62, 207, 255, 0.45);
	background: rgba(62, 207, 255, 0.12);
	color: var(--accent);
}

.forum_post_clan {
	display: inline-block;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--text);
}

.forum_post_clan:hover {
	color: var(--accent);
}

.forum_post_avatar_row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.forum_post_avatar {
	display: block;
	width: 48px !important;
	height: 48px !important;
	max-width: 48px !important;
	object-fit: cover;
	border: 1px solid var(--border);
	border-radius: 8px;
	background: var(--field);
}

.forum_post_rank {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
	width: 100%;
	max-width: 100%;
	font-size: 0.82rem;
	line-height: 1.35;
	color: var(--muted);
}

.forum_rank_name {
	display: inline-block;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--text);
}

.forum_post_rank img[src*="forum/rankpics/"] {
	display: block;
	width: auto !important;
	max-width: 100% !important;
	height: auto !important;
}

.forum_post_rank img[src*="topposter/"] {
	display: inline-block;
	width: 12px !important;
	height: 12px !important;
	max-width: 12px !important;
}

/* Rank progress bar */
.forum_rank_progress {
	display: block;
	width: 100%;
	max-width: 100%;
	height: 8px;
	overflow: hidden;
	border: 1px solid var(--border);
	border-radius: 999px;
	background: var(--bg);
	box-sizing: border-box;
}

.forum_rank_progress_bar {
	display: block;
	height: 100%;
	min-width: 0;
	border-radius: inherit;
	background: linear-gradient(90deg, #2a9bb8 0%, var(--accent) 100%);
	box-shadow: 0 0 10px var(--accent-glow);
}

.forum_post_content {
	font-size: 0.95rem;
	line-height: 1.55;
	color: var(--text);
	word-break: break-word;
	overflow-wrap: anywhere;
}

.forum_post_content img {
	max-width: 100%;
	height: auto;
}

/* Fallback: legacy gif badges on other forum pages */
td:has(> img[src*="forum/new_post.gif"])::after,
div:has(> img[src*="forum/new_post.gif"])::after {
	content: "Ungelesen";
	display: inline-flex;
	align-items: center;
	padding: 3px 8px;
	border: 1px solid rgba(61, 214, 140, 0.45);
	border-radius: 999px;
	background: rgba(61, 214, 140, 0.12);
	color: var(--green);
	font-size: 0.72rem;
	font-weight: 650;
	letter-spacing: 0.03em;
	line-height: 1.2;
}

td:has(> img[src*="forum/new_post.gif"]) > img,
div:has(> img[src*="forum/new_post.gif"]) > img {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	opacity: 0 !important;
	pointer-events: none;
}

.forum_post_roles img[src*="forum/moderator.gif"] {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	opacity: 0 !important;
	pointer-events: none;
}

td:has(> img[src*="forum/moderator.gif"])::after {
	content: "Moderator";
	display: inline-flex;
	align-items: center;
	padding: 3px 8px;
	border: 1px solid rgba(62, 207, 255, 0.45);
	border-radius: 999px;
	background: rgba(62, 207, 255, 0.12);
	color: var(--accent);
	font-size: 0.72rem;
	font-weight: 650;
	letter-spacing: 0.02em;
	line-height: 1.2;
	white-space: nowrap;
}

/* Hide only the old within-rank status PNGs; keep rankpics visible */
.forum_posts img[src*="forum/rankstatus/"] {
	display: none !important;
}

@media (max-width: 720px) {
	.forum_posts > tbody > tr.forum_post_head,
	.forum_posts > tbody > tr.forum_post_body {
		display: block;
	}

	.forum_posts > tbody > tr.forum_post_head > td,
	.forum_posts > tbody > tr.forum_post_body > td {
		display: block;
		width: 100% !important;
		max-width: 100%;
		border-left: 1px solid var(--border) !important;
		border-right: 1px solid var(--border) !important;
		border-radius: 0 !important;
	}

	.forum_posts > tbody > tr.forum_post_head > td:first-child {
		border-radius: var(--radius) var(--radius) 0 0 !important;
	}

	.forum_posts > tbody > tr.forum_post_body > td:first-child {
		border-right: 1px solid var(--border) !important;
		border-bottom: 0 !important;
	}

	.forum_posts > tbody > tr.forum_post_body > td:last-child {
		border-radius: 0 0 var(--radius) var(--radius) !important;
	}
}
