/**
 * Fanzo Sports Feed — Frontend Styles
 *
 * All selectors are scoped under .fanzo-sports-feed to prevent
 * conflicts with any theme. No hardcoded brand colors — inherit and
 * currentColor are used so the design adapts to any pub or venue theme.
 *
 * @package FanzoSportsFeed
 * @since   1.0.0
 */

/* ==========================================================================
   1. Wrapper
   ========================================================================== */

.fanzo-sports-feed {
	box-sizing: border-box;
	font-family: inherit;
	color: inherit;
	width: 100%;
	max-width: 100%;
}

.fanzo-sports-feed *,
.fanzo-sports-feed *::before,
.fanzo-sports-feed *::after {
	box-sizing: inherit;
}

/* ==========================================================================
   2. Status / Error Messages
   ========================================================================== */

.fanzo-sports-feed .fanzo-alert {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	padding: 20px;
	border-radius: 12px;
	margin: 20px 0;
	border: 1px solid transparent;
	text-align: left;
}

.fanzo-sports-feed .fanzo-alert-icon {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgba( 255, 255, 255, 0.2 );
}

.fanzo-sports-feed .fanzo-alert-icon svg {
	width: 24px;
	height: 24px;
	display: block;
}

.fanzo-sports-feed .fanzo-alert-content {
	flex: 1;
}

.fanzo-sports-feed .fanzo-alert-content p {
	margin: 0;
	line-height: 1.5;
	font-weight: 500;
	font-size: 1.05rem;
}

.fanzo-sports-feed .fanzo-alert-actions {
	margin-top: 12px;
}

.fanzo-sports-feed .fanzo-alert-btn {
	display: inline-block;
	padding: 8px 16px;
	background: rgba( 255, 255, 255, 0.15 );
	color: inherit;
	text-decoration: none;
	border-radius: 6px;
	font-weight: 700;
	font-size: 0.9rem;
	transition: background 0.2s ease;
	border: 1px solid rgba( 255, 255, 255, 0.1 );
}

.fanzo-sports-feed .fanzo-alert-btn:hover {
	background: rgba( 255, 255, 255, 0.25 );
	color: inherit;
}

/* ── Alert Types ── */

.fanzo-sports-feed .fanzo-alert-error {
	background-color: rgba( 220, 50, 47, 0.08 );
	border-color: rgba( 220, 50, 47, 0.2 );
	color: #dc322f;
}

.fanzo-sports-feed .fanzo-alert-error .fanzo-alert-icon {
	background: rgba( 220, 50, 47, 0.15 );
}

.fanzo-sports-feed .fanzo-alert-warning {
	background-color: rgba( 251, 190, 54, 0.08 );
	border-color: rgba( 251, 190, 54, 0.2 );
	color: #d4a017; /* Darker yellow for readability */
}

.fanzo-sports-feed .fanzo-alert-warning .fanzo-alert-icon {
	background: rgba( 251, 190, 54, 0.15 );
}

.fanzo-sports-feed .fanzo-alert-info {
	background-color: rgba( 38, 139, 210, 0.08 );
	border-color: rgba( 38, 139, 210, 0.2 );
	color: #268bd2;
}

.fanzo-sports-feed .fanzo-alert-info .fanzo-alert-icon {
	background: rgba( 38, 139, 210, 0.15 );
}

/* ==========================================================================
   3. Filters Row
   ========================================================================== */

.fanzo-sports-feed .fanzo-filters {
	margin-bottom: 24px;
}

/* ── 3a. Sport Filter Dropdown ── */

.fanzo-sports-feed .fanzo-sport-filter {
	margin-bottom: 12px;
}

.fanzo-sports-feed .fanzo-sport-filter select {
	width: 100%;
	padding: 10px 14px;
	font-size: 1rem;
	font-family: inherit;
	border: 1px solid currentColor;
	border-radius: 6px;
	background: transparent;
	color: inherit;
	cursor: pointer;
	appearance: auto;
}

