/** * API Football Frontend Styles */
/* Base styles for all widgets */
.api-football-table, .api-football-widget, .api-football-error {
	--api-football-border-radius: 20px;
}
.api-football-widget {
	border-radius: var(--api-football-border-radius);
	overflow: hidden;
	background: #fff;
	margin-bottom: 24px;
}
.api-football-table {
	--border: 0.5px solid #e0e3e7;
	border-radius: var(--api-football-border-radius);
	border-spacing: 0;
/* 	border-collapse: separate; */
	border: var(--border);
/* 	overflow: hidden; */
	margin-block-end: 0;
}
/* .api-football-favorite-team {
	background: #b2bdb2;
} */
/* Apply a border to the right of all but the last column */
.api-football-table th:not(:last-child),
.api-football-table td:not(:last-child) {
 border-right: var(--border);
}

/* Apply a border to the bottom of all but the last row */
.api-football-table>thead>tr:not(:last-child)>th,
.api-football-table>thead>tr:not(:last-child)>td,
.api-football-table>tbody>tr:not(:last-child)>th,
.api-football-table>tbody>tr:not(:last-child)>td,
.api-football-table>tfoot>tr:not(:last-child)>th,
.api-football-table>tfoot>tr:not(:last-child)>td,
.api-football-table>tr:not(:last-child)>td,
.api-football-table>tr:not(:last-child)>th,
.api-football-table>thead:not(:last-child),
.api-football-table>tbody:not(:last-child),
.api-football-table>tfoot:not(:last-child) {
 border-bottom: var(--border);
}

.api-football-table thead {
	background: #4A90E2;
	color: white;
	font-weight: 600;
}
.api-football-table th, .api-football-table td {
	line-height: 1;
	padding: 8px;
	text-align: left;
	border-bottom: 1px solid #e0e0e0;
}
.api-football-table th {
	font-size: 14px;
	text-transform: uppercase;
}
.api-football-table td {
	vertical-align: middle;
}
/* Team logos */
.team-logo {
	width: 32px;
	margin: 0 8px;
	vertical-align: middle;
}
.team-name {
	vertical-align: middle;
}
.api-football-results.api-football-widget .team-name, .api-football-fixtures.api-football-widget .team-name {
	vertical-align: middle;
	line-height: 1;
}
/* Standings table specific styles */
.standings-table .rank {
	text-align: center;
}
.standings-table .team {
	min-width: 200px;
}
.standings-table .team-name, .schedule-table .team-name {
    flex: 1;
    display: flex;
    align-items: center;
    min-width: 0;
    text-align: right;
}
.standings-table .played, .standings-table .wins, .standings-table .draws, .standings-table .losses {
	width: 40px;
	text-align: center;
}
.standings-table .goal-diff {
	width: 50px;
	max-width: 50px;
	text-align: center;
}
.standings-table .points {
	width: 50px;
	text-align: center;
	font-weight: 600;
}
.standings-table .form {
	width: 80px;
	min-width: 128px;
	text-align: center;
}
/* Position-based row colors */
.position-top {
	background-color: #e8f5e8;
	border-right: 4px solid #4caf50;
}
.position-europe {
	background-color: #e3f2fd;
	border-right: 4px solid #2196f3;
}
.position-relegation {
	background-color: #ffebee;
	border-right: 4px solid #f44336;
}
.position-mid {
	background-color: #fff;
}

