/* ============================================================
   COA Product Table  –  Front-end styles
   Matches: dark background, orange header, orange buttons,
   orange "Load More" outline button, vial icon column.
   ============================================================ */

/* ---- Reset scope ----------------------------------------- */
.coa-wrapper *,
.coa-wrapper *::before,
.coa-wrapper *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

/* ---- Wrapper --------------------------------------------- */
.coa-wrapper {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	background: #0d0d0d;
	padding: 32px 16px 40px;
	min-width: 0;
}

/* ---- Card ------------------------------------------------- */
.coa-card {
	background: #141414;
	border: 1.5px solid #e87722;
	border-radius: 8px;
	overflow: hidden;
}

/* ---- Table ----------------------------------------------- */
.coa-table {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
}

/* Column widths */
.coa-table colgroup { display: none; } /* not used, just safety */
.coa-th:nth-child(1) { width: 32%; }
.coa-th:nth-child(2) { width: 18%; }
.coa-th:nth-child(3) { width: 10%; }
.coa-th:nth-child(4) { width: 13%; }
.coa-th:nth-child(5) { width: 13%; }
.coa-th:nth-child(6) { width: 14%; }

/* ---- Head row -------------------------------------------- */
.coa-head-row {
	background: #e87722;
}
.coa-th {
	padding: 14px 16px;
	color: #ffffff;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-align: left;
	white-space: nowrap;
}
.coa-th--action {
	text-align: right;
}

/* ---- Body rows ------------------------------------------- */
.coa-row {
	border-bottom: 1px solid #2a2a2a;
	transition: background 0.15s;
}
.coa-row:last-child {
	border-bottom: none;
}
.coa-row:hover {
	background: #1c1c1c;
}

.coa-cell {
	padding: 16px 16px;
	color: #e0e0e0;
	font-size: 13.5px;
	vertical-align: middle;
	word-break: break-word;
}

/* Product cell – icon + name */
.coa-cell--product {
	display: flex;
	align-items: center;
	gap: 12px;
}

/* Vial SVG icon */
.coa-vial {
	display: inline-block;
	flex-shrink: 0;
	width: 32px;
	height: 52px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 56'%3E%3Crect x='12' y='0' width='8' height='6' rx='2' fill='%23888'/%3E%3Crect x='10' y='5' width='12' height='2' fill='%23777'/%3E%3Crect x='9' y='7' width='14' height='38' rx='7' fill='%23c8d6e5'/%3E%3Crect x='9' y='30' width='14' height='15' rx='7' fill='%23a8bfd4'/%3E%3Cellipse cx='16' cy='45' rx='7' ry='3' fill='%2395afc0'/%3E%3C/svg%3E") center/contain no-repeat;
}

.coa-product-name {
	color: #ffffff;
	font-weight: 500;
}

/* Purity highlight */
.coa-cell--purity {
	color: #ffffff;
	font-weight: 600;
}

/* Action cell */
.coa-cell--action {
	text-align: right;
}

/* ---- Download button ------------------------------------- */
.coa-btn {
	display: inline-block;
	background: #e87722;
	color: #ffffff !important;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.07em;
	text-decoration: none !important;
	padding: 8px 14px;
	border-radius: 4px;
	white-space: nowrap;
	transition: background 0.18s, transform 0.12s;
	cursor: pointer;
}
.coa-btn:hover,
.coa-btn:focus {
	background: #cf6310;
	transform: translateY(-1px);
	outline: none;
}
.coa-btn:active {
	transform: translateY(0);
}
.coa-btn--disabled {
	background: #444 !important;
	cursor: not-allowed;
	opacity: 0.6;
}

/* ---- Load More ------------------------------------------- */
.coa-load-wrap {
	display: flex;
	justify-content: center;
	margin-top: 28px;
}
.coa-load-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: transparent;
	border: 1.5px solid #e87722;
	color: #e87722;
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	padding: 13px 36px;
	border-radius: 4px;
	cursor: pointer;
	transition: background 0.18s, color 0.18s;
}
.coa-load-btn:hover {
	background: #e87722;
	color: #ffffff;
}
.coa-load-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

/* ---- Spinner -------------------------------------------- */
.coa-load-spinner {
	width: 16px;
	height: 16px;
	border: 2px solid rgba(232,119,34,0.3);
	border-top-color: #e87722;
	border-radius: 50%;
	animation: coa-spin 0.7s linear infinite;
}
@keyframes coa-spin {
	to { transform: rotate(360deg); }
}

/* ---- Row fade-in ----------------------------------------- */
.coa-row {
	animation: coa-fadein 0.3s ease both;
}
@keyframes coa-fadein {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: none; }
}

/* ---- Empty state ----------------------------------------- */
.coa-empty {
	padding: 40px 16px;
	text-align: center;
	color: #666;
	font-style: italic;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
	.coa-table,
	.coa-table thead,
	.coa-table tbody,
	.coa-table th,
	.coa-table td,
	.coa-table tr {
		display: block;
	}
	.coa-head-row {
		display: none; /* hide header, use data-label instead */
	}
	.coa-row {
		padding: 16px;
		border-bottom: 2px solid #e87722;
		display: flex;
		flex-direction: column;
		gap: 6px;
	}
	.coa-cell {
		padding: 4px 0;
		display: flex;
		justify-content: space-between;
		align-items: center;
		font-size: 13px;
	}
	.coa-cell::before {
		content: attr(data-label);
		font-weight: 700;
		color: #e87722;
		font-size: 11px;
		letter-spacing: 0.06em;
		text-transform: uppercase;
		flex-shrink: 0;
		margin-right: 12px;
	}
	.coa-cell--product {
		flex-direction: row;
		justify-content: flex-start;
		padding-bottom: 10px;
		border-bottom: 1px solid #2a2a2a;
	}
	.coa-cell--product::before {
		display: none;
	}
	.coa-cell--action {
		justify-content: flex-end;
		padding-top: 10px;
	}
	.coa-cell--action::before {
		display: none;
	}
}
