/* ============================================================
   AdvancedSmile Video Reels — Elementor Widget
   Degiskenler Elementor kontrollerinden --asv-* ile beslenir.
   ============================================================ */

.asv-reels {
	--asv-card-w: 300px;
	--asv-ratio: 9/16;
	--asv-gap: 20px;
	--asv-pad: 24px;
	--asv-radius: 16px;
	--asv-btn: 40px;
	--asv-icon: 16px;
	--asv-overlay: rgba(8, 22, 54, 0.85);

	width: 100%;
}

/* Tam ekran genisligi: container'in disina tasar */
.asv-reels--stretch {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

/* ---------- Baslik alani ---------- */

.asv-reels__header {
	text-align: center;
	padding: 0 var(--asv-pad);
	margin-bottom: 36px;
}

.asv-reels__handle {
	display: inline-block;
	color: #2f7df6;
	font-size: 15px;
	font-weight: 500;
	text-decoration: none;
}

a.asv-reels__handle:hover {
	text-decoration: underline;
}

.asv-reels__title {
	margin: 10px 0 0;
	color: #0e1b33;
	font-size: 32px;
	font-weight: 700;
	line-height: 1.2;
}

.asv-reels__desc {
	margin: 12px auto 0;
	color: #6b7280;
	font-size: 15px;
	line-height: 1.6;
	max-width: 760px;
}

.asv-reels__header[style*='text-align: left'] .asv-reels__desc,
.asv-reels__header[style*='text-align: right'] .asv-reels__desc {
	margin-left: 0;
	margin-right: 0;
}

/* ---------- Kaydirma serit (track) ---------- */

.asv-reels__track {
	display: flex;
	gap: var(--asv-gap);
	overflow-x: auto;
	overflow-y: hidden;
	padding: 4px var(--asv-pad) 10px;
	cursor: grab;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior-x: contain;
	scrollbar-width: none; /* Firefox */
	-ms-overflow-style: none;
}

.asv-reels__track::-webkit-scrollbar {
	display: none; /* Chrome / Safari */
}

.asv-reels__track:focus-visible {
	outline: 2px solid #2f7df6;
	outline-offset: 2px;
}

.asv-reels__track.is-dragging {
	cursor: grabbing;
	scroll-snap-type: none !important;
	scroll-behavior: auto !important;
}

.asv-reels--snap .asv-reels__track {
	scroll-snap-type: x proximity;
}

.asv-reels--snap .asv-reels__card {
	scroll-snap-align: center;
}

/* ---------- Kart ---------- */

.asv-reels__card {
	position: relative;
	flex: 0 0 var(--asv-card-w);
	width: var(--asv-card-w);
	aspect-ratio: var(--asv-ratio);
	border-radius: var(--asv-radius);
	overflow: hidden;
	background-color: #0b1e4b;
	user-select: none;
	-webkit-user-select: none;
	transform: translateZ(0); /* Safari: border-radius + video kirpma */
}

.asv-reels__video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	pointer-events: none; /* tiklamayi kart yakalar */
}

/* ---------- Alt overlay: handle + butonlar ---------- */

.asv-reels__overlay {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 40px 12px 12px 14px;
	background: linear-gradient(to top, var(--asv-overlay) 0%, rgba(0, 0, 0, 0) 100%);
}

.asv-reels__card-handle {
	color: #fff;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	min-width: 0;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.asv-reels__controls {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 0 0 auto;
}

/* ---------- Butonlar ---------- */

.asv-reels__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--asv-btn);
	height: var(--asv-btn);
	padding: 0;
	border: none;
	border-radius: 50%;
	background-color: #fff;
	color: #2f7df6;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
	transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.asv-reels__btn:hover,
.asv-reels__btn:focus-visible {
	background-color: #2f7df6;
	color: #fff;
	transform: scale(1.06);
}

.asv-reels__btn:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.asv-reels__btn svg {
	width: var(--asv-icon);
	height: var(--asv-icon);
	fill: currentColor;
	pointer-events: none;
}

/* Play butonu: play ikonu ile biraz saga kaydirilmis gorunum */
.asv-icon--play {
	margin-left: 2px;
}

/* ---------- Durum ikonlari ---------- */

.asv-icon--pause,
.asv-icon--sound {
	display: none;
}

.asv-reels__card.is-playing .asv-icon--play {
	display: none;
}

.asv-reels__card.is-playing .asv-icon--pause {
	display: block;
	margin-left: 0;
}

.asv-reels__card.is-muted .asv-icon--sound {
	display: none;
}

.asv-reels__card.is-muted .asv-icon--muted {
	display: block;
}

.asv-reels__card:not(.is-muted) .asv-icon--muted {
	display: none;
}

.asv-reels__card:not(.is-muted) .asv-icon--sound {
	display: block;
}

/* ---------- Mobil ---------- */

@media (max-width: 767px) {
	.asv-reels {
		--asv-card-w: 235px;
		--asv-gap: 14px;
		--asv-pad: 16px;
		--asv-btn: 36px;
	}

	.asv-reels__title {
		font-size: 24px;
	}

	.asv-reels__desc {
		font-size: 14px;
	}

	.asv-reels__header {
		margin-bottom: 24px;
	}
}

/* Kucuk telefonlar: kart ekrandan buyuk olmasin */
@media (max-width: 400px) {
	.asv-reels__card {
		flex-basis: min(var(--asv-card-w), calc(100vw - var(--asv-pad) * 2));
		width: min(var(--asv-card-w), calc(100vw - var(--asv-pad) * 2));
	}
}

/* Hareket azaltma tercihi */
@media (prefers-reduced-motion: reduce) {
	.asv-reels__btn {
		transition: none;
	}

	.asv-reels__btn:hover {
		transform: none;
	}
}
