/**
 * DartsPress Frontend Tables Styles
 *
 * @package DartsPress
 * @since 2.8.0
 */

/* Container for combined tables */
.dp-tables-container {
	margin: 20px 0;
}

.dp-tables-side-by-side {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
}

.dp-tables-side-by-side .dp-table-wrapper {
	flex: 1;
	min-width: 340px;
}

.dp-tables-stacked .dp-table-wrapper {
	margin-bottom: 30px;
}

.dp-table-title {
	margin: 0 0 4px 0;
	font-size: 1.2em;
	color: #f5f2d0;
	text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.dp-tables-tabs {
	display: none;
	gap: 8px;
	margin: 0 0 10px 0;
}

.dp-tables-tab {
	border: 1px solid #222222;
	background: #3b3b3b;
	color: #ffffff;
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	padding: 6px 12px;
	border-radius: 999px;
	cursor: pointer;
}

.dp-tables-tab.is-active {
	background: #1f1f1f;
	border-color: #111111;
}

/* Elementor button reset for table tabs */
body[class*="elementor-kit-"] .dp-tables-tab {
	background: #3b3b3b !important;
	color: #ffffff !important;
	border: 1px solid #222222 !important;
	box-shadow: none !important;
	text-decoration: none !important;
}

body[class*="elementor-kit-"] .dp-tables-tab.is-active {
	background: #1f1f1f !important;
	border-color: #111111 !important;
}

/* Standings Grid */
.dp-standings-grid {
	min-width: 30px;
	font-size: 0.8rem;
	margin: 10px 0;
	border: 3px solid #222222;
	border-radius: 8px;
	overflow: hidden;
	padding: 0px 0px 0px 0px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
	--dp-col-numeric: 5%;
	--dp-col-pos: 6%;
	--dp-col-pts: 7%;
}

.dp-standings-grid__row--head {
	display: flex;
	align-items: center;
	flex-wrap: nowrap;
	background: #222222;
	color: #ffffff;
	text-transform: uppercase;
	text-shadow: 1px 1px 2px rgb(0, 0, 0);
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.10em;
	margin-bottom: 1px;	
	border-bottom: 1px solid #f5f2d0;
}

.dp-standings-grid__row--head > div {
	padding: 10px 4px;
	text-align: center;
}

.dp-standings-grid__row--head .dp-col-team {
	flex: 1 1 auto;
	min-width: 130px;
	text-align: left;
}

.dp-standings-grid__row--head > div:not(.dp-col-team) {
	flex: 0 0 var(--dp-col-numeric);
}

.dp-standings-grid__row--head .dp-col-pos {
	flex: 0 0 var(--dp-col-pos);
}

.dp-standings-grid__row--head .dp-col-pts {
	flex: 0 0 var(--dp-col-pts);
	text-align: center;
}

.dp-standings-grid__row {
	display: flex;
	align-items: center;
	background: #555555;
	border-bottom: 1px solid #999999;
	flex-wrap: nowrap;
}

.dp-standings-grid__row:hover {
	background: #666666;
}

.dp-standings-grid__row .dp-col-pos {
	flex: 0 0 var(--dp-col-pos);
	font-weight: bold;
	background: #343434;
}

.dp-standings-grid__row .dp-col-pts {
	flex: 0 0 var(--dp-col-pts);
	font-weight: bold;
	text-align: center;
	background: #444444;
}

.dp-standings-grid__row:hover .dp-col-pos {
	background: #454545;
}

.dp-standings-grid__row:hover .dp-col-pts {
	background: #555555;
}

.dp-standings-grid__row:last-child {
	margin-bottom: 0;
	border-bottom: none;
}

.dp-standings-grid__row > div {
	padding: 8px 4px;
	text-align: center;
	color: #fff;
}

.dp-standings-grid__row .dp-col-team {
	flex: 1 1 auto;
	min-width: 130px;
	text-align: left;
	font-weight: 600;
}

.dp-standings-grid__row > div:not(.dp-col-team) {
	flex: 0 0 var(--dp-col-numeric);
}




/* Podium placements (gold). */
.dp-standings-grid__row.dp-placement-champion {
	background: rgba(245, 215, 120, 0.75);
}

.dp-standings-grid__row.dp-placement-champion .dp-col-pos {
	background: rgba(232, 190, 95, 0.75);
}

.dp-standings-grid__row.dp-placement-champion .dp-col-pts {
	background: rgba(219, 170, 75, 0.75);
}

.dp-standings-grid__row.dp-placement-champion:hover {
	background: rgba(235, 200, 105, 0.75);
}

.dp-standings-grid__row.dp-placement-champion:hover .dp-col-pos {
	background: rgba(221, 180, 85, 0.75);
}

.dp-standings-grid__row.dp-placement-champion:hover .dp-col-pts {
	background: rgba(206, 160, 70, 0.75);
}

.dp-standings-grid__row.dp-placement-runner-up {
	background: rgba(230, 210, 150, 0.75);
}

.dp-standings-grid__row.dp-placement-runner-up .dp-col-pos {
	background: rgba(210, 185, 125, 0.75);
}

.dp-standings-grid__row.dp-placement-runner-up .dp-col-pts {
	background: rgba(195, 165, 105, 0.75);
}

.dp-standings-grid__row.dp-placement-runner-up:hover {
	background: rgba(220, 198, 140, 0.75);
}

.dp-standings-grid__row.dp-placement-runner-up:hover .dp-col-pos {
	background: rgba(200, 175, 115, 0.75);
}

.dp-standings-grid__row.dp-placement-runner-up:hover .dp-col-pts {
	background: rgba(185, 155, 98, 0.75);
}

.dp-standings-grid__row.dp-placement-champion > div,
.dp-standings-grid__row.dp-placement-runner-up > div {
	color: #111111;
}

/* Promotion / relegation highlights (season pages). */
.dp-standings-grid__row.dp-placement-promoted {
	background: rgba(37, 113, 22, 0.5);
}

.dp-standings-grid__row.dp-placement-promoted .dp-col-pos {
	background: rgba(30, 91, 17, 0.5);
}

.dp-standings-grid__row.dp-placement-promoted .dp-col-pts {
	background: rgba(23, 78, 12, 0.5);
}

.dp-standings-grid__row.dp-placement-promoted:hover {
	background: rgba(23, 78, 12, 0.5);
}

.dp-standings-grid__row.dp-placement-promoted:hover .dp-col-pos {
	background: rgba(16, 58, 7, 0.5);
}

.dp-standings-grid__row.dp-placement-promoted:hover .dp-col-pts {
	background: rgba(12, 44, 5, 0.5);
}

.dp-standings-grid__row.dp-placement-relegated {
	background: rgba(122, 31, 31, 0.5);
}

.dp-standings-grid__row.dp-placement-relegated .dp-col-pos {
	background: rgba(102, 23, 23, 0.5);
}

.dp-standings-grid__row.dp-placement-relegated .dp-col-pts {
	background: rgba(85, 19, 19, 0.5);
}

.dp-standings-grid__row.dp-placement-relegated:hover {
	background: rgba(97, 22, 22, 0.5);
}

.dp-standings-grid__row.dp-placement-relegated:hover .dp-col-pos {
	background: rgba(77, 17, 17, 0.5);
}

.dp-standings-grid__row.dp-placement-relegated:hover .dp-col-pts {
	background: rgba(63, 14, 14, 0.5);
}

.dp-standings-grid__row .dp-team-link {
	color: #ffffff;
	text-decoration: none;
}

.dp-standings-grid__row .dp-team-link:hover {
	text-decoration: underline;
}

.dp-standings-grid__row.dp-placement-champion .dp-team-link,
.dp-standings-grid__row.dp-placement-champion .dp-team-link:hover,
.dp-standings-grid__row.dp-placement-runner-up .dp-team-link,
.dp-standings-grid__row.dp-placement-runner-up .dp-team-link:hover {
	color: #111111;
}



.dp-standings-grid__row .dp-deduction {
	color: #cccccc;
	font-weight: bold;
	cursor: help;
	display: inline-block;
	margin-left: 3px;
}

/* Error and empty states */
.dp-table-error,
.dp-table-empty {
	padding: 20px;
	text-align: center;
	color: #666;
	font-style: italic;
	background: #f5f5f5;
	border: 1px solid #ddd;
	/* border-radius: 4px; */
}

.dp-table-error {
	color: #c00;
	background: #fff0f0;
	border-color: #fcc;
}


@media (max-width: 1250px) {
	.dp-season-content,
	.dp-season-header {
		padding: 0 20px;
	}
} 
@media (max-width: 1024px) {
	.dp-tables-tabs {
		display: inline-flex;
		margin-bottom: 10px;
	}

	.dp-tables-has-tabs .dp-table-title {
		display: none;
	}

	.dp-tables-side-by-side,
	.dp-tables-stacked {
		flex-direction: column;
	}

	.dp-tables-has-tabs.dp-tables-side-by-side {
		gap: 0;
	}

	.dp-tables-has-tabs .dp-table-wrapper {
		display: none;
	}

	.dp-tables-has-tabs .dp-table-wrapper.is-active {
		display: block;
	}

	.dp-tables-has-tabs .dp-table-wrapper {
		margin-top: 0;
	}

	.dp-standings-grid {
		min-width: 0;
		width: 100%;
		margin: 0 0 10px 0;
	}
}
/* Responsive adjustments */
@media (max-width: 768px) {
	.dp-standings-grid__row--head > div {
		font-size: 0.6rem;
		padding: 5px 3px;
	}

	.dp-tables-tabs {
		display: inline-flex;
		margin-bottom: 10px;
	}

	.dp-tables-has-tabs .dp-table-title {
		display: none;
	}

	.dp-tables-side-by-side,
	.dp-tables-stacked {
		flex-direction: column;
	}

	.dp-tables-has-tabs.dp-tables-side-by-side {
		gap: 0;
	}

	.dp-tables-has-tabs .dp-table-wrapper {
		display: none;
	}

	.dp-tables-has-tabs .dp-table-wrapper.is-active {
		display: block;
	}

	.dp-tables-has-tabs .dp-table-wrapper {
		margin-top: 0;
	}

	.dp-standings-grid {
		min-width: 0;
		width: 100%;
		font-size: 0.8rem;
		margin: 0 0 10px 0;
	}

	.dp-standings-grid__row > div {
		padding: 5px 3px;
	}

	.dp-standings-grid__row--head > div:not(.dp-col-team),
	.dp-standings-grid__row > div:not(.dp-col-team) {
		flex: 0 0 7%;
	}

	.dp-standings-grid__row--head .dp-col-pos,
	.dp-standings-grid__row .dp-col-pos {
		flex: 0 0 28px;
		max-width: 28px;
	}

	.dp-standings-grid__row--head .dp-col-pts,
	.dp-standings-grid__row .dp-col-pts {
		flex: 0 0 44px;
	}

	.dp-standings-grid__row--head .dp-col-team,
	.dp-standings-grid__row .dp-col-team {
		min-width: 130px;
		padding-left: 5px;
	}

}

@media (max-width: 768px) {

	.dp-season-content {
		padding: 0 3px;
	}

	.dp-season-header {
		padding: 0 3px;
	}

	.dp-standings-grid {
		font-size: 0.8rem;
	}

	/* Hide less important columns on very small screens */
	.dp-standings-grid__row--head .dp-col-drawn,
	.dp-standings-grid__row .dp-col-drawn
	{
		display: none;
	}
}


@media (max-width: 480px) {

	.dp-standings-grid {
		font-size: 0.8rem;
	}

	/* Hide less important columns on very small screens */
	.dp-standings-grid__row--head .dp-col-drawn,
	.dp-standings-grid__row .dp-col-drawn
	{
		display: none;
	}
}
