/* AC YouTube API - Frontend */

.acyt-wrap {
	box-sizing: border-box;
	max-width: 100%;
}
.acyt-wrap *,
.acyt-modal * {
	box-sizing: border-box;
}

.acyt-section-title {
	color: var(--acyt-sec-color, #1a1a1a);
	text-align: center;
	margin: 0 0 28px;
	font-size: var(--acyt-sec-size, 26px);
	font-weight: var(--acyt-sec-weight, 700);
}

/* --- Grid: masaüstü --- */
.acyt-grid {
	display: grid;
	grid-template-columns: repeat(var(--acyt-cols-d, 2), 1fr);
	gap: var(--acyt-gap, 28px);
}

/* Tablet */
@media (max-width: 1024px) {
	.acyt-grid {
		grid-template-columns: repeat(var(--acyt-cols-t, 2), 1fr);
	}
}

/* Mobil */
@media (max-width: 600px) {
	.acyt-grid {
		grid-template-columns: repeat(var(--acyt-cols-m, 1), 1fr);
	}
}

/* --- Kart --- */
.acyt-card {
	background: var(--acyt-card-bg, #fff);
	border-radius: var(--acyt-card-radius, 12px);
	overflow: hidden;
	cursor: pointer;
	transition: transform .2s ease, box-shadow .2s ease;
	outline: none;
}
.acyt-card.acyt-shadow {
	box-shadow: 0 6px 22px rgba(0, 0, 0, .08);
}
.acyt-card:hover {
	transform: translateY(-4px);
}
.acyt-card:focus-visible {
	box-shadow: 0 0 0 3px var(--acyt-title-hover, #22a447);
}

.acyt-thumb {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #e7ebe8;
	border-radius: var(--acyt-card-radius, 12px);
	overflow: hidden;
}
.acyt-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Play butonu */
.acyt-play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: var(--acyt-play-size, 64px);
	height: var(--acyt-play-size, 64px);
	background: var(--acyt-play-bg, #fff);
	color: var(--acyt-play-icon, #22a447);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
	transition: transform .2s ease;
}
.acyt-card:hover .acyt-play {
	transform: translate(-50%, -50%) scale(1.08);
}
.acyt-play svg {
	width: 45%;
	height: 45%;
	margin-left: 6%;
}

.acyt-title {
	color: var(--acyt-title-color, #1a1a1a);
	font-size: var(--acyt-title-size, 20px);
	font-weight: var(--acyt-title-weight, 700);
	line-height: 1.3;
	margin: 16px 4px 6px;
	transition: color .2s ease;
}
.acyt-card:hover .acyt-title {
	color: var(--acyt-title-hover, #22a447);
}
.acyt-date {
	color: var(--acyt-date-color, #8a8a8a);
	font-size: var(--acyt-date-size, 14px);
	font-weight: var(--acyt-date-weight, 400);
	margin: 0 4px 14px;
}

.acyt-error {
	padding: 14px 18px;
	background: #fff3f3;
	border: 1px solid #ffc9c9;
	color: #b42318;
	border-radius: 8px;
}

/* ===== Popup ===== */
.acyt-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 24px;
}
.acyt-modal.is-open {
	display: flex;
}
.acyt-modal-overlay {
	position: absolute;
	inset: 0;
	background: var(--acyt-overlay, rgba(0, 0, 0, .8));
}
.acyt-modal-box {
	position: relative;
	width: 100%;
	max-width: var(--acyt-popup-width, 900px);
	animation: acyt-pop .22s ease;
}
@keyframes acyt-pop {
	from { transform: scale(.96); opacity: 0; }
	to   { transform: scale(1); opacity: 1; }
}
.acyt-modal-frame {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000;
	border-radius: var(--acyt-popup-radius, 14px);
	overflow: hidden;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}
.acyt-player,
.acyt-player iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* Kapat butonu */
.acyt-close {
	position: absolute;
	top: calc(var(--acyt-close-size, 44px) / -2);
	right: calc(var(--acyt-close-size, 44px) / -2);
	width: var(--acyt-close-size, 44px);
	height: var(--acyt-close-size, 44px);
	background: var(--acyt-close-bg, #22a447);
	color: var(--acyt-close-icon, #fff);
	border: none;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
	z-index: 2;
	transition: transform .15s ease;
}
.acyt-close:hover {
	transform: scale(1.1);
}
.acyt-close svg {
	width: 48%;
	height: 48%;
}

/* --- Kapat butonu konumu (masaüstü) --- */
.acyt-cpos-corner .acyt-close { top: calc(var(--acyt-close-size, 44px) / -2); right: calc(var(--acyt-close-size, 44px) / -2); }
.acyt-cpos-inside .acyt-close { top: 10px; right: 10px; }
.acyt-cpos-above  .acyt-close { top: calc(-1 * (var(--acyt-close-size, 44px) + 12px)); right: 0; }


/* Mobil: popup tam genişlik, font boyutları ve kapat konumu */
@media (max-width: 600px) {
	.acyt-modal {
		padding: 16px;
	}
	.acyt-modal-box {
		max-width: 100%;
	}
	.acyt-title {
		font-size: var(--acyt-title-size-m, var(--acyt-title-size, 18px));
	}
	.acyt-date {
		font-size: var(--acyt-date-size-m, var(--acyt-date-size, 13px));
	}
	.acyt-section-title {
		font-size: var(--acyt-sec-size-m, var(--acyt-sec-size, 22px));
	}
	.acyt-cmpos-corner .acyt-close { top: calc(var(--acyt-close-size, 44px) / -2); right: calc(var(--acyt-close-size, 44px) / -2); }
	.acyt-cmpos-inside .acyt-close { top: 8px; right: 8px; }
	.acyt-cmpos-above  .acyt-close { top: calc(-1 * (var(--acyt-close-size, 44px) + 10px)); right: 0; }
}

/* Popup açıkken sayfayı kilitle */
body.acyt-locked {
	overflow: hidden;
}