/* Highlight configured favorite team row in standings only */
.standings-table tr.api-football-favorite-team {
	background-color: #a4a195 !important; /* soft highlight */
}
/* Standings group title styles */
.api-football-standings-group-title {
	padding: 8px 16px;
	font-size: small;
	font-weight: 600;
	text-align: left;
	display: block;
}
.api-football-standings-separated {
	margin-bottom: 32px;
}
.api-football-standings-separated:last-child {
	margin-bottom: 24px;
}
/* Group selector styles */
.api-football-group-selector {
	padding: 16px;
	background-color: #f8f9fa;
	border-bottom: 1px solid #e0e3e7;
	display: flex;
	align-items: center;
	gap: 12px;
}
.group-select-label {
	font-weight: 600;
	font-size: 14px;
	color: #333;
	margin: 0;
}
.api-football-group-select {
	padding: 8px 12px;
	border: 1px solid #e0e3e7;
	border-radius: 6px;
	background-color: #fff;
	font-size: 14px;
	color: #333;
	cursor: pointer;
	min-width: 200px;
	transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.api-football-group-select:hover {
	border-color: #4A90E2;
}
.api-football-group-select:focus {
	outline: none;
	border-color: #4A90E2;
	box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}
/* Form string styling */
.form-string {
	font-size: 14px;
	color: white;
}
/* Fixtures list styles */
.fixtures-list {
	padding: 8px 16px;
}
.fixture-item {
	display: flex;
	align-items: center;
	padding: 8px 0;
	border-bottom: 1px solid #e0e0e0;
	transition: background-color 0.3s ease;
	min-height: 50px;
	flex-direction: column;
}
.fixture-item:hover {
	background-color: #f8f9fa;
}
.fixture-item:last-child {
	border-bottom: none;
}
.fixture-date {
	font-size: 14px;
}
.fixture-teams {
	display: flex;
	justify-content: space-between;
	width: 100%;
	align-items: center;
}
.fixtures-list .home-team, .fixtures-list .away-team {
	flex: 1;
	display: flex;
	align-items: center;
	max-width: 42%;
	min-width: 0;
}
.away-team {
	flex-direction: row-reverse;
}
.schedule-table .away-team .team-name {
	text-align: left;
}
.away-team .team-name {
	text-align: right;
}

.fixtures-list .away-team .team-logo, .results-table .away-team .team-logo {
	margin-left: 0;
	margin-right: 8px;
}
.match-info {
	flex: 0 0 50px;
	text-align: center;
	margin: 0 16px;
}
.match-info .score {
	font-weight: 600;
}
.match-info .vs {
	font-size: 14px;
}
/* Schedule and results table styles */
.results-table .away-team .team {
	display: flex;
	justify-content: end;
	align-items: center;
	vertical-align: middle;
	flex-direction: row-reverse;
}
.results-table .home-team .team {
	display: flex;
	justify-content: start;
	align-items: center;
	vertical-align: middle;
}
.schedule-table .date, .results-table .date {
/* 	width: 110px; */
}
.schedule-table .home-team, .schedule-table .away-team, .results-table .home-team, .results-table .away-team {
	width: 200px;
}
.schedule-table .score, .results-table .score {
	text-align: center !important;
}
.schedule-table tbody .venue, .schedule-table tbody .date, .results-table tbody .venue, .results-table tbody .date {
    font-size: small;
}
.schedule-table .venue, .results-table .venue {
	min-width: 150px;
}
/* Next Fixtures widget - card layout */
.api-football-next-fixtures-wrapper {
	background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
	padding: 16px;
	border-radius: var(--api-football-border-radius);
}
.api-football-next-fixtures-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 24px;
	max-width: 100%;
}
.api-football-next-fixture-link {
	display: block;
	text-decoration: none;
	color: inherit;
}
.api-football-next-fixture-link:hover .api-football-next-fixture-card {
	opacity: 0.92;
	background-color: rgba(255, 255, 255, 0.12);
}
.api-football-next-fixture-card {
	transition: opacity 0.2s ease, background-color 0.2s ease;
	background-color: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
	border-radius: var(--api-football-border-radius);
	padding: 16px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	text-align: center;
}
.api-football-next-fixture-datetime {
	color: #fff;
	font-size: 14px;
	opacity: 0.95;
}
.api-football-next-fixture-teams {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	width: 100%;
	flex-wrap: wrap;
}
.api-football-next-fixture-team {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	flex: 1;
	min-width: 0;
}
.api-football-next-fixture-home {
	order: 1;
}
.api-football-next-fixture-away {
	order: 2;
}
.api-football-next-fixture-logo {
	width: 130px;
	height: 130px;
	max-height: 130px;
	object-fit: contain;
}
.api-football-next-fixture-team-name {
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	word-break: break-word;
}

