// Getting Started page — welcome card + help sidebar.
$white: #ffffff;
$heading-color: #1D2327;

// ====================
// Main Container
// ====================

.sp-real-qs-page {
	max-width: 1400px;
	margin: 0 auto;

	* {
		box-sizing: border-box;
	}
}

.sp-real-qs-page-content {
	gap: 40px;
}

// ====================
// Welcome Card
// ====================

.sp-real-qs-welcome-card {
	flex: 1;
	background: $white;
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	padding: 40px;
}

.sp-real-qs-welcome-title {
	font-size: 28px;
	line-height: 1;
	font-weight: 600;
	color: $heading-color;
	margin: 0;
	text-transform: capitalize;
}

.sp-real-qs-welcome-desc {
	max-width: 560px;
	margin: 16px 0 0;
	color: #3C434A;
	font-size: 14px;
	line-height: 1.6;
}

.sp-real-qs-welcome-actions {
	flex-wrap: wrap;
	gap: 18px;
	margin: 30px 0;
}

// ====================
// Buttons
// ====================

.sp-real-qs-btn,
.sp-real-qs-btn:focus {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 12px 18px;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 600;
	line-height: 20px;
	text-decoration: none;
	white-space: nowrap;
	box-shadow: none;
	cursor: pointer;
	transition: background 0.2s ease-in-out, border-color 0.2s ease-in-out, color 0.2s ease-in-out;

	.dashicons {
		font-size: 18px;
		width: 18px;
		height: 18px;
	}
}

.sp-real-qs-btn-primary,
.sp-real-qs-btn-primary:focus {
	background: var(--sp-real-primary-color);
	border: 1px solid var(--sp-real-primary-color);
	color: $white;

	&:hover {
		background: var(--sp-real-primary-color-hover);
		border-color: var(--sp-real-primary-color-hover);
		color: $white;
	}
}

.sp-real-qs-btn-secondary,
.sp-real-qs-btn-secondary:focus {
	background: $white;
	border: 1px solid #717171;
	color: #717171;

	&:hover {
		border-color: var(--sp-real-primary-color);
		color: var(--sp-real-primary-color);
	}
}

// ====================
// Welcome Video
// ====================

.sp-real-qs-video-wrapper {
	position: relative;
	border-radius: 8px;
	overflow: hidden;
	line-height: 0;
	// Poster is 796x448 (16:9), so the inline embed swaps in without a jump.
	aspect-ratio: 16 / 9;
	background: #0b1f4b;

	:has(.sp-real-qs-video-placeholder) &::after {
		content: '';
		position: absolute;
		inset: 0;
		background-color: #1E67D84D;
	}
}

.sp-real-qs-video-placeholder {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.sp-real-qs-video-frame {
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

.sp-real-qs-play-btn {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 54px;
	height: 54px;
	background: $white;
	border: none;
	border-radius: 50%;
	z-index: 2;

	svg {
		width: 16px;
		height: 16px;
		margin-left: 2px;
		position: relative;
		z-index: 2;
		color: var(--sp-real-primary-color);
	}

	&::before,
	&::after {
		content: '';
		position: absolute;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%) scale(1);
		width: 100%;
		height: 100%;
		border-radius: 50%;
		background: $white;
		opacity: 0;
		z-index: 1;
	}

	&::before {
		animation: sp-real-qs-pulse 2s ease-out infinite;
	}

	&::after {
		animation: sp-real-qs-pulse 2s ease-out infinite 1s;
	}
}

@keyframes sp-real-qs-pulse {
	0% {
		transform: translate(-50%, -50%) scale(1);
		opacity: 0.6;
	}

	100% {
		transform: translate(-50%, -50%) scale(2);
		opacity: 0;
	}
}

// ====================
// Right Side Sidebar
// ====================

.sp-real-qs-sidebar {
	width: 380px;
	flex-shrink: 0;
	gap: 30px;
	position: sticky;
	top: 20px;
}

.sp-real-qs-info-card {
	background: $white;
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	padding: 28px 28px 34px 28px;
}

.sp-real-qs-info-header {
	margin-bottom: 12px;
}

.sp-real-qs-info-icon {
	width: 20px;
	height: 20px;
	flex-shrink: 0;

	svg {
		width: 20px;
		height: 20px;
	}

	svg path {
		fill: var(--sp-real-primary-color);
	}
}

.sp-real-qs-info-title {
	font-size: 17px;
	font-weight: 600;
	color: $heading-color;
	margin: 0;
	line-height: 20px;
}

.sp-real-qs-info-desc {
	font-size: 14px;
	color: #3C434A;
	line-height: 1.6;
	margin: 0;
}

.sp-real-qs-info-link,
.sp-real-qs-info-link:focus {
	display: inline-flex;
	align-items: center;
	color: #949494;
	font-weight: 500;
	font-size: 13px;
	line-height: 13px;
	text-decoration: none;
	white-space: nowrap;
	border: 1px solid #c9ced6;
	padding: 12px 16px;
	border-radius: 4px;
	box-shadow: none;
	transition: all 0.2s ease-in-out;

	&:hover {
		background: var(--sp-real-primary-color);
		border-color: var(--sp-real-primary-color);
		color: $white;
	}
}

// ====================
// Responsive
// ====================

// Two columns hold down to ~900px (sidebar 300 + gap 24 + a usable main card);
// below that the sidebar drops under the welcome card.
@media (max-width: 900px) {
	.sp-real-qs-page-content {
		flex-direction: column;
	}

	.sp-real-qs-sidebar {
		width: 100%;
		position: static;
		flex-direction: row;
		flex-wrap: wrap;

		.sp-real-qs-info-card {
			flex: 1 1 260px;
		}
	}
}

@media (max-width: 768px) {
	.sp-real-qs-page {
		padding: 0 20px;
	}

	.sp-real-qs-welcome-card {
		padding: 24px;
	}

	.sp-real-qs-welcome-title {
		font-size: 22px;
	}

	.sp-real-qs-welcome-actions .sp-real-qs-btn {
		flex: 1 1 100%;
	}

	.sp-real-qs-sidebar {
		flex-direction: column;
	}
}