/* Pick3 Lottery — front-end styles. Scoped under .easywin-root to avoid theme clashes. */

.easywin-root {
	--p3-bg: #ffffff;
	--p3-panel: #1f6b2e;        /* lottery green */
	--p3-panel-2: #18581f;      /* darker green */
	--p3-line: #2e7d3a;
	--p3-text: #ffffff;
	--p3-muted: #d6e8d8;
	--p3-accent: #f5a623;       /* amber */
	--p3-accent-2: #e0951a;
	--p3-danger: #ff6b6b;
	--p3-radius: 14px;

	max-width: 960px;
	margin: 0 auto;
	color: #1a1a1a;
	background: var(--p3-bg);
	border-radius: var(--p3-radius);
	padding: 20px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	box-sizing: border-box;
}
.easywin-root *, .easywin-root *::before, .easywin-root *::after { box-sizing: inherit; }

.easywin__header {
	display: flex; justify-content: space-between; align-items: center;
	gap: 16px; flex-wrap: wrap; margin-bottom: 14px;
}
.easywin__title { margin: 0; font-size: 26px; letter-spacing: .5px; color: var(--p3-panel); }
.easywin__subtitle { margin: 2px 0 0; color: #5a6b5c; font-size: 13px; }

.easywin__wallet {
	background: var(--p3-panel); border: 1px solid var(--p3-line);
	border-radius: var(--p3-radius); padding: 8px 14px; text-align: right;
}
.easywin__wallet-label { display: block; font-size: 11px; color: var(--p3-muted); text-transform: uppercase; }
.easywin__wallet-amount { font-size: 18px; font-weight: 700; color: #fff; }

.easywin__countdown {
	display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
	background: var(--p3-panel); color: #fff; border: 1px solid var(--p3-line);
	border-radius: var(--p3-radius); padding: 12px 16px; margin-bottom: 16px;
}
.easywin__countdown strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.easywin__status { margin-left: auto; font-size: 13px; color: var(--p3-muted); }
.easywin__status--open { color: #b6f0c0; }
.easywin__status--closed { color: #ffd2d2; }

.easywin__grid {
	display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px;
}
@media (max-width: 760px) { .easywin__grid { grid-template-columns: 1fr; } }

/* Tighten padding and give bigger tap targets on phones. */
@media (max-width: 560px) {
	.easywin-root { padding: 14px 12px; border-radius: 0; }
	.easywin__panel { padding: 14px; }
	/* 10 balls get cramped on narrow screens: show 5 per row, two rows. */
	.easywin__balls { grid-template-columns: repeat(5, 1fr); gap: 8px; }
	.easywin__ball-btn { font-size: clamp( 16px, 6vw, 22px ); }
}

.easywin__panel {
	background: var(--p3-panel); color: #fff; border: 1px solid var(--p3-line);
	border-radius: var(--p3-radius); padding: 18px;
}
.easywin__panel h3 { margin: 0 0 14px; font-size: 16px; color: #fff; }

.easywin__field { display: block; margin-bottom: 14px; }
.easywin__field > span { display: block; font-size: 12px; color: var(--p3-muted); margin-bottom: 6px; }
.easywin__field select, .easywin__field input {
	width: 100%; padding: 10px 12px; border-radius: 8px;
	border: 1px solid var(--p3-line); background: #fff;
	color: #1a1a1a; font-size: 15px;
}

/* ---- number-ball selector ---- */
.easywin__selector { margin-bottom: 16px; }
.easywin__row {
	display: flex; flex-direction: column; align-items: stretch; gap: 8px; margin-bottom: 16px;
}
.easywin__row-label {
	font-size: 12px; font-weight: 700; color: var(--p3-muted);
	text-transform: uppercase; letter-spacing: .4px; line-height: 1.2;
}
.easywin__balls {
	display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; width: 100%;
}
.easywin__ball-btn {
	width: 100%; aspect-ratio: 1 / 1; border-radius: 50%;
	border: 2px solid rgba(255,255,255,.35); background: #15531c; color: #fff;
	font-size: clamp( 13px, 3.2vw, 20px ); font-weight: 700; cursor: pointer; transition: .12s ease;
	display: inline-flex; align-items: center; justify-content: center; padding: 0;
}
.easywin__ball-btn:hover { transform: translateY(-1px); box-shadow: 0 3px 8px rgba(0,0,0,.2); background: #1a6624; }
.easywin__ball-btn--selected {
	background: var(--p3-accent); color: #1a1a1a; border-color: #fff;
	box-shadow: 0 0 0 2px var(--p3-accent);
}
.easywin__row--disabled { opacity: .35; pointer-events: none; }

.easywin__quick { display: flex; gap: 10px; margin-bottom: 14px; }

.easywin__btn {
	appearance: none; border: none; cursor: pointer; font-weight: 700;
	border-radius: 999px; padding: 12px 18px; font-size: 14px; transition: .15s ease;
	letter-spacing: .3px;
}
.easywin__btn--primary { width: 100%; background: var(--p3-accent); color: #1a1a1a; font-size: 16px; }
.easywin__btn--primary:hover { background: var(--p3-accent-2); }
.easywin__btn--primary:disabled { opacity: .5; cursor: not-allowed; }
.easywin__btn--ghost { flex: 1; background: transparent; color: #fff; border: 2px solid #fff; text-transform: uppercase; }
.easywin__btn--ghost:hover { background: rgba(255,255,255,.12); }

.easywin__potential {
	display: flex; justify-content: space-between; align-items: center;
	background: var(--p3-panel-2); border: 1px dashed var(--p3-line);
	border-radius: 9px; padding: 10px 14px; margin-bottom: 14px;
}
.easywin__potential span { color: var(--p3-muted); }
.easywin__potential strong { color: var(--p3-accent); font-size: 18px; }

.easywin__message { min-height: 18px; margin: 10px 0 0; font-size: 13px; }
.easywin__message--ok { color: #b6f0c0; }
.easywin__message--err { color: #ffd2d2; }
.easywin__login { margin-top: 10px; }
.easywin__login a { color: var(--p3-accent); }

.easywin__results-list, .easywin__bets-list { list-style: none; margin: 0; padding: 0; }
.easywin__results-list li, .easywin__bets-list li {
	display: flex; justify-content: space-between; align-items: center;
	padding: 9px 0; border-bottom: 1px solid var(--p3-line); font-size: 14px;
}
.easywin__results-list li:last-child, .easywin__bets-list li:last-child { border-bottom: none; }
.easywin__ball {
	display: inline-flex; align-items: center; justify-content: center;
	width: 30px; height: 30px; border-radius: 50%; margin-left: 4px;
	background: var(--p3-accent); color: #1a1a1a; font-weight: 700; font-size: 14px;
}
.easywin__muted, .easywin__time { color: var(--p3-muted); font-size: 12px; }
.easywin__result-meta { display: flex; flex-direction: column; gap: 2px; }
.easywin__ticketid-sm { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12px; font-weight: 700; color: var(--p3-accent); }

/* ---- public draw-results board ---- */
.easywin-results__table-wrap { overflow-x: auto; border-radius: var(--p3-radius); }
.easywin-results__table { width: 100%; border-collapse: collapse; }
.easywin-results__table thead th {
	text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .3px;
	color: #fff; padding: 12px 10px; border-bottom: 2px solid rgba(255,255,255,.2);
}
.easywin-results__table thead th:last-child { text-align: right; }
.easywin-results__table tbody td { padding: 14px 10px; font-size: 14px; color: #fff; }
.easywin-results__table tbody tr:nth-child(odd) td { background: rgba(255,255,255,.04); }
.easywin-results__ticketid { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-weight: 700; color: var(--p3-accent); white-space: nowrap; }
.easywin-results__date { color: var(--p3-muted); white-space: nowrap; }
.easywin-results__nums { text-align: right; white-space: nowrap; }
.easywin-results__nums .easywin__ball { width: 32px; height: 32px; font-size: 14px; margin-left: 6px; }

/* ---- wallet page ---- */
.easywin-wallet-page__grid { grid-template-columns: 1fr; }
.easywin__textarea {
	width: 100%; padding: 10px 12px; border-radius: 8px;
	border: 1px solid var(--p3-line); background: #fff; color: #1a1a1a;
	font-size: 15px; font-family: inherit; resize: vertical;
}
.easywin-wallet-page__history { margin-top: 16px; }
.easywin-wallet-page__history .easywin-history__table { min-width: 0; }

.easywin__tag { font-size: 11px; padding: 2px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: .3px; }
.easywin__tag--won { background: var(--p3-accent); color: #1a1a1a; }
.easywin__tag--lost { background: rgba(255,107,107,.2); color: #ffd2d2; }
.easywin__tag--pending { background: rgba(255,255,255,.15); color: var(--p3-muted); }

.easywin__footer { margin-top: 16px; text-align: center; color: #5a6b5c; }

/* ---- game instructions + prize table ---- */
.easywin__instructions {
	background: var(--p3-panel-2); border: 1px solid var(--p3-line);
	border-radius: 10px; padding: 12px 16px; margin-bottom: 16px;
}
.easywin__instructions-lead { margin: 0; font-size: 16px; color: #fff; line-height: 1.4; }

.easywin__prize-table { width: 100%; border-collapse: collapse; }
.easywin__prize-table th {
	text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .3px;
	color: var(--p3-muted); padding: 6px 8px; border-bottom: 1px solid var(--p3-line);
}
.easywin__prize-table th:last-child, .easywin__prize-table td:last-child { text-align: right; }
.easywin__prize-table td {
	padding: 9px 8px; font-size: 14px; color: #fff; border-bottom: 1px solid rgba(255,255,255,.08);
}
.easywin__prize-table tr:last-child td { border-bottom: none; }
.easywin__prize-amount { font-weight: 700; color: var(--p3-accent); white-space: nowrap; }
.easywin__prize-note { margin: 10px 0 0; font-size: 12px; color: var(--p3-muted); }

/* ---- bet history dashboard ---- */
.easywin-history__summary { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.easywin-history__card {
	flex: 1 1 150px; background: var(--p3-panel); color: #fff;
	border: 1px solid var(--p3-line); border-radius: var(--p3-radius); padding: 14px 16px;
}
.easywin-history__card-label { display: block; font-size: 11px; text-transform: uppercase; color: var(--p3-muted); }
.easywin-history__card-value { display: block; font-size: 22px; font-weight: 700; margin-top: 4px; }

.easywin-history__table-wrap { overflow-x: auto; border-radius: var(--p3-radius); border: 1px solid #e3e3e3; }
.easywin-history__table { width: 100%; border-collapse: collapse; background: #fff; min-width: 640px; }
.easywin-history__table thead th {
	text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .3px;
	color: #fff; background: var(--p3-panel); padding: 12px 14px; white-space: nowrap;
}
.easywin-history__table tbody td {
	padding: 12px 14px; border-bottom: 1px solid #eee; font-size: 14px; color: #1a1a1a; vertical-align: middle;
}
.easywin-history__table tbody tr:last-child td { border-bottom: none; }
.easywin-history__table tbody tr:nth-child(even) td { background: #fafafa; }
.easywin-history__table .easywin__muted { color: #888; text-align: center; padding: 22px 14px; }
.easywin-history__table .easywin__ball {
	width: 26px; height: 26px; font-size: 13px; margin: 0 2px 0 0; background: var(--p3-panel); color: #fff;
}
.easywin-history__ticket { white-space: nowrap; }
.easywin-history__win { color: #1f6b2e; }
.easywin-history__ticketid { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-weight: 700; color: #1f6b2e; white-space: nowrap; }
.easywin-history__drawno { display: block; font-size: 11px; color: #888; margin-top: 2px; }
.easywin-history__table .easywin__tag--won { background: #1f6b2e; color: #fff; }
.easywin-history__table .easywin__tag--lost { background: #f3d6d6; color: #a33; }
.easywin-history__table .easywin__tag--pending { background: #eee; color: #777; }

.easywin-history__pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 16px; }
.easywin-history__pager .easywin__btn--ghost { flex: 0 0 auto; color: var(--p3-panel); border-color: var(--p3-panel); }
.easywin-history__pager .easywin__btn--ghost:hover { background: rgba(31,107,46,.08); }
.easywin-history__pager .easywin__btn--ghost:disabled { opacity: .4; cursor: not-allowed; }
.easywin-history__pageinfo { font-size: 14px; color: #444; }

/* ============================================================ EasyWin scratch */

.easywin__play { display: flex; flex-direction: column; }

/* ---- purchase bar ---- */
.easywin__buybar {
	display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px;
	background: var(--p3-panel-2); border: 1px solid var(--p3-line);
	border-radius: 12px; padding: 14px;
}
.easywin__qty-label, .easywin__cost-line, .easywin__cost-total {
	display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .4px;
	color: var(--p3-muted); margin-bottom: 6px;
}
.easywin__stepper { display: inline-flex; align-items: stretch; border-radius: 10px; overflow: hidden; border: 1px solid var(--p3-line); }
.easywin__step {
	width: 42px; border: none; background: #15531c; color: #fff; font-size: 22px;
	font-weight: 700; cursor: pointer; line-height: 1; transition: .12s ease;
}
.easywin__step:hover { background: #1a6624; }
.easywin__qty-input {
	width: 64px; text-align: center; border: none; border-left: 1px solid var(--p3-line);
	border-right: 1px solid var(--p3-line); background: #fff; color: #1a1a1a;
	font-size: 18px; font-weight: 700; -moz-appearance: textfield;
}
.easywin__qty-input::-webkit-outer-spin-button,
.easywin__qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.easywin__cost { display: flex; flex-direction: column; gap: 8px; }
.easywin__cost strong { color: #fff; font-size: 16px; }
.easywin__cost-total strong { color: var(--p3-accent); font-size: 18px; }
.easywin__buy { width: auto; flex: 1 1 160px; align-self: stretch; }

/* ---- hint / empty state ---- */
.easywin__hint {
	margin-top: 16px; text-align: center; color: var(--p3-muted);
	border: 1px dashed var(--p3-line); border-radius: 12px; padding: 22px 16px;
}
.easywin__hint-emoji { font-size: 34px; display: block; margin-bottom: 8px; }
.easywin__hint p { margin: 0; font-size: 13px; line-height: 1.5; }

/* ---- cards area ---- */
.easywin__cards { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 16px; }
@media (min-width: 640px) { .easywin__cards:has(.easywin__card + .easywin__card) { grid-template-columns: 1fr 1fr; } }

.easywin__card {
	background: #0f3f17; border: 1px solid var(--p3-line); border-radius: 14px;
	padding: 12px; transition: box-shadow .2s ease, transform .2s ease;
}
.easywin__card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.easywin__card-id {
	font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	font-size: 12px; font-weight: 700; color: var(--p3-accent);
}
.easywin__card-status { font-size: 12px; color: var(--p3-muted); }

/* ---- the scratch stage: grid underneath, canvas on top ---- */
.easywin__stage {
	position: relative; width: 100%; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden;
}
.easywin__cardgrid {
	position: absolute; inset: 0; display: grid;
	grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); gap: 4px;
	padding: 4px;
	background:
		repeating-linear-gradient( 0deg, #1c7a2b 0 12.5%, #1a6f28 12.5% 25% );
}
.easywin__cell {
	display: flex; align-items: center; justify-content: center;
	background: rgba(255,255,255,.10); border-radius: 8px;
	transition: background .2s ease, transform .2s ease;
}
.easywin__cell-icon { font-size: clamp( 26px, 9vw, 46px ); line-height: 1; }
.easywin__cell--hit {
	background: var(--p3-accent); transform: scale(1.04);
	box-shadow: 0 0 0 2px #fff inset, 0 0 14px rgba(245,166,35,.7);
}

.easywin__scratch {
	position: absolute; inset: 0; width: 100%; height: 100%;
	touch-action: none; cursor: grab; border-radius: 10px;
	transition: opacity .25s ease;
}
.easywin__scratch:active { cursor: grabbing; }
.easywin__scratch.is-revealed { opacity: 0; pointer-events: none; }

/* ---- result banner ---- */
.easywin__banner {
	margin-top: 10px; min-height: 18px; font-size: 13px; color: var(--p3-muted);
	display: flex; align-items: center; gap: 8px; line-height: 1.35;
}
.easywin__banner--win { color: #fff; }
.easywin__banner--win strong { color: var(--p3-accent); }
.easywin__banner-emoji { font-size: 20px; }

/* ---- win / lose card states ---- */
.easywin__card--win { box-shadow: 0 0 0 2px var(--p3-accent), 0 10px 30px rgba(245,166,35,.25); }
.easywin__card--lose { opacity: .9; }
.easywin__card--pulse { animation: easywin-pop .5s ease; }
@keyframes easywin-pop {
	0% { transform: scale(1); }
	40% { transform: scale(1.025); }
	100% { transform: scale(1); }
}

/* ---- round controls ---- */
.easywin__round-actions { display: flex; gap: 10px; margin-top: 16px; }

/* ---- prize table symbols ---- */
.easywin__sym { font-size: 18px; vertical-align: -2px; }
.easywin__prize-sym { display: flex; align-items: center; gap: 8px; }

@media (prefers-reduced-motion: reduce) {
	.easywin__card--pulse { animation: none; }
	.easywin__scratch { transition: none; }
}

@media (max-width: 560px) {
	.easywin__buybar { gap: 10px; }
	.easywin__buy { flex-basis: 100%; }
}
