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

.pick3 {
	--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;
}
.pick3 *, .pick3 *::before, .pick3 *::after { box-sizing: inherit; }

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

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

.pick3__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;
}
.pick3__countdown strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.pick3__status { margin-left: auto; font-size: 13px; color: var(--p3-muted); }
.pick3__status--open { color: #b6f0c0; }
.pick3__status--closed { color: #ffd2d2; }

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

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

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

.pick3__field { display: block; margin-bottom: 14px; }
.pick3__field > span { display: block; font-size: 12px; color: var(--p3-muted); margin-bottom: 6px; }
.pick3__field select, .pick3__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 ---- */
.pick3__selector { margin-bottom: 16px; }
.pick3__row {
	display: flex; flex-direction: column; align-items: stretch; gap: 8px; margin-bottom: 16px;
}
.pick3__row-label {
	font-size: 12px; font-weight: 700; color: var(--p3-muted);
	text-transform: uppercase; letter-spacing: .4px; line-height: 1.2;
}
.pick3__balls {
	display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; width: 100%;
}
.pick3__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;
}
.pick3__ball-btn:hover { transform: translateY(-1px); box-shadow: 0 3px 8px rgba(0,0,0,.2); background: #1a6624; }
.pick3__ball-btn--selected {
	background: var(--p3-accent); color: #1a1a1a; border-color: #fff;
	box-shadow: 0 0 0 2px var(--p3-accent);
}
.pick3__row--disabled { opacity: .35; pointer-events: none; }

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

.pick3__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;
}
.pick3__btn--primary { width: 100%; background: var(--p3-accent); color: #1a1a1a; font-size: 16px; }
.pick3__btn--primary:hover { background: var(--p3-accent-2); }
.pick3__btn--primary:disabled { opacity: .5; cursor: not-allowed; }
.pick3__btn--ghost { flex: 1; background: transparent; color: #fff; border: 2px solid #fff; text-transform: uppercase; }
.pick3__btn--ghost:hover { background: rgba(255,255,255,.12); }

.pick3__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;
}
.pick3__potential span { color: var(--p3-muted); }
.pick3__potential strong { color: var(--p3-accent); font-size: 18px; }

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

.pick3__results-list, .pick3__bets-list { list-style: none; margin: 0; padding: 0; }
.pick3__results-list li, .pick3__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;
}
.pick3__results-list li:last-child, .pick3__bets-list li:last-child { border-bottom: none; }
.pick3__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;
}
.pick3__muted, .pick3__time { color: var(--p3-muted); font-size: 12px; }
.pick3__result-meta { display: flex; flex-direction: column; gap: 2px; }
.pick3__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 ---- */
.pick3-results__table-wrap { overflow-x: auto; border-radius: var(--p3-radius); }
.pick3-results__table { width: 100%; border-collapse: collapse; }
.pick3-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);
}
.pick3-results__table thead th:last-child { text-align: right; }
.pick3-results__table tbody td { padding: 14px 10px; font-size: 14px; color: #fff; }
.pick3-results__table tbody tr:nth-child(odd) td { background: rgba(255,255,255,.04); }
.pick3-results__ticketid { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-weight: 700; color: var(--p3-accent); white-space: nowrap; }
.pick3-results__date { color: var(--p3-muted); white-space: nowrap; }
.pick3-results__nums { text-align: right; white-space: nowrap; }
.pick3-results__nums .pick3__ball { width: 32px; height: 32px; font-size: 14px; margin-left: 6px; }

/* ---- wallet page ---- */
.pick3-wallet-page__grid { grid-template-columns: 1fr; }
.pick3__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;
}
.pick3-wallet-page__history { margin-top: 16px; }
.pick3-wallet-page__history .pick3-history__table { min-width: 0; }

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

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

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

.pick3__prize-table { width: 100%; border-collapse: collapse; }
.pick3__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);
}
.pick3__prize-table th:last-child, .pick3__prize-table td:last-child { text-align: right; }
.pick3__prize-table td {
	padding: 9px 8px; font-size: 14px; color: #fff; border-bottom: 1px solid rgba(255,255,255,.08);
}
.pick3__prize-table tr:last-child td { border-bottom: none; }
.pick3__prize-amount { font-weight: 700; color: var(--p3-accent); white-space: nowrap; }
.pick3__prize-note { margin: 10px 0 0; font-size: 12px; color: var(--p3-muted); }

/* ---- bet history dashboard ---- */
.pick3-history__summary { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.pick3-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;
}
.pick3-history__card-label { display: block; font-size: 11px; text-transform: uppercase; color: var(--p3-muted); }
.pick3-history__card-value { display: block; font-size: 22px; font-weight: 700; margin-top: 4px; }

.pick3-history__table-wrap { overflow-x: auto; border-radius: var(--p3-radius); border: 1px solid #e3e3e3; }
.pick3-history__table { width: 100%; border-collapse: collapse; background: #fff; min-width: 640px; }
.pick3-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;
}
.pick3-history__table tbody td {
	padding: 12px 14px; border-bottom: 1px solid #eee; font-size: 14px; color: #1a1a1a; vertical-align: middle;
}
.pick3-history__table tbody tr:last-child td { border-bottom: none; }
.pick3-history__table tbody tr:nth-child(even) td { background: #fafafa; }
.pick3-history__table .pick3__muted { color: #888; text-align: center; padding: 22px 14px; }
.pick3-history__table .pick3__ball {
	width: 26px; height: 26px; font-size: 13px; margin: 0 2px 0 0; background: var(--p3-panel); color: #fff;
}
.pick3-history__ticket { white-space: nowrap; }
.pick3-history__win { color: #1f6b2e; }
.pick3-history__ticketid { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-weight: 700; color: #1f6b2e; white-space: nowrap; }
.pick3-history__drawno { display: block; font-size: 11px; color: #888; margin-top: 2px; }
.pick3-history__table .pick3__tag--won { background: #1f6b2e; color: #fff; }
.pick3-history__table .pick3__tag--lost { background: #f3d6d6; color: #a33; }
.pick3-history__table .pick3__tag--pending { background: #eee; color: #777; }

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