.fanzo-sports-feed .fanzo-sport-filter select:focus {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* ── 3b. Date Navigator ── */

.fanzo-sports-feed .fanzo-date-nav {
	display: flex;
	align-items: center;
	gap: 6px;
}

.fanzo-sports-feed .fanzo-date-arrow {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border: 1px solid currentColor;
	background: transparent;
	color: inherit;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	transition: opacity 0.2s ease, background 0.15s ease;
}

.fanzo-sports-feed .fanzo-date-arrow:hover{
	color: #000;
}

.fanzo-sports-feed .fanzo-date-arrow:hover:not(:disabled) {
	background: rgba( 255, 255, 255, 0.12 );
}

.fanzo-sports-feed .fanzo-date-arrow:disabled {
	opacity: 0.25;
	cursor: default;
}

.fanzo-sports-feed .fanzo-date-strip {
	display: flex;
	flex: 1;
	gap: 4px;
	overflow: hidden; /* JS controls visibility per-button */
}

.fanzo-sports-feed .fanzo-date-btn {
	flex: 1;
	min-width: 0;
	padding: 6px 4px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	border: 1px solid transparent;
	border-radius: 6px;
	color: inherit;
	cursor: pointer;
	text-align: center;
	opacity: 0.55;
	transition: opacity 0.2s ease, border-color 0.2s ease, background 0.15s ease;
}

.fanzo-sports-feed .fanzo-date-btn:hover {
	opacity: 0.85;
	background: rgba( 255, 255, 255, 0.06 );
	color: #000;
}

.fanzo-sports-feed .fanzo-date-btn.fanzo-date-active {
	opacity: 1;
	font-weight: 700;
	color: #000;
}

.fanzo-sports-feed .fanzo-date-btn.fanzo-date-active:focus {
    background: #fbbe36;
}

.fanzo-sports-feed .fanzo-date-btn:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
	opacity: 1;
}

.fanzo-sports-feed .fanzo-date-day {
	display: block;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.04em;
}

.fanzo-sports-feed .fanzo-date-num {
	display: block;
	font-size: 11px;
	line-height: 1.3;
}

/* ==========================================================================
   4. Fixture Day Groups
   ========================================================================== */

.fanzo-sports-feed .fanzo-day {
	margin-bottom: 40px;
}

.fanzo-sports-feed .api_heading {
	margin: 0 0 10px;
	padding-bottom: 4px;
	color: inherit;
	text-align: left;
	text-transform: uppercase;
	font-weight: 700;
	font-size: 2.4rem;
	line-height: 1.35;
}

.fanzo-sports-feed .api_group {
	border-top: 5px solid currentColor;
}

/* ==========================================================================
   5. Individual Fixture Cards
   ========================================================================== */

.fanzo-sports-feed .api_item {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	padding: 15px 0;
	text-align: center;
	border-bottom: 1px solid currentColor;
}

.fanzo-sports-feed .api_item:last-child {
	border-bottom: none;
}

/* Details block: sport name + competition */
.fanzo-sports-feed .api_details {
	width: 15%;
	padding: 5px 10px;
	text-align: center;
}

.fanzo-sports-feed .api_sport {
	margin: 0 0 6px;
	font-size: 1.5rem;
	line-height: 1.35;
	font-weight: 700;
}

.fanzo-sports-feed .api_description {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.4;
	font-weight: 400;
	opacity: 0.75;
}

/* Team logos */
.fanzo-sports-feed .api_team {
	width: 5%;
	object-fit: contain;
	vertical-align: middle;
}

.fanzo-sports-feed .api_team_1 {
	margin-left: 2.5%;
}

.fanzo-sports-feed .api_team_2 {
	margin-right: 2.5%;
}

/* Match title */
.fanzo-sports-feed .api_title {
	flex: 1;
	margin: 0;
	padding: 0 8px;
	font-size: 1.2rem;
	line-height: 1.4;
	text-align: center;
	text-transform: initial;
	font-weight: 600;
}

