/* ==========================================================================
   اعلانات من — header badge, mini-cart-style popup, account section.
   Palette: navy #102a71 / navy-dark #001840 / gold #f5c400 / cream #fffdf0
   ========================================================================== */

.semnan-auth-btn { position: relative; }

/* ---- red dot on the account pill ---- */
.sn-dot {
	position: absolute;
	top: -4px;
	inset-inline-end: -4px;
	min-width: 17px;
	height: 17px;
	padding: 0 4px;
	border-radius: 999px;
	background: #e11d2e;
	color: #fff;
	font-size: 10px;
	font-weight: 800;
	line-height: 17px;
	text-align: center;
	box-shadow: 0 0 0 2px #fffdf0, 0 2px 6px rgba(225, 29, 46, .45);
	/* The dot is now its own affordance (opens the popup); the rest of the pill
	   navigates to the account page. */
	pointer-events: auto;
	cursor: pointer;
	z-index: 3;
}
.sn-dot[hidden] { display: none; }

/* ---- popup (mirrors .semnan-mini-cart) ---- */
.sn-pop {
	position: absolute;
	top: calc(100% + 10px);
	inset-inline-end: 0;
	width: 384px;
	max-width: calc(100vw - 24px);
	max-height: 72vh;
	display: flex;
	flex-direction: column;
	background: #fffdf0;
	border: 1px solid rgba(16, 42, 113, .12);
	border-radius: 16px;
	box-shadow: 0 22px 54px -22px rgba(0, 24, 64, .38);
	z-index: 1002;
	overflow: hidden;
	font-family: inherit;
}
.sn-pop[hidden] { display: none; }

.sn-pop__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 14px 16px;
	border-bottom: 1px solid rgba(16, 42, 113, .08);
	background: linear-gradient(135deg, #001840, #102a71);
	color: #fff;
}
.sn-pop__title { font-size: 15px; font-weight: 800; }
.sn-pop__close {
	width: 28px;
	height: 28px;
	border: 0;
	border-radius: 8px;
	background: rgba(255, 255, 255, .16);
	color: #fff;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}
.sn-pop__close:hover { background: #f5c400; color: #001840; }

.sn-pop__body {
	flex: 1 1 auto;
	min-height: 90px;
	max-height: 48vh;
	overflow: auto;
	padding: 8px 12px;
	overscroll-behavior: contain;
}
.sn-pop__foot {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 11px 14px 14px;
	border-top: 1px solid rgba(16, 42, 113, .08);
	background: #fff;
}
.sn-readall {
	flex: 1 1 auto;
	padding: 9px 14px;
	border: 0;
	border-radius: 10px;
	background: #eef0f3;
	color: #001840;
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	transition: background .2s ease;
}
.sn-readall:hover { background: #f5c400; }
.sn-openall {
	flex: 0 0 auto;
	padding: 9px 14px;
	border-radius: 10px;
	background: #001840;
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
	transition: background .2s ease;
}
.sn-openall:hover { background: #102a71; color: #fff; }

.sn-loading, .sn-empty {
	margin: 0;
	padding: 22px 8px;
	text-align: center;
	color: #5c6575;
	font-size: 13px;
	line-height: 1.9;
}

/* ---- list ---- */
.sn-list { list-style: none; margin: 0; padding: 0; }
.sn-item {
	display: flex;
	align-items: flex-start;
	gap: 11px;
	padding: 11px 10px;
	border-radius: 12px;
	border-bottom: 1px solid rgba(16, 42, 113, .06);
}
.sn-item:last-child { border-bottom: 0; }
.sn-item.is-unread { background: rgba(245, 196, 0, .13); }
.sn-emoji {
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	border-radius: 10px;
	display: grid;
	place-items: center;
	font-size: 17px;
	background: #fff;
	border: 1px solid rgba(16, 42, 113, .1);
	box-shadow: 0 3px 8px -4px rgba(16, 42, 113, .3);
}
.sn-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sn-title { font-size: 13px; font-weight: 800; color: #001840; line-height: 1.6; }
.sn-text { font-size: 12.5px; color: #3c4658; line-height: 1.8; }
.sn-meta { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.sn-date { font-size: 11px; color: #889098; }
.sn-link { font-size: 11.5px; font-weight: 700; color: #102a71; text-decoration: none; }
.sn-link:hover { color: #b98f00; text-decoration: underline; }

/* ---- account page section ---- */
.sn-account { display: flex; flex-direction: column; gap: 14px; }
.sn-account__head {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 18px;
	border-radius: 16px;
	background: linear-gradient(135deg, #001840, #102a71);
	color: #fff;
}
.sn-account__ico {
	flex: 0 0 auto;
	width: 42px;
	height: 42px;
	border-radius: 12px;
	display: grid;
	place-items: center;
	font-size: 20px;
	background: rgba(245, 196, 0, .95);
	color: #3b2f00;
}
.sn-account__title { margin: 0; font-size: 17px; font-weight: 800; color: #fff; }
.sn-account__sub { margin: 2px 0 0; font-size: 12.5px; color: rgba(255, 255, 255, .75); line-height: 1.8; }
.sn-account__badge {
	margin-inline-start: auto;
	flex: 0 0 auto;
	padding: 4px 12px;
	border-radius: 999px;
	background: #f5c400;
	color: #3b2f00;
	font-size: 12px;
	font-weight: 800;
}
.sn-account__bar { margin: 0; }
.sn-account__btn {
	padding: 9px 18px;
	border: 0;
	border-radius: 10px;
	background: #eef0f3;
	color: #001840;
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	transition: background .2s ease;
}
.sn-account__btn:hover { background: #f5c400; }
.sn-account__list {
	background: #fff;
	border: 1px solid rgba(16, 42, 113, .1);
	border-radius: 16px;
	padding: 6px 10px;
}
.sn-account__list .sn-pop__body { max-height: none; }

/* ---- account dashboard tile ---- */
.sp-tile--notifications {
	grid-column: 1 / -1;
}
.sp-tile--notifications.has-unread {
	border-color: rgba(245, 196, 0, .85);
	background: linear-gradient(180deg, #fffdf3, #fff);
}
body.woocommerce-account .woocommerce-MyAccount-content .sp-tile-ico.sp-tile-ico--bell {
	--sp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8a6 6 0 1 0-12 0c0 7-3 9-3 9h18s-3-2-3-9'/%3E%3Cpath d='M13.7 21a2 2 0 0 1-3.4 0'/%3E%3C/svg%3E");
	position: relative;
}
.sp-tile-badge {
	position: absolute;
	top: -5px;
	inset-inline-end: -5px;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 999px;
	background: #e11d2e;
	color: #fff;
	font-size: 10px;
	font-weight: 800;
	line-height: 18px;
	text-align: center;
	box-shadow: 0 0 0 2px #fff;
}

/* ---- mobile: bottom sheet, like the mini-cart ---- */
@media (max-width: 640px) {
	.sn-pop {
		position: fixed;
		inset-inline: 0;
		bottom: 0;
		top: auto;
		width: 100%;
		max-width: 100%;
		max-height: 78vh;
		border-radius: 20px 20px 0 0;
		box-shadow: 0 -12px 44px -12px rgba(0, 24, 64, .35);
	}
	.sn-pop__body { max-height: 56vh; }
	.sn-account__head { flex-wrap: wrap; }
	.sn-account__badge { margin-inline-start: 0; }
}
