/* Skrinz embed on WC single-product pages.
   Renders under the standard product summary at woocommerce_after_single_product_summary. */

.bskz-product-embed {
	margin: 32px 0 24px;
	padding: 24px 0;
	border-top: 1px solid #e5e7eb;
}

.bskz-product-embed__heading {
	font-size: 18px;
	font-weight: 600;
	margin: 0 0 16px;
	color: #1a1a1a;
}

/* 1.0.0.9: reverted to the original auto-fit grid layout (was switched to
   flex column in 1.0.0.6, which regressed landscape sizing inside Elementor
   single-product-page containers — `width: 100%` on a flex item didn't
   reliably stretch when the parent's container was a custom flex/grid).
   Auto-fit grid behaves predictably: a single Skrinz fills its 1fr column
   = full container width. Multiple Skrinz break into responsive cards at
   ≥320px each. Portrait gets a width override (see below) and is centered
   in its grid cell. */
.bskz-product-embed__list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 20px;
	align-items: start;
}

.bskz-product-embed__item {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

/* Portrait: sized by viewport HEIGHT so the iframe fills the screen
   vertically. Width-clamp is 9/16 of the target player height — player
   width = article width, height derives from the inline 9:16 aspect-ratio.
   `justify-self: center` centers the portrait in its grid cell so it
   doesn't sit awkwardly aligned to the left of a wide cell. */
.bskz-product-embed__item--portrait {
	width: clamp(280px, 45vh, 480px);
	justify-self: center;
	max-width: 100%;
}

.bskz-product-embed__item-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 16px;
	border-bottom: 1px solid #f3f4f6;
}

.bskz-product-embed__item-title {
	font-size: 14px;
	font-weight: 600;
	margin: 0;
	color: #1a1a1a;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

/* 1.0.3: per-Skrinz live status pill in the embed header. Green when
   `Schedule_Checker::is_active_now()` returns true, neutral grey otherwise.
   Tiny so it sits naturally next to the Skrinz title. */
.bskz-status-pill {
	display: inline-flex;
	align-items: center;
	font-size: 11px;
	font-weight: 500;
	line-height: 1;
	padding: 3px 8px;
	border-radius: 999px;
	white-space: nowrap;
}

.bskz-status-pill.is-online  { background: #d1fae5; color: #065f46; }
.bskz-status-pill.is-offline { background: #f3f4f6; color: #6b7280; }
.bskz-status-pill.is-online::before {
	content: '';
	display: inline-block;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #10b981;
	margin-right: 6px;
}
.bskz-status-pill.is-offline::before {
	content: '';
	display: inline-block;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #9ca3af;
	margin-right: 6px;
}

.bskz-product-embed__kiosk-link {
	font-size: 12px;
	color: #6366f1;
	text-decoration: none;
	white-space: nowrap;
}

.bskz-product-embed__kiosk-link:hover {
	text-decoration: underline;
}

/* 1.0.3: cross-link line under the iframe — "Bu Skrinz N başka reklam
   ünitesinde daha oynuyor →". Subtle, footer-style. */
.bskz-product-embed__cross-link {
	margin: 0;
	padding: 10px 16px;
	border-top: 1px solid #f3f4f6;
	font-size: 12px;
	background: #fafafa;
}

.bskz-product-embed__cross-link a {
	color: #6366f1;
	text-decoration: none;
}

.bskz-product-embed__cross-link a:hover {
	text-decoration: underline;
}

/* Player wrapper: aspect-ratio is set inline per-Skrinz (16/9 for landscape,
   9/16 for portrait). Container fills its column width; height follows ratio. */
.bskz-product-embed__player {
	background: #000;
	width: 100%;
	position: relative;
	overflow: hidden;
}

.bskz-product-embed__iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

@media (max-width: 640px) {
	/* On mobile, force the grid to a single column and let portrait go
	   edge-to-edge instead of leaving margins on a phone screen. */
	.bskz-product-embed__list {
		grid-template-columns: 1fr;
	}
	.bskz-product-embed__item--portrait {
		width: 100%;
		justify-self: stretch;
	}
}
