/* راهنمای سایز — بخش کاربری */

.wcsg-open {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0 0 1em;
	padding: 8px 14px;
	font: inherit;
	font-size: 0.92em;
	line-height: 1.4;
	color: inherit;
	background: transparent;
	border: 1px solid currentColor;
	border-radius: 6px;
	cursor: pointer;
	opacity: 0.85;
	transition: opacity 0.15s ease, background-color 0.15s ease;
}

.wcsg-open:hover,
.wcsg-open:focus-visible {
	opacity: 1;
	background: rgba(127, 127, 127, 0.1);
}

.wcsg-open-icon {
	font-size: 1.15em;
	line-height: 1;
}

/* مودال */

.wcsg-modal[hidden] {
	display: none;
}

.wcsg-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.wcsg-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
}

.wcsg-dialog {
	position: relative;
	display: flex;
	flex-direction: column;
	width: min(760px, 100%);
	max-height: min(80vh, 640px);
	overflow: hidden;
	background: #fff;
	color: #1d2327;
	border-radius: 10px;
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
	animation: wcsg-in 0.18s ease-out;
}

@keyframes wcsg-in {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.wcsg-dialog {
		animation: none;
	}
}

.wcsg-dialog-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 18px;
	border-bottom: 1px solid #e3e5e8;
}

.wcsg-dialog-head h2 {
	margin: 0;
	font-size: 1.05rem;
	line-height: 1.5;
}

.wcsg-close {
	padding: 0 6px;
	font-size: 26px;
	line-height: 1;
	color: #646970;
	background: none;
	border: 0;
	cursor: pointer;
}

.wcsg-close:hover {
	color: #1d2327;
}

.wcsg-dialog-body {
	padding: 16px 18px;
	overflow: auto;
	-webkit-overflow-scrolling: touch;
}

/* جدول */

.wcsg-table-wrap {
	overflow-x: auto;
}

.wcsg-table {
	width: 100%;
	margin: 0;
	border-collapse: collapse;
	font-size: 0.93rem;
	text-align: center;
}

.wcsg-table th,
.wcsg-table td {
	padding: 9px 12px;
	white-space: nowrap;
	border: 1px solid #e3e5e8;
}

.wcsg-table thead th {
	font-weight: 600;
	background: #f4f5f7;
}

.wcsg-table tbody th {
	font-weight: 600;
	background: #fafafa;
}

.wcsg-table tbody tr:hover td,
.wcsg-table tbody tr:hover th {
	background: #f0f6fc;
}

.wcsg-note {
	margin-top: 12px;
	font-size: 0.85rem;
	line-height: 1.8;
	color: #646970;
}

.wcsg-note p {
	margin: 0 0 0.5em;
}

.wcsg-inline-title {
	margin: 0 0 0.6em;
	font-size: 1.05rem;
}

.wcsg-inline {
	margin: 0 0 1.5em;
}

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

@media (max-width: 600px) {
	.wcsg-dialog {
		max-height: 88vh;
	}

	.wcsg-table {
		font-size: 0.85rem;
	}

	.wcsg-table th,
	.wcsg-table td {
		padding: 7px 9px;
	}
}

/* بلوک جدول در توضیحات و تب */

.wcsg-block {
	margin: 1.5em 0;
}

.wcsg-block-title {
	margin: 0 0 0.7em;
	font-size: 1.05rem;
}

.wcsg-in-short {
	margin-top: 1em;
}

.wcsg-table .wcsg-unit {
	display: block;
	font-size: 0.8em;
	font-weight: 400;
	opacity: 0.7;
}

.wcsg-guide {
	margin-top: 14px;
	padding: 12px 14px;
	font-size: 0.86rem;
	line-height: 1.9;
	background: #f6f7f9;
	border-radius: 8px;
}

.wcsg-guide h4 {
	margin: 0 0 0.4em;
	font-size: 0.92rem;
}

.wcsg-guide p:last-child {
	margin-bottom: 0;
}