/* Time + channel pill row */
.fanzo-sports-feed .api_meta {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 20%;
	gap: 4px;
}

.fanzo-sports-feed .api_time {
	display: block;
	font-size: 1.4rem;
	font-weight: 700;
	line-height: 1.4;
}

.fanzo-sports-feed .api_channel {
	display: inline-block;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	border: 1px solid currentColor;
	border-radius: 20px;
	padding: 2px 8px;
	opacity: 0.8;
}

/* ── JSON feed: sport & competition logos in the details block ── */

.fanzo-sports-feed .api_sport_logo {
	display: block;
	width: 32px;
	height: 32px;
	object-fit: contain;
	margin: 0 auto 4px;
	opacity: 0.85;
}

.fanzo-sports-feed .api_competition_logo {
	display: block;
	width: 28px;
	height: 28px;
	object-fit: contain;
	margin: 4px auto 2px;
	opacity: 0.9;
}

/* ── JSON feed: channel logo inside the channel pill ── */

.fanzo-sports-feed .api_channel_logo {
	display: block;
	height: 20px;
	max-width: 80px;
	object-fit: contain;
	margin: 0 auto;
}

/* ── JSON feed: big-screen and sound badges ── */

.fanzo-sports-feed .api_badge {
	display: inline-block;
	font-size: 0.65rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	border-radius: 20px;
	padding: 2px 7px;
	opacity: 0.75;
	margin-top: 2px;
}

.fanzo-sports-feed .api_badge_bigscreen {
	border: 1px solid currentColor;
}

.fanzo-sports-feed .api_badge_sound {
	border: 1px solid currentColor;
}

/* No fixtures fallback & Empty State */
.fanzo-sports-feed .fanzo-no-fixtures,
.fanzo-sports-feed .fanzo-empty-state {
	padding: 60px 20px;
	text-align: center;
	background: rgba( 255, 255, 255, 0.03 );
	border: 1px solid rgba( 255, 255, 255, 0.1 );
	border-radius: 12px;
	margin: 20px 0;
}

.fanzo-sports-feed .fanzo-dynamic-icon {
	width: 80px;
	height: 90px;
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
	margin: 0 auto 24px;
	box-shadow: 0 4px 15px rgba( 0, 0, 0, 0.2 );
	display: flex;
	flex-direction: column;
	border: 1px solid rgba( 0, 0, 0, 0.1 );
}

