/* Launch Countdown Timer — frontend */

.lct-timer {
	--lct-accent: #7c3aed;
	--lct-bg: #0f0f1a;
	--lct-text: #ffffff;
	--lct-grad-from: #7c3aed;
	--lct-grad-to: #0f0f1a;
	--lct-grad-angle: 135deg;
	--lct-bg-image: none;
	--lct-bg-overlay: 0.55;
	position: relative;
	overflow: hidden;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 18px;
	max-width: 640px;
	margin: 24px auto;
	padding: 28px 26px;
	border-radius: 18px;
	color: var(--lct-text);
	font-family: -apple-system, "Segoe UI", Rubik, Arial, sans-serif;
	text-align: center;
	box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
	border: 1px solid color-mix(in srgb, var(--lct-text) 12%, transparent);
	direction: rtl;
	isolation: isolate;
}

.lct-timer *,
.lct-timer *::before,
.lct-timer *::after {
	box-sizing: border-box;
}

/* רקע: צבע אחיד */
.lct-timer--bg-solid {
	background: var(--lct-bg);
}

/* רקע: גרדיאנט */
.lct-timer--bg-gradient {
	background: linear-gradient(var(--lct-grad-angle), var(--lct-grad-from), var(--lct-grad-to));
}

/* רקע: תמונה + שכבת כיסוי */
.lct-timer--bg-image {
	background: var(--lct-bg) center / cover no-repeat;
}

.lct-timer--bg-image::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: var(--lct-bg-image);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	z-index: 0;
}

.lct-timer--bg-image::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, var(--lct-bg-overlay));
	z-index: 1;
}

.lct-timer--bg-image > * {
	position: relative;
	z-index: 2;
}

.lct-head {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	width: 100%;
}

/* שם המשחק למעלה, המשפט מתחתיו */
.lct-game {
	order: 1;
	font-size: clamp(22px, 4vw, 34px);
	font-weight: 800;
	line-height: 1.15;
	color: var(--lct-text);
}

.lct-title {
	order: 2;
	font-size: 15px;
	letter-spacing: 0.04em;
	opacity: 0.85;
	text-transform: uppercase;
}

.lct-units {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	justify-content: center;
	width: 100%;
}

.lct-unit {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-width: 72px;
	min-height: 88px;
	padding: 14px 12px;
	border-radius: 12px;
	background: color-mix(in srgb, var(--lct-text) 10%, transparent);
	border: 1px solid color-mix(in srgb, var(--lct-text) 14%, transparent);
	text-align: center;
}

.lct-num {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	font-size: clamp(28px, 6vw, 44px);
	font-weight: 800;
	line-height: 1;
	font-variant-numeric: tabular-nums;
	color: var(--lct-text);
	text-align: center;
}

.lct-label {
	font-size: 12px;
	letter-spacing: 0.05em;
	opacity: 0.75;
	text-align: center;
}

/* מצב סיום */
.lct-expired-msg {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
}

.lct-expired-text {
	font-size: clamp(20px, 4vw, 28px);
	font-weight: 800;
}

.lct-cta {
	display: inline-block;
	padding: 12px 28px;
	border-radius: 999px;
	background: var(--lct-accent);
	color: #fff;
	font-weight: 700;
	text-decoration: none;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	box-shadow: 0 8px 24px color-mix(in srgb, var(--lct-accent) 55%, transparent);
}

.lct-cta:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 30px color-mix(in srgb, var(--lct-accent) 65%, transparent);
	color: #fff;
}

.lct-timer.is-expired .lct-units,
.lct-timer.is-expired .lct-head {
	display: none;
}

/* ------- פריסה: ארוכה וצרה (פס אופקי) ------- */
/* שורה אחת נמוכה: שם משחק מימין, משפט + טיימר במרכז */
.lct-timer--layout-slim {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: center;
	position: relative;
	max-width: 960px;
	width: 100%;
	padding: 12px 20px;
	padding-inline-start: clamp(120px, 28%, 220px); /* מקום לשם המשחק מימין */
	border-radius: 12px;
	gap: 0;
}

