/* ========== General ========== */

body[data-color-scheme="light"] {
	--s-color-base: #fff;
	--s-color-invert-base: #000;
	--background-main: #f3f3f3;
	--background-search-bar: #f3f3f3;
	--background-secondary: #fafafa;
	--background-results: #fff;
	--placeholder-color: #6e6e73;
	--border-separator: #d8d8d8;
	--font-color: #000;
	--font-color-lighter: #8a8a8a;
}

body[data-color-scheme="dark"] {
	--s-color-base: #000;
	--s-color-invert-base: #fff;
	--background-main: #000;
	--background-search-bar: #1d1d1f;
	--background-secondary: #333;
	--background-results: #111;
	--placeholder-color: #98989d;
	--border-separator: #424245;
	--font-color: #fff;
	--font-color-lighter: #8a8a8a;
}

body[data-color-scheme="light"].theme-light .tile {
	--sk-tile-background: rgb(232, 232, 237);
}

body[data-color-scheme="dark"].theme-dark .tile {
	--sk-tile-background: #000;
}

.search-b {
	background-color: var(--background-main);
}

.section-results {
	background-color: var(--background-results);
	padding-bottom: 4em;
}

main {
	min-height: 100vh;
}

sf-symbol {
	user-select: none;
	-webkit-user-select: none; /* Safari */
	-moz-user-select: none; /* Firefox */
	-ms-user-select: none; /* IE/Edge */
}

.hiding {
	display: none;
}

/* Default page styles */
body.no-query .section-search {
	padding-top: 5em;
	position: inherit;
}

body.no-query .section-results {
	padding-bottom: 0;
	margin-bottom: 0;
}

body.no-query .section.section-ps {
	padding-bottom: 7em;
}

/* ========== Tab Navigation ========== */

.tn-p {
	display: flex;
	justify-content: left;
}

.tn-sf-icon {
	font-size: 17px;
}

.filters-block {
	margin: 2em 0;
}

.tn-label {
	display: flex !important;
	gap: 5px;
}

/* ========== Search Input ========== */

/* TODO migrate to correct syntax once new globalnav added */

.searchfield-container {
	width: 100%;
}

.search-form-container {
	display: flex;
}

input.searchfield-input:focus {
	outline: none;
	box-shadow: none;
}

input.searchfield-input {
	font-size: 24px;
	width: 100%;
	height: 100%;
	border: none;
	border-radius: 0;
	line-height: 1;
	font-weight: 700;
	letter-spacing: 0.009em;
	font-family:
		SF Pro Display,
		SF Pro Icons,
		Helvetica Neue,
		Helvetica,
		Arial,
		sans-serif;
	position: relative;
	z-index: 1;
	margin-inline-start: -30px;
	margin-inline-end: -31px;
	padding-inline-start: 34px;
	padding-inline-end: 34px;
	box-sizing: border-box;
	background-color: transparent;
	color: var(--s-color-invert-base);
}

input.searchfield-input::-webkit-input-placeholder {
	color: var(--placeholder-color);
}

@media only screen and (max-width: 734px) {
	input.searchfield-input {
		font-size: 17px;
	}
}

input.searchfield-input:-moz-placeholder {
	color: var(--placeholder-color);
	opacity: 1;
}

input.searchfield-input::-moz-placeholder {
	color: var(--placeholder-color);
	opacity: 1;
}

input.searchfield-input:-ms-input-placeholder {
	color: var(--placeholder-color);
}