.fanzo-sports-feed .fanzo-icon-month {
	display: block;
	background: #dc322f; /* Red header */
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	padding: 4px 0;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.fanzo-sports-feed .fanzo-icon-day {
	display: flex;
	flex: 1;
	align-items: center;
	justify-content: center;
	font-size: 36px;
	font-weight: 800;
	color: #333;
	line-height: 1;
}

.fanzo-sports-feed .fanzo-empty-state h2 {
	margin: 0 0 10px;
	font-size: 1.8rem;
	font-weight: 700;
	color: inherit;
}

.fanzo-sports-feed .fanzo-empty-state p {
	margin: 0 0 24px;
	font-size: 1.1rem;
	line-height: 1.5;
	opacity: 0.7;
	max-width: 500px;
	margin-left: auto;
	margin-right: auto;
}

.fanzo-sports-feed .fanzo-refresh-btn {
	display: inline-block;
	padding: 12px 24px;
	background: #fbbe36;
    color: #fff;
	text-decoration: none;
	border-radius: 30px;
	font-weight: 700;
	font-size: 0.95rem;
	transition: transform 0.2s ease, filter 0.2s ease;
}

.fanzo-sports-feed .fanzo-refresh-btn:hover {
	transform: translateY(-2px);
	filter: brightness(1.1);
	color: #000;
}

.fanzo-sports-feed .fanzo-no-fixtures {
	opacity: 0.65;
	font-size: 1rem;
}

/* ==========================================================================
   6. Classic Widget Styles
   ========================================================================== */

.fanzo-widget .fanzo-widget-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.fanzo-widget .fanzo-widget-item {
	padding: 6px 0;
	border-bottom: 1px solid currentColor;
	font-size: 0.9rem;
	line-height: 1.5;
	opacity: 0.9;
}

.fanzo-widget .fanzo-widget-item:last-child {
	border-bottom: none;
}

.fanzo-widget .fanzo-widget-date {
	font-weight: 700;
}

.fanzo-widget .fanzo-widget-time {
	opacity: 0.75;
}

.fanzo-widget .fanzo-widget-sport {
	font-style: italic;
	font-size: 0.8rem;
	opacity: 0.7;
}

/* ==========================================================================
   7. Responsive — Tablet (≤ 1200px)
   ========================================================================== */

@media screen and ( max-width: 1200px ) {
	.fanzo-sports-feed .api_item {
		justify-content: center;
	}

	.fanzo-sports-feed .api_details {
		width: 100%;
		margin-bottom: 10px;
	}

	.fanzo-sports-feed .api_team {
		width: 18%;
		margin: 0 2%;
	}

	.fanzo-sports-feed .api_team_1 {
		margin-left: auto;
		margin-right: 2%;
	}

	.fanzo-sports-feed .api_team_2 {
		margin-left: 2%;
		margin-right: auto;
	}

	.fanzo-sports-feed .api_title {
		width: 40%;
		font-size: 1rem;
	}

	.fanzo-sports-feed .api_meta {
		width: 100%;
		margin-top: 12px;
		flex-direction: row;
		justify-content: center;
		gap: 10px;
	}

	.fanzo-sports-feed .api_heading {
		font-size: 1.4rem;
		text-align: center;
	}
}

/* ==========================================================================
   8. Responsive — Mobile (≤ 600px)
   ========================================================================== */

@media screen and ( max-width: 600px ) {
	.fanzo-sports-feed .fanzo-date-day,
	.fanzo-sports-feed .fanzo-date-num {
		font-size: 10px;
	}

	.fanzo-sports-feed .api_team {
		width: 22%;
	}

	.fanzo-sports-feed .api_title {
		width: 100%;
		font-size: 0.95rem;
		order: 3;
		padding: 8px 0;
	}

	.fanzo-sports-feed .api_sport {
		font-size: 1.1rem;
	}

	.fanzo-sports-feed .api_time {
		font-size: 1.1rem;
	}
}

/* ==========================================================================
   9. Responsive — Narrow mobile (≤ 320px)
   ========================================================================== */

@media screen and ( max-width: 320px ) {
	.fanzo-sports-feed .fanzo-date-btn {
		padding: 4px 2px;
	}

	.fanzo-sports-feed .fanzo-date-arrow {
		width: 28px;
		height: 28px;
		font-size: 18px;
	}

	.fanzo-sports-feed .api_item {
		padding: 10px 0;
	}

	.fanzo-sports-feed .api_team {
		width: 26%;
	}
}

/* ==========================================================================
   10. Print Styles
   ========================================================================== */

@media print {
	/* Hide interactive filter controls. */
	.fanzo-sports-feed .fanzo-filters {
		display: none !important;
	}

	/* Show all fixture groups regardless of JS-toggled visibility. */
	.fanzo-sports-feed .fanzo-day {
		display: block !important;
		page-break-inside: avoid;
		margin-bottom: 20px;
	}

	.fanzo-sports-feed .api_item {
		display: block !important;
		padding: 8px 0;
		border-bottom: 1px solid #ccc;
	}

	.fanzo-sports-feed .api_team {
		display: none;
	}

	.fanzo-sports-feed .api_details,
	.fanzo-sports-feed .api_title,
	.fanzo-sports-feed .api_time {
		display: inline;
		width: auto;
		font-size: 12pt;
	}

	.fanzo-sports-feed .api_channel {
		border: none;
		padding: 0;
	}
}
