/* ========== Overrides ========== */
body[data-color-scheme="light"] .bg-light {
	background: #fafafa !important;
}

body[data-color-scheme="light"] .bg-alt {
	background: #f5f5f7 !important;
}

.bg-video {
	background-color: #2f302e;
	margin-top: 1.5em !important;
	margin-bottom: 0em !important;
	border-radius: 8px;
}

@media only screen and (max-width: 734px) {
	.bg-video {
		margin-top: 0 !important;
		margin-bottom: 0 !important;
	}
}

body[data-color-scheme="light"] .bg-alt .tile {
	background-color: #fff !important;
}

body[data-color-scheme="dark"] .bg-light .tile {
	background-color: #000 !important;
}

.h-image {
	margin-top: 0.75em;
	margin-bottom: 0.75em;
}

/* ========== Dynamic Events ========== */

body[data-color-scheme="light"] .bg-alt .sc-gallery .sc-gallery__card.tile {
	background-color: #fff !important;
}

:root {
	--sc-gallery-card-width: 310px !important;
	/* --sk-tile-padding: 1.5em; */
	/* --tile-custom-gap: 1em; */
}

body[data-color-scheme="light"] {
	--event-icon-color: #000;
}

body[data-color-scheme="dark"] {
	--event-icon-color: #fff;
}

.section-events h5:lang(ko) {
	word-break: break-word;
}

.section-events .tile .event-icon {
	color: var(--sk-glyph-red) !important;
	font-size: 40px;
	margin-bottom: 0.5em;
	margin-left: -0.2em;
}

.section-events .tile .event-icon.event-icon-bw {
	color: var(--sk-body-text-color) !important;
}

.section-events a {
	/* Allows bg colors to show up */
	display: block !important;
}

.section-events .tile h4,
.section-events .tile h5,
.section-events .tile p:not(.link),
.section-events a.tile:hover {
	/* Allows bg colors to show up */
	text-decoration: none !important;
	color: var(--sk-body-text-color) !important;
}

.section-events .tile:hover .link {
	/* Allows bg colors to show up */
	text-decoration: underline;
}

.topic-icon {
	font-size: 28px;
	color: var(--event-icon-color) !important;
	margin-bottom: 0.5em;
}

.skeleton-card {
	pointer-events: none;
	cursor: default;
}

.skeleton-shimmer {
	background: linear-gradient(
		90deg,
		rgba(255, 255, 255, 0.1) 0%,
		rgba(255, 255, 255, 0.2) 50%,
		rgba(255, 255, 255, 0.1) 100%
	);
	background-size: 200% 100%;
	animation: shimmer 2s infinite;
	border-radius: 4px;
	margin-bottom: 0.5em;
}

body[data-color-scheme="dark"] .skeleton-shimmer {
	background: linear-gradient(
		90deg,
		rgba(255, 255, 255, 0.05) 0%,
		rgba(255, 255, 255, 0.15) 50%,
		rgba(255, 255, 255, 0.05) 100%
	);
	background-size: 200% 100%;
}

.skeleton-title {
	height: 20px;
	width: 90%;
	margin-bottom: 0.75em;
}

.skeleton-date {
	height: 14px;
	width: 50%;
	margin-bottom: 0.75em;
}

.skeleton-detail {
	height: 12px;
	width: 100%;
	margin-bottom: 0.3em;
}

@keyframes shimmer {
	0% {
		background-position: -200% 0;
	}
	100% {
		background-position: 200% 0;
	}
}

/* Hide skeleton when loading is complete */
[data-loading="false"] .skeleton-card {
	display: none;
}

/* ========== Thumbnail ========== */

.xcode-thumbnail-container {
	align-items: center;
}

@media only screen and (max-width: 734px) {
	.xcode-thumbnail-container {
		align-items: flex-start;
	}
}

.xcode-thumbnail-image {
	border-radius: 6px;
	border: none;
	outline: none;
	overflow: hidden;
}

.xcode-thumbnail-image img {
	display: block;
	border: none;
}

/* ========== Grid ========== */
@media only screen and (max-width: 734px) {
	.grid-hide {
		display: none;
	}
}

