/**
 * Stylesheet for GPMPay Transactions Shortcode (Frontend - 3 Columns Layout + Realtime Refresh + Tabs & Badges)
 */

.gpmpay-shortcode-container {
	margin: 20px 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
	overflow: hidden;
}

.gpmpay-shortcode-header {
	padding: 14px 20px;
	background: #f8fafc;
	border-bottom: 1px solid #e2e8f0;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
}

.gpmpay-shortcode-header-left {
	display: flex;
	align-items: center;
}

.gpmpay-shortcode-header-right {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.gpmpay-shortcode-title {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: #1e293b;
	display: flex;
	align-items: center;
	gap: 8px;
}

.gpmpay-shortcode-title svg {
	width: 20px;
	height: 20px;
	color: #3b82f6;
}

/* Tabs Switcher: Tiền Vào / Tiền Ra */
.gpmpay-f-tabs {
	display: inline-flex;
	background: #e2e8f0;
	padding: 3px;
	border-radius: 8px;
	gap: 3px;
}

.gpmpay-f-tab-btn {
	border: none;
	background: transparent;
	padding: 5px 12px;
	border-radius: 6px;
	font-size: 12.5px;
	font-weight: 600;
	color: #64748b;
	cursor: pointer;
	transition: all 0.2s ease;
	line-height: 1.2;
}

.gpmpay-f-tab-btn:hover {
	color: #1e293b;
}

.gpmpay-f-tab-btn.active {
	background: #3b82f6;
	color: #ffffff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.gpmpay-count-in,
.gpmpay-count-out {
	font-weight: 700;
}

/* Refresh Button */
.gpmpay-f-btn-refresh {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	background: #ffffff;
	border: 1px solid #cbd5e1;
	color: #475569;
	padding: 5px 10px;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
}

.gpmpay-f-btn-refresh:hover {
	background: #f1f5f9;
	border-color: #94a3b8;
	color: #0f172a;
}

.gpmpay-f-btn-refresh svg {
	width: 14px;
	height: 14px;
	transition: transform 0.3s ease;
}

.gpmpay-f-btn-refresh.is-loading svg {
	animation: gpmpay-spin 0.8s linear infinite;
}

@keyframes gpmpay-spin {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}

/* Table */
.gpmpay-table-responsive {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.gpmpay-frontend-table {
	width: 100%;
	border-collapse: collapse;
	text-align: left;
	font-size: 14px;
}

.gpmpay-frontend-table th {
	background: #f8fafc;
	color: #64748b;
	font-weight: 600;
	padding: 12px 18px;
	border-bottom: 1px solid #e2e8f0;
	white-space: nowrap;
	text-transform: uppercase;
	font-size: 11.5px;
	letter-spacing: 0.5px;
}

.gpmpay-frontend-table td {
	padding: 12px 18px;
	border-bottom: 1px solid #f1f5f9;
	color: #334155;
	vertical-align: middle;
}

.gpmpay-frontend-table tbody tr:last-child td {
	border-bottom: none;
}

.gpmpay-frontend-table tbody tr:hover {
	background: #f8fafc;
}

/* Column Widths */
.gpmpay-frontend-table th.col-time,
.gpmpay-frontend-table td.gpmpay-f-date-cell {
	width: 110px;
	min-width: 100px;
	white-space: nowrap;
}

.gpmpay-frontend-table th.col-amount,
.gpmpay-frontend-table td.gpmpay-f-amount-cell {
	width: 160px;
	min-width: 130px;
	white-space: nowrap;
}

.gpmpay-frontend-table th.col-content,
.gpmpay-frontend-table td.gpmpay-f-content-cell {
	width: auto;
}

/* Time & Date Styling: Giờ dòng trên, ngày dòng dưới */
.gpmpay-f-date-cell {
	white-space: nowrap;
}

.gpmpay-f-time-val {
	font-weight: 700;
	font-size: 13.5px;
	color: #0f172a;
	line-height: 1.2;
}

.gpmpay-f-date-val {
	font-size: 11.5px;
	color: #64748b;
	margin-top: 3px;
	line-height: 1.2;
}

/* Amount */
.gpmpay-f-amount {
	font-weight: 700;
	font-size: 15px;
	white-space: nowrap;
	display: inline-block;
}

.gpmpay-f-amount.in {
	color: #16a34a;
}

.gpmpay-f-amount.out {
	color: #dc2626;
}

/* Content */
.gpmpay-f-content {
	word-break: break-word;
	color: #1e293b;
	font-weight: 500;
	line-height: 1.45;
}

/* Tag HDxxxxx đã thanh toán (Font đậm, màu xanh lá) */
.gpmpay-f-paid-tag {
	display: inline-flex;
	align-items: center;
	font-weight: 700;
	color: #15803d;
	background: #dcfce7;
	border: 1px solid #bbf7d0;
	padding: 3px 8px;
	border-radius: 4px;
	font-size: 12px;
	margin-top: 5px;
	letter-spacing: 0.2px;
}

/* Pagination */
.gpmpay-shortcode-pagination {
	padding: 14px 20px;
	background: #f8fafc;
	border-top: 1px solid #e2e8f0;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	font-size: 13px;
}

.gpmpay-page-links {
	display: flex;
	gap: 4px;
}

.gpmpay-page-link {
	display: inline-block;
	padding: 4px 10px;
	border: 1px solid #cbd5e1;
	border-radius: 4px;
	color: #334155;
	text-decoration: none;
	font-weight: 500;
	transition: all 0.15s ease;
	cursor: pointer;
}

.gpmpay-page-link:hover {
	background: #e2e8f0;
	border-color: #94a3b8;
	color: #0f172a;
}

.gpmpay-page-link.current {
	background: #3b82f6;
	border-color: #3b82f6;
	color: #ffffff;
	font-weight: 700;
	cursor: default;
}

/* Empty State */
.gpmpay-shortcode-empty {
	padding: 35px 20px;
	text-align: center;
	color: #94a3b8;
	font-size: 14px;
}

/* Responsive Mobile */
@media (max-width: 640px) {
	.gpmpay-frontend-table th,
	.gpmpay-frontend-table td {
		padding: 10px 12px;
	}
	.gpmpay-frontend-table th.col-time,
	.gpmpay-frontend-table td.gpmpay-f-date-cell {
		width: 85px;
		min-width: 85px;
	}
	.gpmpay-frontend-table th.col-amount,
	.gpmpay-frontend-table td.gpmpay-f-amount-cell {
		width: 110px;
		min-width: 110px;
	}
	.gpmpay-f-amount {
		font-size: 13.5px;
	}
	.gpmpay-shortcode-header {
		flex-direction: column;
		align-items: flex-start;
	}
	.gpmpay-shortcode-header-right {
		width: 100%;
		justify-content: space-between;
	}
}
