/* Bakiye çubuğu: .th ALTINA eklenir — header float/menü bozulmaz */

/* ========== Bar (header sibling) ========== */
.mrh-header-widget-bar {
	width: 100%;
	box-sizing: border-box;
	background: #243342; /* .th (#2c3e50) ile uyumlu biraz daha koyu şerit */
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
	color: #f0f0f0;
	/* compact */
	line-height: 1;
}

/* Admin bar badge colors (frontend) */
#wpadminbar .mrh-ab-test .ab-item {
	background: #d63638 !important;
	color: #fff !important;
}
#wpadminbar .mrh-ab-pending .ab-item {
	background: #dba617 !important;
	color: #1d2327 !important;
}

body.lightmode .mrh-header-widget-bar,
.lightmode .mrh-header-widget-bar {
	background: #f4f6f8;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
	color: #1a1a1a;
}

/* Reader (siyah body) */
body.black .mrh-header-widget-bar {
	background: #1a1a1a;
	border-bottom-color: rgba(255, 255, 255, 0.08);
}

.mrh-header-widget-inner {
	margin: 0 auto;
	max-width: 1220px; /* tema .centernav ile aynı */
	padding: 6px 20px;
	box-sizing: border-box;
	display: flex;
	justify-content: flex-end;
	align-items: center;
	min-height: 36px;
}

.mrh-header-widget {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 6px;
	max-width: 100%;
}

.mrh-hw-balance,
.mrh-hw-vip,
.mrh-hw-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	min-height: 28px;
	padding: 0 11px;
	border-radius: 999px;
	text-decoration: none !important;
	white-space: nowrap;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	transition: background 0.15s ease, transform 0.15s ease;
}

.mrh-hw-balance {
	background: rgba(255, 193, 7, 0.18);
	color: #ffc107 !important;
}

.mrh-hw-vip {
	background: linear-gradient(135deg, #9c27b0, #512da8);
	color: #fff !important;
	font-size: 11px;
}

.mrh-hw-link {
	background: rgba(255, 255, 255, 0.1);
	color: #fff !important;
}

body.lightmode .mrh-hw-link,
.lightmode .mrh-hw-link {
	background: rgba(0, 0, 0, 0.06);
	color: #1a1a1a !important;
}

body.lightmode .mrh-hw-balance,
.lightmode .mrh-hw-balance {
	color: #b28704 !important;
	background: rgba(255, 193, 7, 0.25);
}

.mrh-hw-balance:hover,
.mrh-hw-vip:hover,
.mrh-hw-link:hover {
	transform: translateY(-1px);
	filter: brightness(1.08);
}

.mrh-hw-ico {
	font-size: 13px;
	line-height: 1;
}

/* Header bulunamazsa — güvenli, layout bozmayan fixed */
.mrh-header-widget-bar.mrh-hw-fallback {
	position: sticky;
	top: 0;
	z-index: 9990;
}

body.admin-bar .mrh-header-widget-bar.mrh-hw-fallback {
	top: 32px;
}

/* ========== Chapter lock icon (ana sayfa / listeler) ========== */
.epxs,
.chapternum,
.fivchap,
.eggchap {
	display: inline-flex !important;
	align-items: center;
	flex-wrap: wrap;
	gap: 4px;
}

.mrh-ch-lock {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	margin-left: 5px;
	vertical-align: middle;
	width: 18px;
	height: 18px;
	min-width: 18px;
	flex-shrink: 0;
	border-radius: 50%;
	color: #ffc107 !important;
	background: rgba(255, 193, 7, 0.22) !important;
	box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.55);
	animation: mrh-lock-pulse 1.6s ease-in-out infinite;
	position: relative;
	z-index: 5;
	overflow: visible !important;
}

.epxs .mrh-ch-lock,
.luf a .mrh-ch-lock,
.chapternum .mrh-ch-lock {
	margin-left: 4px;
}

/* Koyu kart üzerinde (Son Yüklenen Bölümler) */
.utao .mrh-ch-lock,
.bs .mrh-ch-lock,
.epxs .mrh-ch-lock,
.luf .mrh-ch-lock {
	color: #ffd54f !important;
	background: rgba(255, 193, 7, 0.28) !important;
}

.mrh-ch-lock--vip {
	color: #e1bee7 !important;
	background: rgba(156, 39, 176, 0.35) !important;
	box-shadow: 0 0 0 0 rgba(156, 39, 176, 0.5);
	animation-name: mrh-lock-pulse-vip;
}

.mrh-ch-lock svg,
.mrh-ch-lock .fa-lock,
.mrh-ch-lock i {
	display: block !important;
	width: auto;
	height: auto;
	font-size: 10px !important;
	line-height: 1 !important;
	color: inherit !important;
}

