/* BC.GAME-style notification drawer */

.notif-panel-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	z-index: 100000;
}

body.notif-panel-open {
	overflow: hidden;
}

body.notif-panel-open .notif-panel-overlay {
	display: block;
}

#notification_dropdown.notif-panel {
	position: fixed !important;
	top: 0 !important;
	right: 0 !important;
	left: auto !important;
	bottom: 0 !important;
	width: 420px !important;
	max-width: 100vw !important;
	height: 100% !important;
	max-height: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	display: flex !important;
	flex-direction: column !important;
	background: #f3f4f6 !important;
	border: none !important;
	border-radius: 0 !important;
	box-shadow: -12px 0 40px rgba(0, 0, 0, 0.28) !important;
	opacity: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
	transform: translateX(100%) !important;
	transition: transform 0.28s ease, opacity 0.28s ease, visibility 0.28s ease !important;
	z-index: 100001 !important;
	overflow: hidden !important;
	backdrop-filter: none !important;
}

#notification_dropdown.notif-panel.show {
	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: auto !important;
	transform: translateX(0) !important;
}

.dark_mode #notification_dropdown.notif-panel {
	background: #1e2024 !important;
	box-shadow: -16px 0 48px rgba(0, 0, 0, 0.55) !important;
}

.notif-panel__header {
	position: relative;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 56px;
	padding: 10px 52px;
	padding-top: calc(10px + env(safe-area-inset-top));
	background: transparent;
}

.notif-panel__title {
	margin: 0;
	color: #1a1c20;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
}

.dark_mode .notif-panel__title {
	color: #fff;
}

.notif-panel__icon-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: none;
	border-radius: 8px;
	background: #dfe3e8;
	color: #6b7280;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}

.dark_mode .notif-panel__icon-btn {
	background: #2d3035;
	color: #9aa0a6;
}

.notif-panel__icon-btn:hover {
	background: #d0d5db;
	color: #111;
}

.dark_mode .notif-panel__icon-btn:hover {
	background: #3a3e44;
	color: #fff;
}

.notif-panel__back {
	left: 12px;
}

.notif-panel__close {
	right: 12px;
}

.notif-panel__settings {
	display: none;
}

.notif-panel__icon-btn svg,
.notif-panel__icon-btn i {
	width: 16px;
	height: 16px;
	font-size: 14px;
	pointer-events: none;
}

.notif-panel__tabs {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	gap: 2px;
	margin: 0 12px 8px;
	padding: 4px;
	border-radius: 10px;
	background: transparent;
}

.notif-panel__tab {
	flex: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	min-height: 36px;
	padding: 6px 4px;
	border: none;
	border-radius: 8px;
	background: transparent;
	color: #6b7280;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	white-space: nowrap;
}

.dark_mode .notif-panel__tab {
	color: #8b8f97;
}

.notif-panel__tab.is-active {
	background: #e5e7eb;
	color: #111;
}

.dark_mode .notif-panel__tab.is-active {
	background: #2d3035;
	color: #fff;
}

.notif-panel__badge {
	display: none;
	min-width: 18px;
	height: 16px;
	padding: 0 5px;
	border-radius: 999px;
	background: #67e366;
	color: #111;
	font-size: 11px;
	font-weight: 800;
	line-height: 16px;
	text-align: center;
}

.notif-panel__badge.is-visible {
	display: inline-block;
}

.notif-panel__body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-x: hidden !important;
	overflow-y: auto !important;
	padding: 4px 12px 12px !important;
	max-height: none !important;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
}

.notif-panel__body::-webkit-scrollbar {
	width: 6px;
}

.notif-panel__body::-webkit-scrollbar-thumb {
	background: rgba(103, 227, 102, 0.35);
	border-radius: 3px;
}

.notif-card.is-level-up {
	cursor: pointer;
}

.notif-card {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0 0 10px;
	padding: 14px;
	border: none;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.dark_mode .notif-card {
	background: #2d3035;
	box-shadow: none;
}

.notif-card__meta {
	display: flex;
	align-items: center;
	gap: 8px;
}

.notif-card__time {
	color: #8b8f97;
	font-size: 12px;
	font-weight: 400;
	line-height: 1.3;
}

.notif-card__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #67e366;
	flex-shrink: 0;
}

.notif-card.read .notif-card__dot {
	display: none;
}

.notif-card__title {
	margin: 0;
	color: #6b7280;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.55;
	word-break: break-word;
}

.dark_mode .notif-card__title {
	color: #9aa0a6;
}

.notif-card__body {
	color: #6b7280;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.55;
	word-break: break-word;
}

.dark_mode .notif-card__body {
	color: #9aa0a6;
}

.notif-card__body a {
	color: #67e366;
	text-decoration: none;
}

