/* GAM Wallet — Frontend Styles */

/* ============================================================
   WALLET WRAP
   ============================================================ */
.gam-wallet-wrap {
	--gam-primary:     #2563eb;
	--gam-secondary:   #7c3aed;
	--gam-green:       #16a34a;
	--gam-red:         #dc2626;
	--gam-yellow:      #d97706;
	--gam-bg:          #f8fafc;
	--gam-border:      #e2e8f0;
	--gam-radius:      10px;
	--gam-shadow:      0 2px 12px rgba(0,0,0,.08);
	font-family: inherit;
}

/* ============================================================
   BALANCE CARDS
   ============================================================ */
.gam-wallet-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 16px;
	margin-bottom: 32px;
}

.gam-wallet-card {
	background: #fff;
	border: 1px solid var(--gam-border);
	border-radius: var(--gam-radius);
	box-shadow: var(--gam-shadow);
	padding: 24px 20px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.gam-wallet-card--primary  { border-top: 4px solid var(--gam-primary); }
.gam-wallet-card--secondary{ border-top: 4px solid var(--gam-secondary); }
.gam-wallet-card--cashback { border-top: 4px solid var(--gam-green); }

.gam-wallet-card__label {
	font-size: .8rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: #64748b;
}

.gam-wallet-card__amount {
	font-size: 1.8rem;
	font-weight: 700;
	color: #1e293b;
}

/* ============================================================
   TOP-UP FORM
   ============================================================ */
.gam-wallet-topup {
	background: #fff;
	border: 1px solid var(--gam-border);
	border-radius: var(--gam-radius);
	box-shadow: var(--gam-shadow);
	padding: 28px;
	margin-bottom: 32px;
}

.gam-wallet-topup h3 {
	margin: 0 0 20px;
	font-size: 1.1rem;
	color: #1e293b;
}

.gam-wallet-topup__form {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 12px;
}

.gam-wallet-topup__form label {
	display: block;
	font-size: .875rem;
	font-weight: 600;
	margin-bottom: 4px;
	color: #374151;
}

.gam-wallet-topup__input-wrap {
	position: relative;
	display: flex;
	align-items: center;
}

.gam-wallet-topup__currency {
	position: absolute;
	left: 10px;
	color: #64748b;
	font-weight: 600;
}

.gam-wallet-topup__input-wrap input[type="number"] {
	padding-left: 28px;
	height: 44px;
	border: 1px solid var(--gam-border);
	border-radius: 6px;
	font-size: 1rem;
	width: 160px;
}

.gam-wallet-topup__limits {
	margin: 0;
	font-size: .8rem;
	color: #64748b;
	width: 100%;
}

.gam-wallet-topup__btn {
	height: 44px;
	padding: 0 24px;
	background: var(--gam-primary);
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: background .2s;
}

.gam-wallet-topup__btn:hover {
	background: #1d4ed8;
}

/* ============================================================
   MESSAGES
   ============================================================ */
.gam-wallet-msg {
	padding: 10px 16px;
	border-radius: 6px;
	font-size: .9rem;
	margin-top: 8px;
}

.gam-wallet-msg--success {
	background: #f0fdf4;
	border: 1px solid #86efac;
	color: #166534;
}

.gam-wallet-msg--error {
	background: #fef2f2;
	border: 1px solid #fca5a5;
	color: #991b1b;
}

/* ============================================================
   HISTORY / TABLE
   ============================================================ */
.gam-wallet-history {
	background: #fff;
	border: 1px solid var(--gam-border);
	border-radius: var(--gam-radius);
	box-shadow: var(--gam-shadow);
	padding: 28px;
}

.gam-wallet-history__header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 20px;
}

.gam-wallet-history__header h3 {
	margin: 0;
	font-size: 1.1rem;
	color: #1e293b;
}

.gam-wallet-filters select {
	height: 36px;
	border: 1px solid var(--gam-border);
	border-radius: 6px;
	padding: 0 8px;
	font-size: .875rem;
}

.gam-wallet-table {
	width: 100%;
	border-collapse: collapse;
	font-size: .875rem;
}

.gam-wallet-table th,
.gam-wallet-table td {
	padding: 12px 14px;
	border-bottom: 1px solid var(--gam-border);
	text-align: left;
}

.gam-wallet-table th {
	font-weight: 700;
	color: #374151;
	background: var(--gam-bg);
}

.gam-wallet-table tbody tr:hover {
	background: #f8fafc;
}

/* ============================================================
   TRANSACTION BADGES
   ============================================================ */
.gam-tx__badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: .75rem;
	font-weight: 700;
	text-transform: uppercase;
}

.gam-tx__badge--topup     { background: #dbeafe; color: #1e40af; }
.gam-tx__badge--purchase  { background: #fee2e2; color: #991b1b; }
.gam-tx__badge--cashback  { background: #dcfce7; color: #166534; }
.gam-tx__badge--refund    { background: #fef9c3; color: #854d0e; }
.gam-tx__badge--credit    { background: #dcfce7; color: #166534; }
.gam-tx__badge--debit     { background: #fee2e2; color: #991b1b; }
.gam-tx__badge--withdrawal{ background: #ede9fe; color: #6b21a8; }
.gam-tx__badge--admin_credit { background: #d1fae5; color: #065f46; }
.gam-tx__badge--admin_debit  { background: #ffe4e6; color: #9f1239; }

.gam-tx__amount--credit { color: var(--gam-green); font-weight: 700; }
.gam-tx__amount--debit  { color: var(--gam-red);   font-weight: 700; }

/* ============================================================
   LOAD MORE
   ============================================================ */
.gam-wallet-load-more {
	text-align: center;
	padding: 20px 0 4px;
}

.gam-wallet-empty {
	text-align: center;
	color: #64748b;
	padding: 32px 0;
}

/* ============================================================
   CHECKOUT WALLET SECTION
   ============================================================ */
.gam-checkout-wallet {
	background: #eff6ff;
	border: 1px solid #bfdbfe;
	border-radius: var(--gam-radius);
	padding: 20px;
	margin-bottom: 24px;
}

.gam-checkout-wallet h4 {
	margin: 0 0 12px;
	color: var(--gam-primary);
	display: flex;
	align-items: center;
	gap: 8px;
}

.gam-checkout-wallet__balance {
	font-weight: 700;
	font-size: 1.1rem;
	margin-bottom: 12px;
}

.gam-checkout-wallet__row {
	display: flex;
	gap: 10px;
	align-items: center;
	flex-wrap: wrap;
}

.gam-checkout-wallet__row input[type="number"] {
	flex: 1;
	min-width: 120px;
	max-width: 200px;
	height: 40px;
	border: 1px solid var(--gam-border);
	border-radius: 6px;
	padding: 0 10px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
	.gam-wallet-cards { grid-template-columns: 1fr; }
	.gam-wallet-topup__form { flex-direction: column; align-items: stretch; }
	.gam-wallet-topup__input-wrap input { width: 100%; }
	.gam-wallet-table { font-size: .8rem; }
	.gam-wallet-table th, .gam-wallet-table td { padding: 8px; }
}