@keyframes mrh-lock-pulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.45); transform: scale(1); }
	50% { box-shadow: 0 0 0 6px rgba(255, 193, 7, 0); transform: scale(1.08); }
}

@keyframes mrh-lock-pulse-vip {
	0%, 100% { box-shadow: 0 0 0 0 rgba(156, 39, 176, 0.4); transform: scale(1); }
	50% { box-shadow: 0 0 0 6px rgba(156, 39, 176, 0); transform: scale(1.08); }
}

/* ========== Toast ========== */
.mrh-toast-root {
	position: fixed;
	left: 50%;
	bottom: max(16px, env(safe-area-inset-bottom, 0px));
	transform: translateX(-50%);
	z-index: 100000;
	display: flex;
	flex-direction: column;
	gap: 8px;
	pointer-events: none;
	width: min(92vw, 360px);
	box-sizing: border-box;
	padding: 0 10px;
}

.mrh-toast {
	pointer-events: auto;
	padding: 14px 16px;
	border-radius: 14px;
	background: rgba(22, 24, 34, 0.94);
	border: 1px solid rgba(255, 255, 255, 0.12);
	color: #fff;
	font-weight: 700;
	box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3);
	animation: mrh-toast-in 0.35s ease;
	text-align: center;
}

.mrh-toast--success {
	border-color: rgba(102, 187, 106, 0.45);
}

@keyframes mrh-toast-in {
	from { opacity: 0; transform: translateY(12px); }
	to { opacity: 1; transform: translateY(0); }
}

/* ========== Mobil ========== */
@media (max-width: 890px) {
	.mrh-header-widget-inner {
		padding: 5px 12px;
		justify-content: center;
	}

	.mrh-header-widget {
		justify-content: center;
		width: 100%;
	}

	/* Hesabım / Paketler / VIP: sadece ikon */
	.mrh-hw-txt-hide-sm {
		position: absolute !important;
		width: 1px !important;
		height: 1px !important;
		padding: 0 !important;
		margin: -1px !important;
		overflow: hidden !important;
		clip: rect(0, 0, 0, 0) !important;
		border: 0 !important;
	}

	.mrh-hw-balance,
	.mrh-hw-vip,
	.mrh-hw-link {
		min-height: 34px;
		min-width: 34px;
		padding: 0 10px;
	}
}

@media (max-width: 420px) {
	.mrh-header-widget-inner {
		padding: 6px 10px;
	}

	.mrh-hw-balance {
		flex: 1 1 auto;
		max-width: 50%;
	}
}

/* ========== Avatar Dropdown ========== */
.mrh-avatar-wrapper {
	position: relative;
	display: inline-flex;
	align-items: center;
}

.mrh-avatar-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 2px solid #ffc107;
	background: rgba(255, 193, 7, 0.1);
	cursor: pointer;
	padding: 0;
	overflow: hidden;
	transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
	color: #ffc107;
}

.mrh-avatar-btn img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	border-radius: 50%;
}

.mrh-avatar-btn svg {
	display: block;
}

.mrh-avatar-btn:hover {
	box-shadow: 0 0 0 4px rgba(255, 193, 7, 0.28);
	border-color: #ffd54f;
	transform: translateY(-1px);
}

.mrh-avatar-btn:focus {
	outline: none;
	box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.4);
}

/* Dropdown panel */
.mrh-profile-dropdown {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	min-width: 220px;
	background: #1a1a1a;
	border: 1px solid rgba(255, 193, 7, 0.2);
	border-radius: 16px;
	box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55), 0 4px 16px rgba(0, 0, 0, 0.3);
	z-index: 99999;
	overflow: hidden;
	/* başlangıç durumu — animasyon için */
	opacity: 0;
	transform: translateY(-8px);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.mrh-profile-dropdown.is-open {
	opacity: 1;
	transform: translateY(0);
}

/* Dropdown header (avatar büyük + isim + VIP) */
.mrh-dropdown-header {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 16px 12px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mrh-dropdown-avatar {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	overflow: hidden;
	border: 2px solid rgba(255, 193, 7, 0.4);
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 193, 7, 0.1);
	font-size: 1.4rem;
}

.mrh-dropdown-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.mrh-dropdown-header-info {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.mrh-dropdown-name {
	font-size: 0.9rem;
	font-weight: 700;
	color: #fff;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.mrh-dropdown-vip {
	display: inline-block;
	font-size: 0.72rem;
	font-weight: 800;
	padding: 2px 8px;
	border-radius: 999px;
	background: linear-gradient(135deg, #9c27b0, #512da8);
	color: #fff;
	letter-spacing: 0.3px;
}

/* Separator */
.mrh-dropdown-sep {
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	margin: 4px 0;
}

/* Menü öğeleri */
.mrh-dropdown-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 16px;
	font-size: 0.875rem;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.75) !important;
	text-decoration: none !important;
	transition: background 0.15s ease, color 0.15s ease;
	cursor: pointer;
}

