/**
 * NexaShop Wallet - Frontend Stylesheet
 * Digikala-grade aesthetic, full RTL support & responsive layout
 */

.nexashop-wallet-dashboard {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

/* Alert Notification */
.nexashop-wallet-alert {
	padding: 14px 18px;
	border-radius: 12px;
	margin-bottom: 20px;
	font-size: 14px;
	font-weight: 500;
	display: flex;
	align-items: center;
	gap: 10px;
}
.nexashop-wallet-alert.is-success {
	background-color: #ecfdf5;
	color: #065f46;
	border: 1px solid #a7f3d0;
}
.nexashop-wallet-alert.is-error {
	background-color: #fef2f2;
	color: #991b1b;
	border: 1px solid #fecaca;
}

/* 1. Hero Balance Card */
.nexashop-wallet-hero-card {
	background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
	border-radius: 20px;
	padding: 30px;
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: space-between;
	box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.25);
	margin-bottom: 24px;
	position: relative;
	overflow: hidden;
}
.nexashop-wallet-hero-card::after {
	content: '';
	position: absolute;
	top: -50%;
	left: -20%;
	width: 300px;
	height: 300px;
	background: radial-gradient(circle, rgba(249, 115, 22, 0.2) 0%, rgba(249, 115, 22, 0) 70%);
	border-radius: 50%;
	pointer-events: none;
}
.nexashop-wallet-hero-info {
	display: flex;
	align-items: center;
	gap: 20px;
	z-index: 1;
}
.nexashop-wallet-icon-box {
	width: 64px;
	height: 64px;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.15);
	backdrop-filter: blur(8px);
	border-radius: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #f97316;
}
.nexashop-wallet-balance-wrap {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.nexashop-wallet-balance-label {
	font-size: 14px;
	color: #94a3b8;
	font-weight: 500;
}
.nexashop-wallet-balance-amount {
	font-size: 28px;
	font-weight: 800;
	letter-spacing: -0.5px;
	color: #ffffff;
}
.nexashop-wallet-btn-topup-scroll {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background-color: #f97316;
	color: #ffffff !important;
	padding: 12px 24px;
	border-radius: 12px;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none !important;
	transition: all 0.2s ease;
	z-index: 1;
	box-shadow: 0 4px 14px rgba(249, 115, 22, 0.35);
}
.nexashop-wallet-btn-topup-scroll:hover {
	background-color: #ea580c;
	transform: translateY(-2px);
}

/* 2. Action Grid (Topup & Voucher) */
.nexashop-wallet-action-grid {
	display: grid;
	grid-template-columns: 1.2fr 0.8fr;
	gap: 24px;
	margin-bottom: 24px;
}

.nexashop-wallet-card {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 18px;
	padding: 24px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}
.nexashop-wallet-card-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-bottom: 16px;
	border-bottom: 1px solid #f1f5f9;
	margin-bottom: 20px;
}
.nexashop-wallet-card-header .card-title-wrap {
	display: flex;
	align-items: center;
	gap: 10px;
	color: #0f172a;
}
.nexashop-wallet-card-header h4 {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: #0f172a;
}

/* Presets */
.nexashop-field-label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #475569;
	margin-bottom: 10px;
}
.nexashop-topup-presets {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
	margin-bottom: 18px;
}
.nexashop-preset-btn {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 10px 14px;
	font-size: 13px;
	font-weight: 600;
	color: #334155;
	cursor: pointer;
	transition: all 0.2s ease;
	text-align: center;
}
.nexashop-preset-btn:hover {
	background: #f1f5f9;
	border-color: #cbd5e1;
	color: #0f172a;
}
.nexashop-preset-btn.active {
	background: #fff7ed;
	border-color: #f97316;
	color: #c2410c;
	font-weight: 700;
}

/* Custom Amount Input */
.nexashop-form-group {
	margin-bottom: 18px;
}
.nexashop-input-with-symbol {
	position: relative;
	display: flex;
	align-items: center;
}
.nexashop-input-with-symbol input,
.nexashop-voucher-form input {
	width: 100%;
	height: 48px;
	border: 1.5px solid #cbd5e1;
	border-radius: 12px;
	padding: 0 45px 0 16px;
	font-size: 15px;
	font-weight: 600;
	color: #0f172a;
	background: #ffffff;
	transition: all 0.2s ease;
	box-sizing: border-box;
}
.nexashop-input-with-symbol input:focus,
.nexashop-voucher-form input:focus {
	outline: none;
	border-color: #f97316;
	box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}
.nexashop-input-with-symbol .currency-symbol {
	position: absolute;
	right: 14px;
	font-size: 13px;
	font-weight: 600;
	color: #94a3b8;
}

