/* Shared wheel preview for bet history. Live table uses #game_wheel canvas. */
.wheel-container {
	position: relative;
	padding: 8.5px 0;
	margin-bottom: 22px; 
}
.wheel-container .wheel, .wheel-container .wheel2 {
    background-image: url("../../img/games/wheel/wheel.png");
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-color: transparent;
    margin: 7.5px auto;
    width: 270px;
    height: 270px;
    z-index: 15;
    position: relative; 
}

.wheel-container .wheel, .wheel-container .wheel2 {
    will-change: transform; 
}
.wheel-container .wheel-mask {
    background-image: url("../../img/games/wheel/wheel_mask.svg");
    background-repeat: no-repeat;
    background-size: 100% 100%;
    margin: 0 auto;
    width: 300px;
    height: 300px;
    z-index: 10;
    position: absolute;
    top: 1px;
    left: 0;
    right: 0; 
}
.wheel-container .wheel-pointer {
    background-image: url("../../img/games/wheel/wheel_pointer.svg");
    background-repeat: no-repeat;
    background-size: 100% 100%;
    margin: 0 auto;
    width: 60px;
    height: 40px;
    z-index: 20;
    position: absolute;
    top: -8px;
    left: 0;
    right: 0; 
}
.wheel-container .wheel-center {
    background-image: url("../../img/games/wheel/wheel_center.svg");
    background-repeat: no-repeat;
    background-size: 100% 100%;
    margin: 0 auto;
    width: 30px;
    height: 30px;
    z-index: 20;
    position: absolute;
    top: 135px;
    left: 0;
    right: 0; 
}
.game_wheel_result {
	padding: 0px;
	width: 100%;
	height: 100%;
	position: absolute;
	z-index: 0;
	background-color: rgba(255, 255, 255, 0.6);
	transition: opacity 300ms ease-in-out, z-index 300ms ease-in-out;
	opacity: 0;
	top: 0px;
}
.game_wheel_result.showing {
    opacity: 1;
	z-index: 30;
}
.game_wheel_result .profit {
	top: calc(50% - 0.5em);
	left: 0;
    position: absolute;
    right: 0;
	font-size: 50px;
    font-weight: 700;
	text-align: center;
	text-shadow: 2px 2px 2px #333;
	color: #FFF;
}
#wheel-main {
  position: relative;
  z-index: 3;
  width: 300px;
  margin: 0 auto 10px;
  padding-top: 45px;
  -webkit-box-sizing: border-box;
          box-sizing: border-box; 
}

#game_wheel {
	--radius-md: .375rem;
	--radius-lg: .5rem;
	position: relative;
	box-sizing: border-box;
	width: 100% !important;
	max-width: 100% !important;
	padding: 16px 16px 0;
	margin: 20px auto 30px;
	border-radius: 12px;
	background: #fff !important;
	color: #333;
	overflow: visible;
}

.dark_mode #game_wheel {
	background: #1c1e22 !important;
	color: #fff;
	border: 1px solid #dddddd1a;
}

#game_wheel .wheel-layout {
	display: grid;
	grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
	gap: 15px;
	align-items: stretch;
	width: 100%;
	min-width: 0;
}

#game_wheel .wheel-sidebar {
	display: flex;
	flex-direction: column;
	min-width: 0;
	overflow: visible !important;
	max-height: none;
}

#game_wheel .wheel-sidebar-body {
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	flex-direction: column;
}

#game_wheel .wheel-sidebar-foot {
	flex: 0 0 auto;
	padding-top: 8px;
}

#game_wheel .wheel-chips {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 4px;
	padding: 5px;
	border-radius: 8px;
	background: #e9ecef;
	box-sizing: border-box;
	min-height: 42px;
	align-items: center;
}

#game_wheel .wheel-chips.is-five {
	grid-template-columns: repeat(5, minmax(0, 1fr));
}

.dark_mode #game_wheel .wheel-chips {
	background: #1a1c1e;
}

#game_wheel .wheel-option-btn {
	height: 32px;
	min-width: 0;
	padding: 0 6px;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: #90a4ae;
	font-size: 12px;
	font-weight: 800;
	cursor: pointer;
	flex: none;
}

