/** * 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;
}
/* 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-right: 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;
}
.standings-table .played, .standings-table .wins, .standings-table .draws, .standings-table .losses {
	width: 40px;
	text-align: center;
}
.standings-table .goal-diff {
	width: 50px;
	text-align: center;
}
.standings-table .points {
	width: 50px;
	text-align: center;
	font-weight: 600;
}
.standings-table .form {
	width: 80px;
	text-align: center;
}
/* Position-based row colors */
.position-top {
	background-color: #e8f5e8;
	border-left: 4px solid #4caf50;
}
.position-europe {
	background-color: #e3f2fd;
	border-left: 4px solid #2196f3;
}
.position-relegation {
	background-color: #ffebee;
	border-left: 4px solid #f44336;
}
.position-mid {
	background-color: #fff;
}
/* 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-right: 0;
	margin-left: 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;
}
.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;
}
/* Error messages */
.api-football-error {
	padding: 24px 16px;
	text-align: center;
	background-color: #fdfdfd;
	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;
}
/* 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) {
	/* 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: left;
			font-weight: bold;
			text-transform: uppercase;
			padding-right: 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;
	}
}