/* ==========================================================================
   StreamPulse — Base + Rail + Wall styles
   ========================================================================== */

/* --- Empty state --- */
.sp-empty {
	text-align: center;
	padding: 2rem 1rem;
	color: #666;
	font-style: italic;
}

/* --- Card (shared between rail and wall) --- */
.sp-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.sp-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	transform: translateY(-2px);
}

.sp-card:focus {
	outline: 2px solid #0073aa;
	outline-offset: 2px;
}

/* Thumbnail wrapper */
.sp-card__thumbnail {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #000;
}

.sp-card__thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Platform badge */
.sp-card__badge {
	position: absolute;
	top: 8px;
	left: 8px;
	padding: 2px 8px;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #fff;
	line-height: 1.4;
}

.sp-card__badge--youtube {
	background: #ff0000;
}

.sp-card__badge--twitch {
	background: #9146ff;
}

/* Info section */
.sp-card__info {
	padding: 10px 12px;
}

.sp-card__title {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin-bottom: 4px;
}

.sp-card__meta {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 12px;
	color: #666;
}

.sp-card__channel {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 60%;
}

.sp-card__viewers {
	white-space: nowrap;
	flex-shrink: 0;
}

/* Autoplay embed container */
.sp-card__embed {
	position: relative;
	aspect-ratio: 16 / 9;
	background: #000;
}

.sp-card__embed iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* --- Rail layout --- */
.sp-rail {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	overflow-y: hidden;
	padding: 4px 0 12px;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
}

.sp-rail .sp-card {
	flex: 0 0 280px;
	min-width: 280px;
	scroll-snap-align: start;
}

/* Responsive: stack below 600px */
@media (max-width: 600px) {
	.sp-rail {
		flex-direction: column;
		overflow-x: visible;
	}

	.sp-rail .sp-card {
		flex: none;
		min-width: 0;
		width: 100%;
	}
}

/* --- Wall layout --- */
.sp-wall {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
}

/* Tablet: 2 columns */
@media (max-width: 768px) {
	.sp-wall {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Mobile: 1 column */
@media (max-width: 600px) {
	.sp-wall {
		grid-template-columns: 1fr;
	}
}
