/* Rankings card */
.xscores-rank{
	border: none;
	border-radius: 12px;
	overflow: hidden;
	font-size: 0.9rem;
	line-height: 1.6rem;
}

/* Header */
.xscores-rank-header{
	background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
	border-bottom: 2px solid #5c9801;
}
.xscores-rank-header a{
	transition: background-color 0.15s ease;
}
.xscores-rank-header a:hover{
	background-color: rgba(92, 152, 1, 0.06);
}

/* Body */
.xscores-rank-body{
	padding: 0;
}

/* Table */
.xscores-rank .table{
	margin: 0;
}
.xscores-rank .table thead th{
	position: sticky;
	top: 0;
	background: #fff;
	z-index: 1;
	font-size: 0.78rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #6c757d;
	border-bottom: 2px solid #e9ecef;
	padding: 0.5rem;
	white-space: nowrap;
}
.xscores-rank tr[class*="xscores-rank-row"] th,
.xscores-rank tr[class*="xscores-rank-row"] td{
	padding: 0.45rem 0.5rem;
	vertical-align: middle;
	white-space: nowrap;
}
.xscores-rank .table tbody tr{
	transition: background-color 0.15s ease;
	border-bottom: 1px solid #f5f5f5;
}
.xscores-rank .table tbody tr:hover{
	background-color: rgba(92, 152, 1, 0.04);
}

/* Position column */
.xscores-rank .position{
	border-left: 4px solid transparent;
	white-space: nowrap;
	font-weight: 700;
	width: 40px;
	text-align: center;
}

/* Top 3 highlight */
.xscores-rank .position-top{
	background-color: rgba(78, 146, 88, 0.06);
	font-weight: 700;
}
.xscores-rank .position-top .position{
	border-left-color: #5c9801;
}

/* Color indicators */
.xscores-rank .info-green{ border-left-color: #4e9258; }
.xscores-rank .info-orange{ border-left-color: #f88017; }
.xscores-rank .info-yellow{ border-left-color: #e3af33; }
.xscores-rank .info-red{ border-left-color: #b20000; }

/* Team logo */
.xscores-rank .xs-logo{
	width: 36px;
	min-width: 36px;
	max-width: 36px;
	text-align: center;
	padding: 0.3rem 0.2rem;
}
.xscores-rank .xs-logo img{
	width: 28px;
	height: 28px;
	object-fit: contain;
	vertical-align: middle;
	border-radius: 4px;
}
.xscores-rank .xs-logo_country{
	display: table-cell;
	max-width: 20px;
	max-height: 20px;
	text-align: center;
}
.xscores-rank .xs-logo_country img{
	width: auto;
	height: auto;
	max-width: 20px;
	max-height: 20px;
}

/* Team name */
.xscores-rank .team span{
	font-size: 0.9rem;
	font-weight: 500;
	text-overflow: ellipsis;
	overflow: hidden;
	-webkit-line-clamp: 1;
	display: -webkit-box;
	-webkit-box-orient: vertical;
}

/* Points column - make it stand out */
.xscores-rank td:has(.points-value),
.xscores-rank .points-col{
	font-weight: 700;
	color: #1a1a1a;
}

/* Faded last row (overview mode) */
.xscores-rank .xscores-rank-faded th,
.xscores-rank .xscores-rank-faded td{
	border-bottom-width: 0;
}

/* Form badges */
.xscores-rank .form{
	min-width: 180px;
}
.xscores-rank .form .badge{
	width: 20px;
	padding: .35em 0;
	border-radius: 4px;
	font-size: 0.7rem;
}

/* Group header rows */
.xscores-rank .table-secondary td{
	font-size: 0.82rem;
	letter-spacing: 0.02em;
	background-color: #f8f9fa;
}

/* "Classifica completa" button */
.xscores-btn-full{
	background-color: #f0f5e8;
	color: #3d6600;
	border: 1px solid #d4e5b8;
	font-weight: 600;
	font-size: 0.85rem;
	border-radius: 20px;
	padding: 0.4em 1.2em;
	transition: all 0.2s ease;
}
.xscores-btn-full:hover{
	background-color: #5c9801;
	border-color: #5c9801;
	color: #fff;
}

/* Updated timestamp */
.xscores-rank-updated{
	font-size: 0.78rem;
	color: #999;
}

/* Scroll fade hint on mobile */
@media (max-width: 992px){
	.xscores-rank .table-responsive{
		position: relative;
	}
	.xscores-rank .table-responsive::after{
		content: '';
		position: absolute;
		right: 0;
		top: 0;
		bottom: 0;
		width: 20px;
		background: linear-gradient(to right, transparent, rgba(255,255,255,0.9));
		pointer-events: none;
	}
}
@media (max-width: 768px){
	.xscores-rank .form{
		display: none;
	}
	tr.xscores-rank-row th,
	tr.xscores-rank-row td{
		padding: 0.4rem 0.5rem;
	}
}
@media (max-width: 576px){
	.xscores-rank{
		font-size: 0.8rem;
	}
	.xscores-rank .xs-logo img{
		width: 20px;
		height: 20px;
	}
	.xscores-rank .table thead th{
		font-size: 0.7rem;
	}
}