/* ==========================================================================
   Best Users PRO v2.7 - onlineodev.com (Snow / FatSnowFlat Tam Uyumlu)
   Tema sınıflarına (qa-sidepanel, qa-widget-side vb.) müdahale etmez.
   ========================================================================== */

.q2apro-bu-page,
.q2apro-bu-widget {
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
	color: #1e293b;
	line-height: 1.4;
}

.q2apro-bu-page {
	display: block;
	width: auto;
	max-width: 100%;
}

.q2apro-bu-page *,
.q2apro-bu-widget * {
	box-sizing: border-box;
}

.q2apro-bu-svg {
	width: 16px;
	height: 16px;
	min-width: 16px;
	min-height: 16px;
	flex-shrink: 0;
	display: inline-block;
	vertical-align: middle;
	overflow: visible;
}

/* --- Ödüller Kutusu --- */
.q2apro-bu-rewards {
	background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
	border: 1px solid #fde68a;
	border-left: 4px solid #f59e0b;
	border-radius: 10px;
	padding: 14px 16px;
	margin-bottom: 18px;
	box-shadow: 0 1px 4px rgba(245, 158, 11, 0.08);
}

.q2apro-bu-rewards-head {
	display: flex;
	align-items: center;
	gap: 7px;
	font-size: 14px;
	font-weight: 700;
	color: #92400e;
	margin-bottom: 8px;
}

.q2apro-bu-rewards-head .q2apro-bu-svg {
	color: #d97706;
}

.q2apro-bu-rewards-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.q2apro-bu-rewards-item {
	background: #ffffff;
	border: 1px solid #fcd34d;
	border-radius: 6px;
	padding: 5px 10px;
	font-size: 12.5px;
	font-weight: 600;
	color: #78350f;
}

.q2apro-bu-rewards-compact {
	margin: 10px 0 0 0;
	padding: 10px;
}

.q2apro-bu-rewards-compact .q2apro-bu-rewards-list {
	flex-direction: column;
	gap: 5px;
}

.q2apro-bu-rewards-compact .q2apro-bu-rewards-item {
	padding: 4px 8px;
	font-size: 11.5px;
}

/* --- Üst Dönem Seçici Çubuğu (Sıralama Sayfaları) --- */
.q2apro-bu-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 12px 14px;
	margin-bottom: 18px;
}

.q2apro-bu-period-title {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 15px;
	font-weight: 700;
	color: #0f172a;
}

.q2apro-bu-period-title .q2apro-bu-svg {
	color: #2563eb;
	width: 18px;
	height: 18px;
}

.q2apro-bu-picker-form {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
}

.q2apro-bu-navbtn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 8px;
	background: #ffffff;
	border: 1px solid #cbd5e1;
	color: #334155 !important;
	text-decoration: none !important;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.q2apro-bu-navbtn:hover {
	background: #eff6ff;
	border-color: #3b82f6;
	color: #1d4ed8 !important;
}

.q2apro-bu-navbtn.is-disabled {
	opacity: 0.4;
	cursor: not-allowed;
	pointer-events: none;
}

.q2apro-bu-select-wrap {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #ffffff;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	padding: 0 10px;
	height: 32px;
	color: #475569;
}

.q2apro-bu-select-wrap .q2apro-bu-svg {
	width: 14px;
	height: 14px;
	color: #2563eb;
}

.q2apro-bu-select {
	border: none !important;
	background: transparent !important;
	font-size: 13px;
	font-weight: 600;
	color: #0f172a;
	padding: 3px 2px;
	cursor: pointer;
	outline: none;
}

.q2apro-bu-todaybtn {
	display: inline-flex;
	align-items: center;
	height: 32px;
	padding: 0 11px;
	border-radius: 8px;
	background: #2563eb;
	color: #ffffff !important;
	font-size: 12px;
	font-weight: 600;
	text-decoration: none !important;
}

.q2apro-bu-todaybtn:hover {
	background: #1d4ed8;
}

/* --- Sıralama Tablosu (Sayfa) --- */
.q2apro-bu-table-wrap {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	box-shadow: 0 1px 6px rgba(15, 23, 42, 0.04);
}