.lct-timer--layout-slim .lct-head {
	display: contents;
}

.lct-timer--layout-slim .lct-game {
	position: absolute;
	inset-inline-start: 20px; /* צד ימין ב-RTL */
	top: 50%;
	transform: translateY(-50%);
	max-width: calc(28% - 8px);
	margin: 0;
	text-align: right;
	font-size: clamp(15px, 1.8vw, 20px);
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	z-index: 2;
}

.lct-timer--layout-slim .lct-title {
	order: 1; /* ימין — קרוב לשם המשחק */
	flex: 0 0 auto;
	font-size: clamp(15px, 2vw, 18px);
	font-weight: 700;
	opacity: 1;
	text-transform: none;
	letter-spacing: normal;
	text-align: center;
	align-self: center;
	position: relative;
	padding-inline-end: 16px; /* מרווח משמאל לטקסט — בין הקו לטיימר */
	padding-inline-start: 0;
}

/* קו הפרדה משמאל לטקסט → הטקסט מימין לקו */
.lct-timer--layout-slim .lct-title::before {
	content: "";
	position: absolute;
	inset-inline-end: 0;
	top: 15%;
	bottom: 15%;
	width: 1px;
	background: color-mix(in srgb, var(--lct-text) 35%, transparent);
}

.lct-timer--layout-slim .lct-units {
	order: 2; /* שמאל — לפני קו ההפרדה */
	position: relative;
	gap: 6px;
	flex: 0 0 auto;
	justify-content: center;
	width: auto;
	padding-inline-start: 0;
	padding-inline-end: 16px;
}

.lct-timer--layout-slim .lct-units::before {
	display: none;
}

.lct-timer--layout-slim .lct-unit {
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-width: 56px;
	min-height: 64px;
	padding: 8px 10px;
	border-radius: 8px;
}

.lct-timer--layout-slim .lct-num {
	font-size: 22px;
}

.lct-timer--layout-slim .lct-label {
	font-size: 11px;
}

.lct-timer--layout-slim .lct-expired-msg {
	flex-direction: row;
	flex-wrap: wrap;
	gap: 10px 16px;
	width: 100%;
	justify-content: center;
}

.lct-timer--layout-slim .lct-expired-text {
	font-size: clamp(17px, 2.4vw, 22px);
}

.lct-timer--layout-slim .lct-cta {
	padding: 8px 20px;
}