#main section.section {
	padding-top: 4em;
	padding-bottom: 4em;
}

#main section.section.section-xyz {
	padding-top: 2em;
	padding-bottom: 2em;
}

#main section.section.section-xyz .thumbnail {
	margin: 0;
}

.thumbnail-scrim,
.thumbnail-scrim-top,
.thumbnail-scrim-bottom {
	transition: opacity 0.35s ease;
}

a:hover .thumbnail-scrim,
a:hover .thumbnail-scrim-top,
a:hover .thumbnail-scrim-bottom {
	opacity: 0.6 !important;
}

#main section .section-content .row {
	margin-left: 0;
	margin-right: 0;
}

#main section .section-content .row > .column {
	padding: 0;
}

@media only screen and (max-width: 1068px) {
	#main section .section-content .row {
		margin-left: 0;
		margin-right: 0;
	}
	#main section .section-content .row > .column {
		padding: 0;
	}
}

@media only screen and (max-width: 734px) {
	#main section.section {
		padding-top: 2em;
		padding-bottom: 2em;
	}
	#main section .section-content .row {
		margin-left: 0;
		margin-right: 0;
	}
	#main section .section-content .row > .column {
		padding: 1em 0;
	}
}

/* ========== Hero Section ========== */
.section-hero .device-hero {
	margin-top: 2em;
}

/* ========== Section Grid Layouts ========== */
#main section:not(.section-automate-testing) .grid {
	align-items: center;
}

#main section .grid-item picture {
	display: block;
}

/* ========== Images ========== */

picture.screen-only img {
	border-radius: 8px;
	margin: 1.5em 0 1.5em;
	border: 1px solid #ececec;
}

body[data-color-scheme="dark"] picture.screen-only img {
	border: 1px solid #333;
}

@media only screen and (max-width: 734px) {
	picture.screen-only img {
		border-radius: 8px;
		margin: 0 0;
	}
}

.video-only {
	display: flex;
	justify-content: center;
}

/* ========== Gradient Glow Effect ========== */

.glow-wrapper {
	position: relative;
	display: inline-block;
	width: 100%;
}

.glow-wrapper::before {
	content: "";
	position: absolute;
	top: -10px;
	left: -10px;
	right: -10px;
	bottom: -10px;
	background: linear-gradient(
		90deg,
		#cc39a4 0%,
		#ff6b6b 14%,
		#ff8c42 28%,
		#ffd93d 42%,
		#6bcf7f 56%,
		#4ecdc4 70%,
		#5d9cec 84%,
		#cc39a4 100%
	);
	background-size: 200% 100%;
	filter: blur(30px);
	opacity: 0.85;
	border-radius: 40px;
	z-index: 0;
	pointer-events: none;
	animation: gradientShift 8s linear infinite;
	transform: translateZ(0);
	-webkit-backface-visibility: hidden;
	-webkit-transform: translateZ(0);
}

.glow-wrapper .thumbnail {
	position: relative;
	z-index: 1;
	border: none !important;
	outline: none !important;
	box-shadow: none !important;
}

@keyframes gradientShift {
	0% {
		background-position: 0% 50%;
	}
	100% {
		background-position: 200% 50%;
	}
}

/* Disable animation to prevent blur rendering bug */
@supports (-webkit-hyphens: none) {
	.glow-wrapper::before {
		animation: none !important;
		background: linear-gradient(135deg, #ff6b6b 0%, #ff8c42 33%, #ffd93d 100%);
		filter: blur(35px);
	}
}

@media only screen and (max-width: 734px) {
	.glow-wrapper::before {
		top: -15px;
		left: -15px;
		right: -15px;
		bottom: -15px;
		background: linear-gradient(135deg, #ff6b6b 0%, #ff8c42 33%, #ffd93d 100%);
		filter: blur(40px);
		opacity: 0.85;
		border-radius: 30px;
		animation: none;
	}

	.xcode-thumbnail-image {
		border-radius: 8px;
		border: none;
		outline: none;
	}
}

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
	.glow-wrapper::before {
		animation: none;
	}
}
