/**
 * Horizontal tournament fixtures — date + carousel on one row (shortcode horizontal_fixtures).
 *
 * @package ISPV2
 */

/* Outer shortcode wrapper — works even if theme Tailwind omits arbitrary max-width utilities */
.isp-tournament-fixtures-h-embed-row {
	box-sizing: border-box;
	width: 100%;
	/*max-width: 320px;*/
	margin-left: auto;
	margin-right: auto;
}

.isp-hf {
	box-sizing: border-box;
	width: 100%;
	margin-left: auto;
	margin-right: auto;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	font-size: 11px;
	color: #0f172a;
	line-height: 1.35;
	background: #fff;
	border-radius: 8px;
	padding: 0;
}

.isp-hf__error,
.isp-hf__empty {
	margin: 0;
	padding: 12px 16px;
	font-size: 13px;
	color: #991b1b;
	background: #fef2f2;
	border-radius: 8px;
}

/* Date column + carousel row */
.isp-hf__layout-row {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	gap: 5px;
	width: 100%;
}

.isp-hf__date-side {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 6px;
	width: 104px;
	min-width: 104px;
	max-width: 104px;
	padding: 4px 10px 4px 4px;
	border-right: 1px solid #eef2f7;
}

.isp-hf__league {
	display: block;
	width: 100%;
	box-sizing: border-box;
	margin: 0;
	padding: 5px 8px;
	font-weight: 700;
	font-size: 10px;
	line-height: 1.25;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-align: center;
	color: #0f172a;
	background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
	max-width: 100%;
	word-break: break-word;
	hyphens: auto;
}

.isp-hf__date-select {
	font-size: 10px;
	font-weight: 600;
	padding: 5px 30px 5px 10px;
	min-height: 28px;
	border: 1px solid #e5e7eb;
	border-radius: 999px;
	background-color: #fff;
	color: #0f172a;
	cursor: pointer;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	-webkit-tap-highlight-color: transparent;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
	/* Down chevron (kept separate from background-color so the arrow always paints) */
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M7 10l5 5 5-5' stroke='%23374151' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 9px center;
	background-size: 14px 14px;
}

.isp-hf__date-select:hover {
	border-color: #d1d5db;
}

/* No blue browser / theme focus ring — select stays focused after picking a date otherwise */
.isp-hf__date-select:focus,
.isp-hf__date-select:focus-visible,
.isp-hf__date-select:active {
	outline: none;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
	border-color: #e5e7eb;
}

.isp-hf__date-select:focus:hover,
.isp-hf__date-select:focus-visible:hover {
	border-color: #d1d5db;
}

.isp-hf__date-select::-ms-expand {
	display: none;
}

.isp-hf__panels {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
}

.isp-hf__panel {
	text-align: start;
	direction: ltr;
}

.isp-hf__panel[hidden] {
	display: none !important;
}

.isp-hf__no-matches {
	margin: 0;
	padding: 8px 2px;
	font-size: 10px;
	color: #64748b;
	text-align: left;
}

/* Carousel — sits to the right of the date column */
.isp-hf__carousel {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	justify-content: flex-start;
	gap: 3px;
	width: 100%;
	min-height: 0;
	min-width: 0;
}

.isp-hf__nav {
	flex: 0 0 24px;
	align-self: center;
	width: 24px;
	height: 24px;
	padding: 0;
	border: none;
	border-radius: 999px;
	background: #f1f5f9;
	color: #475569;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
	transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.isp-hf__nav:hover:not(:disabled) {
	background: #e2e8f0;
	color: #0f172a;
}

.isp-hf__nav:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.isp-hf__nav-icon {
	font-size: 14px;
	line-height: 1;
	font-weight: 300;
}

/*
 * Scroll viewport: block + text-align start so an inline-flex track hugs the left edge
 * (avoids flex+min-width quirks and scroll-snap centering a lone card).
 */
.isp-hf__viewport {
	flex: 1 1 auto;
	min-width: 0;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	display: block;
	text-align: start;
	direction: ltr;
	scrollbar-width: none;
}

.isp-hf__viewport::-webkit-scrollbar {
	display: none;
}

.isp-hf__track {
	display: inline-flex;
	flex-direction: row;
	flex-wrap: nowrap;
	justify-content: flex-start;
	align-items: stretch;
	gap: 5px;
	padding: 2px 0 6px;
	margin: 0;
	vertical-align: top;
	text-align: start;
}

/* Card — fixed width; first card stays flush left */
.isp-hf__card {
	display: block;
	flex: 0 0 auto;
	width: 158px;
	max-width: 158px;
	padding: 7px 8px;
	margin: 0;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 1px 8px rgba(15, 23, 42, 0.06);
	border: 1px solid #e5e7eb;
	text-decoration: none;
	color: inherit;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.isp-hf__card--link {
	margin: 0;
}

.isp-hf__card--link,
.isp-hf__card--link .isp-hf__card-meta,
.isp-hf__card--link .isp-hf__team-name {
	text-decoration: none !important;
}

.isp-hf__card--link:hover,
.isp-hf__card--link:active,
.isp-hf__card--link:visited {
	text-decoration: none !important;
}

/* Extra safety against theme-level link underlines inside widget */
.isp-hf a,
.isp-hf a:hover,
.isp-hf a:active,
.isp-hf a:visited {
	text-decoration: none !important;
}

.isp-hf__card--link:hover {
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
	transform: translateY(-1px);
}

.isp-hf__card--link:focus-visible {
	outline: 2px solid #2563eb;
	outline-offset: 2px;
}

.isp-hf__card-meta {
	margin: 0 0 5px;
	font-size: 9px;
	font-weight: 500;
	color: #64748b;
	line-height: 1.35;
	word-break: break-word;
}

.isp-hf__card-teams {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.isp-hf__card-team {
	display: flex;
	align-items: center;
	gap: 5px;
	min-height: 22px;
}

.isp-hf__logo--round {
	width: 22px;
	height: 22px;
	object-fit: contain;
	border-radius: 50%;
	background: #fff;
	flex-shrink: 0;
	box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.isp-hf__team-name {
	font-size: 11px;
	font-weight: 700;
	color: #0f172a;
	letter-spacing: -0.01em;
	line-height: 1.25;
}

@media (max-width: 640px) {
	.isp-hf {
		max-width: 100%;
	}

	.isp-hf__layout-row {
		gap: 6px;
	}

	.isp-hf__date-side {
		width: 92px;
		min-width: 92px;
		max-width: 92px;
		padding: 3px 8px 3px 3px;
		gap: 5px;
	}

	.isp-hf__league {
		padding: 4px 6px;
		font-size: 9px;
		letter-spacing: 0.03em;
	}

	.isp-hf__carousel {
		gap: 4px;
	}

	.isp-hf__nav {
		flex-basis: 22px;
		width: 22px;
		height: 22px;
	}

	.isp-hf__card {
		width: 148px;
		max-width: 148px;
		padding: 6px 6px;
	}

	.isp-hf__team-name {
		font-size: 10px;
	}
}