/* ------- מובייל: הסתרה / מוקטן / מלא ------- */
@media (max-width: 768px) {
	.lct-timer--mobile-hide,
	.lct-topbar-wrap:has(.lct-timer--mobile-hide),
	.lct-float:has(.lct-timer--mobile-hide) {
		display: none !important;
	}

	/* גרסה מוקטנת — כרטיס */
	.lct-timer--mobile-compact {
		gap: 10px;
		padding: 14px 14px;
		margin: 12px auto;
		border-radius: 12px;
	}

	.lct-timer--mobile-compact .lct-game {
		font-size: clamp(16px, 5vw, 22px);
	}

	.lct-timer--mobile-compact .lct-title {
		font-size: 12px;
	}

	.lct-timer--mobile-compact .lct-unit {
		min-width: 52px;
		min-height: 64px;
		padding: 8px 6px;
		border-radius: 8px;
	}

	.lct-timer--mobile-compact .lct-num {
		font-size: clamp(20px, 5.5vw, 28px);
	}

	.lct-timer--mobile-compact .lct-label {
		font-size: 10px;
	}

	/* גרסה מוקטנת — פס צר: שורה אחת דחוסה */
	.lct-timer--layout-slim.lct-timer--mobile-compact {
		display: flex;
		flex-wrap: nowrap;
		align-items: center;
		justify-content: flex-start;
		gap: 0;
		padding: 8px 12px;
		padding-inline-start: 12px;
		overflow: hidden;
	}

	.lct-timer--layout-slim.lct-timer--mobile-compact .lct-game {
		position: static;
		transform: none;
		flex: 0 1 auto;
		max-width: 32%;
		margin-inline-end: auto;
		font-size: 13px;
	}

	.lct-timer--layout-slim.lct-timer--mobile-compact .lct-title {
		flex: 0 0 auto;
		order: 1;
		padding-inline-start: 8px;
		padding-inline-end: 0;
		font-size: 12px;
		white-space: nowrap;
	}

	.lct-timer--layout-slim.lct-timer--mobile-compact .lct-units {
		flex: 0 0 auto;
		order: 2;
		padding-inline-start: 0;
		padding-inline-end: 8px;
		gap: 4px;
	}

	.lct-timer--layout-slim.lct-timer--mobile-compact .lct-unit {
		min-width: 0;
		min-height: 0;
		padding: 4px 6px;
	}

	.lct-timer--layout-slim.lct-timer--mobile-compact .lct-num {
		font-size: 14px;
	}

	.lct-timer--layout-slim.lct-timer--mobile-compact .lct-label {
		font-size: 9px;
	}

	/* תצוגה מלאה במובייל לפריסה צרה */
	.lct-timer--layout-slim.lct-timer--mobile-full {
		flex-wrap: wrap;
		justify-content: center;
		padding-inline-start: 12px;
		gap: 8px 10px;
	}

	.lct-timer--layout-slim.lct-timer--mobile-full .lct-game {
		position: static;
		transform: none;
		flex: 1 1 100%;
		max-width: 100%;
		text-align: center;
		font-size: 16px;
	}

	.lct-timer--layout-slim.lct-timer--mobile-full .lct-title {
		order: 1;
		padding-inline-start: 10px;
		padding-inline-end: 0;
		font-size: 13px;
	}

	.lct-timer--layout-slim.lct-timer--mobile-full .lct-units {
		order: 2;
		padding-inline-start: 0;
		padding-inline-end: 10px;
	}
}

/* ------- וריאנט: פס עליון קבוע ------- */
.lct-topbar-wrap {
	position: sticky;
	top: 0;
	z-index: 9999;
	width: 100%;
}

.lct-timer--bar {
	flex-direction: row;
	flex-wrap: wrap;
	max-width: none;
	margin: 0;
	padding: 10px 20px;
	border-radius: 0;
	border-left: 0;
	border-right: 0;
	border-top: 0;
	gap: 20px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.lct-timer--bar .lct-head {
	flex-direction: row;
	align-items: baseline;
	gap: 8px;
	width: auto;
}

.lct-timer--bar .lct-game {
	font-size: 18px;
}

.lct-timer--bar .lct-title {
	font-size: 13px;
}

.lct-timer--bar .lct-units {
	gap: 8px;
	width: auto;
}

.lct-timer--bar .lct-unit {
	flex-direction: column;
	min-width: 0;
	min-height: 0;
	padding: 6px 12px;
}

.lct-timer--bar .lct-num {
	font-size: 20px;
}

.lct-timer--bar .lct-label {
	font-size: 11px;
}

/* ------- וריאנט: תיבה צפה ------- */
.lct-float {
	position: fixed;
	bottom: 22px;
	z-index: 9999;
	max-width: 340px;
}

.lct-float--br { right: 22px; }
.lct-float--bl { left: 22px; }

.lct-float .lct-timer--float {
	margin: 0;
	padding: 20px 18px;
	gap: 12px;
}

.lct-float .lct-num { font-size: 28px; }
.lct-float .lct-unit { min-width: 56px; min-height: 72px; padding: 10px 8px; }
.lct-float .lct-game { font-size: 20px; }

.lct-float-close {
	position: absolute;
	top: -10px;
	left: -10px;
	z-index: 3;
	width: 28px;
	height: 28px;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: #111;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.lct-float.is-closed { display: none; }

@media (max-width: 600px) {
	.lct-timer--bar { flex-direction: column; gap: 10px; text-align: center; }
	.lct-float { left: 12px; right: 12px; max-width: none; }
}
