/**
 * Lotto 5/35 - Frontend Plugin Stylesheet
 * Integrates seamlessly with Flatsome Theme and standalone pages.
 */

/* Live Panel Widget */
.lotto-live-card {
	background: #ffffff;
	border: 2px solid #059669;
	border-radius: 16px;
	padding: 20px 10px;
	box-shadow: 0 4px 16px rgba(5, 150, 105, 0.1);
	margin-bottom: 20px;
}

.lotto-live-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid #e5edfa;
	padding-bottom: 12px;
	margin-bottom: 14px;
}

.lotto-live-title {
	display: flex;
	align-items: center;
	gap: 10px;
}

.lotto-live-title h2 {
	margin: 0;
	font-size: 20px;
	color: #081247;
	font-weight: 800;
}

.lotto-badge-live {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #ef4444;
	color: #ffffff;
	font-size: 11px;
	font-weight: 800;
	padding: 4px 10px;
	border-radius: 20px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.lotto-badge-live i {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #fff;
	animation: lotto-pulse 1s infinite alternate;
}

@keyframes lotto-pulse {
	from { opacity: 0.3; transform: scale(0.8); }
	to { opacity: 1; transform: scale(1.2); }
}

.lotto-live-meta {
	display: flex;
	align-items: center;
	gap: 18px;
	font-size: 13px;
	color: #475569;
	margin-bottom: 16px;
	flex-wrap: wrap;
}

.lotto-live-meta strong {
	color: #0055ff;
}

/* Balls spinning animation */
.lotto-ball-rolling {
	animation: lotto-spin 0.6s infinite linear;
	filter: blur(0.5px);
}

@keyframes lotto-spin {
	0% { transform: translateY(-3px) rotate(0deg); }
	50% { transform: translateY(3px) rotate(180deg); }
	100% { transform: translateY(-3px) rotate(360deg); }
}

/* Live Prizes Table */
.lotto-prizes-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 14px;
	font-size: 13px;
}

.lotto-prizes-table th {
	background: #f1f5f9;
	padding: 8px 10px;
	font-weight: 700;
	color: #1e293b;
	border-bottom: 1px solid #cbd5e1;
}

.lotto-prizes-table td {
	padding: 8px 10px;
	border-bottom: 1px solid #e2e8f0;
}

.lotto-prizes-table tr:hover td {
	background: #f8fafc;
}

.lotto-prizes-table .jp-row {
	background: #fff5f5;
	font-weight: 700;
}

.lotto-prizes-table .jp-row td {
	color: #d80000;
}

/* Live Indicators & Pulsing Dots */
.live-dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	background: #ef4444;
	border-radius: 50%;
	box-shadow: 0 0 8px #ef4444;
	animation: lotto-pulse 1s infinite alternate;
	margin-right: 4px;
	vertical-align: middle;
}

.lotto-live-indicator {
	display: inline-flex;
	align-items: center;
	background: rgba(239, 68, 68, 0.15);
	color: #ef4444;
	font-weight: 800;
	padding: 4px 12px;
	border-radius: 20px;
	font-size: 13px;
	letter-spacing: 0.5px;
	border: 1px solid rgba(239, 68, 68, 0.3);
}

.lotto-live-badge-pulsing {
	color: #ef4444;
	font-weight: 800;
	animation: lotto-pulse 1s infinite alternate;
}

