/* Metals Price Table Styles */

*, *::before, *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

.mpt-wrap {
	max-width: 1500px;
	margin: 0 auto;
	border-radius: 10px;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
	padding: 20px;
	background: #fff;
}

/* ── Header ── */
.mpt-header {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 18px;
}

.mpt-header h2 {
	font-size: 1.5rem;
	font-weight: 800;
	margin: 0;
}

.mpt-header p {
	font-size: 0.875rem;
	color: #64748b;
	margin-top: 3px;
}

.mpt-currency-badge {
	background: #0f172a;
	color: #fff;
	font-size: 0.75rem;
	font-weight: 700;
	padding: 6px 14px;
	border-radius: 99px;
	letter-spacing: 0.8px;
}

/* ── Table wrapper ── */
.mpt-table-wrap {
	width: 100%;
	overflow-x: auto;
	border-radius: 10px;
	background: #fff;
}

/* ── Table ── */
.mpt-table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	font-size: 16px;
	border-radius: 10px;
}

/* thead — metal names */
.mpt-table thead tr.mpt-thead-main th {
	background: #222;
	color: #fff;
	font-weight: 500;
	font-size: 16px;
	padding: 15px 30px;
	text-align: center;
	white-space: nowrap;
	border-right: 1px solid #1e293b;
	height: 53px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	border-bottom: 3px solid #dfca77;
}

.mpt-table thead tr.mpt-thead-main th:first-child {
	text-align: left;
	border-right: 0;
	border-radius: 10px 0 0 0;
}

.mpt-table thead tr.mpt-thead-main th:last-child {
	border-radius: 0 10px 0 0;
	border-right: none;
}

/* tbody */
.mpt-table tbody tr {
	border-bottom: 1px solid #eee;
	transition: background 0.12s;
	background-color: #ffffff;
}

.mpt-table tbody tr:last-child {
	border-bottom: none;
}

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

/* Style for even rows */
.mpt-table tbody tr:nth-child(even) {
	background-color: #fcfcfc;
}

.mpt-table tbody td {
	color: #666;
	font-size: 16px;
	font-weight: 500;
	padding: 12px 30px;
	text-align: center;
	white-space: nowrap;
	border-right: 1px solid #eee;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	height: 40px;
}

.mpt-table tbody td:first-child {
	text-align: left;
	font-weight: 500;
	border-right: 1px solid #eee;
	min-width: 120px;
}

.mpt-table tbody td:last-child {
	border-right: none;
}

/* Highlight base (troy oz) row */
.mpt-row-oz td {
	background: #fff !important;
	font-weight: 600;
}

.mpt-row-oz td:first-child {
	background: #fff !important;
}

/* Per-metal colour */
.mpt-col-XAU {
	color: #92400e;
	font-weight: 600;
}

.mpt-col-XAG {
	color: #374151;
	font-weight: 600;
}

.mpt-col-XPT {
	color: #1e40af;
	font-weight: 600;
}

.mpt-col-XPD {
	color: #065f46;
	font-weight: 600;
}

.mpt-err {
	color: #b91c1c;
	font-size: 0.75rem;
	font-style: italic;
}

/* ── Footer ── */
.mpt-table-footer {
	background: #fff;
	padding: 15px 30px;
	border-radius: 0 0 10px 10px;
	border-top: 1px solid #eee;
}

.mpt-note {
	font-size: 0.75rem;
	color: #94a3b8;
	margin: 0;
	text-align: right;
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 8px;
}

.mpt-note a {
	color: #0f172a;
	text-decoration: none;
	font-weight: 600;
	transition: color 0.2s;
}

.mpt-note a:hover {
	color: #dfca77;
}

.mpt-refresh-btn {
	cursor: pointer;
	padding: 4px 8px;
	background: #f0f0f0;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 0.75rem;
	transition: all 0.2s;
}

.mpt-refresh-btn:hover {
	background: #0f172a;
	color: #fff;
	border-color: #0f172a;
}

.mpt-refresh-btn.loading {
	opacity: 0.6;
	pointer-events: none;
}

/* Error handling */
.mpt-errors {
	background: #fee2e2;
	border: 1px solid #fecaca;
	border-radius: 6px;
	padding: 12px 15px;
	margin-top: 15px;
	color: #b91c1c;
	font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
	.mpt-wrap {
		padding: 10px;
	}

	.mpt-header {
		flex-direction: column;
		align-items: flex-start;
	}

	.mpt-header h2 {
		font-size: 1.2rem;
	}

	.mpt-table thead tr.mpt-thead-main th,
	.mpt-table tbody td {
		padding: 10px 12px;
		font-size: 14px;
	}

	.mpt-table-footer {
		padding: 10px 12px;
	}

	.mpt-note {
		justify-content: flex-start;
		flex-direction: column;
		text-align: left;
	}
}

@media (max-width: 480px) {
	.mpt-table thead tr.mpt-thead-main th,
	.mpt-table tbody td {
		padding: 8px;
		font-size: 12px;
	}

	.mpt-header h2 {
		font-size: 1rem;
	}

	.mpt-header p {
		font-size: 0.75rem;
	}
}
