/**
 * Scene Switcher Grid Widget
 * scene-switcher-grid.css
 */

/* ── Widget Shell ───────────────────────────────────────────── */
.psg-widget {
	--psg-transition: 0.6s;
}

/* ── Header ─────────────────────────────────────────────────── */
.psg-header {
	margin-bottom: 24px;
}
.psg-title {
	margin: 0 0 6px;
	padding: 0;
	line-height: 1.2;
}
.psg-subtitle {
	margin: 0;
	padding: 0;
	opacity: 0.7;
}

/* ── Toggle Bar ─────────────────────────────────────────────── */
.psg-toggle-bar {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 14px;
}

/* Labels */
.psg-toggle-label {
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	opacity: 0.4;
	transition: opacity 0.25s ease;
	user-select: none;
	cursor: default;
}
.psg-toggle-label.active {
	opacity: 1;
}

/* Switch */
.psg-toggle-switch {
	position: relative;
	display: inline-block;
	width: 52px;
	height: 28px;
	cursor: pointer;
	flex-shrink: 0;
}
.psg-toggle-input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}
.psg-toggle-track {
	position: absolute;
	inset: 0;
	border-radius: 999px;
	background: #888;
	transition: background var(--psg-transition) ease;
}
.psg-toggle-thumb {
	position: absolute;
	top: 4px;
	left: 4px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
	transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
	pointer-events: none;
}
.psg-toggle-input:checked ~ .psg-toggle-thumb {
	transform: translateX(24px);
}

/* ── Grid ───────────────────────────────────────────────────── */
.psg-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr); /* overridden by Elementor selectors */
	gap: 16px;
}

/* ── Card ───────────────────────────────────────────────────── */
.psg-card {
	display: block;
	text-decoration: none;
	color: inherit;
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
	transition: transform 0.22s ease, box-shadow 0.22s ease;
	cursor: pointer;
	position: relative;
}
.psg-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 6px 28px rgba(0, 0, 0, 0.13);
}

/* Image Wrapper */
.psg-img-wrap {
	position: relative;
	width: 100%;
	height: 220px; /* overridden by Elementor slider */
	overflow: hidden;
}

/* Images */
.psg-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: opacity 0.6s ease; /* overridden by Elementor transition speed control */
}
.psg-img-a { opacity: 1; }
.psg-img-b { opacity: 0; }

/* State B active: swap images */
.psg-widget.is-b .psg-img-a { opacity: 0; }
.psg-widget.is-b .psg-img-b { opacity: 1; }

/* Card Footer */
.psg-card-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 14px;
	gap: 8px;
}

.psg-item-name {
	font-size: 0.82rem;
	font-weight: 500;
	line-height: 1.3;
}

/* ── Badge ──────────────────────────────────────────────────── */
.psg-badge {
	display: inline-block;
	font-size: 0.62rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 3px 9px;
	border-radius: 999px;
	background: #333;
	color: #fff;
	white-space: nowrap;
	flex-shrink: 0;
	transition: background var(--psg-transition) ease;
}

/* ── Responsive Fallback ────────────────────────────────────── */
/* Elementor handles breakpoints via its own selectors.
   These are safety-net defaults only. */
@media (max-width: 767px) {
	.psg-grid {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}
@media (min-width: 768px) and (max-width: 1024px) {
	.psg-grid {
		/* tablet default – Elementor responsive control overrides this */
		grid-template-columns: repeat(2, 1fr);
	}
}