/* Mobile shorts feed - standalone page (shorts.tpl), no dependency on style.css */

* { box-sizing: border-box; }

html, body {
	margin: 0;
	padding: 0;
	height: 100%;
	background: #000;
	color: #fff;
	font-family: 'Roboto', BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
	overscroll-behavior-y: none;
}

body.shorts-body {
	display: flex;
	flex-direction: column;
	height: 100dvh;
	overflow: hidden;
}

/* --- fejlec: reklamsav + logo ------------------------------------------- */

.shorts-head {
	flex: 0 0 auto;
	padding-top: env(safe-area-inset-top);
	background: #0d0d0d;
}

/* a fejlecbol atmasolt hqb-topbar keskenyebb ezen az oldalon */
.shorts-head .hqb-topbar {
	--tb-h: 32px;
	--tb-h-mob: 30px;
	position: relative;   /* nem sticky, de a __close abszolut poziciojanak kell a kontext */
	padding: 2px 30px;
}

.shorts-head .hqb-topbar__text { font-size: clamp(10px, 2.5vw, 13px); }
.shorts-head .hqb-topbar__btn { padding: 3px 10px; font-size: clamp(10px, 2.3vw, 12px); }
.shorts-head .hqb-topbar__close { padding: 4px 7px; font-size: 18px; }

@media (max-width: 767px) {
	.shorts-head .hqb-topbar { padding: 2px 28px; }
}

.shorts-bar {
	display: flex;
	align-items: center;
	gap: 10px;
	height: 36px;
	padding: 0 10px;
	background: #0d0d0d;
	border-bottom: 1px solid #222;
}

.shorts-back {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	margin-left: -4px;
	color: #fff;
	font-size: 26px;
	line-height: 1;
	text-decoration: none;
}

.shorts-logo { flex: 0 0 auto; display: block; }
.shorts-logo img { display: block; width: auto; height: 22px; }

.shorts-bar-title {
	flex: 1 1 auto;
	overflow: hidden;
	color: #b9b9b9;
	font-size: 12px;
	text-align: right;
	white-space: nowrap;
	text-overflow: ellipsis;
}

/* --- feed --------------------------------------------------------------- */

.shorts-feed {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: scroll;
	overscroll-behavior-y: contain;
	scroll-snap-type: y mandatory;
	-webkit-overflow-scrolling: touch;
}

/* the KVS block wrappers must not break the snap container */
#list_videos_shorts_feed,
#list_videos_shorts_feed_items { display: contents; }

.shorts-slide {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	scroll-snap-align: start;
	scroll-snap-stop: always;
	background: #000;
	overflow: hidden;
}

.shorts-video {
	position: relative;
	z-index: 1;
	width: 100%;
	height: 100%;
	background: transparent;
}

.shorts-video.is-vertical { object-fit: cover; }

/* fekvo videok: contain + felnagyitas. 1 = eredeti (16:9-nel a kepernyo 28%-a),
   3.55 = teljes kitoltes 16:9-nel, de a kepkocka 72%-a levagva */
.shorts-video.is-horizontal {
	object-fit: contain;
	transform: scale(var(--shorts-h-zoom, 2));
}

/* elmosott hatter a videó sajat kepebol: 32x18-as canvas felnagyitva */
.shorts-ambient {
	position: absolute;
	inset: 0;
	z-index: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: blur(26px) saturate(1.6) brightness(.5);
	transform: scale(1.18);
}


/* --- overlay ------------------------------------------------------------ */

.shorts-overlay {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 10;
	padding: 48px 16px calc(30px + env(safe-area-inset-bottom)) 16px;   /* 30px: elfer alatta a haladassav */
	background: linear-gradient(0deg, rgba(0,0,0,.8) 0%, rgba(0,0,0,0) 100%);
	pointer-events: none;
}

/* cim + idotartam egyetlen, jol lathatoan kattinthato kartya-link a videooldalra */
.shorts-open {
	pointer-events: auto;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 10px 10px 14px;
	border: 1px solid rgba(255,255,255,.35);
	border-radius: 14px;
	background: rgba(0,0,0,.4);
	color: #fff;
	text-decoration: none;
	-webkit-tap-highlight-color: transparent;
}

.shorts-open:active { background: rgba(255,255,255,.18); }

.shorts-open-text {
	flex: 1 1 auto;
	min-width: 0;
}

.shorts-video-title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	color: #fff;
	font-size: 15px;
	line-height: 1.35;
}

.shorts-duration {
	display: block;
	margin-top: 4px;
	color: #cfcfcf;
	font-size: 12px;
}

.shorts-open-arrow {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: #ee7a08;
	color: #111;
}

