/* ── COA Table Block (v2) ─────────────────────────────────────── */

.coa-v2-wrap {
	margin: 20px 0;
}

.coa-v2-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

.coa-v2-group {
	border: 2px solid #e8eaed;
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
}

.coa-v2-group-title {
	padding: 10px 14px;
	font-size: 14px;
	font-weight: 700;
	color: #1a202c;
	background: #f7fafc;
	border-bottom: 1px solid #e2e8f0;
}

.coa-v2-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.coa-v2-table thead th {
	padding: 8px 14px;
	text-align: left;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #718096;
	background: #f7fafc;
	border-bottom: 1px solid #e2e8f0;
}

.coa-v2-table thead th:last-child {
	text-align: right;
}

.coa-v2-table tbody td {
	padding: 10px 14px;
	border-bottom: 1px solid #edf2f7;
	color: #2d3748;
}

.coa-v2-table tbody tr:last-child td {
	border-bottom: none;
}

.coa-v2-current {
	background: #f0fff4;
}

.coa-v2-current .coa-v2-batch {
	font-weight: 600;
}

.coa-v2-past {
	background: #fff;
}

.coa-v2-mg {
	font-weight: 600;
	color: #3c8094;
}

.coa-v2-actions {
	text-align: right;
	white-space: nowrap;
	display: flex;
	gap: 8px;
	justify-content: flex-end;
	align-items: center;
}

.coa-v2-view,
.coa-v2-dl {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 6px;
	border: 1px solid #e2e8f0;
	background: #fff;
	color: #4a5568;
	cursor: pointer;
	transition: all 0.2s ease;
	text-decoration: none;
	padding: 0;
}

.coa-v2-view:hover,
.coa-v2-dl:hover {
	background: #3c8094;
	color: #fff;
	border-color: #3c8094;
}

/* Single product — no group wrapper needed */
.coa-v2-wrap:not(.coa-v2-grid) .coa-v2-table-wrap {
	border: 2px solid #e8eaed;
	border-radius: 10px;
	overflow: hidden;
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
	.coa-v2-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}
@media (max-width: 600px) {
	.coa-v2-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}
	.coa-v2-table {
		font-size: 13px;
	}
	.coa-v2-table thead th,
	.coa-v2-table tbody td {
		padding: 8px 10px;
	}
}

/* ── Purchased badge ──────────────────────────────────────────── */
.coa-v2-purchased {
	display: inline-block;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #fff;
	background: #379d9b;
	padding: 2px 8px;
	border-radius: 10px;
	margin-left: 6px;
	vertical-align: middle;
	line-height: 1.4;
}

/* ── Purchased row highlight ──────────────────────────────────── */
.coa-v2-purchased-row {
	background: #eafafd !important;
}
.coa-v2-purchased-row .coa-v2-batch {
	font-weight: 600;
}

/* ── Purchase date ────────────────────────────────────────────── */
.coa-v2-purchase-date {
	display: inline-block;
	font-size: 11px;
	font-weight: 400;
	color: #a0aec0;
	margin-left: 6px;
	vertical-align: middle;
}


/* ── Current badge ─────────────────────────────────────────────── */
.coa-v2-current-badge {
	display: inline-block;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #fff;
	background: #38a169;
	padding: 2px 8px;
	border-radius: 10px;
	margin-left: 6px;
	vertical-align: middle;
	line-height: 1.4;
}

/* Current + Purchased combo */
.coa-v2-current.coa-v2-purchased-row {
	background: #eafafd !important;
}

/* ── Show more toggle ─────────────────────────────────────────── */
.coa-v2-table-wrap.coa-v2-collapsed tbody tr:nth-child(n+6) {
	display: none;
}
.coa-v2-show-more {
	display: block;
	width: 100%;
	padding: 0;
	margin-bottom: 10px;
	font-size: 12px;
	font-weight: 600;
	color: #389e9f !important;
	background: none !important;
	background-image: none !important;
	border: none !important;
	box-shadow: none !important;
	cursor: pointer;
	text-align: center;
	text-decoration: none !important;
	padding: 8px 0 !important;
	opacity: 1 !important;
}
.coa-v2-show-more:hover {
	color: #3c8094 !important;
	text-decoration: none !important;
	background: none !important;
	background-image: none !important;
	box-shadow: none !important;
	transform: none !important;
}

/* ── Single product table max width ───────────────────────────── */
.coa-v2-wrap:not(.coa-v2-grid) {
	max-width: 600px;
}