/* Submit Buttons */
.nexashop-wallet-submit-btn {
	width: 100%;
	height: 48px;
	background-color: #f97316;
	color: #ffffff;
	border: none;
	border-radius: 12px;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	transition: all 0.2s ease;
}
.nexashop-wallet-submit-btn:hover {
	background-color: #ea580c;
}
.nexashop-wallet-submit-btn.secondary-btn {
	background-color: #0f172a;
}
.nexashop-wallet-submit-btn.secondary-btn:hover {
	background-color: #1e293b;
}
.nexashop-wallet-submit-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* Spinner */
.btn-spinner {
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: nexashop-spin 0.6s linear infinite;
}
@keyframes nexashop-spin {
	to { transform: rotate(360deg); }
}

.nexashop-card-desc {
	font-size: 13px;
	color: #64748b;
	line-height: 1.7;
	margin: 0 0 16px 0;
}

/* 3. Transactions Table (Modern SaaS & Responsive Mobile Cards) */
.nexashop-transactions-card {
	padding: 26px;
}

.nexashop-tx-card-header {
	padding-bottom: 18px;
	border-bottom: 1px solid #f1f5f9;
	margin-bottom: 20px;
}

.tx-header-icon-badge {
	width: 42px;
	height: 42px;
	border-radius: 12px;
	background: #fff7ed;
	color: #f97316;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.tx-header-subtitle {
	display: block;
	font-size: 12px;
	color: #64748b;
	font-weight: 500;
	margin-top: 3px;
}

.nexashop-tx-count-pill {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	color: #475569;
	font-size: 12px;
	font-weight: 700;
	padding: 5px 12px;
	border-radius: 20px;
}

.nexashop-tx-table-wrap {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border: 1px solid #e2e8f0;
	border-radius: 14px;
	background: #ffffff;
}

.nexashop-tx-table,
.nexashop-tx-table thead,
.nexashop-tx-table tbody,
.nexashop-tx-table tr,
.nexashop-tx-table th,
.nexashop-tx-table td {
	border: none !important;
	box-shadow: none !important;
}

.nexashop-tx-table {
	width: 100%;
	border-collapse: collapse !important;
	border-spacing: 0 !important;
	font-size: 13px;
	margin: 0 !important;
}

.nexashop-tx-table thead tr {
	background: #f8fafc !important;
	border-bottom: 1px solid #e2e8f0 !important;
}

.nexashop-tx-table th {
	background: #f8fafc !important;
	color: #475569 !important;
	font-weight: 800 !important;
	font-size: 12.5px !important;
	padding: 15px 16px !important;
	text-align: right !important;
	border-bottom: 1px solid #e2e8f0 !important;
	white-space: nowrap;
}

.nexashop-tx-table tbody tr {
	border-bottom: 1px solid #f1f5f9 !important;
	transition: background-color 0.2s ease;
}

.nexashop-tx-table tbody tr:last-child {
	border-bottom: none !important;
}

.nexashop-tx-table td {
	padding: 16px !important;
	border-bottom: 1px solid #f1f5f9 !important;
	vertical-align: middle !important;
	color: #1e293b;
	text-align: right !important;
}

.nexashop-tx-table tbody tr:last-child td {
	border-bottom: none !important;
}

.nexashop-tx-table tbody tr:hover td {
	background: #f8fafc !important;
}

.tx-id-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #f1f5f9;
	color: #475569;
	font-weight: 800;
	font-size: 12px;
	padding: 4px 10px;
	border-radius: 8px;
	font-family: monospace, inherit;
}

.nexashop-tx-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 700;
	white-space: nowrap;
}

