/* Hamenagen Shorts - YouTube Shorts style */

html[data-hm-theme="light"],
html:not([data-hm-theme]) {
	--hm-shorts-page-bg: #f4f5f8;
	--hm-shorts-accent: #cb1e53;
	--hm-shorts-accent-text: #ffffff;
	--hm-shorts-chrome-bg: rgba(255, 255, 255, 0.92);
	--hm-shorts-chrome-border: rgba(32, 33, 90, 0.12);
	--hm-shorts-chrome-text: #20215a;
	--hm-shorts-chrome-muted: rgba(32, 33, 90, 0.62);
	--hm-shorts-chrome-hover: rgba(32, 33, 90, 0.08);
	--hm-shorts-empty-text: #666666;
	--hm-shorts-frame-shadow: 0 24px 80px rgba(32, 33, 90, 0.18);
}

html[data-hm-theme="dark"] {
	--hm-shorts-page-bg: #16162e;
	--hm-shorts-accent: #fa8504;
	--hm-shorts-accent-text: #111111;
	--hm-shorts-chrome-bg: rgba(0, 0, 0, 0.45);
	--hm-shorts-chrome-border: rgba(255, 255, 255, 0.12);
	--hm-shorts-chrome-text: #ffffff;
	--hm-shorts-chrome-muted: rgba(255, 255, 255, 0.72);
	--hm-shorts-chrome-hover: rgba(255, 255, 255, 0.14);
	--hm-shorts-empty-text: rgba(255, 255, 255, 0.7);
	--hm-shorts-frame-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

body.hm-shorts-page-active {
	overflow: hidden !important;
	height: 100dvh !important;
	max-height: 100dvh !important;
	background: var(--hm-shorts-page-bg) !important;
}

body.hm-shorts-page-active .elementor-location-header,
body.hm-shorts-page-active .elementor-location-footer {
	position: relative;
	z-index: 20;
}

body.hm-shorts-page-active .elementor-location-footer,
body.hm-shorts-page-active .hm-footer {
	display: none !important;
}

body.hm-shorts-page-active .elementor-location-single,
body.hm-shorts-page-active main,
body.hm-shorts-page-active #content,
body.hm-shorts-page-active .site-content,
body.hm-shorts-page-active .page-content,
body.hm-shorts-page-active .entry-content {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	margin-bottom: 0 !important;
}

body.hm-shorts-page-active .elementor-widget-shortcode:has(.hm-shorts),
body.hm-shorts-page-active .elementor-element:has(.hm-shorts),
body.hm-shorts-page-active .elementor-widget-wrap:has(.hm-shorts),
body.hm-shorts-page-active .e-con:has(.hm-shorts),
body.hm-shorts-page-active .elementor-section:has(.hm-shorts),
body.hm-shorts-page-active .elementor-container:has(.hm-shorts),
body.hm-shorts-page-active .elementor-column:has(.hm-shorts) {
	margin: 0 !important;
	padding: 0 !important;
	min-height: 0 !important;
	height: auto !important;
}

body.hm-shorts-page-active #page,
body.hm-shorts-page-active .site,
body.hm-shorts-page-active .elementor-section-wrap {
	min-height: 0 !important;
	overflow: hidden !important;
}

/* איפוס כפוי - מונע דריסה מעיצוב האתר */
.hm-shorts,
.hm-shorts *,
.hm-shorts *::before,
.hm-shorts *::after {
	box-sizing: border-box !important;
}

.hm-shorts {
	font-family: "פולין", "Polin", sans-serif !important;
}

.hm-shorts button,
.hm-shorts input,
.hm-shorts textarea,
.hm-shorts select {
	appearance: none !important;
	-webkit-appearance: none !important;
	font-family: inherit !important;
	font-size: inherit !important;
	line-height: inherit !important;
	letter-spacing: normal !important;
	text-transform: none !important;
	box-shadow: none !important;
	outline: none !important;
}

.hm-shorts button {
	cursor: pointer !important;
}

.hm-shorts input,
.hm-shorts textarea,
.hm-shorts select {
	width: auto !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	color: inherit !important;
}

.hm-shorts {
	--hm-shorts-video-text: #ffffff;
	--hm-shorts-video-muted: rgba(255, 255, 255, 0.72);
	position: relative;
	width: 100%;
	height: var(--hm-shorts-height, calc(100dvh - var(--hm-h-total-h, 120px)));
	max-height: var(--hm-shorts-height, calc(100dvh - var(--hm-h-total-h, 120px)));
	min-height: 0 !important;
	background: var(--hm-shorts-page-bg) !important;
	color: var(--hm-shorts-chrome-text) !important;
	isolation: isolate;
	transition: background-color 0.25s ease, color 0.25s ease;
}

body.hm-header-v2--mobile.hm-shorts-page-active .hm-shorts {
	height: var(--hm-shorts-height, calc(100dvh - 52px - var(--hm-h-mob-bar-h, 90px) - 16px));
	max-height: var(--hm-shorts-height, calc(100dvh - 52px - var(--hm-h-mob-bar-h, 90px) - 16px));
}

.hm-shorts__feed {
	height: 100%;
	overflow-y: auto;
	overflow-x: hidden;
	scroll-snap-type: y mandatory;
	scroll-behavior: smooth;
	overscroll-behavior-y: contain;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.hm-shorts__feed::-webkit-scrollbar {
	display: none;
}

.hm-shorts__slide {
	height: var(--hm-shorts-slide-h, 100%);
	min-height: var(--hm-shorts-slide-h, 100%);
	scroll-snap-align: start;
	scroll-snap-stop: always;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	flex-shrink: 0;
}

.hm-shorts__frame {
	position: relative;
	width: min(100%, 480px);
	height: 100%;
	max-height: 100%;
	margin: 0 auto;
	overflow: hidden;
	background: #000;
}

.hm-shorts__video-wrap {
	position: absolute;
	inset: 0;
	overflow: hidden;
	background: #000;
}

.hm-shorts__poster {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: opacity 0.25s ease;
}

.hm-shorts__slide.is-playing .hm-shorts__poster {
	opacity: 0;
	pointer-events: none;
}

.hm-shorts__player {
	position: absolute;
	inset: 0;
	overflow: hidden;
}

.hm-shorts__player iframe {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 178%;
	height: 100%;
	min-height: 100%;
	transform: translate(-50%, -50%);
	border: 0;
	pointer-events: none;
}

.hm-shorts__gradient {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top,
			rgba(0, 0, 0, 0.82) 0%,
			rgba(0, 0, 0, 0.35) 28%,
			rgba(0, 0, 0, 0.05) 55%,
			rgba(0, 0, 0, 0.15) 100%);
	pointer-events: none;
	z-index: 2;
}

.hm-shorts__meta {
	position: absolute;
	right: 16px;
	left: 16px;
	bottom: 24px;
	z-index: 3;
	display: grid;
	gap: 8px;
	text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}

.hm-shorts__title {
	margin: 0 !important;
	font-size: clamp(1rem, 2.8vw, 1.25rem) !important;
	font-weight: 700 !important;
	line-height: 1.35 !important;
	color: var(--hm-shorts-video-text) !important;
}

.hm-shorts__excerpt {
	margin: 0 !important;
	font-size: 0.92rem !important;
	line-height: 1.45 !important;
	color: var(--hm-shorts-video-muted) !important;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.hm-shorts__time {
	margin: 0 !important;
	font-size: 0.82rem !important;
	color: rgba(255, 255, 255, 0.55) !important;
}

.hm-shorts a.hm-shorts__full-link {
	display: inline-flex !important;
	align-items: center !important;
	gap: 8px !important;
	width: fit-content !important;
	margin-top: 4px !important;
	padding: 10px 16px !important;
	border: none !important;
	border-radius: 999px !important;
	background: var(--hm-shorts-accent) !important;
	color: var(--hm-shorts-accent-text) !important;
	font-size: 0.92rem !important;
	font-weight: 700 !important;
	text-decoration: none !important;
	transition: transform 0.15s ease, filter 0.15s ease !important;
}

.hm-shorts a.hm-shorts__full-link:hover,
.hm-shorts a.hm-shorts__full-link:focus-visible {
	filter: brightness(1.08);
	transform: translateY(-1px);
	color: var(--hm-shorts-accent-text) !important;
	text-decoration: none !important;
}

.hm-shorts a.hm-shorts__full-link svg {
	flex-shrink: 0;
}

button.hm-shorts__mute {
	position: absolute;
	top: 16px;
	left: 16px;
	z-index: 4;
	width: 42px !important;
	height: 42px !important;
	min-width: 42px !important;
	min-height: 42px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 1px solid rgba(255, 255, 255, 0.18) !important;
	border-radius: 50% !important;
	background: rgba(0, 0, 0, 0.45) !important;
	color: #ffffff !important;
	display: grid !important;
	place-items: center !important;
	cursor: pointer !important;
	backdrop-filter: blur(6px);
	transition: background 0.15s ease !important;
}

button.hm-shorts__mute:hover {
	background: rgba(0, 0, 0, 0.65) !important;
	color: #ffffff !important;
}

button.hm-shorts__nav {
	position: static;
	transform: none;
	width: 44px !important;
	height: 44px !important;
	min-width: 44px !important;
	min-height: 44px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 1px solid var(--hm-shorts-chrome-border) !important;
	border-radius: 50% !important;
	background: var(--hm-shorts-chrome-bg) !important;
	color: var(--hm-shorts-chrome-text) !important;
	display: grid !important;
	place-items: center !important;
	cursor: pointer !important;
	backdrop-filter: blur(8px);
	transition: background 0.15s ease, opacity 0.15s ease, color 0.15s ease !important;
	flex-shrink: 0;
}

.hm-shorts__nav-stack {
	position: absolute;
	right: max(12px, calc(50% - 280px));
	left: auto;
	top: 50%;
	transform: translateY(-50%);
	z-index: 6;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

button.hm-shorts__nav:hover:not(:disabled) {
	background: var(--hm-shorts-chrome-hover) !important;
	color: var(--hm-shorts-chrome-text) !important;
}

button.hm-shorts__nav:disabled {
	opacity: 0.35 !important;
	cursor: default !important;
}

button.hm-shorts__shuffle.is-active {
	background: var(--hm-shorts-accent) !important;
	color: var(--hm-shorts-accent-text, #111) !important;
	border-color: transparent !important;
}

button.hm-shorts__shuffle.is-active svg {
	stroke: currentColor;
}

button.hm-shorts__shuffle svg {
	display: block;
}

.hm-shorts__progress {
	position: absolute;
	bottom: 10px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 5;
	padding: 4px 10px;
	border-radius: 999px;
	border: 1px solid var(--hm-shorts-chrome-border);
	background: var(--hm-shorts-chrome-bg);
	font-size: 0.78rem;
	color: var(--hm-shorts-chrome-muted);
	backdrop-filter: blur(6px);
	pointer-events: none;
	transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.hm-shorts__empty {
	height: 100%;
	display: grid;
	place-items: center;
	padding: 24px;
	text-align: center;
	color: var(--hm-shorts-empty-text) !important;
}

.hm-shorts__empty p {
	margin: 0 !important;
	font-size: 1rem !important;
	color: inherit !important;
}

.hm-shorts.is-loading-more .hm-shorts__feed::after {
	content: attr(data-loading-text);
	display: block;
	padding: 24px;
	text-align: center;
	color: var(--hm-shorts-chrome-muted);
	font-size: 0.9rem;
}

@media (max-width: 640px) {
	.hm-shorts__nav-stack {
		display: flex !important;
		flex-direction: column !important;
		right: 8px !important;
		left: auto !important;
		top: 50% !important;
		transform: translateY(-50%) !important;
		gap: 8px !important;
		z-index: 8 !important;
	}

	button.hm-shorts__nav {
		width: 40px !important;
		height: 40px !important;
		min-width: 40px !important;
		min-height: 40px !important;
		box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22) !important;
	}

	button.hm-shorts__nav svg {
		width: 24px !important;
		height: 24px !important;
	}

	.hm-shorts__meta {
		right: 12px !important;
		left: 12px !important;
		bottom: 16px !important;
		padding-inline-end: 0 !important;
		max-width: calc(100% - 56px) !important;
	}

	.hm-shorts__progress {
		bottom: 8px !important;
		font-size: 0.72rem !important;
	}

	.hm-shorts__frame {
		width: 100% !important;
		border-radius: 0 !important;
	}

	.hm-shorts__ad-progress {
		top: 10px !important;
		left: 12px !important;
		right: 12px !important;
	}

	.hm-shorts__ad-wrap {
		width: min(92%, 320px) !important;
		padding-top: 24px !important;
	}
}

@media (min-width: 900px) {
	.hm-shorts__frame {
		border-radius: 16px;
		box-shadow: var(--hm-shorts-frame-shadow);
	}
}

/* === פרסומת באנר + מנגינה (overlay) === */
.hm-shorts.is-ad-playing .hm-shorts__feed {
	overflow: hidden !important;
	touch-action: none !important;
}

.hm-shorts.is-ad-playing .hm-shorts__nav-stack {
	z-index: 45 !important;
	pointer-events: auto !important;
}

.hm-shorts__ad-overlay {
	position: absolute !important;
	inset: 0 !important;
	z-index: 40 !important;
	display: grid !important;
	place-items: center !important;
	background: linear-gradient(165deg, #1a1a32 0%, #0e0e1c 100%) !important;
	isolation: isolate !important;
}

.hm-shorts__ad-overlay__frame {
	position: relative !important;
	width: min(100%, 480px) !important;
	height: 100% !important;
	max-height: 100% !important;
	display: grid !important;
	place-items: center !important;
	align-content: center !important;
	margin: 0 auto !important;
}

.hm-shorts__ad-progress {
	position: absolute !important;
	top: 14px !important;
	left: 16px !important;
	right: 16px !important;
	z-index: 4 !important;
	display: flex !important;
	align-items: center !important;
	gap: 10px !important;
	padding-inline-end: 72px !important;
}

button.hm-shorts__ad-skip {
	position: absolute !important;
	top: 10px !important;
	inset-inline-end: 12px !important;
	z-index: 5 !important;
	margin: 0 !important;
	padding: 6px 12px !important;
	border: 1px solid rgba(255, 255, 255, 0.28) !important;
	border-radius: 999px !important;
	background: rgba(0, 0, 0, 0.55) !important;
	color: #ffffff !important;
	font-family: inherit !important;
	font-size: 0.78rem !important;
	font-weight: 700 !important;
	line-height: 1.2 !important;
	cursor: pointer !important;
	backdrop-filter: blur(6px);
	transition: background 0.15s ease, transform 0.15s ease !important;
}

button.hm-shorts__ad-skip:hover,
button.hm-shorts__ad-skip:focus-visible {
	background: rgba(0, 0, 0, 0.72) !important;
	transform: translateY(-1px);
}

.hm-shorts__ad-progress-track {
	flex: 1 1 auto !important;
	height: 4px !important;
	border-radius: 999px !important;
	background: rgba(255, 255, 255, 0.22) !important;
	overflow: hidden !important;
}

.hm-shorts__ad-progress-fill {
	display: block !important;
	height: 100% !important;
	width: 0% !important;
	border-radius: inherit !important;
	background: var(--hm-shorts-accent) !important;
	transition: width 0.15s linear !important;
}

.hm-shorts__ad-progress-sec {
	flex: 0 0 auto !important;
	min-width: 2.4em !important;
	font-size: 0.78rem !important;
	font-weight: 700 !important;
	font-variant-numeric: tabular-nums !important;
	color: #ffffff !important;
	text-align: center !important;
	white-space: nowrap !important;
}

.hm-shorts__ad-progress-sec::after {
	content: " שנ׳" !important;
	font-weight: 500 !important;
	font-size: 0.68rem !important;
	opacity: 0.85 !important;
}

.hm-shorts__ad-wrap {
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	gap: 14px !important;
	width: min(88%, 340px) !important;
	padding: 16px !important;
	padding-top: 28px !important;
}

.hm-shorts__ad-card {
	position: relative !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 1px solid rgba(255, 255, 255, 0.14) !important;
	border-radius: 14px !important;
	overflow: hidden !important;
	background: rgba(255, 255, 255, 0.06) !important;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35) !important;
}

.hm-shorts__ad-image {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 100% !important;
	aspect-ratio: 1 / 1 !important;
	background: rgba(0, 0, 0, 0.35) !important;
}

.hm-shorts__ad-image a {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 100% !important;
	height: 100% !important;
}

.hm-shorts__ad-image img {
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	object-fit: contain !important;
	object-position: center center !important;
}

.hm-shorts__ad-label {
	padding: 6px 10px !important;
	font-size: 0.72rem !important;
	font-weight: 600 !important;
	text-align: center !important;
	color: rgba(255, 255, 255, 0.72) !important;
	background: rgba(0, 0, 0, 0.35) !important;
	letter-spacing: 0.02em !important;
}

.hm-shorts__ad-title {
	margin: 0 !important;
	font-size: 0.9rem !important;
	font-weight: 600 !important;
	color: #ffffff !important;
	text-align: center !important;
	line-height: 1.35 !important;
}

.hm-shorts__ad-advertiser {
	margin: 0 !important;
	font-size: 0.78rem !important;
	color: rgba(255, 255, 255, 0.78) !important;
	text-align: center !important;
}

.hm-shorts__ad-audio {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	opacity: 0 !important;
	pointer-events: none !important;
}