/* Rolling and Revealed Balls Animations */
.ball.ball-rolling {
	background: radial-gradient(circle at 35% 35%, #94a3b8, #475569) !important;
	color: #ffffff !important;
	box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
	animation: ball-shimmer 0.8s infinite ease-in-out alternate;
	font-weight: 800;
	position: relative;
	overflow: hidden;
}

.ball.gold.ball-rolling {
	background: radial-gradient(circle at 35% 35%, #fde047, #ca8a04) !important;
	color: #713f12 !important;
	box-shadow: 0 4px 12px rgba(202, 138, 4, 0.4) !important;
}

.ball.ball-rolling .rolling-inner {
	display: inline-block;
	animation: ball-drum-roll 0.4s infinite linear;
}

@keyframes ball-drum-roll {
	0% { transform: translateY(-4px); opacity: 0.7; }
	50% { transform: translateY(4px); opacity: 1; }
	100% { transform: translateY(-4px); opacity: 0.7; }
}

@keyframes ball-shimmer {
	0% { transform: scale(0.96); filter: brightness(0.9); }
	100% { transform: scale(1.05); filter: brightness(1.15); }
}

/* Badge completed state */
.lotto-badge-done {
	display: inline-flex;
	align-items: center;
	background: #e0f2fe;
	color: #0369a1;
	font-size: 11px;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: 20px;
	letter-spacing: 0.3px;
	border: 1px solid #bae6fd;
}

.ball.ball-revealed {
	/* Clean static presentation without jumping animation after draw */
}

.lotto-history-tier-drawer {
	padding: 10px 3px !important;
	box-sizing: border-box !important;
}

.lotto-history-tier-drawer .table-scroll {
	border: none !important;
	box-shadow: none !important;
	border-radius: 6px !important;
	overflow: hidden !important;
}

/* Modal and Structure Table Styling matching Vietlott screenshot */
.table-vietlott-structure th,
.lotto-tier-table th {
	background: linear-gradient(180deg, #f0fdf4 0%, #dcfce7 100%) !important;
	color: #064e3b !important;
	border-bottom: 1px solid #86efac !important;
	vertical-align: middle;
	padding: 8px 3px !important;
	box-sizing: border-box !important;
}

.table-vietlott-structure td,
.lotto-tier-table td,
.table-vietlott-modal td {
	border-bottom: 1px solid #e2f4e9 !important;
	vertical-align: middle;
	padding: 8px 3px !important;
	box-sizing: border-box !important;
}

.table-vietlott-structure th:first-child,
.table-vietlott-structure td:first-child,
.lotto-tier-table th:first-child,
.lotto-tier-table td:first-child {
	padding-left: 3px !important;
}

.table-vietlott-structure th:last-child,
.table-vietlott-structure td:last-child,
.lotto-tier-table th:last-child,
.lotto-tier-table td:last-child {
	padding-right: 3px !important;
	text-align: right !important;
}

.table-vietlott-structure tr:hover td,
.lotto-tier-table tr:hover td,
.table-vietlott-modal tr:hover td {
	background: #f0fdf4 !important;
}

/* History Load More Button - Compact & Modern */
.lotto-load-more-btn {
	background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
	color: #ffffff !important;
	border: none !important;
	border-radius: 20px !important;
	padding: 7px 22px !important;
	font-weight: 500 !important;
	font-size: 13px !important;
	line-height: 1.4 !important;
	cursor: pointer !important;
	box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25) !important;
	transition: all 0.25s ease !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	text-decoration: none !important;
}

.lotto-load-more-btn:hover {
	background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
	box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35) !important;
	transform: translateY(-1px);
	color: #ffffff !important;
}

.lotto-load-more-btn:active {
	transform: translateY(0);
	box-shadow: 0 2px 6px rgba(5, 150, 105, 0.2) !important;
}

/* Frequency Chart Modern Segmented Tabs - Perfectly Centered */
.tabs {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	background: #f0fdf4 !important;
	border: 1px solid #bbf7d0 !important;
	border-radius: 24px !important;
	padding: 3px !important;
	gap: 3px !important;
	box-shadow: inset 0 1px 2px rgba(6, 78, 59, 0.04) !important;
	white-space: nowrap !important;
	box-sizing: border-box !important;
	line-height: 1 !important;
	margin: 0 !important;
}

.tabs button {
	margin: 0 !important;
	padding: 6px 16px !important;
	border: none !important;
	border-radius: 20px !important;
	background: transparent !important;
	font-weight: 600 !important;
	font-size: 13px !important;
	line-height: 1 !important;
	cursor: pointer !important;
	color: #064e3b !important;
	transition: all 0.2s ease !important;
	outline: none !important;
	user-select: none !important;
	text-transform: none !important;
	letter-spacing: 0.2px !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	vertical-align: middle !important;
	box-sizing: border-box !important;
	height: auto !important;
}

.tabs button:hover:not(.selected) {
	color: #059669 !important;
	background: rgba(5, 150, 105, 0.08) !important;
}

.tabs button.selected {
	background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
	color: #ffffff !important;
	box-shadow: 0 2px 7px rgba(5, 150, 105, 0.32) !important;
}

/* Matched Balls Patterns (Vietlott standard) - Vertically Aligned Special Balls */
.lotto-match-pattern {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	vertical-align: middle;
}

.lotto-match-main {
	display: inline-flex;
	align-items: center;
	justify-content: flex-end;
	gap: 5px;
	width: 90px;
	flex-shrink: 0;
}

.lotto-match-special {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	width: 29px;
	flex-shrink: 0;
}

.lotto-dot {
	width: 14px;
	height: 14px;
	border-radius: 50%;
	display: inline-block;
	flex-shrink: 0;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.16);
}