.ps-container {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.ps-header,
.ps-link {
	font-size: 12px;
	line-height: 1.3333733333;
	font-weight: 400;
	letter-spacing: -0.01em;
	font-family:
		SF Pro Text,
		SF Pro Icons,
		Helvetica Neue,
		Helvetica,
		Arial,
		sans-serif;
	color: rgb(110, 110, 115);
	margin-bottom: 0.4em;
}

.ps-link {
	color: #000;
	font-weight: 600;
	cursor: pointer;
	padding: 3px 1px;
	border-radius: 2px;
	margin: 0;
}

.ps-link:first-of-type {
	margin-top: 0.25em;
}

body[data-color-scheme="dark"] .ps-link {
	color: #fff;
}

.ps-link:hover {
	background-color: var(--background-secondary);
	text-decoration: none;
}

.ps-search-arrow-icon {
	font-size: 12px;
	color: #6e6e73;
	margin-right: 0.5em;
}

.flex-button-container {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	gap: 7px;
}

.source-block {
	margin-top: 3em;
	/* margin-top: 0.5em; */
}

.source-block .badge {
	margin-bottom: 0.6em;
}

.section.section-search {
	padding-top: 2em;
	padding-bottom: 2em;
	margin: 0;
	background-color: var(--background-search-bar);
	position: sticky;
	top: 0;
	z-index: 3;
	/* border-top: 1px solid var(--border-separator); */
}

/* @media only screen and (max-width: 1068px) {
	.section.section-search {
		top: 48px;
	}
} */

.section.section-ps {
	padding-top: 1em;
	padding-bottom: 2em;
	margin: 0;
	background-color: var(--background-search-bar);
	transition:
		opacity 0.3s ease-out,
		max-height 0.3s ease-out,
		margin 0.3s ease-out,
		padding 0.3s ease-out;
	overflow: hidden;
}

section.section-ps.hiding {
	opacity: 0;
	max-height: 0;
	margin-top: 0;
	margin-bottom: 0;
	padding-top: 0;
	padding-bottom: 0;
}

/* ========== Results ========== */

.search-message {
	font-weight: bold;
	margin: 3em 0;
	/* text-align: center; */
	list-style: none !important;
}

.loading {
	padding-top: 2em;
}

.loading b {
	background: linear-gradient(
		90deg,
		var(--placeholder-color) 0%,
		var(--placeholder-color) 25%,
		var(--font-color) 50%,
		var(--placeholder-color) 75%,
		var(--placeholder-color) 100%
	);
	background-size: 200% 100%;
	background-clip: text;
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	animation: shimmer 1.5s ease-in-out infinite;
}

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

.search-results {
	padding: 0 !important;
	margin: 0 !important;
	list-style: none !important;
}

.search-result {
	padding: 2em 0;
	border-bottom: 1px solid var(--border-separator);
}

.search-result:first-child {
	border-top: 1px solid var(--border-separator);
}

.search-sf-icon {
	margin-right: 4px;
	font-size: 20px;
}

ul.breadcrumb-list {
	display: flex;
	flex-wrap: wrap;
	margin-top: 10px;
	/* gap: 1em; */
	list-style: none !important;
	margin: 0;
	color: var(--font-color-lighter);
	font-size: 14px;
	margin-top: 0.25em;
}

.breadcrumb-list-item {
	max-width: 300px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

@media only screen and (max-width: 734px) {
	.breadcrumb-list-item {
		max-width: 150px;
	}

	ul.breadcrumb-list {
		font-size: 12px;
	}
}

.breadcrumb-separator {
	font-size: 10px;
	margin: 0 7px;
	color: var(--font-color-lighter);
	flex-shrink: 0;
}

.thumbnail {
	position: relative;
	aspect-ratio: 16/9;
	height: 150px;
	/* margin-bottom: 1em; */
}

.thumbnail-scrim {
	transition: opacity 0.3s ease;
}

.thumbnail .thumbnail-button {
	scale: 0.8;
}

.result-thumbnail:hover .thumbnail-scrim {
	opacity: 0.3;
}

.result-video {
	display: flex;
	gap: 1.5em;
	align-items: center;
}

@media only screen and (max-width: 734px) {
	.result-video {
		flex-direction: column;
		align-items: flex-start;
		gap: 1em;
	}
}

.results-video-details {
	display: flex;
	flex-direction: column;
}

.results-video-details .result-title {
	margin-top: 0;
	/* font-size: 14px;
	font-weight: 400; */
}

@media only screen and (max-width: 734px) {
	.result-video .result-title {
		text-wrap: pretty;
	}
}

.result-description {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	line-clamp: 2;
	text-wrap: pretty;
}

/* Video duration badge overlay */
.video-duration {
	position: absolute;
	bottom: 8px;
	right: 15px;
	display: block;
	padding: 4px 6px;
	background: #000;
	background-color: rgba(0, 0, 0, 0.7);
	color: #fff;
	font-size: 0.7em;
	font-weight: 700;
	line-height: 1;
	border-radius: 4px;
	z-index: 2;
}

/* Video event name */
.result-event-name {
	font-size: 14px;
	font-weight: 400;
	color: var(--font-color-lighter);
	margin-top: 0;
}

/* ========== Event Results ========== */
.session-times {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr 1fr;
	gap: 0.5em 0.5em;
}

@media only screen and (max-width: 1068px) {
	.session-times {
		grid-template-columns: 1fr;
		gap: 0.5em 0;
	}
}

.source-time {
	border: 1px solid rgba(0, 102, 204, 0.5);
	border-radius: 8px;
	padding: 4px 6px;
	font-size: 12px;
	width: 100%;
	text-align: center;
}

.source-title-container {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	gap: 0.5em;
	margin-bottom: 0.25em;
}

.source-title {
	font-weight: bold;
}

.source-title-event-icon {
	font-size: 21px;
	vertical-align: middle;
}

/* ========== Featured Results ========== */
.featured-section {
	margin-bottom: 2em;
}

.featured-wrapper {
	display: flex;
	align-items: center;
	justify-content: space-between;
	color: var(--font-color);
	gap: 1.5em;
	padding: 1.5em 2em;
}

.featured-wrapper:hover {
	text-decoration: none;
}

.featured-description {
	text-wrap: pretty;
}

@media only screen and (max-width: 734px) {
	.featured-description {
		text-wrap: stable;
	}
}

/* ========== Override ========== */

html body.theme-dark#search .search-result.has-thumbnail .result-thumbnail img {
	border: unset;
}

.result-thumbnail .thumbnail-image {
	scale: 1.03;
}

.search-b .globalnav-item.globalnav-search {
	display: none !important;
}

