/* Defensive icon guard: some themes apply global SVG resets (sizing all
   icons to ~1em to match their own icon font, or forcing fill/stroke to
   match their own icon system) which can shrink or hide our icons entirely.
   These rules force our icons to always render at their intended size and
   with their intended fill/stroke, regardless of what a theme's global CSS
   does elsewhere. */
.aparat-plus-carousel-arrow,
.aparat-plus-gallery-overlay-badge,
.aparat-plus-video-button-thumb {
	box-sizing: border-box !important;
}

.aparat-plus-gallery-overlay-badge svg,
.aparat-plus-video-button-thumb svg {
	fill: currentColor !important;
	stroke: none !important;
	display: block !important;
	max-width: none !important;
	max-height: none !important;
	flex-shrink: 0 !important;
}
.aparat-plus-gallery-overlay-badge svg { width: 26px !important; height: 26px !important; }
.aparat-plus-video-button-thumb svg { width: 16px !important; height: 16px !important; }

.aparat-plus-carousel-arrow svg {
	fill: none !important;
	stroke: currentColor !important;
	stroke-width: 2 !important;
	display: block !important;
	width: 20px !important;
	height: 20px !important;
	max-width: none !important;
	max-height: none !important;
	flex-shrink: 0 !important;
}

.aparat-plus-card-views svg {
	fill: none !important;
	stroke: currentColor !important;
	stroke-width: 2 !important;
	width: 13px !important;
	height: 13px !important;
	display: inline-block !important;
	max-width: none !important;
	max-height: none !important;
}

.aparat-plus-video-wrap {
	position: relative;
	width: 100%;
	max-width: 100%;
}
.aparat-plus-video-inner {
	position: relative;
	width: 100%;
	padding-top: var(--aparat-plus-ratio-padding, 56.25%);
	aspect-ratio: var(--aparat-plus-ratio, 16 / 9);
	background: #0b0b0d;
	overflow: hidden;
	border-radius: inherit;
	display: flex;
	align-items: center;
	justify-content: center;
}
@supports (aspect-ratio: 1 / 1) {
	.aparat-plus-video-inner { height: auto; padding-top: 0; }
}
.aparat-plus-video-frame {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	max-width: 100%;
	max-height: 100%;
	overflow: hidden;
}
.aparat-plus-video-frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

.aparat-plus-badge-duration {
	position: absolute;
	bottom: 8px;
	inset-inline-start: 8px;
	background: rgba(0,0,0,.72);
	backdrop-filter: blur(2px);
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	padding: 3px 7px;
	border-radius: 5px;
	z-index: 2;
	line-height: 1.6;
}

.aparat-plus-widget-heading { font-size: 22px; font-weight: 700; margin: 0 0 8px; line-height: 1.5; }
.aparat-plus-widget-description { font-size: 14px; opacity: .75; margin: 0 0 20px; line-height: 1.8; }

.aparat-plus-grid {
	--aparat-plus-columns: 3;
	--aparat-plus-gap: 24px;
	display: grid;
	grid-template-columns: repeat(var(--aparat-plus-columns), 1fr);
	align-items: start;
	gap: var(--aparat-plus-gap);
}
@media (max-width: 1024px) {
	.aparat-plus-grid { --aparat-plus-columns: 2; }
}
@media (max-width: 640px) {
	.aparat-plus-grid { --aparat-plus-columns: 1; }
}