.lotto-dot-main {
	background: radial-gradient(circle at 35% 35%, #22c55e 0%, #15803d 100%);
}

.lotto-dot-special {
	background: radial-gradient(circle at 35% 35%, #fb923c 0%, #ea580c 100%);
}

.lotto-dot-plus {
	font-size: 13px;
	font-weight: 700;
	color: #64748b;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 10px;
}

.lotto-match-kk-wrap {
	display: inline-flex;
	flex-direction: column;
	gap: 4px;
	vertical-align: middle;
	padding: 2px 0;
}

.lotto-dot-empty {
	width: 14px;
	height: 14px;
	display: inline-block;
	visibility: hidden;
}

/* ==========================================================================
   Live Arena Box & Large Highlight Balls
   ========================================================================== */
.lotto-live-balls-arena {
	background: linear-gradient(135deg, #022015 0%, #064434 45%, #046347 80%, #057a55 100%) !important;
	border-radius: 16px !important;
	padding: 26px 20px !important;
	text-align: center !important;
	color: #ffffff !important;
	margin-bottom: 22px !important;
	box-shadow: 0 8px 26px rgba(2, 32, 21, 0.28), inset 0 1px 2px rgba(255, 255, 255, 0.35) !important;
	border: 1px solid rgba(52, 211, 153, 0.35) !important;
	position: relative !important;
	overflow: hidden !important;
}

.lotto-live-balls-arena::before {
	content: '';
	position: absolute;
	top: -50%;
	left: -50%;
	width: 200%;
	height: 200%;
	background: radial-gradient(circle at 50% 25%, rgba(255, 255, 255, 0.18) 0%, transparent 60%);
	pointer-events: none;
}

#lotto-live-status-text {
	color: #ffffff !important;
	font-size: 16px !important;
	font-weight: 700 !important;
	margin-bottom: 18px !important;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
	position: relative;
	z-index: 1;
}

#lotto-live-status-text strong {
	color: #ffffff !important;
	letter-spacing: 0.3px;
}

.lotto-live-balls {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 14px !important;
	flex-wrap: wrap !important;
	position: relative !important;
	z-index: 1 !important;
}

.lotto-live-balls .ball {
	width: 54px !important;
	height: 54px !important;
	font-size: 26px !important;
	font-weight: 800 !important;
	border-radius: 50% !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	background: linear-gradient(180deg, #ffffff 0%, #edf8ff 100%) !important;
	color: #071b38 !important;
	border: 3px solid #38bdf8 !important;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25), inset 0 2px 4px #ffffff !important;
	line-height: 1 !important;
	font-family: Arial, sans-serif !important;
	transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.lotto-live-balls .ball:hover {
	transform: scale(1.08) !important;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35), inset 0 2px 4px #ffffff !important;
}

.lotto-live-balls .ball.gold {
	background: linear-gradient(180deg, #fffbeb 0%, #fde047 50%, #f59e0b 100%) !important;
	border-color: #d97706 !important;
	color: #78350f !important;
	box-shadow: 0 4px 16px rgba(245, 158, 11, 0.45), inset 0 2px 4px #ffffff !important;
	margin-left: 8px !important;
}

/* Live Card Active Drawing Glow */
.lotto-live-card.is-drawing {
	border: 2px solid #ef4444 !important;
	box-shadow: 0 0 25px rgba(239, 68, 68, 0.22), 0 4px 16px rgba(0, 0, 0, 0.06) !important;
	position: relative;
}

/* Live Badge with Ping Indicator */
.lotto-badge-live.pulse-glow {
	background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%) !important;
	color: #ffffff !important;
	padding: 5px 14px !important;
	border-radius: 20px !important;
	font-size: 13px !important;
	font-weight: 800 !important;
	letter-spacing: 0.5px !important;
	display: inline-flex !important;
	align-items: center !important;
	gap: 7px !important;
	box-shadow: 0 0 14px rgba(239, 68, 68, 0.55) !important;
	animation: liveGlowBadge 1.5s infinite alternate !important;
}

@keyframes liveGlowBadge {
	0% { box-shadow: 0 0 8px rgba(239, 68, 68, 0.4); }
	100% { box-shadow: 0 0 20px rgba(239, 68, 68, 0.9); }
}

.live-dot-ping {
	width: 8px;
	height: 8px;
	background: #ffffff;
	border-radius: 50%;
	display: inline-block;
	position: relative;
}
.live-dot-ping::after {
	content: '';
	position: absolute;
	top: -4px;
	left: -4px;
	right: -4px;
	bottom: -4px;
	border-radius: 50%;
	border: 2px solid #ffffff;
	animation: livePingRing 1.2s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes livePingRing {
	0% { transform: scale(0.6); opacity: 1; }
	100% { transform: scale(2.2); opacity: 0; }
}

.live-dot-pulse {
	width: 7px;
	height: 7px;
	background: #ef4444;
	border-radius: 50%;
	display: inline-block;
	animation: liveDotBlink 0.9s infinite alternate;
}
@keyframes liveDotBlink {
	0% { transform: scale(0.8); opacity: 0.5; }
	100% { transform: scale(1.3); opacity: 1; }
}

/* Animated 3 Loading Dots (Live Load Waves) */
.live-dots-loading,
.live-dots-loading.is-white,
.live-dots-loading.white {
	background: transparent !important;
	background-color: transparent !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 4px !important;
	height: 16px !important;
	vertical-align: middle !important;
	padding: 0 4px !important;
}

.live-dots-loading i {
	width: 5px !important;
	height: 5px !important;
	background-color: #ef4444 !important;
	border-radius: 50% !important;
	display: inline-block !important;
	animation: liveDotPulse 1.2s infinite ease-in-out both !important;
}

.live-dots-loading i:nth-child(1) {
	animation-delay: -0.32s !important;
}

.live-dots-loading i:nth-child(2) {
	animation-delay: -0.16s !important;
}

.live-dots-loading i:nth-child(3) {
	animation-delay: 0s !important;
}

@keyframes liveDotPulse {
	0%, 80%, 100% {
		transform: scale(0.6);
		opacity: 0.3;
	}
	40% {
		transform: scale(1.2);
		opacity: 1;
	}
}

.live-dots-loading.is-white i,
.live-dots-loading.white i {
	background-color: #ffffff !important;
}

/* Status Wait Chip in Prize Table */
.live-wait-chip {
	background: #fef2f2 !important;
	color: #dc2626 !important;
	border: 1px solid #fecaca !important;
	border-radius: 20px !important;
	padding: 3px 10px !important;
	font-size: 12px !important;
	font-weight: 700 !important;
	display: inline-flex !important;
	align-items: center !important;
	gap: 6px !important;
	white-space: nowrap !important;
	box-shadow: 0 1px 3px rgba(220, 38, 38, 0.08) !important;
}

.live-equalizer {
	display: inline-flex;
	align-items: flex-end;
	gap: 2.5px;
	height: 12px;
	margin-right: 2px;
}
.live-equalizer i {
	width: 2.5px;
	background: #dc2626;
	border-radius: 2px;
	display: inline-block;
	animation: liveBarWave 0.8s ease-in-out infinite alternate;
}
.live-equalizer i:nth-child(1) { height: 5px; animation-delay: 0.1s; }
.live-equalizer i:nth-child(2) { height: 12px; animation-delay: 0.35s; }
.live-equalizer i:nth-child(3) { height: 7px; animation-delay: 0.6s; }

@keyframes liveBarWave {
	0% { height: 3px; opacity: 0.45; }
	50% { height: 12px; opacity: 1; }
	100% { height: 4px; opacity: 0.6; }
}

/* Live Jackpot Tags */
.live-jp-tag {
	background: #fee2e2;
	color: #b91c1c;
	font-size: 11px;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 12px;
	margin-left: 6px;
	display: inline-block;
	vertical-align: middle;
	animation: liveTagPulse 1.2s infinite alternate;
}
.live-table-tag {
	background: #ffffff;
	color: #d80000;
	font-size: 11px;
	font-weight: 800;
	padding: 2px 8px;
	border-radius: 12px;
	margin-left: 8px;
	display: inline-block;
	vertical-align: middle;
}
.live-badge-estimate {
	display: block !important;
	font-size: 11px !important;
	color: #ef4444 !important;
	font-weight: 600 !important;
	margin-top: 2px !important;
}
@keyframes liveTagPulse {
	0% { opacity: 0.8; transform: scale(0.98); }
	100% { opacity: 1; transform: scale(1.04); }
}

/* Live Broadcast Ticker in Arena */
.live-status-stream {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: transparent !important;
	border: none !important;
	padding: 0 !important;
	margin: 0 !important;
	max-width: 100%;
}
.live-stream-badge {
	background: #ef4444;
	color: #ffffff;
	padding: 4px 14px;
	border-radius: 20px;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.5px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	box-shadow: 0 0 12px rgba(239, 68, 68, 0.7);
}
.live-stream-msg {
	display: none !important;
}
@media (max-width: 600px) {
	.live-status-stream {
		flex-direction: row;
		padding: 0 !important;
		margin: 0 !important;
	}
	.live-stream-msg {
		display: none !important;
	}
}

/* Rolling and Tumbling Balls */
.lotto-live-balls .ball.ball-rolling {
	background: radial-gradient(circle at 35% 35%, #60a5fa 0%, #1e40af 70%, #0f172a 100%) !important;
	color: #ffffff !important;
	border-color: #93c5fd !important;
	box-shadow: 0 4px 18px rgba(37, 99, 235, 0.5), inset 0 2px 4px rgba(255, 255, 255, 0.6) !important;
	animation: ballTumbleShake 0.12s infinite alternate, ballTumblePulse 1.2s infinite ease-in-out !important;
	position: relative !important;
}

.lotto-live-balls .ball.gold.ball-rolling {
	background: radial-gradient(circle at 35% 35%, #fef08a 0%, #f59e0b 60%, #92400e 100%) !important;
	color: #451a03 !important;
	border-color: #fde047 !important;
	box-shadow: 0 4px 22px rgba(245, 158, 11, 0.65), inset 0 2px 4px #ffffff !important;
	animation: ballTumbleShake 0.12s infinite alternate, ballGoldPulse 1.2s infinite ease-in-out !important;
}

.lotto-live-balls .ball.ball-revealed-pop {
	animation: ballRevealPop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

@keyframes ballTumbleShake {
	0% { transform: translateY(-1.5px) rotate(-1deg); }
	100% { transform: translateY(1.5px) rotate(1deg); }
}

@keyframes ballTumblePulse {
	0% { box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4); }
	100% { box-shadow: 0 6px 26px rgba(59, 130, 246, 0.8); }
}

@keyframes ballGoldPulse {
	0% { box-shadow: 0 4px 16px rgba(245, 158, 11, 0.5); }
	100% { box-shadow: 0 8px 30px rgba(251, 191, 36, 0.95); }
}

@keyframes ballRevealPop {
	0% { transform: scale(0.3); opacity: 0.2; }
	65% { transform: scale(1.22); }
	100% { transform: scale(1); opacity: 1; }
}

@media (max-width: 580px) {
	.lotto-live-balls {
		gap: 8px !important;
	}
	.lotto-live-balls .ball {
		width: 44px !important;
		height: 44px !important;
		font-size: 20px !important;
		border-width: 2.5px !important;
	}
	.lotto-live-balls .ball.gold {
		margin-left: 4px !important;
	}
}

@media (max-width: 380px) {
	.lotto-live-balls {
		gap: 6px !important;
	}
	.lotto-live-balls .ball {
		width: 38px !important;
		height: 38px !important;
		font-size: 17px !important;
		border-width: 2px !important;
	}
}

/* ==========================================================================
   Homepage Results Table - Aligned, 14px Font, 32px Balls
   ========================================================================== */
table.results-table {
	border-collapse: collapse !important;
	width: 100% !important;
	white-space: nowrap !important;
	font-size: 14px !important;
	margin: 0 !important;
}

table.results-table th {
	background: linear-gradient(180deg, #f0fdf4 0%, #dcfce7 100%) !important;
	font-size: 13px !important;
	font-weight: 700 !important;
	padding: 12px 10px !important;
	color: #064e3b !important;
	border: 0 !important;
	border-bottom: 2px solid #86efac !important;
	vertical-align: middle !important;
	letter-spacing: 0.3px !important;
}

table.results-table td {
	padding: 11px 10px !important;
	border-bottom: 1px solid #e2f4e9 !important;
	border-top: 0 !important;
	vertical-align: middle !important;
	font-size: 14px !important;
	line-height: 1.4 !important;
	color: #374151 !important;
}

table.results-table tr:hover td {
	background: #f0fdf4 !important;
}

table.results-table td:first-child {
	font-weight: 700 !important;
	color: #059669 !important;
}

table.results-table td:last-child {
	font-weight: 800 !important;
	color: #d80000 !important;
	font-size: 15px !important;
}

table.results-table td button.text-link {
	font-size: 14px !important;
	font-weight: 700 !important;
	color: #059669 !important;
	background: none !important;
	border: none !important;
	padding: 0 !important;
	margin: 0 !important;
	cursor: pointer !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	vertical-align: middle !important;
	line-height: 1 !important;
	box-shadow: none !important;
	text-decoration: none !important;
}

table.results-table td button.text-link:hover {
	text-decoration: underline !important;
	color: #047857 !important;
}

table.results-table .result-balls {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	vertical-align: middle !important;
	gap: 6px !important;
	line-height: 1 !important;
}

table.results-table .result-balls .ball {
	width: 32px !important;
	height: 32px !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	border-radius: 50% !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	vertical-align: middle !important;
	line-height: 1 !important;
	margin: 0 !important;
	background: linear-gradient(180deg, #ffffff 0%, #edf8ff 100%) !important;
	border: 2px solid #51b9e9 !important;
	box-shadow: 0 2px 0 #1682b9 !important;
	color: #071b38 !important;
}

table.results-table .result-balls .ball.gold {
	background: linear-gradient(180deg, #fffbe3, #ffe58a) !important;
	border-color: #efb817 !important;
	box-shadow: 0 2px 0 #c88b00 !important;
	color: #78350f !important;
	margin-left: 6px !important;
}

/* History Filter Bar - Perfectly Aligned, Sleek & Modern */
.lotto-history-filter-form {
	display: grid !important;
	grid-template-columns: 1fr 1.35fr 1fr auto !important;
	gap: 14px !important;
	align-items: start !important;
	margin-bottom: 20px !important;
	background: #f8fafc !important;
	padding: 18px 20px !important;
	border-radius: 12px !important;
	border: 1px solid #e2e8f0 !important;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
	box-sizing: border-box !important;
}

.lotto-history-filter-form .filter-field {
	display: flex !important;
	flex-direction: column !important;
	justify-content: flex-start !important;
	margin: 0 !important;
	padding: 0 !important;
}

.lotto-history-filter-form label {
	display: block !important;
	font-size: 12px !important;
	font-weight: 600 !important;
	color: #475569 !important;
	margin-bottom: 6px !important;
	line-height: 16px !important;
	height: 16px !important;
	white-space: nowrap !important;
}

.lotto-history-filter-form input[type="date"],
.lotto-history-filter-form select,
.lotto-history-filter-form input[type="text"] {
	width: 100% !important;
	height: 42px !important;
	line-height: 40px !important;
	padding: 0 12px !important;
	border: 1px solid #cbd5e1 !important;
	border-radius: 8px !important;
	font-size: 13px !important;
	color: #1e293b !important;
	background-color: #ffffff !important;
	box-sizing: border-box !important;
	margin: 0 !important;
	outline: none !important;
	transition: all 0.2s ease !important;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
}

.lotto-history-filter-form select {
	cursor: pointer !important;
	appearance: none !important;
	-webkit-appearance: none !important;
	-moz-appearance: none !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: right 12px center !important;
	padding-right: 32px !important;
}

.lotto-history-filter-form input[type="date"]:focus,
.lotto-history-filter-form select:focus,
.lotto-history-filter-form input[type="text"]:focus {
	border-color: #059669 !important;
	box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15) !important;
}

.lotto-history-filter-form .filter-buttons-group {
	display: flex !important;
	gap: 8px !important;
	align-items: center !important;
	height: 42px !important;
}

/* Modern Filter Buttons - No Basic/Dull Colors */
.lotto-btn-filter {
	height: 42px !important;
	margin: 0 !important;
	padding: 0 18px !important;
	border-radius: 8px !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 7px !important;
	border: none !important;
	background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
	color: #ffffff !important;
	box-shadow: 0 3px 10px rgba(5, 150, 105, 0.28) !important;
	cursor: pointer !important;
	transition: all 0.2s ease !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	line-height: 1 !important;
	box-sizing: border-box !important;
	white-space: nowrap !important;
}

.lotto-btn-filter:hover {
	background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
	box-shadow: 0 5px 15px rgba(5, 150, 105, 0.4) !important;
	transform: translateY(-1px);
	color: #ffffff !important;
}

.lotto-btn-filter:active {
	transform: translateY(0);
	box-shadow: 0 2px 6px rgba(5, 150, 105, 0.2) !important;
}

.lotto-btn-reset {
	height: 42px !important;
	margin: 0 !important;
	padding: 0 16px !important;
	border-radius: 8px !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 6px !important;
	border: 1px solid #cbd5e1 !important;
	background: #ffffff !important;
	color: #475569 !important;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
	cursor: pointer !important;
	transition: all 0.2s ease !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	line-height: 1 !important;
	box-sizing: border-box !important;
	white-space: nowrap !important;
}

.lotto-btn-reset:hover {
	background: #f1f5f9 !important;
	border-color: #94a3b8 !important;
	color: #0f172a !important;
	transform: translateY(-1px);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
}

.lotto-btn-reset:active {
	transform: translateY(0);
	background: #e2e8f0 !important;
}

/* History Table Header and Row Layout - Perfectly Aligned and Centered */
.lotto-history-header {
	display: grid;
	grid-template-columns: 175px 1fr 130px 80px;
	align-items: center;
	gap: 10px;
	background: linear-gradient(180deg, #f0fdf4 0%, #dcfce7 100%) !important;
	border: 1px solid #86efac !important;
	border-radius: 8px;
	padding: 10px 16px;
	font-size: 12px;
	font-weight: 700;
	color: #064e3b !important;
	letter-spacing: 0.3px;
	margin-bottom: 8px;
	box-sizing: border-box;
}

.lotto-history-header .history-hdr-draw {
	text-align: left;
}

.lotto-history-header .history-hdr-balls {
	text-align: center;
}

.lotto-history-header .history-hdr-prize {
	text-align: right;
}

.lotto-history-header .history-hdr-action {
	text-align: right;
}

.history-row {
	display: grid !important;
	grid-template-columns: 175px 1fr 130px 80px !important;
	align-items: center !important;
	gap: 10px !important;
	border-top: 1px solid #e3ebf8 !important;
	padding: 12px 16px !important;
	box-sizing: border-box !important;
}

.history-row .history-draw-col {
	display: flex !important;
	align-items: center !important;
	gap: 8px !important;
	white-space: nowrap !important;
	line-height: 1 !important;
}

.history-row .history-draw-id {
	color: #059669 !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	line-height: 1 !important;
}

.history-row .history-draw-datetime {
	color: #64748b !important;
	font-size: 12px !important;
	font-weight: 500 !important;
	line-height: 1 !important;
}

.history-row .result-balls {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 6px !important;
	line-height: 1 !important;
	margin: 0 !important;
	padding: 0 !important;
}

.history-row .result-balls .ball {
	width: 32px !important;
	height: 32px !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	border-radius: 50% !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	line-height: 1 !important;
	margin: 0 !important;
	background: linear-gradient(180deg, #ffffff 0%, #edf8ff 100%) !important;
	border: 2px solid #51b9e9 !important;
	box-shadow: 0 2px 0 #1682b9 !important;
	color: #071b38 !important;
	box-sizing: border-box !important;
}

.history-row .result-balls .ball.gold {
	background: linear-gradient(180deg, #fffbe3, #ffe58a) !important;
	border-color: #efb817 !important;
	box-shadow: 0 2px 0 #c88b00 !important;
	color: #78350f !important;
	margin-left: 6px !important;
}

.history-row .history-prize {
	display: flex !important;
	align-items: center !important;
	justify-content: flex-end !important;
	text-align: right !important;
	line-height: 1 !important;
}

.history-row .history-prize-mobile-label {
	display: none;
}

.history-row .history-prize-val {
	color: #d6221c !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	white-space: nowrap !important;
	line-height: 1 !important;
}

.history-row .history-action {
	display: flex !important;
	align-items: center !important;
	justify-content: flex-end !important;
	margin: 0 !important;
	padding: 0 !important;
	line-height: 1 !important;
	align-self: center !important;
}

.history-row .lotto-toggle-detail-btn {
	margin: 0 !important;
	padding: 0 6px !important;
	width: 80px !important;
	min-width: 80px !important;
	max-width: 80px !important;
	height: 32px !important;
	min-height: 32px !important;
	max-height: 32px !important;
	font-size: 12px !important;
	font-weight: 600 !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	text-align: center !important;
	white-space: nowrap !important;
	border-radius: 6px !important;
	border: 1px solid #bfdbfe !important;
	background: linear-gradient(135deg, #f0f6ff 0%, #e0edfe 100%) !important;
	color: #0284c7 !important;
	cursor: pointer !important;
	box-sizing: border-box !important;
	line-height: 1 !important;
	box-shadow: 0 1px 2px rgba(2, 132, 199, 0.06) !important;
	transition: all 0.2s ease !important;
	text-transform: none !important;
	align-self: center !important;
	vertical-align: middle !important;
}

.history-row .lotto-toggle-detail-btn:hover {
	background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
	border-color: #047857 !important;
	color: #ffffff !important;
	box-shadow: 0 3px 8px rgba(5, 150, 105, 0.25) !important;
	transform: translateY(-1px);
}

.history-row .lotto-toggle-detail-btn.is-active {
	background: #fef2f2 !important;
	border-color: #fecaca !important;
	color: #dc2626 !important;
	box-shadow: 0 1px 2px rgba(220, 38, 38, 0.08) !important;
}

.history-row .lotto-toggle-detail-btn.is-active:hover {
	background: #dc2626 !important;
	border-color: #b91c1c !important;
	color: #ffffff !important;
	box-shadow: 0 3px 8px rgba(220, 38, 38, 0.25) !important;
}

@media (max-width: 900px) {
	.lotto-history-filter-form {
		grid-template-columns: 1fr 1fr !important;
	}
	.filter-field.filter-actions {
		grid-column: 1 / -1;
	}
	.filter-field.filter-actions .filter-actions-label {
		display: none !important;
	}
	.filter-buttons-group {
		width: 100%;
	}
	.filter-buttons-group button {
		flex: 1;
	}
}

@media (max-width: 600px) {
	.lotto-history-filter-form {
		grid-template-columns: 1fr !important;
	}
}

@media (max-width: 767px) {
	.lotto-history-header {
		display: none !important;
	}
	.history-row {
		grid-template-columns: 1fr auto !important;
		gap: 10px 8px !important;
		padding: 12px 6px !important;
	}
	.history-row .history-draw-col {
		grid-column: 1 / -1 !important;
		justify-content: space-between !important;
	}
	.history-row .result-balls {
		grid-column: 1 / -1 !important;
		justify-content: center !important;
	}
	.history-row .history-prize {
		justify-content: flex-start !important;
		text-align: left !important;
	}
	.history-row .history-prize-mobile-label {
		display: inline !important;
		color: #71819b !important;
		font-size: 12px !important;
		font-weight: 500 !important;
		margin-right: 4px !important;
	}
	.history-row .history-action {
		justify-content: flex-end !important;
	}
}

@keyframes rowNewHighlight {
	0% {
		background-color: #ecfdf5;
		transform: translateY(-8px);
		opacity: 0;
	}
	30% {
		background-color: #d1fae5;
		opacity: 1;
		transform: translateY(0);
	}
	100% {
		background-color: transparent;
	}
}

/* ==========================================================================
   Lotto History Grouped By Date
   ========================================================================== */
.lotto-history-list {
	display: flex !important;
	flex-direction: column !important;
	gap: 16px !important;
}

/* ==========================================================================
   Lotto History Grouped By Date - Compact & Clean Edition
   ========================================================================== */
.lotto-history-list {
	display: flex !important;
	flex-direction: column !important;
	gap: 8px !important;
}

.history-date-group {
	background: #ffffff !important;
	border: 1px solid #e2e8f0 !important;
	border-radius: 8px !important;
	overflow: hidden !important;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03) !important;
	transition: all 0.15s ease !important;
	box-sizing: border-box !important;
}

.history-date-group:hover {
	border-color: #cbd5e1 !important;
}

/* 1 Dòng link ngày - Tinh gọn, thanh lịch */
.history-date-header {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	background: #f8fafc !important;
	border-bottom: 1px solid #f1f5f9 !important;
	padding: 8px 14px !important;
	gap: 10px !important;
	box-sizing: border-box !important;
}

.history-date-title {
	display: inline-flex !important;
	align-items: center !important;
	gap: 6px !important;
	font-size: 13.5px !important;
	font-weight: 700 !important;
	color: #1e293b !important;
	text-decoration: none !important;
	transition: color 0.15s ease !important;
}

.history-date-title:hover {
	color: #059669 !important;
}

.history-date-calendar-icon {
	font-size: 14px !important;
	line-height: 1 !important;
}

.history-date-link-btn {
	font-size: 12.5px !important;
	font-weight: 600 !important;
	color: #059669 !important;
	text-decoration: none !important;
	padding: 2px 4px !important;
	transition: color 0.15s ease !important;
	white-space: nowrap !important;
}

.history-date-link-btn:hover {
	color: #047857 !important;
	text-decoration: underline !important;
}

/* Các dòng con (sub-rows) */
.history-date-subrows {
	display: flex !important;
	flex-direction: column !important;
}

.history-row,
.history-date-subrows .history-sub-row {
	display: grid !important;
	grid-template-columns: 160px 1fr 130px 80px !important;
	align-items: center !important;
	gap: 10px !important;
	border-top: 1px solid #f1f5f9 !important;
	padding: 9px 14px !important;
	background: #ffffff;
	box-sizing: border-box !important;
	transition: background-color 0.15s ease !important;
}

.history-date-subrows .history-sub-row:first-child {
	border-top: none !important;
}

.history-date-subrows .history-sub-row:hover {
	background-color: #f8fafc;
}

/* Col 1: Mã kỳ quay & giờ quay */
.history-row .history-draw-col {
	display: flex !important;
	align-items: center !important;
	gap: 8px !important;
	white-space: nowrap !important;
	line-height: 1 !important;
}

.history-row .history-draw-id {
	color: #059669 !important;
	font-size: 14px !important;
	font-weight: 700 !important;
}

.history-draw-tag {
	font-size: 11.5px !important;
	font-weight: 600 !important;
	padding: 2px 6px !important;
	border-radius: 4px !important;
	display: inline-flex !important;
	align-items: center !important;
	white-space: nowrap !important;
	line-height: 1 !important;
}

.history-draw-tag.time-evening {
	background: #f3e8ff !important;
	color: #7e22ce !important;
}

.history-draw-tag.time-noon {
	background: #fef3c7 !important;
	color: #92400e !important;
}

/* Col 2: Balls */
.history-row .result-balls {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 5px !important;
	line-height: 1 !important;
	margin: 0 !important;
	padding: 0 !important;
}

.history-row .result-balls .ball {
	width: 30px !important;
	height: 30px !important;
	font-size: 13px !important;
}

/* Col 3: Prize */
.history-row .history-prize {
	display: flex !important;
	align-items: center !important;
	justify-content: flex-end !important;
	text-align: right !important;
	line-height: 1 !important;
}

.history-row .history-prize-val {
	color: #d80000 !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	white-space: nowrap !important;
}

/* Col 4: Action button */
.history-row .history-action {
	display: flex !important;
	align-items: center !important;
	justify-content: flex-end !important;
	margin: 0 !important;
	padding: 0 !important;
}

.history-row .lotto-toggle-detail-btn {
	width: 76px !important;
	min-width: 76px !important;
	max-width: 76px !important;
	height: 28px !important;
	min-height: 28px !important;
	font-size: 11.5px !important;
	font-weight: 600 !important;
	border-radius: 4px !important;
	padding: 0 !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	background: #f0fdf4 !important;
	border: 1px solid #bbf7d0 !important;
	color: #15803d !important;
	transition: all 0.15s ease !important;
}

.history-row .lotto-toggle-detail-btn:hover {
	background: #15803d !important;
	border-color: #15803d !important;
	color: #ffffff !important;
}

.history-row .lotto-toggle-detail-btn.is-active {
	background: #fee2e2 !important;
	border-color: #fca5a5 !important;
	color: #b91c1c !important;
}

/* Mobile responsive */
@media (max-width: 900px) {
	.lotto-history-header {
		display: none !important;
	}
	.history-date-header {
		padding: 8px 10px !important;
	}
	.history-row,
	.history-date-subrows .history-sub-row {
		grid-template-columns: 1fr auto !important;
		gap: 8px !important;
		padding: 10px 10px !important;
	}
}




