/* ==========================================================
   Uni-Forum — Konu gösterimi ve mesajlar (postbit)
   ACP'de yeni stil dosyası: uf-showthread.css
   Özel dosyalar: showthread.php, newreply.php, newthread.php,
                  editpost.php, private.php, announcements.php
   ========================================================== */

:root {
	--uf-accent: #2ecc9a;
	--uf-navy: #2c3e50;
	--uf-ink: #1f2d3a;
	--uf-muted: #52606d;
	--uf-line: #e4e9ef;
	--uf-soft: #f6f8fa;
}

/* Üst/alt çubuk (sayfalar + Cevap yaz) */
.uf-tl-bar {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
	gap: 10px 16px;
	margin: 0 0 14px;
	font-family: 'Nunito', system-ui, -apple-system, sans-serif;
}
.uf-tl-bar .pagination { padding: 0; margin: 0; }
.uf-tl-bar .pagination a,
.uf-tl-bar .pagination .pagination_current { border-radius: 8px; padding: 6px 10px; }
.uf-tl-bar .pagination .pagination_current { background: var(--uf-navy); color: #fff; }
.uf-tl-new a.button,
.uf-tl-new a.button:visited {
	display: inline-flex; align-items: center; gap: 8px;
	min-height: 44px;
	padding: 0 20px;
	border: 0;
	border-radius: 12px;
	background: var(--uf-accent);
	color: var(--uf-ink);
	font-family: inherit;
	font-size: 15px;
	font-weight: 800;
	text-decoration: none;
	box-shadow: none;
	text-shadow: none;
}
.uf-tl-new a.button:hover { background: #27b588; color: var(--uf-ink); }
.uf-tl-new a.button span { color: inherit; }

/* Konu kartı */
.uf-thread {
	margin: 0 0 16px;
	font-family: 'Nunito', system-ui, -apple-system, sans-serif;
	text-align: left;
}
.uf-thread-head {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
	gap: 10px 16px;
	margin: 0 0 16px;
	padding: 18px 22px;
	border-radius: 20px;
	background: var(--uf-navy);
	color: #fff;
}
.uf-thread-head .uf-thread-title {
	margin: 0;
	font-family: inherit;
	font-size: 22px;
	font-weight: 800;
	line-height: 1.35;
	color: #fff;
	flex: 1 1 400px;
	min-width: 0;
}
.uf-thread-tools { display: flex; align-items: center; gap: 10px; }
.uf-thread-tools a,
.uf-thread-tools a:visited { color: #fff; }
.uf-thread-mode {
	width: 36px; height: 36px;
	display: inline-flex; align-items: center; justify-content: center;
	border-radius: 10px;
	background: rgba(255, 255, 255, .12);
}
.uf-thread-mode:hover { background: rgba(255, 255, 255, .22); }
.uf-thread-tools .float_right { float: none; }

.uf-thread-foot {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
	gap: 10px;
	padding: 12px 4px 0;
}
.uf-thread-foot a.uf-thread-nav,
.uf-thread-foot a.uf-thread-nav:visited {
	display: inline-flex; align-items: center; gap: 8px;
	min-height: 40px;
	padding: 0 14px;
	border: 1px solid var(--uf-line);
	border-radius: 12px;
	background: #fff;
	color: var(--uf-ink);
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
}
.uf-thread-foot a.uf-thread-nav:hover { border-color: #c3cdd8; }

/* ===== Mesaj kartı ===== */
.post.uf-post {
	display: grid;
	grid-template-columns: 200px minmax(0, 1fr);
	margin: 0 0 16px;
	padding: 0;
	border: 1px solid var(--uf-line);
	border-radius: 20px;
	overflow: hidden;
	background: #fff;
	color: var(--uf-ink);
	font-family: 'Nunito', system-ui, -apple-system, sans-serif;
	font-size: 15px;
	text-align: left;
}
.post.uf-post.unapproved_post { background: #fff4f5; border-color: #ffc9cf; }
.post.uf-post.deleted_post { background: #f4f0ff; }

/* Yazar sütunu */
.uf-post .uf-post-author {
	float: none;
	width: auto !important;
	margin: 0 !important;
	padding: 22px 16px;
	border: 0;
	border-right: 1px solid var(--uf-line);
	border-radius: 0;
	background: var(--uf-soft);
	text-align: center;
	line-height: 1.4;
}
.uf-post .uf-avatar { float: none !important; margin: 0 0 10px; text-align: center; }
.post.uf-post .post_author div.author_avatar img,
.uf-post .uf-avatar img {
	width: 96px !important;
	height: 96px !important;
	padding: 0 !important;
	border: 3px solid #fff !important;
	border-radius: 50%;
	box-shadow: 0 2px 8px rgba(31, 45, 58, .12);
	object-fit: cover;
	background: #fff;
}
.uf-post .uf-author-info { float: none !important; padding: 0 !important; text-align: center; }
.uf-post .uf-author-name {
	display: inline-flex; align-items: center; gap: 6px;
	font-size: 16px; font-weight: 800;
}
.uf-post .uf-author-name a { font-family: inherit; font-size: 16px; font-weight: 800; text-decoration: none; }
.uf-post .uf-online { width: 9px; height: 9px; border-radius: 50%; background: #c3cdd8; display: inline-block; flex: none; }
.uf-post .uf-online.is-online { background: #2ecc71; }
.uf-post .uf-author-title { margin-top: 2px; font-size: 13px; color: var(--uf-muted); }
.uf-post .uf-author-title:empty { display: none; }
.uf-post .uf-author-group { margin-top: 6px; }
.uf-post .uf-author-group:empty { display: none; }
.uf-post .uf-author-group img { max-width: 100%; height: auto; }

.uf-post .uf-author-stats {
	float: none !important;
	margin: 14px 0 0 !important;
	padding: 12px 0 0 !important;
	border-top: 1px solid var(--uf-line) !important;
	font-size: 12px;
	line-height: 1.5;
	color: var(--uf-muted);
	text-align: left;
}
.uf-post .uf-stat-row { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; }
.uf-post .uf-stat-row span:last-child { font-weight: 700; color: var(--uf-ink); text-align: right; }
.uf-post .uf-author-stats br { display: none; }

/* Mesaj sütunu */
.uf-post .uf-post-main { display: flex; flex-direction: column; min-width: 0; }
.uf-post .uf-post-head {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
	gap: 6px 12px;
	padding: 12px 22px;
	border-bottom: 1px solid var(--uf-line);
	font-size: 13px;
	color: var(--uf-muted);
}
.uf-post .uf-post-head .post_date { color: var(--uf-muted); }
.uf-post .uf-post-head .post_edit,
.uf-post .uf-post-head .edited_post,
.uf-post .uf-post-head .edited_post a { font-size: 12px; color: #7b8794; }
.uf-post .uf-post-head-right { display: inline-flex; align-items: center; gap: 10px; }
.uf-post .uf-post-head-right a,
.uf-post .uf-post-head-right strong a {
	display: inline-flex; align-items: center;
	min-height: 26px;
	padding: 0 10px;
	border-radius: 99px;
	background: #eef1f5;
	color: var(--uf-navy);
	font-size: 12px;
	font-weight: 800;
	text-decoration: none;
}

.uf-post .uf-post-content {
	float: none !important;
	width: auto !important;
	margin: 0 !important;
	padding: 20px 22px 16px !important;
	flex: 1 1 auto;
}
.uf-post .post_body {
	padding: 0;
	font-size: 15px;
	line-height: 1.7;
	color: var(--uf-ink);
	word-wrap: break-word;
	overflow-wrap: anywhere;
}
.uf-post .post_body img { max-width: 100%; height: auto; }
.uf-post .post_body blockquote {
	margin: 10px 0;
	padding: 12px 16px;
	border: 0;
	border-radius: 12px;
	background: #f1f4f7;
	color: var(--uf-ink);
}
.uf-post .post_body blockquote cite { display: block; margin-bottom: 6px; font-style: normal; font-weight: 800; color: var(--uf-navy); border: 0; }
.uf-post .post_body .codeblock { border-radius: 12px; border: 1px solid var(--uf-line); background: #f8fafc; }

.uf-post .uf-attachments {
	margin: 18px 0 0;
	padding: 14px 16px;
	border: 1px solid var(--uf-line);
	border-radius: 14px;
	background: var(--uf-soft);
	font-size: 14px;
}
.uf-post .uf-attachments-title { margin-bottom: 8px; font-size: 13px; font-weight: 800; color: var(--uf-muted); }
.uf-post .uf-attachments img { max-width: 100%; height: auto; border-radius: 8px; }

.uf-post .uf-signature {
	position: static;
	margin: 20px 0 0;
	padding: 12px 0 0;
	border: 0;
	border-top: 1px dashed #d5dde6;
	font-size: 13px;
	line-height: 1.5;
	color: var(--uf-muted);
	text-align: left;
	max-height: 140px;
	overflow: hidden;
}
.uf-post .uf-signature img { max-width: 100%; max-height: 110px; height: auto; }
.uf-post .uf-post-status:empty { display: none; }

/* Butonlar */
.uf-post .uf-post-controls {
	display: flex !important; flex-wrap: wrap; align-items: center; justify-content: space-between;
	gap: 6px 10px;
	width: auto !important;
	margin: 0 !important;
	padding: 10px 16px !important;
	border-top: 1px solid var(--uf-line);
	background: #fff !important;
	text-align: left !important;
}
.uf-post .postbit_buttons { display: flex; flex-wrap: wrap; gap: 6px; float: none; }
.uf-post .postbit_buttons > a:link,
.uf-post .postbit_buttons > a:visited {
	display: inline-flex; align-items: center;
	min-height: 34px;
	margin: 0;
	padding: 0 12px;
	border: 0;
	border-radius: 10px;
	background: #eef1f5;
	color: var(--uf-ink);
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
	text-shadow: none;
	box-shadow: none;
}
.uf-post .postbit_buttons > a:hover { background: var(--uf-navy); color: #fff; text-shadow: none; box-shadow: none; }
.uf-post .postbit_buttons a span { font-size: 13px; }
.uf-post .postbit_buttons a span:before { margin-right: 6px; }

/* Hızlı cevap */
table.uf-qr {
	width: 100%;
	margin: 16px 0;
	border: 1px solid var(--uf-line);
	border-collapse: separate;
	border-spacing: 0;
	border-radius: 20px;
	overflow: hidden;
	background: #fff;
	font-family: 'Nunito', system-ui, -apple-system, sans-serif;
}
table.uf-qr .thead { padding: 14px 22px; background: var(--uf-navy); text-align: left; font-size: 15px; font-weight: 800; }
table.uf-qr td.trow1,
table.uf-qr td.trow2 { padding: 18px 22px; background: #fff; border: 0; text-align: left; vertical-align: top; font-size: 13px; color: var(--uf-muted); }
table.uf-qr .uf-qr-box { width: 100%; }
table.uf-qr .uf-qr-box textarea {
	width: 100% !important;
	box-sizing: border-box;
	min-height: 140px;
	max-width: 100% !important;
	min-width: 0;
	padding: 14px 16px;
	border: 2px solid #d5dde6;
	border-radius: 14px;
	font-family: inherit;
	font-size: 15px;
	color: var(--uf-ink);
	resize: vertical;
}
table.uf-qr .uf-qr-box textarea:focus { outline: none; border-color: var(--uf-navy); }
table.uf-qr td.tfoot { padding: 12px 22px 18px; background: #fff; border: 0; text-align: right; }
table.uf-qr td.tfoot input.button {
	min-height: 44px;
	padding: 0 22px;
	border: 2px solid #d5dde6;
	border-radius: 12px;
	background: #fff;
	color: var(--uf-ink);
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
}
table.uf-qr td.tfoot input#quick_reply_submit { border: 0; background: var(--uf-accent); font-weight: 800; }

/* Alt araçlar */
.uf-thread-bottom {
	display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start;
	gap: 16px;
	margin: 16px 0;
	font-family: 'Nunito', system-ui, -apple-system, sans-serif;
	text-align: left;
}
.uf-thread-bottom ul.thread_tools { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.uf-thread-bottom ul.thread_tools li { font-size: 13px; margin: 0; padding: 0; }
.uf-thread-mod { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }

/* ===== Telefon ===== */
@media (max-width: 768px) {
	.uf-thread-head { padding: 14px 16px; border-radius: 16px; }
	.uf-thread-head .uf-thread-title { font-size: 18px; flex-basis: 100%; }

	.post.uf-post { grid-template-columns: 1fr; border-radius: 16px; }
	.uf-post .uf-post-author {
		display: flex; align-items: center; gap: 12px;
		padding: 12px 14px;
		border-right: 0;
		border-bottom: 1px solid var(--uf-line);
		text-align: left;
	}
	.uf-post .uf-avatar { margin: 0; }
	.post.uf-post .post_author div.author_avatar img,
	.uf-post .uf-avatar img { width: 44px !important; height: 44px !important; border-width: 2px !important; }
	.uf-post .uf-author-info { text-align: left; }
	.uf-post .uf-author-group { margin-top: 2px; }
	.uf-post .uf-author-group img { max-height: 18px; width: auto; }
	.uf-post .uf-author-stats { display: none; }
	.uf-post .uf-post-head { padding: 10px 14px; }
	.uf-post .uf-post-content { padding: 14px !important; }
	.uf-post .post_body { font-size: 15px; }
	.uf-post .uf-post-controls { padding: 8px 10px !important; }
	.uf-post .postbit_buttons a span { font-size: 0; }
	.uf-post .postbit_buttons a span:before { margin: 0; font-size: 14px; }
	.uf-post .postbit_buttons > a:link,
	.uf-post .postbit_buttons > a:visited { min-height: 40px; min-width: 40px; justify-content: center; padding: 0 10px; }

	table.uf-qr, table.uf-qr thead, table.uf-qr tbody, table.uf-qr tr { display: block; width: 100% !important; box-sizing: border-box; }
	table.uf-qr td { display: block; width: 100% !important; box-sizing: border-box; }
	table.uf-qr td.mobile-hide { display: none; }
	table.uf-qr td.trow1, table.uf-qr td.trow2 { padding: 14px; }
}

/* Mesajdaki ayırıcı çizgi ([hr]) */
.uf-post .post_body hr,
.uf-post .post_body hr.mycode_hr {
	height: 0;
	margin: 16px 0;
	border: 0;
	border-top: 1px solid #d5dde6;
	background: none;
	color: transparent;
}
/* Hızlı cevap: Önizle butonunun çerçevesi */
table.uf-qr td.tfoot input.button[name="previewpost"] {
	border: 2px solid #d5dde6 !important;
	background: #fff !important;
	color: #1f2d3a !important;
	margin-left: 8px;
}

/* Hızlı cevap butonu (mesajın altında) */
.uf-post .postbit_buttons a.postbit_quickreply span:before {
	content: "\f3e5";
	font-family: "Font Awesome 5 Free";
	font-weight: 900;
}
.uf-post .postbit_buttons > a.postbit_quickreply:link,
.uf-post .postbit_buttons > a.postbit_quickreply:visited { background: #e6f8f1; color: #1f2d3a; }
.uf-post .postbit_buttons > a.postbit_quickreply:hover { background: var(--uf-accent); color: #1f2d3a; }

/* Etiketler (konunun altında) */
.uf-thread-tags { margin: 0 0 12px; }
.uf-thread-tags:empty { display: none; }
.uf-thread-tags table.tborder,
.uf-thread-tags .tborder { width: 100%; border-radius: 16px; overflow: hidden; border: 1px solid var(--uf-line); }
.uf-thread-tags .thead { padding: 10px 18px; font-size: 13px; text-align: left; }
.uf-thread-tags td { text-align: left; }
/* Sayfada hızlı cevap kutusu yoksa (ziyaretçi, kapalı konu, ÖM) "Hızlı cevap" butonu gizlenir */
body:not(:has(#quick_reply_form)) .uf-post a.postbit_quickreply { display: none !important; }
