/* قیمت‌گذاری آنلاین طلا — استایل سمت کاربر
   طراحی خنثا و سازگار با قالب (از جمله WoodMart). */

.hgp-box {
	margin: 14px 0 18px;
	font-size: 14px;
	line-height: 1.9;
}

/* --- خط نرخ لحظه‌ای --- */
.hgp-rate {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px;
	padding: 10px 12px;
	border: 1px solid rgba(180, 140, 40, .35);
	border-radius: 8px;
	background: linear-gradient(0deg, rgba(212, 175, 55, .07), rgba(212, 175, 55, .13));
}

.hgp-rate__label {
	font-weight: 600;
}

.hgp-rate__value {
	font-weight: 700;
	font-size: 1.06em;
}

.hgp-rate__value small {
	font-weight: 400;
	opacity: .75;
}

.hgp-rate__time {
	font-size: .85em;
	opacity: .65;
}

.hgp-rate__stale {
	font-size: .8em;
	padding: 1px 7px;
	border-radius: 20px;
	background: rgba(200, 120, 0, .14);
	color: #8a5200;
	cursor: help;
}

/* --- جدول ریز اجزا --- */
.hgp-breakdown {
	width: 100%;
	margin: 12px 0 0;
	border-collapse: collapse;
	border: 1px solid rgba(0, 0, 0, .09);
	border-radius: 8px;
	overflow: hidden;
}

.hgp-breakdown th,
.hgp-breakdown td {
	padding: 8px 12px;
	border: 0;
	border-bottom: 1px solid rgba(0, 0, 0, .06);
	font-size: .94em;
	vertical-align: middle;
	background: transparent;
}

.hgp-breakdown th {
	font-weight: 400;
	text-align: start;
	opacity: .85;
}

.hgp-breakdown td {
	text-align: end;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.hgp-breakdown tbody tr:nth-child(odd) th,
.hgp-breakdown tbody tr:nth-child(odd) td {
	background: rgba(0, 0, 0, .018);
}

.hgp-breakdown__total th,
.hgp-breakdown__total td {
	border-bottom: 0;
	border-top: 2px solid rgba(180, 140, 40, .4);
	font-weight: 700;
	font-size: 1em;
	background: rgba(212, 175, 55, .08) !important;
}

/* --- انتساب (الزامی طلاسنج) --- */
.hgp-attribution {
	margin: 8px 0 0;
	font-size: 11.5px;
	opacity: .7;
}

.hgp-attribution a {
	color: inherit;
	text-decoration: underline;
}

.hgp-attribution a:hover {
	opacity: 1;
}

.hgp-attribution--footer {
	padding: 10px 16px;
	text-align: center;
}

/* --- تابلوی نرخ --- */
.hgp-ticker {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.hgp-ticker__item {
	flex: 1 1 140px;
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 10px 14px;
	border: 1px solid rgba(180, 140, 40, .3);
	border-radius: 8px;
	background: rgba(212, 175, 55, .07);
}

.hgp-ticker__label {
	font-size: .85em;
	opacity: .75;
}

.hgp-ticker__value {
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.hgp-inline-rate {
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

/* --- حالت بدون نرخ --- */
.hgp-unavailable {
	padding: 9px 12px;
	border-radius: 8px;
	background: rgba(200, 60, 60, .08);
	color: #a1312f;
	font-size: .94em;
}

/* --- حالت تاریک --- */
@media (prefers-color-scheme: dark) {
	.hgp-breakdown tbody tr:nth-child(odd) th,
	.hgp-breakdown tbody tr:nth-child(odd) td {
		background: rgba(255, 255, 255, .03);
	}
	.hgp-breakdown th,
	.hgp-breakdown td {
		border-bottom-color: rgba(255, 255, 255, .08);
	}
	.hgp-rate__stale {
		color: #f0c070;
	}
}

/* --- محصول متغیر و جدول وزن --- */
.hgp-variation-breakdown {
	min-height: 1px;
}

.hgp-choose {
	margin: 0;
	padding: 9px 12px;
	border: 1px dashed rgba(180, 140, 40, .45);
	border-radius: 8px;
	font-size: .92em;
	opacity: .8;
}

.hgp-weight-table thead th {
	padding: 8px 12px;
	font-weight: 600;
	font-size: .9em;
	text-align: start;
	border-bottom: 2px solid rgba(180, 140, 40, .35);
	background: rgba(212, 175, 55, .08);
}

.hgp-weight-table thead th:last-child {
	text-align: end;
}

.hgp-weight-table tbody th {
	font-weight: 600;
	opacity: 1;
}

/* --- پیام راهنما در ویرایشگر قالب‌ساز --- */
.hgp-choose {
	margin: 0;
	padding: 12px 14px;
	border: 1px dashed rgba(180, 140, 40, .5);
	border-radius: 8px;
	background: rgba(212, 175, 55, .06);
	font-size: 13px;
	line-height: 1.9;
}

/* --- برچسب «نمونه» در ویرایشگر قالب‌ساز --- */
.hgp-sample-note {
	margin: 0 0 10px;
	padding: 6px 10px;
	border-radius: 6px;
	background: rgba(120, 90, 200, .1);
	color: #5a4a8a;
	font-size: 12px;
}
