.pfg-price-chart-widget {
	display: inline-block;
}

.pfg-price-trigger {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	border: 1px solid #ececec;
	background: #ffffff;
	color: #1c2a4e;
	font-family: inherit;
	line-height: 1;
}

.pfg-price-trigger__icon {
	display: inline-flex;
	align-items: center;
}

/* ---------- Modal ---------- */
.pfg-price-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.pfg-price-modal.is-open {
	display: flex;
}

.pfg-price-modal__overlay {
	position: absolute;
	inset: 0;
	background-color: rgba( 20, 20, 30, 0.55 );
}

.pfg-price-modal__card {
	position: relative;
	width: 100%;
	max-width: 900px;
	max-height: 90vh;
	overflow: auto;
	background: #ffffff;
	border-radius: 20px;
	padding: 32px;
	box-sizing: border-box;
	direction: rtl;
}

.pfg-price-modal__close {
	position: absolute;
	top: 16px;
	left: 16px;
	background: transparent;
	border: none;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	color: #8a8a8a;
	padding: 4px;
}

.pfg-price-modal__header {
	display: flex;
	align-items: flex-start;
	justify-content: flex-end;
	gap: 16px;
	margin-bottom: 24px;
	padding-inline-start: 40px;
}

.pfg-price-modal__titles {
	order: 2;
	text-align: right;
}

.pfg-price-modal__thumb {
	order: 1;
	width: 64px;
	height: 64px;
	object-fit: contain;
	border-radius: 8px;
	flex-shrink: 0;
}

.pfg-price-modal__title {
	font-size: 20px;
	font-weight: 700;
	color: #1c2a4e;
	margin-bottom: 4px;
}

.pfg-price-modal__subtitle {
	font-size: 13px;
	color: #8a8a8a;
}

/* ---------- Variation filter ---------- */
.pfg-price-modal__filter {
	position: relative;
	margin-bottom: 20px;
}

.pfg-variation-select {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 18px;
	border: none;
	border-radius: 14px;
	background: #f5f6f8;
	color: #1c2a4e;
	cursor: pointer;
	font-size: 14px;
	font-family: inherit;
	box-sizing: border-box;
}

.pfg-variation-select__chevron {
	transition: transform 0.15s ease;
}

.pfg-variation-select[aria-expanded="true"] .pfg-variation-select__chevron {
	transform: rotate(180deg);
}

.pfg-variation-list {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	left: 0;
	background: #ffffff;
	border: 1px solid #ececec;
	border-radius: 12px;
	max-height: 220px;
	overflow: auto;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
	z-index: 2;
	list-style: none;
	margin: 0;
	padding: 6px;
}

.pfg-variation-list li {
	padding: 10px 12px;
	border-radius: 8px;
	cursor: pointer;
	font-size: 14px;
	color: #1c2a4e;
}

.pfg-variation-list li:hover,
.pfg-variation-list li.is-active {
	background: #f5f6f8;
}

/* ---------- Chart ---------- */
.pfg-price-modal__chart-wrap {
	position: relative;
	height: 380px;
	margin-bottom: 16px;
}

.pfg-price-chart-canvas {
	width: 100% !important;
	height: 100% !important;
}

.pfg-price-modal__loading,
.pfg-price-modal__empty {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	color: #8a8a8a;
	font-size: 13px;
	padding: 20px;
	background: #ffffff;
}

.pfg-price-modal__loading[hidden],
.pfg-price-modal__empty[hidden] {
	display: none;
}

/* ---------- Legend ---------- */
.pfg-price-modal__legend {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	justify-content: flex-end;
	font-size: 13px;
	color: #444444;
}

.pfg-legend-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.pfg-legend-swatch {
	width: 18px;
	height: 3px;
	border-radius: 2px;
	display: inline-block;
}

.pfg-legend-swatch--dashed {
	background: transparent;
	border-top: 3px dashed;
	height: 0;
}

body.pfg-modal-open {
	overflow: hidden;
}

@media (max-width: 480px) {
	.pfg-price-modal__card {
		padding: 20px;
		border-radius: 14px;
	}

	.pfg-price-modal__thumb {
		width: 44px;
		height: 44px;
	}

	.pfg-price-modal__title {
		font-size: 16px;
	}
}

.pfg-editor-notice {
	padding: 24px;
	text-align: center;
	background: #f7f7f7;
	border: 1px dashed #cccccc;
	border-radius: 8px;
	color: #888888;
	font-size: 13px;
}
