/* Rojal Campaign Popup */
.rcp[hidden] { display: none !important; }
.rcp, .rcp * { box-sizing: border-box; }
.rcp {
	position: fixed; inset: 0; z-index: 999999;
	display: flex; align-items: center; justify-content: center;
	padding: 24px; height: 100vh; height: 100dvh; -webkit-text-size-adjust: 100%; font-family: var(--rcp-font); color: #2e1f2c;
	direction: rtl; text-align: right; line-height: 1.5;
}
html.rcp-lock, html.rcp-lock body { overflow: hidden !important; }
.rcp button, .rcp a { font-family: inherit; text-decoration: none; text-transform: none; letter-spacing: 0; }
.rcp button { margin: 0; border: 0; background: none; cursor: pointer; color: inherit; line-height: inherit; min-height: 0; box-shadow: none; }
.rcp h2, .rcp p { margin: 0; padding: 0; font-family: inherit; letter-spacing: 0; text-transform: none; }

.rcp-backdrop { position: absolute; inset: 0; background: rgba(46, 31, 44, .58); opacity: 0; transition: opacity .3s ease; backdrop-filter: blur(3px); }
.rcp-dialog {
	position: relative; width: 100%; max-width: 920px; max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px);
	display: flex; flex-direction: column; overflow: hidden;
	background: #fdf8fc; border-radius: 36px; box-shadow: 0 40px 80px -20px rgba(46, 31, 44, .6);
	transform: translateY(40px) scale(.96); opacity: 0;
	transition: transform .5s cubic-bezier(.2, 1.3, .4, 1), opacity .3s ease; outline: none;
}
.rcp.is-open .rcp-backdrop { opacity: 1; }
.rcp.is-open .rcp-dialog { transform: none; opacity: 1; }

.rcp-close {
	position: absolute !important; top: 20px; left: 20px; z-index: 5;
	width: 44px; height: 44px; padding: 0 !important; border-radius: 50% !important;
	display: flex !important; align-items: center; justify-content: center;
	background: rgba(255, 255, 255, .92) !important; color: #2e1f2c !important;
	box-shadow: 0 4px 12px rgba(0, 0, 0, .15) !important; transition: transform .25s ease;
}
.rcp-close:hover { transform: rotate(90deg); }