#game_wheel .wheel-option-btn.is-active,
.dark_mode #game_wheel .wheel-option-btn.is-active {
	background: #fff !important;
	color: #111 !important;
	border-color: transparent !important;
}

.dark_mode #game_wheel .wheel-option-btn.is-active {
	background: #3a3e44 !important;
	color: #fff !important;
}

#game_wheel.is-auto-running .wheel-option-btn,
#game_wheel .wheel-option-btn:disabled {
	opacity: 0.55;
	pointer-events: none;
}

#game_wheel .wheel-actions {
	margin-top: 8px;
}

#game_wheel #manual_bet,
#game_wheel #auto_bet {
	display: none;
}

#game_wheel:not(.is-auto) #manual_bet {
	display: block;
}

#game_wheel.is-auto #auto_bet {
	display: block;
}

#game_wheel .bet_btn,
#game_wheel #process_bet_game_wheel,
#game_wheel #start_autobet,
#game_wheel #stop_autobet {
	display: flex;
	width: 100%;
	max-width: none !important;
	height: 48px;
	margin: 0 !important;
	padding: 0 8px;
	border: 0 !important;
	border-radius: 8px;
	background: #67e366 !important;
	color: #0d1a0d !important;
	font-size: 14px;
	font-weight: 800;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

#game_wheel:not(.is-auto) #process_bet_game_wheel {
	display: flex;
}

#game_wheel:not(.is-auto) #start_autobet,
#game_wheel:not(.is-auto) #stop_autobet,
#game_wheel:not(.is-auto) #auto_bet {
	display: none !important;
}

#game_wheel.is-auto #process_bet_game_wheel {
	display: none !important;
}

#game_wheel.is-auto:not(.is-auto-running) #start_autobet {
	display: flex !important;
}

#game_wheel.is-auto-running #start_autobet {
	display: none !important;
}

#game_wheel #stop_autobet {
	display: none !important;
	background: #f44336 !important;
	color: #fff !important;
}

#game_wheel.is-auto-running #stop_autobet {
	display: flex !important;
}

#game_wheel .bet_btn img,
#game_wheel #process_bet_game_wheel img,
#game_wheel #stop_autobet img {
	width: 22px;
	height: 22px;
}

#game_wheel .wheel-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
}

#game_wheel .wheel-stage {
	position: relative;
	min-width: 0;
	min-height: 0;
	display: flex;
	flex-direction: column;
	padding: 16px;
	border: 1px solid #DDD;
	border-radius: 10px;
	background: #f5f6f8;
}

.dark_mode #game_wheel .wheel-stage {
	background: #212428;
	border-color: #3a3e44;
}

#game_wheel .wheel-live-mult {
	align-self: stretch;
	position: relative;
	z-index: 3;
	display: flex;
	flex-direction: row-reverse;
	flex-wrap: nowrap;
	justify-content: flex-start;
	align-items: center;
	gap: 6px;
	height: 40px;
	margin-bottom: 10px;
	overflow: hidden;
}

#game_wheel .wheel-mult {
	flex: 0 0 auto;
	min-width: 0;
	padding: 10px 15px;
	border-radius: 6px;
	background: #eceff1;
	color: #546e7a;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	text-align: center;
	white-space: nowrap;
	transform-origin: center center;
}

#game_wheel .wheel-mult.is-new {
	animation: wheel-mult-pop .28s ease-out forwards;
	backface-visibility: hidden;
}

@keyframes wheel-mult-pop {
	from { transform: scale(1); }
	to { transform: scale(1.15); }
}

#game_wheel .wheel-mult.is-win {
	background: #8bc34a;
	color: #fff;
}

.dark_mode #game_wheel .wheel-mult {
	background: #2f363d;
	color: #e8eef2;
}

.dark_mode #game_wheel .wheel-mult.is-win {
	background: #67e366;
	color: #1a270b;
}

#wheel-stage {
	position: relative;
	width: 100%;
	max-width: 420px;
	margin: 0 auto;
	flex: 1 1 auto;
}