.shorts-open-arrow svg { width: 20px; height: 20px; display: block; }

/* jobb oldali sav: videooldal-gomb (ikon, szoveg nelkul) a nemitas-gomb folott */
.shorts-open-btn {
	position: absolute;
	right: 10px;
	bottom: calc(182px + env(safe-area-inset-bottom));
	z-index: 15;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: #ee7a08;
	color: #111;
	box-shadow: 0 2px 10px rgba(0,0,0,.45);
	-webkit-tap-highlight-color: transparent;
}

.shorts-open-btn:active { transform: scale(.94); }
.shorts-open-btn svg { width: 24px; height: 24px; display: block; }

.shorts-mute-btn {
	position: absolute;
	right: 12px;
	bottom: calc(130px + env(safe-area-inset-bottom));   /* a cim-kartya folott, ne takarja */
	z-index: 15;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 50%;
	background: rgba(0,0,0,.45);
	color: #fff;
	font: inherit;
}

.shorts-mute-btn::after {
	content: '\1F507';
	font-size: 18px;
	line-height: 40px;
}

body.sound-on .shorts-mute-btn::after { content: '\1F50A'; }

.shorts-play-hint {
	position: absolute;
	z-index: 12;
	display: none;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: rgba(0,0,0,.5);
	color: #fff;
	font-size: 32px;
	line-height: 72px;
	text-align: center;
}

.shorts-slide.is-blocked .shorts-play-hint { display: block; }

/* --- ad slide ----------------------------------------------------------- */

.shorts-ad-box {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-width: 300px;
	min-height: 250px;
	padding: 12px;
	border: 1px dashed #3a3a3a;
	border-radius: 8px;
}

.shorts-ad-label {
	color: #7a7a7a;
	font-size: 11px;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.shorts-ad-content { max-width: 100%; }

/* --- haladassav + tekeres ----------------------------------------------- */

.shorts-progress {
	position: absolute;
	left: 0;
	right: 0;
	bottom: env(safe-area-inset-bottom);
	z-index: 16;
	height: 24px;                 /* hüvelykujjra meretezett talalati felulet */
	display: flex;
	align-items: flex-end;
	padding-bottom: 4px;
	touch-action: none;           /* kulonben a scroll-snap konteiner elgorget tekeres kozben */
	cursor: pointer;
}

.shorts-progress::before {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: 4px;
	height: 3px;
	background: rgba(255,255,255,.25);
	transition: height .12s ease;
}

.shorts-progress-fill {
	position: relative;
	height: 3px;
	width: 0;
	background: #fff;
	transition: height .12s ease;
}

.shorts-slide.is-scrubbing .shorts-progress::before,
.shorts-slide.is-scrubbing .shorts-progress-fill { height: 7px; }

.shorts-slide.is-scrubbing .shorts-progress-fill { background: #e9ff5c; }

/* --- VAST video hirdetes ------------------------------------------------ */

.shorts-ad-video { display: none; }
.shorts-slide-ad.has-vast .shorts-ad-video { display: block; }
.shorts-slide-ad.has-vast .shorts-ad-box { display: none; }

.shorts-ad-badge {
	position: absolute;
	top: 10px;
	left: 12px;
	z-index: 12;
	display: none;
	padding: 2px 7px;
	border: 1px solid rgba(255,255,255,.35);
	border-radius: 3px;
	background: rgba(0,0,0,.45);
	color: #dcdcdc;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .09em;
	text-transform: uppercase;
}

.shorts-slide-ad.has-vast .shorts-ad-badge { display: block; }

.shorts-ad-cta {
	position: absolute;
	left: 16px;
	right: 16px;
	bottom: calc(24px + env(safe-area-inset-bottom));
	z-index: 14;
	display: none;
	padding: 11px 16px;
	border-radius: 8px;
	background: #e9ff5c;
	color: #111;
	font-size: 15px;
	font-weight: 800;
	text-align: center;
	text-decoration: none;
}

.shorts-slide-ad.has-vast .shorts-ad-cta { display: block; }

.shorts-ad-cta-url {
	display: block;
	margin-top: 2px;
	font-size: 11px;
	font-weight: 600;
	opacity: .7;
}

/* --- end slide ---------------------------------------------------------- */

.shorts-end-box { text-align: center; padding: 0 24px; }
.shorts-end-title { margin: 0 0 14px; font-size: 17px; }

.shorts-end-link {
	display: inline-block;
	padding: 10px 18px;
	border-radius: 6px;
	background: #d81f4a;
	color: #fff;
	font-size: 14px;
	text-decoration: none;
}