/* Score in center for result card */
.api-football-next-fixture-teams-with-score {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	width: 100%;
	flex-wrap: nowrap;
}
.api-football-next-fixture-score {
	display: flex;
	align-items: center;
	justify-content: center;
	order: 2;
	flex-shrink: 0;
}
.api-football-next-fixture-score span {
	color: #fff;
	font-size: 2rem;
	font-weight: 700;
	letter-spacing: 2px;
	white-space: nowrap;
}
.api-football-next-fixture-teams-with-score .api-football-next-fixture-home {
	order: 1;
}
.api-football-next-fixture-teams-with-score .api-football-next-fixture-away {
	order: 3;
}

/* League Position widget - card (max 1000px, bigger digits on desktop) */
.api-football-league-position-wrapper {
	background: transparent;
	padding: 0;
	max-width: 1000px;
	width: 100%;
	margin-left: auto;
	margin-right: auto;
}
.api-football-league-position-link {
	display: block;
	text-decoration: none;
	color: inherit;
}
.api-football-league-position-link:hover .api-football-league-position-card {
	opacity: 0.92;
	background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}
.api-football-league-position-card {
	transition: opacity 0.2s ease, background 0.2s ease;
	background-color: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
	border-radius: var(--api-football-border-radius);
	padding: 24px 28px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
	max-width: 100%;
}
.api-football-league-position-title {
	color: #fff;
	font-size: 26px;
	font-weight: 700;
	margin: 0 0 24px 0;
	text-align: center;
}
.api-football-league-position-stats {
	display: flex;
	align-items: flex-start;
	gap: 56px 64px;
	flex-wrap: wrap;
}
.api-football-league-position-main {
	flex-shrink: 0;
}
.api-football-league-position-main .api-football-league-position-value {
	font-size: 6rem;
	font-weight: 700;
	line-height: 1.1;
	color: #fff;
}
.api-football-league-position-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 48px;
	flex: 1;
	min-width: 0;
}
.api-football-league-position-stat {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
}
.api-football-league-position-stat .api-football-league-position-value {
	color: #fff;
	font-size: 3rem;
	font-weight: 700;
	line-height: 1.2;
}
.api-football-league-position-label {
	color: #e8a317;
	font-size: 14px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

/* Error messages */
.api-football-error {
	padding: 24px 16px;
	text-align: center;
	background-color: #fdfdfd98;
	border: 1px solid var(--e-global-color-secondary);
	border-radius: var(--api-football-border-radius);
	margin: 0 0 20px 0;
}
/* Color schemes */
/* Blue theme (default) */
.api-football-widget {
	--primary-color: #4A90E2;
	--primary-light: #e3f2fd;
	--primary-dark: #1976d2;
}
/* Green theme */
body.api-football-green .api-football-table thead, .api-football-widget.color-green .api-football-table thead {
	background: #4caf50;
}
.api-football-widget.color-green {
	--primary-color: #4caf50;
	--primary-light: #e8f5e8;
	--primary-dark: #388e3c;
}
/* Red theme */
body.api-football-red .api-football-table thead, .api-football-widget.color-red .api-football-table thead {
	background: #f44336;
}
.api-football-widget.color-red {
	--primary-color: #f44336;
	--primary-light: #ffebee;
	--primary-dark: #d32f2f;
}
/* Next Fixtures - mobile: stack cards */
@media (max-width: 768px) {
	.api-football-next-fixtures-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}
	.api-football-next-fixture-card {
		padding: 16px;
	}
	.api-football-next-fixture-team-name {
		font-size: 12px;
	}
	/* League Position - tablet */
	.api-football-league-position-card {
		padding: 16px;
	}
	.api-football-league-position-stats {
		gap: 24px;
	}
	.api-football-league-position-main .api-football-league-position-value {
		font-size: 3.6rem;
	}
	.api-football-league-position-stat .api-football-league-position-value {
		font-size: 1.8rem;
	}
	.api-football-league-position-grid {
		gap: 12px 20px;
	}
}
@media (max-width: 480px) {
	.api-football-next-fixtures-wrapper {
		padding: 14px;
	}
	.api-football-next-fixture-card {
		padding: 14px;
		gap: 10px;
	}
	.api-football-next-fixture-logo {
		width: 80px;
		height: 80px;
	}
	.api-football-next-fixture-score span {
		font-size: 1.4rem;
	}
	.api-football-next-fixture-teams-with-score {
		gap: 10px;
	}
	/* League Position - mobile */
	.api-football-league-position-card {
		padding: 14px;
	}
	.api-football-league-position-title {
		font-size: 16px;
		margin-bottom: 12px;
	}
	.api-football-league-position-stats {
		flex-direction: column;
		gap: 12px;
	}
	.api-football-league-position-main .api-football-league-position-value {
		font-size: 2rem;
	}
	.api-football-league-position-grid {
		justify-content: space-between;
		gap: 24px;
	}
	.api-football-league-position-stat .api-football-league-position-value {
		font-size: 1.6rem;
	}
	.api-football-league-position-label {
		font-size: 11px;
	}
}