#wheel-canvas-wrap {
	position: relative;
	width: 100%;
	padding-bottom: 100%;
	background: #1e2024;
	border-radius: 50%;
}

body:not(.dark_mode) #wheel-canvas-wrap {
	background: #f0f4f8;
}

#wheel-canvas {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: block;
}

.wheel-canvas-pointer {
	position: absolute;
	top: -2px;
	left: 50%;
	transform: translateX(-50%);
	width: 28px;
	height: 36px;
	z-index: 20;
	pointer-events: none;
}

.wheel-canvas-pointer::before {
	content: '';
	display: block;
	width: 0;
	height: 0;
	margin: 0 auto;
	border-left: 14px solid transparent;
	border-right: 14px solid transparent;
	border-top: 22px solid #e91e63;
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

.wheel-legend {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin-top: 16px;
}

.wheel-legend-item {
	flex: 1 1 72px;
	min-width: 72px;
	max-width: 120px;
	padding: 8px 6px 6px;
	border-radius: 8px;
	background: #1e2024;
	border: 1px solid #3a3e44;
	text-align: center;
}

body:not(.dark_mode) .wheel-legend-item {
	background: #fff;
	border-color: #d5dbe3;
}

.wheel-legend-mult {
	font-size: 13px;
	font-weight: 700;
	color: #fff;
	margin-bottom: 6px;
}

body:not(.dark_mode) .wheel-legend-mult {
	color: #1e2024;
}

.wheel-legend-bar {
	height: 4px;
	border-radius: 2px;
}

#wheel-stage .game_result_wrap {
	z-index: 100;
}

#game_wheel .gx-board-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 12px -16px 0;
	padding: 6px 14px 10px;
	border-top: 1px solid #e5e7eb;
	min-height: 40px;
}

.dark_mode #game_wheel .gx-board-bar {
	border-top-color: #3a3e44;
}

#game_wheel .gx-board-bar .gx-left {
	gap: 8px;
	flex: 0 1 auto;
	min-width: 0;
}

#game_wheel .gx-board-bar .gx-title {
	font-size: 15px;
	font-weight: 700;
	margin: 0;
	color: #374151;
}

.dark_mode #game_wheel .gx-board-bar .gx-title {
	color: #fff;
}

#game_wheel .gx-board-bar .gx-nav {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	gap: 2px;
	margin-left: auto;
}

#game_wheel .gx-board-bar .gx-btn {
	background: transparent;
	border: 0;
	border-radius: 8px;
	padding: 6px 8px;
	min-width: 32px;
	height: 32px;
	color: #90a4ae;
	font-size: 14px;
	box-shadow: none;
}

.dark_mode #game_wheel .gx-board-bar .gx-btn {
	color: #b0bec5;
	background: transparent;
}

#game_wheel .gx-board-bar .gx-btn:hover,
.dark_mode #game_wheel .gx-board-bar .gx-btn:hover {
	background: rgba(0, 0, 0, 0.06);
	color: #111;
}

.dark_mode #game_wheel .gx-board-bar .gx-btn:hover {
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
}

#game_wheel .gx-board-bar .gx-btn.is-active-stats,
.dark_mode #game_wheel .gx-board-bar .gx-btn.is-active-stats {
	color: #67e366;
}

@media (max-width: 991px) {
	#game_wheel .wheel-layout {
		grid-template-columns: minmax(0, 1fr);
	}
	#game_wheel .wheel-stage {
		order: -1;
	}
	#game_wheel .wheel-live-mult {
		height: 28px;
		gap: 4px;
		margin-bottom: 6px;
	}
	#game_wheel .wheel-mult {
		padding: 5px 8px;
		font-size: 11px;
		border-radius: 5px;
	}
}

@media (max-width: 575px) {
	#game_wheel {
		width: 100% !important;
		max-width: 100% !important;
		padding: 12px 10px 0;
		margin: 10px auto 20px;
	}
	#game_wheel .wheel-chips.is-five {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}
	#game_wheel .wheel-option-btn {
		font-size: 11px;
		padding: 0 2px;
	}
}
