/* LATEST DRAWS RESULTS */
.latest-results-section {
	padding: 60px 0;
}

.latest-results-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
	gap: 1.5rem;
	align-items: start;
}

/* Result Card */
.result-card {
	background: #fff;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
	display: flex;
	flex-direction: column;
	border: 1px solid rgba(0, 0, 0, 0.06);
	transition:
		box-shadow 0.3s ease,
		transform 0.3s ease;
}

.result-card:hover {
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
	transform: translateY(-3px);
}

@media (min-width: 640px) {
	.result-card--wide {
		grid-column: span 2;
	}
}

/* Card Header */
.result-card-header {
	background-color: var(--game-color);
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.75rem 1rem;
}

.result-card-logo-wrap {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.result-card-logo {
	width: 24px;
	height: 24px;
	object-fit: contain;
}

.result-card-meta {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	min-width: 0;
}

.result-card-name {
	color: #fff;
	font-size: 0.8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.result-card-date {
	color: rgba(255, 255, 255, 0.75);
	font-size: 0.72rem;
	line-height: 1.2;
}

.result-date-select {
	font-family: 'Inter', sans-serif;
	font-size: 0.72rem;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.9);
	background: rgba(0, 0, 0, 0.18);
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: 5px;
	padding: 3px 6px;
	cursor: pointer;
	max-width: 100%;
	outline: none;
	line-height: 1.4;
}

.result-date-select:hover,
.result-date-select:focus {
	background: rgba(0, 0, 0, 0.3);
	border-color: rgba(255, 255, 255, 0.5);
}

.result-date-select option {
	background: #2c2c2c;
	color: #fff;
	font-size: 0.85rem;
}

/* Card Body */
.result-card-body {
	flex: 1;
	padding: 1rem 1.125rem;
}

.result-label {
	font-size: 0.72rem;
	font-weight: 700;
	color: #999;
	text-transform: uppercase;
	letter-spacing: 0.4px;
	margin-bottom: 0.625rem;
}

/* Balls */
.result-balls {
	margin-top: 10px;
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	align-items: center;
}

.result-ball {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background-color: var(--game-color);
	color: #fff;
	font-size: 0.8rem;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.result-ball--star {
	background: none;
	position: relative;
	width: 45px;
	height: 45px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	border-radius: 50%;
}

.result-star-svg {
	position: absolute;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
	pointer-events: none;
}

.result-ball--star > span {
	position: relative;
	z-index: 1;
	top: 1px;
	font-size: 0.85rem;
	font-weight: 700;
	color: #333;
	line-height: 1;
}

.result-ball--comp {
	background-color: var(--game-color);
	color: #fff;
	filter: brightness(1.2);
}

.result-ball--reintegro {
	background-color: #686c71;
	color: #fff;
}

.result-ball--dream {
	background-color: #16a085;
	color: #fff;
}

.result-ball--lnac {
	background-color: #686c71;
	color: #fff;
}

.result-ball-group {
	display: flex;
	align-items: center;
	gap: 0.2rem;
	flex-shrink: 0;
}

.result-ball-label {
	font-size: 1rem;
	font-weight: 800;
	color: #444444;
	text-transform: uppercase;
	align-self: center;
	margin: 0;
}

.result-addon-icon {
	width: 20px;
	height: 20px;
	margin-right: 0.2rem;
}

.result-extra-label {
	font-size: 0.72rem;
	color: #999;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.3px;
}

.result-extra {
	display: flex;
	font-size: 0.92rem;
	color: #555;
	font-weight: 600;
	margin-top: 0.725rem;
}

.result-extra strong {
	color: #008080;
	padding-left: 0.25rem;
}

/* Tables (Quiniela, Quinigol, Quíntuple) */
.result-table-wrapper {
	max-height: 420px;
	overflow-y: auto;
	border-radius: 6px;
	border: 1px solid #f0f0f0;
}

.result-table-wrapper table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.85rem;
}

.result-table-wrapper tbody tr {
	border-bottom: 1px solid #f5f5f5;
}

.result-table-wrapper tbody tr:last-child {
	border-bottom: none;
}

.result-table-wrapper tbody td {
	padding: 0.45rem 0.75rem;
	vertical-align: middle;
}

.result-table-wrapper tbody td:first-child {
	width: 2.25rem;
	font-weight: 700;
	color: #aaa;
	text-align: center;
	font-size: 0.78rem;
}

.result-table--sign tbody td:last-child {
	width: 3.5rem;
	font-weight: 700;
	text-align: center;
	background-color: var(--game-color);
	color: #fff;
}

.result-table--qupl tbody td:last-child {
	width: 3.5rem;
	font-weight: 700;
	text-align: center;
	background-color: var(--game-color);
	color: #fff;
}

@media (max-width: 480px) {
	.result-table--sign tbody td:nth-child(2),
	.result-table--qupl tbody td:nth-child(2) {
		max-width: 110px;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}
}

/* Custom scrollbar for tables */
.result-table-wrapper::-webkit-scrollbar {
	width: 4px;
}

.result-table-wrapper::-webkit-scrollbar-track {
	background: #f5f5f5;
}

.result-table-wrapper::-webkit-scrollbar-thumb {
	background: #ddd;
	border-radius: 2px;
}

/* Lotería Nacional */
.result-lnac {
	display: flex;
	flex-direction: column;
	gap: 0.625rem;
}

.result-lnac-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.75rem;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid #f5f5f5;
}

.result-lnac-row:last-of-type {
	border-bottom: none;
}

.result-lnac-label {
	font-size: 0.72rem;
	font-weight: 700;
	color: #999;
	text-transform: uppercase;
	letter-spacing: 0.4px;
	flex-shrink: 0;
}

.result-lnac-number {
	font-size: 1.25rem;
	font-weight: 800;
	color: var(--game-color);
	letter-spacing: 3px;
	font-variant-numeric: tabular-nums;
}

.result-lnac-reintegros {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.375rem;
}

/* Card Footer */
.result-card-footer {
	padding: 0.75rem 1.125rem;
	border-top: 1px solid #f0f0f0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
}

.result-jackpot {
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
	min-width: 0;
}

.result-jackpot-label {
	font-size: 0.65rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #aaa;
}

.result-jackpot-amount {
	font-size: 1.05rem;
	font-weight: 800;
	color: #00488c;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Jugar button */
.btn-result-jugar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.45rem 1.125rem;
	border: 2px solid var(--game-color);
	border-radius: 50px;
	color: var(--game-color);
	font-size: 0.82rem;
	font-weight: 700;
	text-decoration: none;
	transition: all 0.3s ease;
	white-space: nowrap;
	flex-shrink: 0;
}

.btn-result-jugar:hover {
	background-color: var(--game-color);
	color: #fff;
}

.result-no-data {
	font-size: 0.85rem;
	color: #aaa;
	text-align: center;
	padding: 1.5rem 0;
}

@media (max-width: 640px) {
	.result-card--wide {
		grid-column: span 1;
	}

	.latest-results-grid {
		grid-template-columns: 1fr;
	}

	.result-ball {
		width: 34px;
		height: 34px;
		font-size: 0.75rem;
	}
}