/* Responsive design */
@media (max-width: 768px) {
	/* Optimize standings table for tablet */
	.standings-table .team {
		min-width: 140px;
	}
	/* Keep essential columns, hide some for compact view */
	.api-football-standings .standings-table .draws, .api-football-standings .standings-table .losses {
/* 		display: none; */
	}
	.fixture-item {
		min-height: 45px;
	}
	.match-info {
		flex: 0 0 42px;
		margin: 0 8px;
	}
}
@media (max-width: 640px) {
	/* Group selector mobile styles */
	.api-football-group-selector {
		flex-direction: column;
		align-items: flex-start;
		padding: 12px;
	}
	.group-select-label {
		font-size: 13px;
	}
	.api-football-group-select {
		width: 100%;
		min-width: auto;
	}
	/* Better mobile layout for compact standings */
	.api-football-standings .standings-table {
		font-size: 14px;
	}
	.api-football-standings .standings-table th, .api-football-standings .standings-table td {
/* 		padding: 12px 8px; */
	}
	.api-football-standings .team-name {
		font-size: 14px;
		font-weight: 600;
	}
	.schedule-table .team-name {
		flex:unset;
		justify-content: right;
	}
	/* Hide goal difference on smaller screens */
	.api-football-standings .standings-table .goal-diff {
/* 		display: none; */
	}
	/* Make rank and points more prominent */
	.api-football-standings .standings-table .rank {
		font-size: 16px;
		font-weight: 700;
		color: #333;
	}
	.api-football-standings .standings-table .points {
		font-size: 16px;
		font-weight: 700;
		color: #333;
	}
	/* Improve fixtures on mobile */
	.api-football-fixtures .fixture-item {
		min-height: 40px;
	}
	.schedule-table .time {
		width: auto;
	}
}
@media (max-width: 480px) {
	/* Mobile-first approach for very small screens */
	/* Compact standings - keep table format but optimize */
	.api-football-standings .api-football-table {
		font-size: 14px;
	}
	.api-football-standings .standings-table th, .api-football-standings .standings-table td {
/* 		padding: 10px 6px; */
	}
	/* Hide less important columns for compact view */
	.api-football-standings .standings-table .played, .api-football-standings .standings-table .wins {
		display: none;
	}
	/* Keep only essential: rank, team, points */
	.api-football-standings .standings-table .rank {
		width: 30px;
		font-size: 14px;
		font-weight: 700;
	}
	.api-football-standings .standings-table .points {
		width: 40px;
		font-size: 14px;
		font-weight: 700;
		text-align: center;
	}
	/* Fixtures mobile optimization */
	.api-football-fixtures .fixture-item {
		min-height: 36px;
	}
	.api-football-fixtures .fixture-teams {
		gap: 8px;
	}
	.api-football-fixtures .match-info .vs {
		font-size: 14px;
		font-weight: 600;
	}
	.api-football-fixtures .match-info .score {
		font-size: 16px;
		font-weight: 700;
	}
	/* Full page widgets - use card layout */
	.api-football-standings-full .api-football-table, .api-football-schedule .api-football-table, .api-football-results-full .api-football-table, .api-football-table:not(.standings-table):not(.api-football-fixtures .api-football-table) {
	}
	/*Mobile Table*/
	@media screen and (max-width: 690px) {
		.api-football-standings-full .table-responsive {
			overflow-x: auto;
			-webkit-overflow-scrolling: touch;
		}
		.api-football-schedule table, .api-football-results-full table {
			border: 0;
		}
		.api-football-schedule table thead, .api-football-results-full table thead {
			border: none;
			clip: rect(0 0 0 0);
			height: 1px;
			margin: -1px;
			overflow: hidden;
			padding: 0;
			position: absolute;
			width: 1px;
		}
		.api-football-schedule table tr, .api-football-results-full table tr {
			border-bottom: 3px solid #ddd;
			display: block;
			margin-bottom: .625em;
		}
		.api-football-schedule table td, .api-football-results-full table td {
			border-bottom: 1px solid #ddd;
			display: block;
			text-align: end;
		}
		.api-football-schedule table td::before, .api-football-results-full table td::before {
			content: attr(data-label);
			float: right;
			font-weight: bold;
			text-transform: uppercase;
			padding-left: 16px;
		}
		.api-football-schedule table td:last-child, .api-football-results-full table td:last-child {
			border-bottom: 0;
		}
		.schedule-table .date, .results-table .date {
			width: auto;
		}
		.schedule-table .home-team, .schedule-table .away-team, .results-table .home-team, .results-table .away-team {
			width: auto;
			display: inherit;
		}
	}
	/* Don't apply card layout to fixtures list */
	.fixtures-list .api-football-table, .fixtures-list .api-football-table thead, .fixtures-list .api-football-table tbody, .fixtures-list .api-football-table th, .fixtures-list .api-football-table td, .fixtures-list .api-football-table tr {
		display: table;
		position: static;
		border: none;
		margin: 0;
		padding: 0;
		background: transparent;
		
	}
}
/* Accessibility improvements */
.api-football-table:focus {
	outline: 2px solid var(--primary-color);
	outline-offset: 2px;
}
.fixture-item:focus {
	outline: 2px solid var(--primary-color);
	outline-offset: -2px;
}
/* Print styles */
@media print {
	.api-football-widget {
		box-shadow: none;
		border: 1px solid #000;
	}
	.api-football-table thead {
		background: #000 !important;
		color: #fff !important;
	}
	.position-top, .position-europe, .position-relegation {
		background: transparent !important;
		border-left: 2px solid #000 !important;
	}
}