.q2apro-bu-table {
	width: 100%;
	border-collapse: collapse;
	margin: 0;
}

.q2apro-bu-table thead th {
	background: #f8fafc;
	color: #475569;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	padding: 11px 12px;
	text-align: left;
	border-bottom: 1px solid #e2e8f0;
}

.q2apro-bu-table thead th.q2apro-bu-th-rank {
	width: 64px;
	text-align: center;
}

.q2apro-bu-table thead th.q2apro-bu-th-score {
	text-align: right;
	width: 140px;
}

.q2apro-bu-row td {
	padding: 10px 12px;
	border-bottom: 1px solid #f1f5f9;
	vertical-align: middle;
	font-size: 13.5px;
}

.q2apro-bu-row:last-child td {
	border-bottom: none;
}

.q2apro-bu-row:hover {
	background-color: #f8fafc;
}

.q2apro-bu-top-1 { background-color: #fffdf5; }
.q2apro-bu-top-2 { background-color: #f8fafc; }
.q2apro-bu-top-3 { background-color: #fff9f5; }

.q2apro-bu-count {
	text-align: center;
}

.q2apro-bu-rankbadge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	min-width: 30px;
	height: 26px;
	padding: 0 7px;
	border-radius: 999px;
	background: #f1f5f9;
	color: #475569;
	font-weight: 700;
	font-size: 12.5px;
}

.q2apro-bu-rankbadge .q2apro-bu-svg {
	width: 13px;
	height: 13px;
}

.q2apro-bu-top-1 .q2apro-bu-rankbadge {
	background: #fef3c7;
	color: #b45309;
	border: 1px solid #fcd34d;
}

.q2apro-bu-top-2 .q2apro-bu-rankbadge {
	background: #e2e8f0;
	color: #334155;
	border: 1px solid #cbd5e1;
}

.q2apro-bu-top-3 .q2apro-bu-rankbadge {
	background: #ffedd5;
	color: #c2410c;
	border: 1px solid #fdba74;
}

.q2apro-bu-usercell {
	display: flex;
	align-items: center;
	gap: 9px;
}

.q2apro-bu-usercell img {
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid #e2e8f0;
	flex-shrink: 0;
	display: block;
}

.q2apro-bu-top-1 .q2apro-bu-usercell img { border-color: #f59e0b; }
.q2apro-bu-top-2 .q2apro-bu-usercell img { border-color: #94a3b8; }
.q2apro-bu-top-3 .q2apro-bu-usercell img { border-color: #ea580c; }

.q2apro-bu-username {
	min-width: 0;
	word-break: normal !important;
	overflow-wrap: break-word;
}

.q2apro-bu-username a {
	font-weight: 600;
	color: #0f172a;
	text-decoration: none;
	word-break: normal !important;
	overflow-wrap: break-word;
}

.q2apro-bu-username a:hover {
	color: #2563eb;
	text-decoration: underline;
}

.q2apro-bu-score {
	text-align: right;
	white-space: nowrap;
}

.q2apro-bu-points {
	display: inline-block;
	background: #eff6ff;
	color: #1d4ed8;
	border: 1px solid #bfdbfe;
	border-radius: 999px;
	padding: 3px 9px;
	font-size: 12.5px;
	font-weight: 700;
}

.q2apro-bu-acount {
	display: block;
	margin-top: 3px;
	font-size: 11.5px;
	color: #64748b;
}

.q2apro-bu-location,
.q2apro-bu-about {
	font-size: 12.5px;
	color: #475569;
	max-width: 220px;
	word-break: break-word;
}

/* --- Boş Durum --- */
.q2apro-bu-empty {
	text-align: center;
	padding: 32px 16px;
	background: #f8fafc;
	border: 1px dashed #cbd5e1;
	border-radius: 10px;
	color: #64748b;
}

.q2apro-bu-empty .q2apro-bu-svg {
	width: 32px;
	height: 32px;
	color: #94a3b8;
	margin-bottom: 8px;
}

.q2apro-bu-empty p {
	margin: 0;
	font-size: 13.5px;
}

/* --- Alt Aksiyon Butonu --- */
.q2apro-bu-footer-actions {
	margin: 20px 0 10px 0;
}

.q2apro-bu-btn-primary {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 9px 16px;
	border-radius: 8px;
	background: #2563eb;
	color: #ffffff !important;
	font-size: 13.5px;
	font-weight: 600;
	text-decoration: none !important;
}

.q2apro-bu-btn-primary:hover {
	background: #1d4ed8;
}

/* ==========================================================================
   Kenar Çubuğu Bileşeni (Dar Sidebar'a Tam Uyumlu Kompakt Tasarım)
   ========================================================================== */
.q2apro-bu-widget {
	display: block;
	float: none;
	clear: right;
	overflow: hidden;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	position: relative;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 10px 8px;
	margin: 10px 0 14px 0;
	box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

/* Kenar çubuğu kutusu zaten kendi çerçeve ve boşluğuna sahip olduğu için çift kutu daralmasını kaldır */
.qa-widget-side .q2apro-bu-widget {
	border: none;
	box-shadow: none;
	background: transparent;
	padding: 2px 0;
	margin: 0;
}

.q2apro-bu-whead {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
	padding-bottom: 9px;
	margin-bottom: 10px;
	border-bottom: 1px solid #f1f5f9;
}

.q2apro-bu-wtitle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	font-weight: 700;
	color: #0f172a !important;
	text-decoration: none !important;
}

.q2apro-bu-wtitle .q2apro-bu-svg {
	color: #f59e0b;
	width: 16px;
	height: 16px;
}

.q2apro-bu-wtitle:hover {
	color: #2563eb !important;
}

.q2apro-bu-wperiod {
	font-size: 11px;
	font-weight: 600;
	color: #64748b;
	background: #f1f5f9;
	padding: 2px 7px;
	border-radius: 999px;
	white-space: nowrap;
}

.q2apro-bu-wlist {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	display: flex;
	flex-direction: column;
	gap: 7px;
}

.q2apro-bu-witem {
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 6px 8px;
	border-radius: 7px;
	background: #f8fafc;
	border: 1px solid #f1f5f9;
	min-width: 0;
}

.q2apro-bu-witem:hover {
	background: #eff6ff;
	border-color: #dbeafe;
}

.q2apro-bu-wrank {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 21px;
	height: 21px;
	border-radius: 50%;
	background: #e2e8f0;
	color: #475569;
	font-size: 11px;
	font-weight: 700;
	flex-shrink: 0;
}

.q2apro-bu-rank-1 .q2apro-bu-wrank {
	background: #fef3c7;
	color: #b45309;
	border: 1px solid #f59e0b;
}

.q2apro-bu-rank-2 .q2apro-bu-wrank {
	background: #e2e8f0;
	color: #334155;
	border: 1px solid #94a3b8;
}

.q2apro-bu-rank-3 .q2apro-bu-wrank {
	background: #ffedd5;
	color: #c2410c;
	border: 1px solid #fb923c;
}

.q2apro-bu-wavatar {
	flex-shrink: 0;
	line-height: 0;
}

.q2apro-bu-wavatar a,
.q2apro-bu-wavatar img {
	display: block;
	float: none !important;
	margin: 0 !important;
}

.q2apro-bu-wavatar img {
	width: 26px !important;
	height: 26px !important;
	border-radius: 50%;
	object-fit: cover;
	border: 1px solid #cbd5e1;
}

.q2apro-bu-winfo {
	flex: 1;
	min-width: 0;
}

.q2apro-bu-wname {
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1.3;
	white-space: normal;
	overflow: visible;
	text-overflow: clip;
	word-break: break-word;
	overflow-wrap: anywhere;
}

.q2apro-bu-wname a {
	color: #0f172a;
	text-decoration: none;
}

.q2apro-bu-wname a:hover {
	color: #2563eb;
}

.q2apro-bu-wsub {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 5px;
	margin-top: 3px;
}

.q2apro-bu-wmeta {
	font-size: 11px;
	color: #64748b;
	white-space: normal;
	line-height: 1.25;
}

.q2apro-bu-wpoints {
	font-size: 11px;
	font-weight: 700;
	color: #1d4ed8;
	background: #eff6ff;
	border: 1px solid #bfdbfe;
	padding: 2px 6px;
	border-radius: 999px;
	white-space: nowrap;
	flex-shrink: 0;
}

.q2apro-bu-wpoints em {
	font-style: normal;
	font-weight: 500;
	font-size: 10px;
}

.q2apro-bu-wempty {
	font-size: 12.5px;
	color: #64748b;
	text-align: center;
	padding: 12px 6px;
}

.q2apro-bu-wfoot {
	margin-top: 10px;
	padding-top: 8px;
	border-top: 1px solid #f1f5f9;
	text-align: right;
}

.q2apro-bu-wlink {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	font-size: 12px;
	font-weight: 600;
	color: #2563eb !important;
	text-decoration: none !important;
}

.q2apro-bu-wlink:hover {
	text-decoration: underline !important;
}

.q2apro-bu-wlink .q2apro-bu-svg {
	width: 13px;
	height: 13px;
}

/* ==========================================================================
   Tablet ve Mobil Uyumluluk (Sıfır Yatay Taşma - iPhone Safari dahil)
   ========================================================================== */
@media (max-width: 979px) {
	.q2apro-bu-widget {
		clear: both;
		float: none;
		width: 100%;
		max-width: 100%;
		min-width: 0;
		margin: 12px 0;
		padding: 10px;
		overflow: hidden;
	}

	.q2apro-bu-whead,
	.q2apro-bu-wlist,
	.q2apro-bu-witem,
	.q2apro-bu-wfoot,
	.q2apro-bu-rewards {
		max-width: 100%;
		min-width: 0;
	}

	.q2apro-bu-winfo {
		flex: 1 1 0%;
		min-width: 0;
		overflow: hidden;
	}

	.q2apro-bu-wname,
	.q2apro-bu-wmeta {
		max-width: 100%;
		overflow: visible;
		text-overflow: clip;
		white-space: normal;
		word-break: break-word;
	}
}

@media (max-width: 640px) {
	.q2apro-bu-page {
		width: 100%;
		max-width: 100%;
		overflow-x: hidden;
	}

	.q2apro-bu-witem {
		gap: 6px;
		padding: 6px;
	}

	.q2apro-bu-wtitle {
		font-size: 13px;
	}

	.q2apro-bu-wname {
		font-size: 12.5px;
	}

	.q2apro-bu-wpoints {
		font-size: 10.5px;
		padding: 2px 6px;
	}

	.q2apro-bu-toolbar {
		flex-direction: column;
		align-items: stretch;
		padding: 10px;
	}

	.q2apro-bu-picker-form {
		justify-content: space-between;
	}

	.q2apro-bu-select-wrap {
		flex: 1;
		justify-content: center;
	}

	.q2apro-bu-table {
		table-layout: auto;
	}

	.q2apro-bu-table thead th,
	.q2apro-bu-row td {
		padding: 8px 6px;
		font-size: 12.5px;
	}

	.q2apro-bu-table thead th.q2apro-bu-th-rank,
	.q2apro-bu-row td.q2apro-bu-count {
		width: 40px;
		padding-left: 4px;
		padding-right: 4px;
	}

	.q2apro-bu-rankbadge {
		min-width: 26px;
		height: 24px;
		padding: 0 5px;
		font-size: 11.5px;
	}

	.q2apro-bu-table thead th.q2apro-bu-th-score,
	.q2apro-bu-row td.q2apro-bu-score {
		width: 1%;
		white-space: nowrap;
		padding-left: 4px;
		padding-right: 8px;
	}

	.q2apro-bu-points {
		font-size: 11.5px;
		padding: 2px 7px;
	}

	.q2apro-bu-usercell {
		gap: 7px;
		min-width: 0;
	}

	.q2apro-bu-usercell img {
		width: 28px !important;
		height: 28px !important;
	}

	.q2apro-bu-username,
	.q2apro-bu-username a {
		font-size: 13px;
		word-break: keep-all !important;
		overflow-wrap: break-word;
	}

	.q2apro-bu-location,
	.q2apro-bu-about {
		display: none;
	}
}