.mrh-dropdown-item:hover {
	background: rgba(255, 193, 7, 0.1);
	color: #ffc107 !important;
}

.mrh-dropdown-item-ico {
	font-size: 1rem;
	width: 20px;
	text-align: center;
	flex-shrink: 0;
	line-height: 1;
}

.mrh-dropdown-item-lbl {
	flex: 1;
}

.mrh-dropdown-item--logout {
	color: rgba(255, 100, 100, 0.75) !important;
	margin-bottom: 4px;
}

.mrh-dropdown-item--logout:hover {
	background: rgba(244, 67, 54, 0.1);
	color: #ef5350 !important;
}

@media (max-width: 890px) {
	.mrh-profile-dropdown {
		min-width: min(260px, calc(100vw - 24px));
		max-width: calc(100vw - 16px);
		right: 0;
		left: auto;
	}
}

@media (max-width: 420px) {
	.mrh-profile-dropdown {
		position: fixed;
		top: auto;
		bottom: 12px;
		left: 12px;
		right: 12px;
		min-width: 0;
		max-width: none;
		width: auto;
	}
	.mrh-header-widget-inner {
		padding: 6px 10px;
	}
}

/* ========== Kilitli Chapter Kutusu Animasyonları ========== */
/* .mrh-chapter-locked class'ı JS tarafından .chbox, li, .epxs
   veya [data-mrh-cid] elementine eklenir. Seçici geniş tutuldu. */

/* Coin kilitli — altın pulse */
.mrh-chapter-locked {
	position: relative;
	animation: mrh-chapter-pulse 3s ease-in-out infinite;
}

@keyframes mrh-chapter-pulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.0); }
	50%       { box-shadow: 0 0 10px 3px rgba(255, 193, 7, 0.28); }
}

/* VIP kilitli chapter kutusu — mor pulse */
.mrh-chapter-locked--vip {
	animation-name: mrh-chapter-pulse-vip;
}

@keyframes mrh-chapter-pulse-vip {
	0%, 100% { box-shadow: 0 0 0 0 rgba(206, 147, 216, 0.0); }
	50%       { box-shadow: 0 0 10px 3px rgba(206, 147, 216, 0.32); }
}

/* Hover overlay — altın gradient */
.mrh-chapter-locked::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, rgba(255, 193, 7, 0.07), transparent);
	border-radius: inherit;
	opacity: 0;
	transition: opacity 0.2s ease;
	pointer-events: none;
	z-index: 1;
}

.mrh-chapter-locked:hover::before {
	opacity: 1;
}

/* VIP hover — mor tonu */
.mrh-chapter-locked--vip::before {
	background: linear-gradient(135deg, rgba(206, 147, 216, 0.07), transparent);
}

.mrh-chapter-locked .mrh-ch-lock {
	position: relative;
	z-index: 2;
}

/* MangaAuth entegrasyonu: ikinci profil barı yerine mevcut kullanıcı barında coin/VIP. */
.mrh-ma-header-chip{height:40px;min-width:40px;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:0 11px;border-radius:22px;border:1px solid rgba(255,255,255,.09);background:rgba(22,22,32,.94);backdrop-filter:blur(16px);color:#e8e8ef!important;text-decoration:none!important;font:700 12px/1 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;box-shadow:0 4px 12px rgba(0,0,0,.28);transition:background .18s,border-color .18s,transform .18s}
.mrh-ma-header-chip:hover{background:rgba(255,193,7,.14);border-color:rgba(255,193,7,.42);transform:translateY(-1px);color:#fff!important}
.mrh-ma-header-chip .mrh-hw-ico{display:inline-flex;color:#ffc107}.mrh-ma-header-chip .mrh-hw-ico svg{width:16px;height:16px}.mrh-ma-header-chip .mrh-hw-txt{display:inline-block}
.mrh-ma-vip-chip{color:#ffd76a!important;border-color:rgba(255,193,7,.3);background:linear-gradient(135deg,rgba(83,56,5,.96),rgba(34,27,19,.96))}
.mrh-ma-dropdown-item svg{width:16px;height:16px;color:#ffc107;flex:0 0 auto}
.mrh-ma-vip-badge{display:inline-flex;align-items:center;padding:4px 9px;border:1px solid rgba(255,193,7,.38);border-radius:999px;background:rgba(255,193,7,.12);color:#ffd54f;font-size:11px;font-weight:800;letter-spacing:.04em}
.mrh-ma-vip-avatar{box-shadow:0 0 0 3px rgba(255,193,7,.45),0 0 24px rgba(255,193,7,.22)}
@media(max-width:600px){.mrh-ma-header-chip{padding:0 9px}.mrh-ma-vip-chip .mrh-hw-txt-hide-sm{display:none}}