.tx-topup { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
.tx-purchase { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.tx-refund { background: #fff7ed; color: #ea580c; border: 1px solid #fed7aa; }
.tx-cashback { background: #f5f3ff; color: #7c3aed; border: 1px solid #ddd6fe; }
.tx-voucher { background: #fdf2f8; color: #db2777; border: 1px solid #fbcfe8; }
.tx-manual_credit { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.tx-manual_debit { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.tx-withdrawal { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }

.tx-amount {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-weight: 900;
	font-size: 14px;
	padding: 4px 10px;
	border-radius: 8px;
}

.tx-amount.is-credit {
	color: #059669;
	background: #f0fdf4;
}

.tx-amount.is-debit {
	color: #e11d48;
	background: #fff1f2;
}

.tx-balance-after {
	font-weight: 700;
	font-size: 13.5px;
	color: #334155;
}

.tx-desc {
	font-size: 13px;
	font-weight: 600;
	color: #1e293b;
	line-height: 1.6;
}

.tx-order-link {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-top: 4px;
	font-size: 12px;
	color: #f97316 !important;
	font-weight: 700;
	text-decoration: none !important;
	background: #fff7ed;
	padding: 2px 8px;
	border-radius: 6px;
}

.tx-order-link:hover {
	background: #ffedd5;
}

.tx-datetime-box {
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.tx-date-day {
	font-size: 12.5px;
	font-weight: 700;
	color: #334155;
}

.tx-date-clock {
	font-size: 11.5px;
	color: #94a3b8;
	font-weight: 600;
}

@media (max-width: 768px) {
	.nexashop-transactions-card {
		padding: 18px 14px;
	}
	.nexashop-tx-table-wrap {
		border: none;
		background: transparent;
	}
	.nexashop-tx-table thead {
		display: none;
	}
	.nexashop-tx-table,
	.nexashop-tx-table tbody,
	.nexashop-tx-table tr,
	.nexashop-tx-table td {
		display: block;
		width: 100%;
		box-sizing: border-box;
	}
	.nexashop-tx-table tbody tr {
		background: #ffffff;
		border: 1px solid #e2e8f0 !important;
		border-radius: 14px;
		padding: 14px;
		margin-bottom: 12px;
		box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03) !important;
	}
	.nexashop-tx-table td {
		display: flex !important;
		align-items: center;
		justify-content: space-between;
		padding: 8px 0 !important;
		border-bottom: 1px dashed #f1f5f9 !important;
		text-align: left !important;
	}
	.nexashop-tx-table td:last-child {
		border-bottom: none !important;
		padding-bottom: 0 !important;
	}
	.nexashop-tx-table td::before {
		content: attr(data-label);
		font-size: 12px;
		font-weight: 700;
		color: #64748b;
		text-align: right;
		margin-left: 10px;
	}
	.tx-datetime-box {
		flex-direction: row;
		align-items: center;
		gap: 8px;
	}
}

/* Empty State */
.nexashop-wallet-empty {
	text-align: center;
	padding: 40px 20px;
}
.nexashop-wallet-empty .empty-icon {
	margin-bottom: 16px;
}
.nexashop-wallet-empty h5 {
	font-size: 16px;
	font-weight: 700;
	color: #334155;
	margin: 0 0 8px 0;
}
.nexashop-wallet-empty p {
	font-size: 13px;
	color: #64748b;
	margin: 0;
}

/* Checkout Box */
.nexashop-checkout-wallet-box {
	background: #f8fafc;
	border: 1.5px solid #e2e8f0;
	border-radius: 14px;
	padding: 18px 20px;
	margin-bottom: 20px;
	transition: all 0.2s ease;
}
.nexashop-checkout-wallet-box.is-active {
	background: #fff7ed;
	border-color: #f97316;
	box-shadow: 0 4px 14px rgba(249, 115, 22, 0.1);
}
.nexashop-wallet-box-main {
	display: flex;
	align-items: center;
	gap: 16px;
}
.nexashop-wallet-box-icon {
	width: 44px;
	height: 44px;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #f97316;
	flex-shrink: 0;
}
.nexashop-wallet-box-content {
	flex: 1;
	min-width: 0;
}
.nexashop-wallet-box-header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 4px;
}
.nexashop-wallet-box-title {
	font-size: 15px;
	font-weight: 700;
	color: #0f172a;
}
.nexashop-wallet-box-balance {
	font-size: 13px;
	color: #475569;
}
.nexashop-wallet-box-notice p {
	margin: 0;
	font-size: 12px;
	color: #64748b;
	line-height: 1.6;
}

/* Switch Toggle Slider */
.nexashop-wallet-switch {
	position: relative;
	display: inline-block;
	width: 46px;
	height: 26px;
	flex-shrink: 0;
}
.nexashop-wallet-switch input {
	opacity: 0;
	width: 0;
	height: 0;
}
.nexashop-wallet-switch .slider {
	position: absolute;
	cursor: pointer;
	top: 0; left: 0; right: 0; bottom: 0;
	background-color: #cbd5e1;
	transition: .25s;
	border-radius: 34px;
}
.nexashop-wallet-switch .slider:before {
	position: absolute;
	content: "";
	height: 20px;
	width: 20px;
	right: 3px;
	bottom: 3px;
	background-color: white;
	transition: .25s;
	border-radius: 50%;
}
.nexashop-wallet-switch input:checked + .slider {
	background-color: #f97316;
}
.nexashop-wallet-switch input:checked + .slider:before {
	transform: translateX(-20px);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
	.nexashop-wallet-hero-card {
		flex-direction: column;
		align-items: flex-start;
		gap: 20px;
		padding: 22px;
	}
	.nexashop-wallet-btn-topup-scroll {
		width: 100%;
		justify-content: center;
		box-sizing: border-box;
	}
	.nexashop-wallet-action-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}
	.nexashop-topup-presets {
		grid-template-columns: repeat(2, 1fr);
	}
	.nexashop-wallet-card {
		padding: 18px;
	}
	.nexashop-wallet-box-main {
		flex-wrap: wrap;
	}
	.nexashop-wallet-toggle-wrap {
		width: 100%;
		display: flex;
		justify-content: flex-end;
		margin-top: 8px;
	}
}