/* RTL Support for Arabic */
html[dir="rtl"] .api-football-table th,
html[dir="rtl"] .api-football-table td {
	text-align: right;
}

html[dir="rtl"] .standings-table .team-name,
html[dir="rtl"] .schedule-table .team-name {
	text-align: right;
}

html[dir="rtl"] .api-football-table th:not(:last-child),
html[dir="rtl"] .api-football-table td:not(:last-child) {
	border-right: none;
	border-left: var(--border);
}

html[dir="rtl"] .position-top,
html[dir="rtl"] .position-europe,
html[dir="rtl"] .position-relegation {
	border-right: none;
	border-left-width: 4px;
	border-left-style: solid;
}

html[dir="rtl"] .position-top {
	border-left-color: #4caf50;
}

html[dir="rtl"] .position-europe {
	border-left-color: #2196f3;
}

html[dir="rtl"] .position-relegation {
	border-left-color: #f44336;
}

html[dir="rtl"] .team-logo {
	margin: 0 0 0 8px;
}

html[dir="rtl"] .fixtures-list .away-team .team-logo,
html[dir="rtl"] .results-table .away-team .team-logo {
	margin-right: 0;
	margin-left: 8px;
}

html[dir="rtl"] .fixtures-list .home-team,
html[dir="rtl"] .results-table .home-team .team {
	flex-direction: row-reverse;
	justify-content: end;
}

html[dir="rtl"] .fixtures-list .away-team,
html[dir="rtl"] .results-table .away-team .team {
	flex-direction: row;
	justify-content: start;
}

html[dir="rtl"] .away-team .team-name {
	text-align: left;
}

html[dir="rtl"] .api-football-group-selector {
	flex-direction: row-reverse;
}

html[dir="rtl"] .api-football-standings-group-title {
	text-align: right;
}