.aparat-plus-card {
	background: #fff;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0,0,0,.08);
	transition: box-shadow .25s ease, transform .25s ease;
	display: flex;
	flex-direction: column;
	isolation: isolate;
}
.aparat-plus-card:hover { box-shadow: 0 14px 34px -14px rgba(0,0,0,.28); transform: translateY(-3px); }
.aparat-plus-card-media { position: relative; flex-shrink: 0; }
.aparat-plus-card-body { padding: 14px 16px; }
.aparat-plus-card-title {
	font-size: 15px;
	font-weight: 700;
	margin: 0 0 8px;
	line-height: 1.6;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	transition: color .15s ease;
}
.aparat-plus-card:hover .aparat-plus-card-title { color: var(--aparat-plus-accent, #ff5a36); }
.aparat-plus-card-meta {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 12.5px;
	opacity: .65;
	gap: 8px;
}
.aparat-plus-card-channel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aparat-plus-card-views { flex-shrink: 0; }

.aparat-plus-card--overlay .aparat-plus-badge-duration {
	bottom: auto;
	top: 8px;
	inset-inline-start: auto;
	inset-inline-end: 8px;
}

.aparat-plus-card--overlay { position: relative; }
.aparat-plus-card--overlay .aparat-plus-card-body {
	position: absolute;
	inset: auto 0 0 0;
	background: linear-gradient(0deg, rgba(0,0,0,.85), rgba(0,0,0,.35) 70%, transparent);
	color: #fff;
	padding: 34px 16px 14px;
}
.aparat-plus-card--overlay .aparat-plus-card-meta { opacity: .9; }

.aparat-plus-card--minimal .aparat-plus-card-body { display: none; }

.aparat-plus-load-more-wrap { text-align: center; margin-top: 28px; }
.aparat-plus-load-more {
	background: var(--aparat-plus-accent, #ff5a36);
	color: #fff;
	border: none;
	padding: 12px 30px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition: background .15s, transform .15s;
}
.aparat-plus-load-more:hover { background: #ff6e4d; transform: translateY(-1px); }
.aparat-plus-load-more:active { transform: translateY(0); }
.aparat-plus-load-more[disabled] { opacity: .6; cursor: default; transform: none; }

.aparat-plus-pager {
	--aparat-plus-pager-size: 38px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin-top: 28px;
	flex-wrap: wrap;
	transition: opacity .15s ease;
}
.aparat-plus-pager.is-loading { opacity: .55; pointer-events: none; }
.aparat-plus-pager-num,
.aparat-plus-pager-arrow {
	min-width: var(--aparat-plus-pager-size);
	height: var(--aparat-plus-pager-size);
	padding: 0 6px;
	border-radius: 10px;
	border: 1px solid rgba(0,0,0,.14);
	background: #fff;
	color: #4a4f57;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.aparat-plus-pager-arrow { font-size: 16px; }
.aparat-plus-pager-num:hover:not(.is-active),
.aparat-plus-pager-arrow:hover:not([disabled]) {
	background: var(--aparat-plus-accent, #ff5a36);
	border-color: var(--aparat-plus-accent, #ff5a36);
	color: #fff;
}
.aparat-plus-pager-num.is-active {
	background: var(--aparat-plus-accent, #ff5a36);
	border-color: var(--aparat-plus-accent, #ff5a36);
	color: #fff;
	cursor: default;
}
.aparat-plus-pager-arrow[disabled] { opacity: .4; cursor: default; }
.aparat-plus-pager-ellipsis { color: #9aa1ac; padding: 0 2px; user-select: none; }

.aparat-plus-carousel {
	--aparat-plus-slides: 4;
	--aparat-plus-space: 18px;
	position: relative;
}
.aparat-plus-carousel-viewport {
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	-ms-overflow-style: none;
	cursor: grab;
}
.aparat-plus-carousel-viewport::-webkit-scrollbar { display: none; height: 0; }
.aparat-plus-carousel-viewport.is-dragging {
	cursor: grabbing;
	scroll-snap-type: none;
	scroll-behavior: auto;
}
.aparat-plus-carousel-track {
	display: flex;
	align-items: flex-start;
	gap: var(--aparat-plus-space);
}
.aparat-plus-carousel-slide {
	flex: 0 0 calc((100% - (var(--aparat-plus-slides) - 1) * var(--aparat-plus-space)) / var(--aparat-plus-slides));
	min-width: 0;
	scroll-snap-align: start;
	-webkit-user-select: none;
	user-select: none;
}
.aparat-plus-carousel-slide img { -webkit-user-drag: none; }
@media (max-width: 1024px) {
	.aparat-plus-carousel { --aparat-plus-slides: 2; }
}
@media (max-width: 640px) {
	.aparat-plus-carousel { --aparat-plus-slides: 1; }
}
.aparat-plus-carousel-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: var(--aparat-plus-arrow-size, 44px);
	height: var(--aparat-plus-arrow-size, 44px);
	aspect-ratio: 1 / 1;
	flex-shrink: 0;
	padding: 0;
	margin: 0;
	border-radius: 50%;
	background: #fff;
	border: none;
	color: var(--aparat-plus-accent, #ff5a36);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 3;
	box-shadow: 0 6px 20px -6px rgba(0,0,0,.35), 0 0 0 1px rgba(0,0,0,.06);
	transition: background-color .15s ease, color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.aparat-plus-carousel-arrow:hover:not([disabled]) {
	background: var(--aparat-plus-accent, #ff5a36);
	color: #fff;
	transform: translateY(-50%) scale(1.08);
	box-shadow: 0 10px 26px -6px rgba(0,0,0,.45);
}
.aparat-plus-carousel-arrow--prev { right: var(--aparat-plus-arrow-offset, 10px); }
.aparat-plus-carousel-arrow--next { left: var(--aparat-plus-arrow-offset, 10px); }
.aparat-plus-carousel-arrow[disabled] { opacity: .35; cursor: default; }
.aparat-plus-carousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.aparat-plus-carousel-dot { width: var(--aparat-plus-dot-size, 8px); height: var(--aparat-plus-dot-size, 8px); border-radius: 50%; background: #d8d8d8; border: none; cursor: pointer; padding: 0; transition: background-color .15s, width .15s; }
.aparat-plus-carousel-dot.is-active { background: var(--aparat-plus-accent, #ff5a36); width: calc(var(--aparat-plus-dot-size, 8px) * 2.5); border-radius: 4px; }

.aparat-plus-editor-placeholder {
	padding: 40px 20px;
	text-align: center;
	background: #f6f6f7;
	border: 1px dashed #c9c9c9;
	border-radius: 10px;
	color: #666;
	font-size: 13px;
}

.aparat-plus-description-video { margin: 20px 0; max-width: 100%; }
.aparat-plus-description-video .aparat-plus-video-wrap { border-radius: 10px; overflow: hidden; }

.aparat-plus-video-empty-inner {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f4f4f5;
	color: #8a8f98;
	font-size: 13px;
	text-align: center;
	padding: 16px;
}

/* Gallery overlay play badge: the gallery itself is left completely
   untouched (no slide injected, no markup changed) so it can never break a
   theme's slider/carousel. A small badge simply sits on top of it and opens
   the shared popup modal on click. */
.woocommerce-product-gallery { position: relative; }
.aparat-plus-gallery-overlay-badge {
	position: absolute;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	border: none;
	background: var(--aparat-plus-accent, #ff5a36);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 10;
	box-shadow: 0 6px 20px -4px rgba(0,0,0,.5);
	transition: transform .2s ease;
}
.aparat-plus-gallery-overlay-badge svg { margin-inline-start: 2px; }
.aparat-plus-gallery-overlay-badge:hover { transform: scale(1.08); }
.aparat-plus-gallery-overlay-badge--overlay_bottom { bottom: 16px; inset-inline-end: 16px; }
.aparat-plus-gallery-overlay-badge--overlay_bottom_start { bottom: 16px; inset-inline-start: 16px; }
.aparat-plus-gallery-overlay-badge--overlay_top_end { top: 16px; inset-inline-end: 16px; }
.aparat-plus-gallery-overlay-badge--overlay_top_start { top: 16px; inset-inline-start: 16px; }
.aparat-plus-gallery-overlay-badge--overlay_center { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.aparat-plus-gallery-overlay-badge--overlay_center:hover { transform: translate(-50%, -50%) scale(1.08); }

/* Video popup button (thumbnail + label), usable at several positions. */
.aparat-plus-video-button {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: #fff;
	border: 1px solid rgba(0,0,0,.14);
	color: #24262b;
	border-radius: 999px;
	padding-block: 8px;
	padding-inline-start: 8px;
	padding-inline-end: 22px;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
	cursor: pointer;
	margin: 10px 0;
	width: fit-content;
	max-width: 100%;
	flex-shrink: 0;
	align-self: flex-start;
	box-sizing: border-box;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .15s ease;
	box-shadow: 0 2px 10px -4px rgba(0,0,0,.18);
}
.aparat-plus-video-button:hover,
.aparat-plus-video-button:focus-visible {
	background: var(--aparat-plus-accent, #ff5a36);
	border-color: var(--aparat-plus-accent, #ff5a36);
	color: #fff;
	box-shadow: 0 8px 20px -8px rgba(0,0,0,.35);
	transform: translateY(-1px);
}
.aparat-plus-video-button:hover .aparat-plus-video-button-thumb,
.aparat-plus-video-button:focus-visible .aparat-plus-video-button-thumb {
	background: #fff;
	color: var(--aparat-plus-accent, #ff5a36);
}
.aparat-plus-video-button-thumb {
	position: relative;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	overflow: hidden;
	flex-shrink: 0;
	background: var(--aparat-plus-accent, #ff5a36);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	transition: background-color .15s ease, color .15s ease;
}
.aparat-plus-video-button-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.aparat-plus-video-button-thumb-fallback {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}
.aparat-plus-video-button-label {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 220px;
}

.aparat-plus-video-button--tracked {
	position: fixed;
	z-index: 8000;
	margin: 0;
}

.aparat-plus-video-button--floating {
	position: fixed;
	bottom: 26px;
	z-index: 9000;
	margin: 0;
	top: auto !important;
	left: auto !important;
}
.aparat-plus-video-button--floating[data-aparat-floating-side="left"] { left: 26px !important; right: auto; }
.aparat-plus-video-button--floating[data-aparat-floating-side="right"],
.aparat-plus-video-button--floating:not([data-aparat-floating-side]) { right: 26px; left: auto !important; }
@media (max-width: 480px) {
	.aparat-plus-video-button--floating .aparat-plus-video-button-label,
	.aparat-plus-video-button--tracked .aparat-plus-video-button-label { display: none; }
	.aparat-plus-video-button--floating,
	.aparat-plus-video-button--tracked { padding: 6px; }
}

/* Popup modal (shared, single instance per page) */
.aparat-plus-video-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.aparat-plus-video-modal.is-open { display: flex; }
.aparat-plus-video-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,.75);
}
.aparat-plus-video-modal__box {
	position: relative;
	width: 100%;
	max-width: 860px;
	z-index: 1;
}
.aparat-plus-video-modal__close {
	position: absolute;
	top: -44px;
	inset-inline-end: 0;
	background: transparent;
	border: none;
	color: #fff;
	font-size: 30px;
	line-height: 1;
	cursor: pointer;
	padding: 4px 8px;
}
@media (max-width: 600px) {
	.aparat-plus-video-modal { padding: 12px; }
	.aparat-plus-video-modal__close {
		top: 8px;
		inset-inline-end: 8px;
		width: 36px;
		height: 36px;
		display: flex;
		align-items: center;
		justify-content: center;
		background: rgba(0,0,0,.55);
		border-radius: 50%;
		font-size: 22px;
		z-index: 2;
	}
}
.aparat-plus-video-modal__body { width: 100%; }
.aparat-plus-video-modal-player {
	position: relative;
	width: 100%;
	height: 0;
	padding-top: 56.25%;
	background: #000;
	border-radius: 8px;
	overflow: hidden;
}
.aparat-plus-video-modal-player iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}
.aparat-plus-video-modal-spinner { display: none; }
.aparat-plus-video-modal-player.is-loading .aparat-plus-video-modal-spinner {
	display: flex;
	position: absolute;
	inset: 0;
	align-items: center;
	justify-content: center;
	z-index: 1;
}
.aparat-plus-video-modal-player.is-loading .aparat-plus-video-modal-spinner::after {
	content: "";
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 3px solid rgba(255,255,255,.2);
	border-top-color: var(--aparat-plus-accent, #ff5a36);
	animation: aparat-plus-spin .8s linear infinite;
}
html.aparat-plus-modal-open { overflow: hidden; }
@keyframes aparat-plus-spin { to { transform: rotate(360deg); } }

@media (max-width: 480px) {
	.aparat-plus-card-title { font-size: 14px; }
}