.notif-card__body.is-collapsed {
	display: -webkit-box;
	-webkit-line-clamp: 4;
	line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.notif-card__media {
	position: relative;
	margin: 2px 0 4px;
	overflow: hidden;
	border-radius: 10px;
}

.notif-card__media img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 180px;
	object-fit: cover;
}

.notif-card__expand {
	position: absolute;
	right: 8px;
	bottom: 8px;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 8px;
	border: none;
	border-radius: 6px;
	background: rgba(45, 48, 53, 0.88);
	color: #d1d5db;
	font-size: 11px;
	font-weight: 600;
	cursor: pointer;
}

.notif-card.is-expanded .notif-card__body.is-collapsed {
	display: block;
	-webkit-line-clamp: unset;
	overflow: visible;
}

.notif-card.is-expanded .notif-card__media img {
	max-height: none;
}

.notif-card .announcement-reactions {
	margin-top: 4px;
	padding: 6px 8px;
}

.notif-card.is-expanded .notif-card__expand i {
	transform: rotate(180deg);
}

.notif-card__actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-top: 4px;
}

.notif-card__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 32px;
	padding: 6px 12px;
	border: none;
	border-radius: 8px;
	background: #eceff3;
	color: #229f52;
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
}

.dark_mode .notif-card__cta {
	background: #25282d;
	color: #67e366;
}

.notif-card__cta:hover {
	color: #1b7a3e;
	text-decoration: none;
}

.dark_mode .notif-card__cta:hover {
	background: #212428;
	color: #7eec7b;
}

.notif-card__delete {
	margin-left: auto;
	width: 32px;
	height: 32px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: none;
	background: transparent;
	color: #9aa0a6;
	cursor: pointer;
	border-radius: 8px;
}

.notif-card__delete:hover {
	background: rgba(239, 68, 68, 0.12);
	color: #ef4444;
}

.notif-panel__empty {
	padding: 48px 16px;
	color: #8b8f97;
	font-size: 14px;
	text-align: center;
}

.notif-panel__empty p {
	margin: 0 0 18px;
}

.notif-panel__empty-icon {
	display: block;
	margin: 0 auto;
	font-size: 72px;
	line-height: 1;
	opacity: 0.28;
	color: #6b7280;
}

.dark_mode .notif-panel__empty-icon {
	color: #9aa0a6;
	opacity: 0.32;
}

.notif-panel__more {
	padding: 8px 0 4px;
	text-align: center;
}

.notif-panel__more-btn {
	min-height: 36px;
	padding: 8px 16px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	background: transparent;
	color: #4b5563;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

.dark_mode .notif-panel__more-btn {
	border-color: #3a3e44;
	color: #c5c9ce;
}

.notif-panel__footer {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 56px;
	padding: 10px 14px;
	padding-bottom: calc(10px + env(safe-area-inset-bottom));
	border-top: 1px solid #e5e7eb;
	background: #f3f4f6;
}

.dark_mode .notif-panel__footer {
	border-top-color: #2d3035;
	background: #1e2024;
}

.notif-panel__unread-toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #4b5563;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	user-select: none;
}

.dark_mode .notif-panel__unread-toggle {
	color: #c5c9ce;
}

.notif-switch {
	position: relative;
	width: 40px;
	height: 22px;
	flex-shrink: 0;
}

.notif-switch input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.notif-switch__ui {
	position: absolute;
	inset: 0;
	border-radius: 999px;
	background: #c5c9ce;
	transition: background 0.2s ease;
}

.dark_mode .notif-switch__ui {
	background: #3a3e44;
}

.notif-switch__ui:before {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	transition: transform 0.2s ease;
}

.notif-switch input:checked + .notif-switch__ui {
	background: #67e366;
}

.notif-switch input:checked + .notif-switch__ui:before {
	transform: translateX(18px);
}

.notif-panel__mark-all {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 0;
	border: none;
	background: none;
	color: #229f52;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
}

.dark_mode .notif-panel__mark-all {
	color: #67e366;
}

.notif-panel__mark-all i {
	font-size: 14px;
	color: #67e366;
}

body.notif-unread-only .notif-card.read {
	display: none;
}

@media screen and (min-width: 769px) {
	.notif-panel__back {
		display: none;
	}
}

@media screen and (max-width: 768px) {
	#notification_dropdown.notif-panel {
		width: 100% !important;
		max-width: 100% !important;
		left: 0 !important;
		right: 0 !important;
		border-radius: 0 !important;
		box-shadow: none !important;
	}

	.notif-panel__close {
		display: none;
	}

	.notif-panel__header {
		padding: 10px 52px;
	}

	.notif-panel__tab {
		font-size: 12px;
		padding: 6px 4px;
	}

	.notif-panel__mark-all {
		font-size: 12px;
	}

	.notif-panel__unread-toggle {
		font-size: 12px;
	}
}