/* slides stacked in one grid cell, so height never jumps */
.rcp-slides { display: grid; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.rcp-slide {
	grid-area: 1 / 1; display: grid; grid-template-columns: 1fr 1.05fr;
	opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility 0s linear .35s;
}
.rcp-slide.is-active { opacity: 1; visibility: visible; transition: opacity .35s ease; }

.rcp-copy { display: flex; flex-direction: column; padding: 40px; }
.rcp-brand { font-size: 18px; font-weight: 900; color: #924099; }
.rcp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 40px; }
.rcp-kicker { padding: 4px 12px; border-radius: 999px; background: var(--soft); color: var(--d); font-size: 14px; font-weight: 700; }
.rcp-kind { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 500; color: #8a7487; }
.rcp-kind svg { width: 14px; height: 14px; }
.rcp-slide .rcp-title { margin-top: 16px; font-size: 42px; font-weight: 900; line-height: 1.25; color: var(--d); }
.rcp-slide .rcp-deal { margin-top: 10px; padding: 10px 14px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); font-size: 15px; font-weight: 700; line-height: 1.9; color: var(--d); }
.rcp-slide .rcp-body { margin-top: 12px; font-size: 18px; font-weight: 500; line-height: 2; color: #6b5468; }

.rcp-actions { margin-top: auto; padding-top: 32px; display: flex; flex-direction: column; gap: 12px; }
.rcp .rcp-box {
	display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
	padding: 12px 20px; border-radius: 16px; border: 2px dashed var(--line); background: transparent;
}
.rcp .rcp-box b { font-size: 20px; font-weight: 900; letter-spacing: .04em; color: var(--c); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rcp .rcp-box span { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; font-size: 14px; font-weight: 700; color: var(--d); }
.rcp .rcp-box span svg { width: 16px; height: 16px; }
.rcp .rcp-box em { font-style: normal; }
.rcp .rcp-box--link { border-style: solid; border-color: transparent; background: var(--soft); }
.rcp .rcp-box--link b { font-size: 17px; font-weight: 700; color: var(--d); letter-spacing: 0; }
.rcp .rcp-box--login { justify-content: center; font-size: 16px; font-weight: 700; color: var(--d); }
.rcp .rcp-box.is-done { border-color: var(--c); }

.rcp .rcp-cta {
	display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 56px;
	border-radius: 16px; background: var(--c); color: var(--on) !important;
	font-size: 18px; font-weight: 800; box-shadow: 0 6px 0 var(--d); transition: transform .15s ease, box-shadow .15s ease;
}
.rcp .rcp-cta:hover svg { transform: translateX(-4px); }
.rcp .rcp-cta svg { transition: transform .2s ease; }
.rcp .rcp-cta:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--d); }
.rcp-admin-hint { font-size: 14px; color: #b42318; }

/* stage */
.rcp-stage { position: relative; min-height: 430px; overflow: hidden; background: var(--c); }
.rcp-em-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.rcp-em-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rcp-pill { margin-top: 8px; padding: 6px 20px; border-radius: 999px; background: var(--rcp-accent); color: var(--d); font-size: 18px; font-weight: 800; white-space: nowrap; }
.rcp-pill--bottom { position: absolute; bottom: 52px; left: 50%; transform: translateX(-50%); margin: 0; }
.rcp-pill--dark { background: #2b1d05; color: var(--rcp-accent); }

.rcp-big { font-size: 260px; font-weight: 900; line-height: 1; color: #fff; text-shadow: 0 18px 0 var(--d); }
.rcp-big--long { font-size: 150px; text-shadow: 0 12px 0 var(--d); }
.rcp-slide.is-active .rcp-big { animation: rcp-pop .7s cubic-bezier(.2, 1.5, .4, 1) both; }
.rcp-confetti i { position: absolute; top: -30px; left: var(--x); width: var(--sz); height: var(--sz); border-radius: var(--r); background: var(--col); opacity: .85; animation: rcp-fall var(--dur) linear var(--dl) infinite; }

.rcp-pulse { position: absolute; width: 300px; height: 300px; border-radius: 50%; background: rgba(255, 255, 255, .1); animation: rcp-breathe 2.4s ease-in-out infinite; }
.rcp-cross { position: relative; width: 176px; height: 176px; border-radius: 40px; background: #fff; box-shadow: 0 18px 0 var(--d); }
.rcp-cross i { position: absolute; top: 50%; left: 50%; border-radius: 8px; background: #c93f55; transform: translate(-50%, -50%); }
.rcp-cross i:first-child { width: 32px; height: 96px; }
.rcp-cross i:last-child { width: 96px; height: 32px; }
.rcp-beat { position: absolute; bottom: 56px; left: 0; width: 100%; height: 70px; }
.rcp-beat path { fill: none; stroke: #fff; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: rcp-draw 2.4s ease-in-out infinite; }
.rcp-stage--cross .rcp-pill--bottom { bottom: 16px; }

.rcp-ticket { position: relative; width: 270px; padding: 24px; border-radius: 24px; background: #fff; text-align: center; box-shadow: 0 18px 0 var(--d); transform: rotate(-8deg); }
.rcp-slide.is-active .rcp-ticket { animation: rcp-tilt .8s cubic-bezier(.2, 1.4, .4, 1) both; }
.rcp-ticket::before, .rcp-ticket::after { content: ""; position: absolute; top: 50%; width: 32px; height: 32px; margin-top: -16px; border-radius: 50%; background: var(--c); }
.rcp-ticket::before { right: -16px; }
.rcp-ticket::after { left: -16px; }
.rcp-ticket small { display: block; font-size: 16px; font-weight: 700; color: var(--d); }
.rcp-ticket hr { margin: 16px 0; border: 0; border-top: 2px dashed var(--line); }
.rcp-ticket b { display: block; font-size: 28px; font-weight: 900; letter-spacing: .04em; color: var(--c); }
.rcp-gift { position: absolute; bottom: 48px; left: 48px; display: flex; align-items: center; justify-content: center; width: 80px; height: 80px; border-radius: 18px; background: var(--rcp-accent); font-size: 38px; box-shadow: 0 10px 0 rgba(0, 0, 0, .25); animation: rcp-bob 3s ease-in-out infinite; }

.rcp-orbit { position: absolute; width: 300px; height: 300px; border-radius: 50%; border: 4px dashed rgba(43, 29, 5, .25); animation: rcp-spin 30s linear infinite; }
.rcp-people { position: relative; display: flex; }
.rcp-people span { display: flex; align-items: center; justify-content: center; width: 112px; height: 112px; margin-left: -24px; border-radius: 50%; border: 6px solid var(--c); background: var(--pc); color: #fff; font-size: 20px; font-weight: 900; animation: rcp-bob 2.6s ease-in-out var(--pd) infinite; }
.rcp-people span:last-child { margin-left: 0; }

/* palette */
.rcp-palette { flex-shrink: 0; display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 12px; padding: 16px; background: #f7eef5; border-top: 1px solid #efe2ec; }
.rcp .rcp-tab { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px; border-radius: 16px; text-align: right; transition: background .2s ease; }
.rcp .rcp-tab:hover { background: rgba(255, 255, 255, .6); }
.rcp .rcp-tab.is-active { background: #fff; box-shadow: 0 1px 3px rgba(46, 31, 44, .08); }
.rcp-pan { position: relative; flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: var(--soft); box-shadow: inset 0 0 0 2px var(--c); }
.rcp-fill { position: absolute; inset: auto 0 0 0; height: 100%; background: var(--c); }
.rcp-tab.is-active .rcp-fill { animation: rcp-fill var(--rcp-rotate) linear both; }
.rcp.is-paused .rcp-tab.is-active .rcp-fill { animation-play-state: paused; }
.rcp-tab-text { min-width: 0; }
.rcp-tab-text strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; font-weight: 800; color: #4a3647; }
.rcp-tab.is-active .rcp-tab-text strong { color: var(--d); }
.rcp-tab-text small { display: block; font-size: 14px; font-weight: 500; color: #8a7487; }

@keyframes rcp-fill { from { height: 0; } to { height: 100%; } }
@keyframes rcp-fall { from { transform: translateY(0) rotate(0); } to { transform: translateY(560px) rotate(360deg); } }
@keyframes rcp-breathe { 50% { transform: scale(1.08); } }
@keyframes rcp-draw { 0% { stroke-dashoffset: 1; } 70%, 100% { stroke-dashoffset: 0; } }
@keyframes rcp-bob { 50% { transform: translateY(-10px); } }
@keyframes rcp-spin { to { transform: rotate(360deg); } }
@keyframes rcp-pop { from { transform: scale(.6); opacity: 0; } }
@keyframes rcp-tilt { from { transform: rotate(-14deg) translateY(30px); opacity: 0; } }

/* تبلت */
@media (min-width: 768px) and (max-width: 1023px) {
	.rcp-copy { padding: 32px; }
	.rcp-slide .rcp-title { font-size: 34px; }
	.rcp-slide .rcp-body { font-size: 16px; }
	.rcp-big { font-size: 200px; }
	.rcp-big--long { font-size: 120px; }
	.rcp-stage { min-height: 380px; }
}

/* موبایل: باتم‌شیت */
@media (max-width: 767px) {
	.rcp {
		padding: 0; align-items: flex-end;
	}
	.rcp-dialog {
		max-width: none; border-radius: 28px 28px 0 0;
		max-height: 92vh; max-height: 92dvh;
		padding-bottom: env(safe-area-inset-bottom, 0);
		transform: translateY(60px); box-shadow: 0 -20px 60px -20px rgba(46, 31, 44, .6);
	}
	.rcp-dialog::before { /* دستگیره‌ی بالای شیت */
		content: ""; position: absolute; top: 8px; left: 50%; z-index: 4; width: 40px; height: 4px; margin-left: -20px;
		border-radius: 4px; background: rgba(255, 255, 255, .7); box-shadow: 0 0 0 1px rgba(0, 0, 0, .06);
	}
	.rcp-close { top: 14px; left: 14px; width: 40px; height: 40px; }
	.rcp-slide { grid-template-columns: 1fr; }
	.rcp-stage { order: -1; min-height: clamp(104px, 17vh, 150px); }
	.rcp-copy { padding: 20px 20px 22px; }
	.rcp-meta { margin-top: 0; gap: 6px; }
	.rcp-kicker { font-size: 13px; padding: 3px 10px; }
	.rcp-kind { font-size: 13px; }
	.rcp-brand { display: none; }
	.rcp-slide .rcp-title { margin-top: 12px; font-size: clamp(22px, 7vw, 28px); line-height: 1.35; }
	.rcp-slide .rcp-body { margin-top: 8px; font-size: 15px; line-height: 1.85; }
	.rcp-slide .rcp-deal { margin-top: 10px; padding: 8px 12px; font-size: 13px; line-height: 1.8; }
	.rcp-actions { margin-top: 0; padding-top: 18px; gap: 10px; }
	.rcp .rcp-box { padding: 10px 14px; gap: 8px; border-radius: 14px; }
	.rcp .rcp-box b { font-size: 17px; min-width: 0; }
	.rcp .rcp-box--link b { font-size: 14px; }
	.rcp .rcp-box span { font-size: 13px; }
	.rcp .rcp-box--login { font-size: 14px; text-align: center; line-height: 1.7; }
	.rcp .rcp-cta { height: 52px; font-size: 16px; border-radius: 14px; box-shadow: 0 5px 0 var(--d); }
	.rcp-cd-units { gap: 6px; }
	.rcp-cd-units span { padding: 6px 2px; border-radius: 12px; }
	.rcp-cd-units b { font-size: 19px; }
	.rcp-cd-units small { font-size: 11px; }
	.rcp-cd-label { font-size: 12px; }

	/* صحنه‌ها: کوچک‌شده و متناسب با ارتفاع */
	.rcp-big { font-size: clamp(64px, 24vw, 104px); text-shadow: 0 6px 0 var(--d); }
	.rcp-big--long { font-size: clamp(52px, 17vw, 80px); }
	.rcp-pill { margin-top: 2px; padding: 3px 14px; font-size: 14px; }
	.rcp-pulse, .rcp-orbit { width: 120px; height: 120px; }
	.rcp-cross { width: 64px; height: 64px; border-radius: 18px; box-shadow: 0 6px 0 var(--d); }
	.rcp-cross i:first-child { width: 12px; height: 36px; }
	.rcp-cross i:last-child { width: 36px; height: 12px; }
	.rcp-beat { bottom: 10px; height: 36px; }
	.rcp-pill--bottom, .rcp-stage--cross .rcp-pill--bottom { bottom: 8px; font-size: 13px; }
	.rcp-stage--people .rcp-em-center, .rcp-stage--number .rcp-em-center { padding-bottom: 0; }
	.rcp-ticket { width: min(190px, 62%); padding: 10px; border-radius: 20px; box-shadow: 0 8px 0 var(--d); }
	.rcp-ticket small { font-size: 14px; }
	.rcp-ticket hr { margin: 8px 0; }
	.rcp-ticket b { font-size: 18px; }
	.rcp-ticket::before, .rcp-ticket::after { width: 24px; height: 24px; margin-top: -12px; }
	.rcp-ticket::before { right: -12px; }
	.rcp-ticket::after { left: -12px; }
	.rcp-gift { width: 38px; height: 38px; font-size: 18px; bottom: 10px; left: 14px; border-radius: 14px; box-shadow: 0 6px 0 rgba(0, 0, 0, .25); }
	.rcp-people span { width: 56px; height: 56px; margin-left: -12px; font-size: 15px; border-width: 4px; }
	.rcp-orbit { display: none; }
	.rcp-confetti i { animation-name: rcp-fall-s; }

	/* پالت: دکمه‌های لمسیِ حداقل ۴۴px */
	.rcp-palette { gap: 6px; padding: 10px 12px; justify-items: center; }
	.rcp .rcp-tab { padding: 6px; justify-content: center; width: 100%; min-height: 48px; }
	.rcp-tab-text { display: none; }
}

/* موبایل‌های خیلی کوچک */
@media (max-width: 359px) {
	.rcp-copy { padding: 16px 14px 18px; }
	.rcp-slide .rcp-body { font-size: 14px; }
	.rcp .rcp-cta { font-size: 15px; }
	.rcp-people span { width: 60px; height: 60px; font-size: 13px; }
}

/* حالت افقیِ کم‌ارتفاع (موبایل landscape): دو ستون فشرده */
@media (max-height: 520px) and (orientation: landscape) {
	.rcp { padding: 8px; align-items: center; }
	.rcp-dialog { max-width: 760px; border-radius: 24px; max-height: 100vh; max-height: 100dvh; padding-bottom: 0; transform: none; }
	.rcp-dialog::before { display: none; }
	.rcp-slide { grid-template-columns: 1.1fr 1fr; }
	.rcp-stage { order: 0; min-height: 0; }
	.rcp-copy { padding: 18px 20px; }
	.rcp-slide .rcp-title { font-size: 22px; margin-top: 8px; }
	.rcp-slide .rcp-body { font-size: 13px; line-height: 1.7; margin-top: 4px; }
	.rcp-actions { padding-top: 12px; }
	.rcp .rcp-cta { height: 44px; }
	.rcp-big { font-size: 90px; }
	.rcp-big--long { font-size: 60px; }
	.rcp-palette { padding: 6px 12px; }
	.rcp .rcp-tab { min-height: 40px; }
	.rcp-close { top: 10px; left: 10px; }
}

@keyframes rcp-fall-s { from { transform: translateY(0) rotate(0); } to { transform: translateY(300px) rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
	.rcp-confetti, .rcp-gift, .rcp-people span, .rcp-orbit, .rcp-pulse, .rcp-beat path { animation: none !important; }
	.rcp-beat path { stroke-dashoffset: 0; }
	.rcp-dialog { transition: opacity .2s ease; transform: none; }
}

/* شمارش معکوس */
.rcp-countdown { display: flex; flex-direction: column; gap: 8px; }
.rcp-cd-label { font-size: 13px; font-weight: 700; color: var(--d); }
.rcp-cd-units { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.rcp-cd-units span { display: flex; flex-direction: column; align-items: center; padding: 8px 4px; border-radius: 14px; background: var(--soft); border: 2px solid var(--line); }
.rcp-cd-units b { font-size: 22px; font-weight: 900; line-height: 1.2; color: var(--c); font-variant-numeric: tabular-nums; }
.rcp-cd-units small { font-size: 12px; font-weight: 700; color: var(--d); }
.rcp .rcp-cta.is-locked { opacity: .45; cursor: not-allowed; filter: grayscale(.3); pointer-events: none; }
.rcp .rcp-cta.is-unlocked { animation: rcp-unlock .6s ease; }
@keyframes rcp-unlock { 0% { transform: scale(.94); } 60% { transform: scale(1.05); } 100% { transform: scale(1); } }

.rcp-countdown[hidden] { display: none; }
.rcp-countdown.is-ended .rcp-cd-units { display: none; }
.rcp-countdown.is-ended .rcp-cd-label { font-size: 15px; color: #b42318; }
.rcp-countdown.is-live .rcp-cd-units span { background: transparent; }
