/* Goalie Toolbox Video Search — self-contained styles, scoped to .gtvs */

.gtvs {
	position: relative;
	width: 100%;
	max-width: var( --gtvs-max, 300px );
	margin-left: auto;
	margin-right: auto;
	font-family: inherit;
	box-sizing: border-box;
}

.gtvs *,
.gtvs *::before,
.gtvs *::after {
	box-sizing: border-box;
}

.gtvs__field {
	position: relative;
	display: flex;
	align-items: center;
	background: #fff;
	border: 1px solid #d4d8dd;
	border-radius: 10px;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.gtvs__field:focus-within {
	border-color: #1a73e8;
	box-shadow: 0 0 0 3px rgba( 26, 115, 232, .15 );
}

.gtvs__icon {
	width: 20px;
	height: 20px;
	margin-left: 14px;
	color: #8a9099;
	flex: 0 0 auto;
}

.gtvs__input {
	flex: 1 1 auto;
	width: 100%;
	border: 0;
	outline: 0;
	background: transparent;
	padding: 14px 14px 14px 10px;
	font-size: 16px;
	color: #1d2228;
	line-height: 1.2;
}

.gtvs__input::placeholder {
	color: #9aa0a6;
}

.gtvs__spinner {
	width: 16px;
	height: 16px;
	margin-right: 14px;
	border: 2px solid #d4d8dd;
	border-top-color: #1a73e8;
	border-radius: 50%;
	flex: 0 0 auto;
	animation: gtvs-spin .6s linear infinite;
}

@keyframes gtvs-spin {
	to { transform: rotate( 360deg ); }
}

.gtvs__list {
	position: absolute;
	z-index: 9999;
	top: calc( 100% + 6px );
	/* Mobile-first: dropdown matches the input width. */
	left: 0;
	right: 0;
	margin: 0;
	padding: 6px;
	list-style: none;
	background: #fff;
	border: 1px solid #e3e6ea;
	border-radius: 10px;
	box-shadow: 0 12px 32px rgba( 0, 0, 0, .14 );
	max-height: 380px;
	overflow-y: auto;
}

/* Desktop: dropdown is a fixed 500px, centered on the input, independent
   of the 300px field width. max-width guards narrow desktop windows. */
@media ( min-width: 560px ) {
	.gtvs__list {
		left: 50%;
		right: auto;
		transform: translateX( -50% );
		width: 500px;
		max-width: 90vw;
	}
}

.gtvs__item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 10px;
	border-radius: 7px;
	cursor: pointer;
	color: #1d2228;
}

.gtvs__item.is-active,
.gtvs__item:hover {
	background: #f1f5fd;
}

.gtvs__thumb {
	width: 56px;
	height: 36px;
	object-fit: cover;
	border-radius: 5px;
	flex: 0 0 auto;
	background: #eceff3;
}

.gtvs__title {
	font-size: 15px;
	line-height: 1.35;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.gtvs__empty {
	padding: 14px 12px;
	color: #8a9099;
	font-size: 14px;
	text-align: center;
}

/* Dark backgrounds: add the class .gtvs--dark on a wrapper if needed. */
.gtvs--dark .gtvs__field {
	background: #1c1f24;
	border-color: #343a42;
}

.gtvs--dark .gtvs__input {
	color: #f2f4f7;
}

.gtvs--dark .gtvs__list {
	background: #1c1f24;
	border-color: #343a42;
}

.gtvs--dark .gtvs__item {
	color: #f2f4f7;
}

.gtvs--dark .gtvs__item.is-active,
.gtvs--dark .gtvs__item:hover {
	background: #262b32;
}
