.wpht-comparison-wrap {
	margin-bottom: 30px;
	--wpht-primary-color: #0e466c;
	--wpht-primary-light: #e0f1fe;
	--wpht-primary-hover: #7fcdfa;
	--wpht-accent-color: #057bc4;
	--wpht-brand-color: #ffffff;
	--wpht-icon-color: #6b7280;
	--wpht-icon-bg: #f9fafb;
	--wpht-icon-border: #e5e7eb;
	--wpht-header-bg: var(--wpht-primary-color);
	--wpht-header-radius: 10px;
}

.wpht-comparison-table-block { margin-bottom: 28px; scroll-margin-top: 20px; }

.wpht-table-header {
	display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px;
	background: var(--wpht-header-bg);
	border-radius: var(--wpht-header-radius) var(--wpht-header-radius) 0 0;
	padding: 10px 14px;
}
.wpht-table-title { margin: 0; font-size: 17px; font-weight: 600; color: var(--wpht-brand-color); flex: 1 1 auto; display: flex; align-items: center; gap: 8px; }
/* Theme / Elementor-kit heading colours (h3, .elementor-kit-N h3 …) must
   not replace the colour picked in the widget. */
.wpht-comparison-wrap .wpht-table-header .wpht-table-title { color: var(--wpht-brand-color) !important; }
.wpht-table-logo { width: 28px; height: 28px; object-fit: contain; border-radius: 4px; flex: none; background: #fff; }
.wpht-vat-toggle-wrap { font-size: 13px; cursor: pointer; display: flex; align-items: center; gap: 6px; color: var(--wpht-brand-color); opacity: 0.92; }
.wpht-jump-select-wrap { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--wpht-brand-color); opacity: 0.92; }
.wpht-jump-select-wrap select {
	padding: 6px 10px; border: none; border-radius: 8px; font-size: 13px;
	background: var(--wpht-primary-light); color: var(--wpht-primary-color);
}
.wpht-vat-note { margin: 6px 0 0; padding: 0 16px; color: #7a5c00; font-size: 12px; }

.wpht-btn { border: 1px solid #ccc; background: #f5f5f5; padding: 6px 12px; border-radius: 4px; cursor: pointer; font-size: 13px; }
.wpht-btn:hover { opacity: 0.85; }

.wpht-table-footer { display: flex; gap: 8px; padding: 10px 14px; border: 1px solid #eee; border-top: none; border-radius: 0 0 var(--wpht-header-radius) var(--wpht-header-radius); }
.wpht-icon-btn {
	display: inline-flex !important; align-items: center !important; justify-content: center !important;
	width: 32px !important; height: 32px !important; min-height: 32px !important; min-width: 32px !important;
	border-radius: 8px !important; cursor: pointer !important;
	padding: 0 !important; margin: 0 !important; line-height: 1 !important;
	box-shadow: none !important; text-transform: none !important; font-size: 0 !important;
	color: var(--wpht-icon-color, #6b7280) !important;
	background: var(--wpht-icon-bg, #f9fafb) !important; background-color: var(--wpht-icon-bg, #f9fafb) !important; background-image: none !important;
	border: 1px solid var(--wpht-icon-border, #e5e7eb) !important;
	-webkit-appearance: none !important; appearance: none !important;
	transition: background-color 0.15s ease, color 0.15s ease !important;
}
.wpht-icon-btn svg {
	display: inline-block !important; flex-shrink: 0 !important;
	width: 16px !important; height: 16px !important;
	color: inherit !important; stroke: currentColor !important; fill: none !important;
}
.wpht-icon-btn:hover {
	background: var(--wpht-primary-color) !important; background-color: var(--wpht-primary-color) !important;
	border-color: var(--wpht-primary-color) !important; color: #ffffff !important;
}

.wpht-comparison-wrap svg,
.wpht-filter-box svg {
	display: inline-block !important;
	visibility: visible !important;
	max-width: none !important;
	vertical-align: middle;
	width: 16px;
	height: 16px;
}
.wpht-filter-chevron svg { width: 16px; height: 16px; }

.wpht-comparison-table { width: 100%; border-collapse: collapse; }
.wpht-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.wpht-table-scroll .wpht-comparison-table { min-width: 560px; }
.wpht-comparison-table th,
.wpht-comparison-table td { padding: 10px; border-bottom: 1px solid #eef0f2; text-align: right; }
.wpht-comparison-table thead { background: var(--wpht-thead-bg, #fafbfc); }
.wpht-comparison-table thead th { color: var(--wpht-thead-color, #4b5563); font-weight: 600; font-size: 13px; }
/* Column-header row: theme "table th" styles can't change the colours
   chosen in the widget (each widget sets its own variables). */
.wpht-comparison-wrap .wpht-comparison-table thead th,
.wpht-comparison-wrap .wpht-product-table thead th {
	background: var(--wpht-thead-bg, #fafbfc) !important;
	color: var(--wpht-thead-color, #4b5563) !important;
}
.wpht-comparison-table tbody tr:nth-child(odd) { background: transparent; }
/* Every other row tinted (colour per widget: --wpht-stripe-bg). */
.wpht-comparison-table tbody tr:nth-child(even),
.wpht-product-table tbody tr:nth-child(even) { background: var(--wpht-stripe-bg, #edf1f6); }
.wpht-comparison-table tbody tr:hover,
.wpht-product-table tbody tr:hover { background: var(--wpht-row-hover, var(--wpht-primary-light)); }

/* Balanced columns: each column type gets the same share of the width in
   every table (<colgroup> from the renderer), so tables under each other
   line up. «خودکار» in the widget = --wpht-table-layout: auto. */
.wpht-comparison-table.is-balanced,
.wpht-product-table.is-balanced,
.wpht-mt-table.is-balanced { table-layout: var(--wpht-table-layout, fixed); }
.wpht-comparison-table.is-balanced th,
.wpht-comparison-table.is-balanced td { overflow-wrap: anywhere; word-break: normal; }
.wpht-product-table.is-balanced th:first-child { width: 30%; }
.wpht-comparison-table td:not(:first-child) { color: var(--wpht-attr-color, inherit); }

/* ==== Product title (link or plain text) ====
   Themes and the Elementor kit colour every <a> (a, a:hover, .elementor-kit-N a,
   .entry-content a …). The title keeps the colour picked in THIS widget
   in every state; with nothing picked it uses the cell's text colour,
   never the theme's link colour. */
.wpht-comparison-wrap .wpht-product-name { font-weight: 500; }
.wpht-comparison-wrap .wpht-product-name,
.wpht-comparison-wrap a.wpht-product-name,
.wpht-comparison-wrap a.wpht-product-name:link,
.wpht-comparison-wrap a.wpht-product-name:visited {
	color: var(--wpht-name-color, currentColor) !important;
	text-decoration: none !important;
	background-image: none !important;
	box-shadow: none !important;
	border-bottom: 0 !important;
}
.wpht-comparison-wrap a.wpht-product-name:hover,
.wpht-comparison-wrap a.wpht-product-name:focus,
.wpht-comparison-wrap a.wpht-product-name:active {
	color: var(--wpht-name-hover-color, var(--wpht-name-color, currentColor)) !important;
	text-decoration: var(--wpht-name-hover-decoration, none) !important;
}

.wpht-up { color: #1a7f37; font-weight: 600; }
.wpht-down { color: #cf222e; font-weight: 600; }

.wpht-view-chart {
	display: inline-flex !important; align-items: center; justify-content: center;
	width: 28px !important; height: 28px !important;
	border-radius: 6px !important;
	background: var(--wpht-primary-light, #e0f1fe) !important;
	color: var(--wpht-primary-color, #0e466c) !important;
	transition: background-color 0.15s ease, color 0.15s ease;
}
.wpht-view-chart svg { stroke: currentColor !important; }
.wpht-view-chart:hover { background: var(--wpht-primary-color, #0e466c) !important; color: #fff !important; }

.wpht-filter-tabs { display: flex; flex-direction: column; gap: 6px; }
.wpht-filter-tab { border: 1px solid #ccc; background: #fff; padding: 8px 14px; border-radius: 4px; cursor: pointer; text-align: right; }
.wpht-filter-tab.active { background: var(--wpht-primary-color, #0e466c); color: #fff; border-color: var(--wpht-primary-color, #0e466c); }

.wpht-chart-range-tabs { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.wpht-range-tab { border: 1px solid #ccc; background: #f5f5f5; padding: 5px 10px; border-radius: 4px; cursor: pointer; font-size: 13px; }
.wpht-range-tab.active { background: var(--wpht-primary-color, #0e466c); color: #fff; border-color: var(--wpht-primary-color, #0e466c); }
.wpht-range-custom input[type="date"] { padding: 4px; }

.wpht-order-list { list-style: none; margin: 0; padding: 0; max-width: 360px; }
.wpht-order-list li {
	background: #fff; border: 1px solid #ccc; border-radius: 4px; padding: 8px 10px;
	margin-bottom: 6px; cursor: move; display: flex; align-items: center; gap: 8px;
}
.wpht-order-list li:before { content: "⠿"; color: #999; }

@media print {
	body * { visibility: hidden; }
	.wpht-print-target, .wpht-print-target * { visibility: visible; }
	.wpht-print-target { position: absolute; left: 0; top: 0; width: 100%; }
	.wpht-table-footer { display: none !important; }
}

/* ==== Filter Box widget ==== */

.wpht-filter-box {
	--wpht-filter-accent: #057bc4;
	display: flex; flex-direction: column; gap: 10px;
	max-width: 320px; padding: 14px; border: 1px solid #e5e5e5; border-radius: 12px; background: #fff;
}

.wpht-filter-field { position: relative; border: 1px solid #e0e0e0; border-radius: 10px; }
.wpht-filter-toggle {
	width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
	background: none; border: none; cursor: pointer; padding: 10px 14px; font-size: 14px; color: #333;
}
.wpht-filter-toggle.has-selection { color: var(--wpht-filter-accent); font-weight: 600; }
.wpht-filter-count { margin-inline-start: auto; margin-inline-end: 6px; font-size: 12px; color: var(--wpht-filter-accent); }
.wpht-filter-chevron { display: inline-flex; color: #666; transition: transform 0.15s ease; }
.wpht-filter-field.open .wpht-filter-chevron { transform: rotate(180deg); }

.wpht-filter-panel {
	display: none;
	position: absolute; z-index: 20; inset-inline: 0; top: calc(100% + 4px);
	background: #fff; border: 1px solid #e0e0e0; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.08);
	padding: 10px; max-height: 280px; flex-direction: column; gap: 8px;
}
.wpht-filter-field.open .wpht-filter-panel { display: flex; }
.wpht-filter-search { width: 100%; padding: 8px 10px; border: 1px solid #ddd; border-radius: 8px; font-size: 13px; box-sizing: border-box; }
.wpht-filter-options { overflow-y: auto; max-height: 200px; display: flex; flex-direction: column; gap: 2px; }
.wpht-filter-option { display: flex; align-items: center; gap: 8px; padding: 6px 4px; font-size: 13px; cursor: pointer; border-radius: 6px; }
.wpht-filter-option:hover { background: #f5f7fa; }
.wpht-filter-option input { margin: 0; }

.wpht-filter-vat-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 2px; font-size: 13px; cursor: pointer; }
.wpht-switch { position: relative; display: inline-block; width: 38px; height: 22px; flex: none; }
.wpht-switch input { opacity: 0; width: 0; height: 0; }
.wpht-switch-slider {
	position: absolute; inset: 0; background: #ccc; border-radius: 999px; transition: background 0.15s ease;
}
.wpht-switch-slider:before {
	content: ""; position: absolute; height: 16px; width: 16px; left: 3px; top: 3px;
	background: #fff; border-radius: 50%; transition: transform 0.15s ease;
}
.wpht-switch input:checked + .wpht-switch-slider { background: var(--wpht-filter-accent); }
.wpht-switch input:checked + .wpht-switch-slider:before { transform: translateX(-16px); }

.wpht-filter-actions { display: flex; align-items: center; gap: 8px; border-top: 1px solid #eee; padding-top: 10px; }
.wpht-filter-clear {
	flex: none; width: 40px !important; height: 40px !important; min-height: 40px !important; min-width: 40px !important;
	display: inline-flex !important; align-items: center !important; justify-content: center !important;
	padding: 0 !important; margin: 0 !important; line-height: 1 !important; box-shadow: none !important;
	-webkit-appearance: none !important; appearance: none !important;
	border: none !important; border-radius: 10px !important;
	background: #666 !important; background-color: #666 !important; background-image: none !important;
	color: #fff !important; cursor: pointer;
	transition: background-color 0.15s ease !important;
}
.wpht-filter-clear svg { display: inline-block !important; color: #fff !important; stroke: #fff !important; fill: none !important; }
.wpht-filter-clear:hover { background: #cf222e !important; background-color: #cf222e !important; border-color: #cf222e !important; color: #fff !important; }
.wpht-filter-apply {
	flex: 1 1 auto; border: none; border-radius: 10px; background: var(--wpht-filter-accent); color: #fff;
	font-size: 14px; font-weight: 600; padding: 10px 14px; cursor: pointer;
}
.wpht-filter-apply:hover { opacity: 0.92; }

/* ==== Pagination (rows inside a table / pages of tables) ==== */
.wpht-table-pager {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
	padding: 10px 14px; border: 1px solid #eee; border-top: none; font-size: 13px; color: #64748b;
}
.wpht-pager-links { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.wpht-pager-btn {
	min-width: 32px; height: 32px; padding: 0 8px !important; display: inline-flex !important; align-items: center; justify-content: center;
	border: 1px solid #e2e8f0 !important; border-radius: 8px; background: #fff !important; color: #334155 !important;
	font-size: 13px; line-height: 1; cursor: pointer; text-decoration: none !important;
}
.wpht-pager-btn:hover:not(:disabled):not(.is-current) { border-color: var(--wpht-primary-color, #0e466c) !important; color: var(--wpht-primary-color, #0e466c) !important; }
.wpht-pager-btn.is-current { background: var(--wpht-primary-color, #0e466c) !important; border-color: var(--wpht-primary-color, #0e466c) !important; color: #fff !important; cursor: default; }
.wpht-pager-btn:disabled { opacity: 0.4; cursor: default; }
.wpht-pager-gap { padding: 0 4px; color: #94a3b8; }
.wpht-group-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 24px 0 8px; }
.wpht-group-pager .wpht-pager-btn { min-width: 38px; height: 38px; font-size: 14px; }
.wpht-pager-meta { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.wpht-rows-select-wrap { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #64748b; margin: 0; }
.wpht-rows-select {
	height: 32px; min-width: 64px; padding: 0 8px; border: 1px solid #e2e8f0; border-radius: 8px;
	background-color: #fff; color: #334155; font: inherit; font-size: 13px; cursor: pointer;
}
/* Phones: selector, "showing x–y of z" and page buttons stacked and centred. */
@media (max-width: 650px) {
	.wpht-table-pager { flex-direction: column; justify-content: center; align-items: center; gap: 10px; text-align: center; }
	.wpht-pager-meta { flex-direction: column; justify-content: center; align-items: center; gap: 8px; width: 100%; }
	.wpht-pager-info { width: 100%; text-align: center; }
	.wpht-pager-links { justify-content: center; }
}
@media print { .wpht-table-pager, .wpht-group-pager { display: none !important; } }

/* ==== Smart Filter widget ==== */
/* The category field only belongs to "navigate" mode (no table on the page). */
.wpht-smart-filter .wpht-sf-cat-field { display: none; }
.wpht-smart-filter.wpht-sf-navigate .wpht-sf-cat-field { display: block; }
.wpht-sf-go {
	flex: 1 1 auto; border: none; border-radius: 10px; background: var(--wpht-filter-accent); color: #fff;
	font-size: 14px; font-weight: 600; padding: 10px 14px; cursor: pointer;
}
.wpht-sf-go:hover { opacity: 0.92; }
.wpht-sf-go.is-loading { opacity: 0.6; cursor: progress; }
.wpht-filter-option .wpht-sf-count { margin-inline-start: auto; font-size: 11px; color: #94a3b8; }
.wpht-filter-option.wpht-sf-depth-1 { padding-inline-start: 22px; }
.wpht-filter-option.wpht-sf-depth-2 { padding-inline-start: 40px; }
.wpht-filter-option.wpht-sf-depth-3 { padding-inline-start: 58px; }
.wpht-filter-option.wpht-sf-depth-1,
.wpht-filter-option.wpht-sf-depth-2,
.wpht-filter-option.wpht-sf-depth-3 { font-size: 12.5px; color: #475569; }

/* Dropdowns open in place and push the next field down (accordion), so
   every field stays visible one under another instead of being covered. */
.wpht-smart-filter .wpht-filter-panel {
	position: static; box-shadow: none; border: none; border-top: 1px solid #eef0f2;
	border-radius: 0 0 10px 10px; padding: 10px; max-height: none;
}
.wpht-smart-filter .wpht-filter-options { max-height: 220px; }

/* ---- Popup mode ---- */
.wpht-sf-trigger {
	display: inline-flex; align-items: center; gap: 8px; cursor: pointer; text-decoration: none;
	font-size: 14px; font-weight: 600; line-height: 1.4;
}
.wpht-sf-trigger.is-button {
	padding: 10px 18px; border-radius: 10px; background: var(--wpht-primary-color, #0e466c); color: #fff;
}
.wpht-sf-trigger.is-button:hover { opacity: 0.92; color: #fff; }
.wpht-sf-trigger.is-link { color: var(--wpht-accent-color, #057bc4); }
.wpht-sf-trigger.is-link:hover { text-decoration: underline; }
.wpht-sf-trigger svg { flex: none; }

.wpht-sf-trigger { border: none; font-family: inherit; }
.wpht-popup-btn-wrap.is-stretch { display: flex; }
.wpht-popup-btn-wrap.is-stretch .wpht-sf-trigger { width: 100%; justify-content: center; }
button.wpht-sf-trigger.is-link { background: none; padding: 0; }

/* ==== Shared popup = bottom sheet (smart filter, popup-button widget,
   chart popup, call/proforma form). Slides up from the bottom of the
   screen on phones (and on desktop when set to "bottom"); centred on
   desktop otherwise. JS toggles [hidden] + .is-open for the motion. ==== */
.wpht-sf-modal { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.wpht-sf-modal[hidden] { display: none; }
.wpht-sf-modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.55); opacity: 0; transition: opacity 0.28s ease; }
.wpht-sf-modal.is-open .wpht-sf-modal-backdrop { opacity: 1; }
.wpht-sf-modal-panel {
	position: relative; width: min(460px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column;
	background: #fff; border-radius: 18px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25); overflow: hidden;
	opacity: 0; transform: translateY(24px) scale(0.98);
	transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease;
	will-change: transform;
}
.wpht-sf-modal.is-open .wpht-sf-modal-panel { opacity: 1; transform: none; }
.wpht-sf-modal.wpht-chart-sheet .wpht-sf-modal-panel { width: min(720px, 100%); }
.wpht-sheet-handle { display: none; width: 44px; height: 5px; border-radius: 99px; background: #d5dbe3; margin: 8px auto 0; flex: none; touch-action: none; }
.wpht-sf-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid #eef0f2; touch-action: none; }
.wpht-sf-modal-title { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.5; }
.wpht-sf-modal-close {
	display: inline-flex !important; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0 !important; flex: none;
	border: none !important; border-radius: 10px; background: #f1f5f9 !important; color: #475569 !important; cursor: pointer;
}
.wpht-sf-modal-close:hover { background: #e2e8f0 !important; }
.wpht-sf-modal-body { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 14px 16px 18px; }
.wpht-sf-modal-body .wpht-filter-box { border: none; padding: 0; max-width: none; }
body.wpht-sf-locked { overflow: hidden; }

/* Bottom sheet: phones always, desktop when the popup is set to "bottom". */
.wpht-sf-modal.is-bottom { align-items: flex-end; padding: 0; }
.wpht-sf-modal.is-bottom .wpht-sf-modal-panel {
	width: min(640px, 100%); max-height: 88vh; border-radius: 20px 20px 0 0;
	opacity: 1; transform: translateY(100%);
	padding-bottom: env(safe-area-inset-bottom, 0);
}
.wpht-sf-modal.is-bottom.is-open .wpht-sf-modal-panel { transform: translateY(0); }
.wpht-sf-modal.is-bottom .wpht-sheet-handle { display: block; }
@media (max-width: 650px) {
	.wpht-sf-modal { align-items: flex-end; padding: 0; }
	.wpht-sf-modal-panel,
	.wpht-sf-modal.wpht-chart-sheet .wpht-sf-modal-panel {
		width: 100%; max-height: 90vh; border-radius: 20px 20px 0 0;
		opacity: 1; transform: translateY(100%);
		padding-bottom: env(safe-area-inset-bottom, 0);
	}
	.wpht-sf-modal.is-open .wpht-sf-modal-panel { transform: translateY(0); }
	.wpht-sheet-handle { display: block; }
	/* Chart / contact popups: centred on phones too. */
	.wpht-sf-modal.is-center { align-items: center; padding: 12px; }
	.wpht-sf-modal.is-center .wpht-sf-modal-panel,
	.wpht-sf-modal.is-center.wpht-chart-sheet .wpht-sf-modal-panel {
		width: 100%; max-height: calc(100vh - 24px); border-radius: 18px;
		opacity: 0; transform: translateY(24px) scale(0.98); padding-bottom: 0;
	}
	.wpht-sf-modal.is-center.is-open .wpht-sf-modal-panel { opacity: 1; transform: none; }
	.wpht-sf-modal.is-center .wpht-sheet-handle { display: none; }
}
.wpht-sf-modal-panel.is-dragging { transition: none; }
@media (prefers-reduced-motion: reduce) {
	.wpht-sf-modal-panel, .wpht-sf-modal-backdrop { transition: none !important; }
}

/* Chart popup header: product, price, change */
/* ==== Chart popup (#wpht-chart-sheet). Scoped by id and with explicit
   values so theme styles for buttons/inputs (WoodMart etc.) can't leak in. ==== */
#wpht-chart-sheet { --wpht-chart-color: #2563eb; --wpht-cs-accent: var(--wpht-primary-color, #0e466c); }
#wpht-chart-sheet .wpht-sf-modal-panel { width: min(760px, 100%); }
#wpht-chart-sheet .wpht-sf-modal-head { align-items: flex-start; padding: 18px 20px 14px; border-bottom: 0; }
#wpht-chart-sheet .wpht-sf-modal-body { padding: 0 20px 20px; }
.wpht-cs-heading { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
#wpht-chart-sheet .wpht-cs-name { font-size: 17px; line-height: 1.6; font-weight: 700; color: #0f172a; margin: 0; }
.wpht-cs-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.wpht-cs-price { font-size: 20px; font-weight: 800; color: #0f172a; letter-spacing: -0.2px; }
.wpht-cs-change { display: inline-flex; align-items: center; gap: 3px; padding: 3px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: #f1f5f9; color: #475569; direction: ltr; }
.wpht-cs-change.wpht-up { background: #dcfce7; color: #15803d; }
.wpht-cs-change.wpht-down { background: #fee2e2; color: #b91c1c; }

/* Segmented range switch */
#wpht-chart-sheet .wpht-cs-tabs { display: flex; gap: 4px; padding: 4px; margin: 0 0 12px; background: #f1f5f9; border-radius: 12px; }
#wpht-chart-sheet .wpht-cs-tab {
	flex: 1 1 0; min-width: 0; margin: 0; padding: 8px 6px; border: 0; border-radius: 9px; background: transparent; box-shadow: none;
	color: #475569; font: inherit; font-size: 13.5px; font-weight: 600; line-height: 1.4; text-transform: none; letter-spacing: 0;
	cursor: pointer; white-space: nowrap; transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease; height: auto; min-height: 0;
}
#wpht-chart-sheet .wpht-cs-tab:hover { color: #0f172a; background: rgba(255, 255, 255, 0.6); }
#wpht-chart-sheet .wpht-cs-tab.is-active { background: #fff; color: var(--wpht-cs-accent); box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12); }

/* Custom date range (hidden until «بازه دلخواه») */
#wpht-chart-sheet .wpht-cs-custom { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin: -2px 0 14px; padding: 12px; border: 1px solid #e2e8f0; border-radius: 12px; background: #f8fafc; }
#wpht-chart-sheet .wpht-cs-custom[hidden] { display: none; }
#wpht-chart-sheet .wpht-cs-custom label { display: flex; flex-direction: column; gap: 4px; flex: 1 1 140px; min-width: 0; margin: 0; font-size: 12px; color: #64748b; font-weight: 600; }
#wpht-chart-sheet .wpht-cs-custom input[type="date"] {
	box-sizing: border-box; width: 100%; min-width: 0; max-width: 100%; height: 40px; margin: 0; padding: 0 10px; border: 1px solid #cbd5e1; border-radius: 9px; background: #fff; box-shadow: none;
	color: #0f172a; font: inherit; font-size: 14px; line-height: 40px;
}
#wpht-chart-sheet .wpht-cs-custom input[type="date"]:focus { outline: none; border-color: var(--wpht-cs-accent); box-shadow: 0 0 0 3px rgba(14, 70, 108, 0.12); }
#wpht-chart-sheet .wpht-cs-apply {
	flex: 0 0 auto; height: 40px; min-height: 0; margin: 0; padding: 0 20px; border: 0; border-radius: 9px; background: var(--wpht-cs-accent); box-shadow: none;
	color: #fff; font: inherit; font-size: 14px; font-weight: 700; line-height: 40px; text-transform: none; letter-spacing: 0; cursor: pointer;
}
#wpht-chart-sheet .wpht-cs-apply:hover { opacity: 0.92; }

/* Min / max / average / change strip */
.wpht-cs-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0 0 12px; }
.wpht-cs-stat { display: flex; flex-direction: column; gap: 2px; padding: 9px 10px; border-radius: 10px; background: #f8fafc; border: 1px solid #eef2f6; min-width: 0; }
.wpht-cs-stat span { font-size: 11.5px; color: #64748b; }
.wpht-cs-stat b { align-self: flex-start; max-width: 100%; font-size: 14px; font-weight: 700; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wpht-cs-stat.wpht-up b { color: #15803d; }
.wpht-cs-stat.wpht-down b { color: #b91c1c; }

/* Chart area + loading / empty states */
.wpht-cs-chart { position: relative; border: 1px solid #eef2f6; border-radius: 14px; padding: 10px 8px 4px; }
#wpht-chart-sheet .wpht-chart-canvas-wrap { height: 300px; margin: 0; }
#wpht-chart-sheet canvas { cursor: crosshair; touch-action: pan-y; }
.wpht-cs-state { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; padding: 20px; text-align: center; color: #64748b; font-size: 14px; border-radius: 14px; }
.wpht-cs-chart.is-loading .wpht-cs-state { display: flex; background: rgba(255, 255, 255, 0.7); }
.wpht-cs-chart.is-empty .wpht-cs-state { display: flex; background: #fff; }
.wpht-cs-spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid #e2e8f0; border-top-color: var(--wpht-cs-accent); animation: wpht-spin 0.8s linear infinite; }
@keyframes wpht-spin { to { transform: rotate(360deg); } }

@media (max-width: 650px) {
	#wpht-chart-sheet .wpht-sf-modal-head { padding: 16px 16px 10px; }
	#wpht-chart-sheet .wpht-sf-modal-body { padding: 0 14px 16px; }
	#wpht-chart-sheet .wpht-cs-name { font-size: 15.5px; }
	.wpht-cs-price { font-size: 18px; }
	#wpht-chart-sheet .wpht-cs-tab { font-size: 12.5px; padding: 8px 2px; }
	.wpht-cs-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
	#wpht-chart-sheet .wpht-chart-canvas-wrap { height: 230px; }
	#wpht-chart-sheet .wpht-cs-apply { flex: 1 1 100%; }
}

/* Contact popup built from an Elementor template (printed in the footer). */
.wpht-sf-modal.wpht-contact-tpl .wpht-sf-modal-panel { width: min(var(--wpht-sheet-width, 520px), 100%); }
.wpht-contact-tpl .wpht-sf-modal-head.is-untitled { border-bottom: 0; padding-bottom: 0; justify-content: flex-end; }
.wpht-contact-tpl .wpht-sf-modal-head.is-untitled .wpht-sf-modal-title { display: none; }
/* Template content uses the popup's width, not the page's boxed width. */
.wpht-sf-modal-body > .elementor { width: 100%; max-width: 100%; }
.wpht-sf-modal-body .elementor-section-stretched { width: 100% !important; left: auto !important; }

/* Call / proforma request form */
.wpht-cf { display: flex; flex-direction: column; gap: 10px; }
.wpht-cf input, .wpht-cf textarea { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #dfe3e8; border-radius: 10px; font: inherit; font-size: 14px; }
.wpht-cf textarea { min-height: 90px; }
.wpht-cf button[type=submit] { border: none; border-radius: 10px; padding: 12px; background: var(--wpht-primary-color, #0e466c); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.wpht-cf-result { font-size: 13px; color: #475569; min-height: 1em; margin: 0; }

/* ==== Buy / call / proforma buttons in the tables ==== */
.wpht-act {
	display: inline-flex !important; align-items: center; justify-content: center; gap: 4px; white-space: nowrap;
	min-height: 32px; padding: 0 12px !important; border-radius: 8px !important; font: inherit; font-size: 12.5px; font-weight: 600;
	cursor: pointer; text-decoration: none !important; line-height: 1; border: 1px solid transparent !important;
	transition: opacity 0.15s ease, background-color 0.15s ease;
}
.wpht-act-cart { background: var(--wpht-primary-color, #0e466c) !important; color: #fff !important; }
.wpht-act-cart.is-loading { opacity: 0.6; cursor: progress; }
.wpht-act-cart.is-added { background: #16a34a !important; }
.wpht-act-call { background: #fff !important; color: #0f766e !important; border-color: #99d5cc !important; }
.wpht-act-proforma { background: #fff !important; color: var(--wpht-primary-color, #0e466c) !important; border-color: #b9cfe0 !important; }
.wpht-act:hover { opacity: 0.9; }
.wpht-view-chart { border: none !important; padding: 0 !important; cursor: pointer; font: inherit; }

/* "Several categories together" page */
.wpht-multi-category-links { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 16px; padding: 0; }
.wpht-multi-category-links a {
	display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 13px; text-decoration: none;
	background: var(--wpht-primary-light, #e0f1fe); color: var(--wpht-primary-color, #0e466c);
}

/* ==== Category archive page: table + sidebar layout ==== */

.wpht-archive-price-table-wrap { margin: 20px 0; }
.wpht-archive-layout { display: flex; align-items: flex-start; gap: 28px; }
.wpht-archive-main { flex: 1 1 0; min-width: 0; }
.wpht-archive-sidebar { flex: 0 0 300px; width: 300px; }
.wpht-archive-layout.wpht-no-sidebar .wpht-archive-main { flex: 1 1 100%; }

@media (max-width: 782px) {
	.wpht-archive-layout { flex-direction: column; }
	.wpht-archive-sidebar { width: 100%; flex-basis: auto; order: 2; }
}

/* ==== Two layouts: desktop table (.wpht-view-desktop) and phone table
   (.wpht-view-mobile). Normally the server sends only ONE of them
   (wrapper class .wpht-device-desktop / .wpht-device-mobile) — that one is
   always shown. Inside the Elementor editor both are sent
   (.wpht-device-both) and the screen width picks one. ==== */

.wpht-view-mobile { display: none; }

@media (max-width: 650px) {
	.wpht-view-desktop { display: none !important; }
	.wpht-view-mobile { display: block; }
}

.wpht-device-mobile .wpht-view-mobile { display: block !important; }
.wpht-device-desktop .wpht-view-desktop { display: block !important; }

/* Phone layout component styles (apply at any width — a tablet may get
   the phone layout too). */
	.wpht-m-card {
		border: 1px solid #eef0f2; border-radius: 10px; background: #fff;
		margin-top: 10px; padding: 0 12px;
	}

	/* The header is always visible: title + the columns picked for the header. */
	.wpht-m-head { padding: 12px 0; }
	.wpht-m-card.has-drawer .wpht-m-head { cursor: pointer; }
	.wpht-m-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
	.wpht-m-title { flex: 1 1 auto; text-align: right; font-weight: 600; font-size: 14px; }
	.wpht-m-chevron { display: inline-flex; color: #8a94a6; transition: transform 0.15s ease; flex: none; }
	.wpht-m-card.is-open .wpht-m-chevron { transform: rotate(180deg); }

	.wpht-m-stats { width: 100%; border-collapse: collapse; margin-top: 10px; table-layout: auto; }
	.wpht-m-stats th, .wpht-m-stats td { text-align: center; padding: 2px 10px; white-space: nowrap; }
	.wpht-m-stats th:first-child, .wpht-m-stats td:first-child { padding-inline-start: 0; }
	.wpht-m-stats th:last-child, .wpht-m-stats td:last-child { padding-inline-end: 0; }
	.wpht-m-stats th { color: #8a94a6; font-weight: 400; font-size: 11px; }
	.wpht-m-stats td { font-size: 13px; font-weight: 600; padding-top: 2px; }

	.wpht-m-chart-action { flex: none; }

	.wpht-m-label { color: #8a94a6; flex: none; }

	/* The drawer:{ color: #8a94a6; flex: none; }

	/* The drawer: everything not on the header, opened by the chevron. */
	.wpht-m-more { display: none; border-top: 1px solid #f0f2f4; padding: 4px 0 6px; }
	.wpht-m-card.is-open .wpht-m-more { display: block; }
	.wpht-m-row {
		display: flex; align-items: center; justify-content: space-between; gap: 10px;
		padding: 8px 0; font-size: 13px;
	}
	.wpht-m-row + .wpht-m-row { border-top: 1px solid #f6f7f8; }
	.wpht-m-row .wpht-m-value { text-align: left; }

/* ==== Phone layout, "table" style (.wpht-mt-*): one shared header row,
   each product row opens its own drawer row underneath. ==== */
	.wpht-mt-wrap { border: 1px solid #eee; border-top: none; }
	.wpht-mt-table { width: 100%; border-collapse: collapse; margin: 0; border: none; }
	.wpht-mt-table th,
	.wpht-mt-table td { border: none; border-bottom: 1px solid #eef0f2; padding: 10px 4px; text-align: center; vertical-align: middle; font-size: 13px; background: none; }
	.wpht-mt-table thead th { background: var(--wpht-thead-bg, #f1f5f9); color: var(--wpht-thead-color, #475569); font-weight: 600; font-size: 11.5px; white-space: nowrap; padding-top: 9px; padding-bottom: 9px; }
	.wpht-comparison-wrap .wpht-mt-table thead th {
		background: var(--wpht-thead-bg, #f1f5f9) !important;
		color: var(--wpht-thead-color, #475569) !important;
	}
	.wpht-mt-table .wpht-mt-name { text-align: right; padding-inline-start: 10px; line-height: 1.5; }
	.wpht-mt-table td.wpht-mt-name { font-weight: 600; }
	.wpht-mt-table td:not(.wpht-mt-name) { white-space: nowrap; color: var(--wpht-attr-color, inherit); }
	.wpht-mt-table .wpht-mt-icon-cell { width: 30px; padding-inline: 2px; }
	.wpht-mt-table .wpht-mt-icon-cell:last-child { padding-inline-end: 8px; }
	.wpht-mt-row.has-drawer { cursor: pointer; -webkit-tap-highlight-color: transparent; }
	.wpht-mt-row.is-open > td { background: var(--wpht-primary-light); border-bottom-color: transparent; }
	.wpht-mt-row.is-open .wpht-m-chevron { transform: rotate(180deg); }
	.wpht-mt-table tr.wpht-mt-drawer > td { background: var(--wpht-primary-light); padding: 0 8px 10px; text-align: right; }
	.wpht-mt-drawer[hidden] { display: none; }
	.wpht-mt-drawer-inner { background: #fff; border-radius: 8px; padding: 2px 10px; }
	.wpht-mt-drawer-inner .wpht-m-row { padding: 8px 0; font-size: 13px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
	.wpht-mt-drawer-inner .wpht-m-row + .wpht-m-row { border-top: 1px dashed #e9edf2; }

/* Printing: the desktop table when it was sent; on a phone (only the phone
   table was sent) print that, with every row's details opened. */
@media print {
	.wpht-view-desktop { display: block !important; }
	.wpht-view-mobile { display: none !important; }
	.wpht-device-mobile .wpht-view-mobile { display: block !important; }
	.wpht-device-mobile .wpht-mt-drawer { display: table-row !important; }
	.wpht-device-mobile .wpht-m-more { display: block !important; }
	.wpht-m-chevron { display: none !important; }
}

/* ==== Single Table widget (custom, optionally-linked title) ==== */

.wpht-single-table-title { margin: 0 0 12px; font-size: 19px; }
/* Title link: the widget's colours win over theme link colours. */
.wpht-comparison-wrap .wpht-single-table-title a,
.wpht-comparison-wrap .wpht-single-table-title a:visited {
	color: var(--wpht-stitle-link-color, currentColor) !important;
	text-decoration: none !important; background-image: none !important; box-shadow: none !important;
}
.wpht-comparison-wrap .wpht-single-table-title a:hover,
.wpht-comparison-wrap .wpht-single-table-title a:focus {
	color: var(--wpht-stitle-hover-color, var(--wpht-stitle-link-color, currentColor)) !important;
}

.wpht-loading-relative { position: relative; min-height: 120px; }
.wpht-loading-overlay {
	position: absolute; inset: 0; z-index: 30;
	display: flex; align-items: center; justify-content: center;
	background: rgba(255, 255, 255, 0.72);
	border-radius: var(--wpht-header-radius, 8px);
}
.wpht-loading-spinner {
	width: 34px; height: 34px; border-radius: 50%;
	border: 3px solid rgba(0, 0, 0, 0.12);
	border-top-color: var(--wpht-accent-color, #2196f3);
	animation: wpht-spin 0.7s linear infinite;
}
.wpht-loading-logo { max-width: 64px; max-height: 64px; animation: wpht-pulse 1s ease-in-out infinite; }

@keyframes wpht-spin { to { transform: rotate(360deg); } }
@keyframes wpht-pulse {
	0%, 100% { opacity: 0.45; transform: scale(0.92); }
	50% { opacity: 1; transform: scale(1.04); }
}

/* ==== Mobile toggle button (show/hide neighboring widgets) ==== */

.wpht-mobile-toggle-btn {
	display: inline-flex; align-items: center; justify-content: center;
	width: 100%; border: none; border-radius: 8px; padding: 10px 16px;
	font-size: 14px; font-weight: 600; cursor: pointer;
	background-color: #0e466c; color: #fff;
}
.wpht-mobile-toggle-btn:hover { opacity: 0.92; }

.wpht-toggle-target-hidden { display: none !important; }

@media (min-width: 651px) {
	.wpht-mobile-toggle-btn:not(.wpht-toggle-all-screens) { display: none; }
}

/* =====================================================================
   Category price table (.wpht-ct) — «جدول قیمت با دسته‌بندی کناری»
   Every colour is a variable set by THIS widget's own style controls
   ({{WRAPPER}} .wpht-ct); !important keeps theme / Elementor-kit button
   and link styles (button:hover, .elementor-kit-N a …) from replacing them.
   ===================================================================== */
.wpht-ct {
	--wpht-ct-nav-width: 250px;
	--wpht-ct-gap: 20px;
	--wpht-ct-cols: 4;
	--wpht-ct-nav-bg: #1e2a5a;
	--wpht-ct-nav-radius: 14px;
	--wpht-ct-nav-title: #ffffff;
	--wpht-ct-tab-radius: 8px;
	--wpht-ct-tab-bg: transparent;
	--wpht-ct-tab-color: #ffffff;
	--wpht-ct-tab-hover-bg: rgba(255, 255, 255, 0.08);
	--wpht-ct-tab-hover-color: #ffffff;
	--wpht-ct-tab-active-bg: #f5b42a;
	--wpht-ct-tab-active-color: #1f2433;
	--wpht-ct-divider: rgba(255, 255, 255, 0.12);
	--wpht-ct-card-bg: #ffffff;
	--wpht-ct-card-radius: 14px;
	--wpht-ct-head-bg: #f5b42a;
	--wpht-ct-head-title: #1f2433;
	--wpht-ct-date-color: #3b3f4c;
	--wpht-ct-date-icon: currentColor;
	--wpht-ct-vat-bg: #ffffff;
	--wpht-ct-vat-color: #374151;
	--wpht-ct-switch-on: #16a34a;
	--wpht-ct-switch-off: #cbd5e1;
	--wpht-ct-stripe: var(--wpht-stripe-bg, #edf1f6);
	--wpht-ct-up: #16a34a;
	--wpht-ct-down: #dc2626;
	--wpht-ct-more-bg: #f5b42a;
	--wpht-ct-more-color: #1f2433;
	--wpht-ct-more-hover-bg: #e5a312;
	--wpht-ct-more-hover-color: #1f2433;
	--wpht-ct-more-radius: 10px;
	--wpht-ct-more-align: center;
	direction: rtl;
}
.wpht-ct *, .wpht-ct *::before, .wpht-ct *::after { box-sizing: border-box; }
.wpht-ct-layout { display: flex; align-items: flex-start; gap: var(--wpht-ct-gap); }
.wpht-ct-nav-end .wpht-ct-layout { flex-direction: row-reverse; }
.wpht-ct-panels { flex: 1 1 auto; min-width: 0; }
.wpht-ct-panel[hidden] { display: none !important; }
.wpht-ct-panel:focus { outline: none; }
.wpht-ct-empty { margin: 0; padding: 18px; text-align: center; color: #6b7280; }

/* ---- Category menu (desktop: a column of rows) ---- */
.wpht-ct-nav {
	flex: 0 0 var(--wpht-ct-nav-width);
	width: var(--wpht-ct-nav-width);
	background: var(--wpht-ct-nav-bg);
	border-radius: var(--wpht-ct-nav-radius);
	padding: 16px 12px;
	position: sticky;
	top: 20px;
}
.wpht-ct-nav-title { color: var(--wpht-ct-nav-title) !important; font-weight: 700; font-size: 15px; text-align: center; padding: 4px 6px 14px; line-height: 1.6; }
.wpht-ct-tabs { display: flex; flex-direction: column; gap: 0; }
.wpht-ct .wpht-ct-tab {
	-webkit-appearance: none; appearance: none;
	display: flex; align-items: center; justify-content: space-between; gap: 8px;
	width: 100%; min-height: 0; margin: 0;
	padding: 13px 14px;
	font: inherit; font-size: 14px; font-weight: 600; line-height: 1.5; letter-spacing: normal; text-transform: none !important; text-align: start;
	background: var(--wpht-ct-tab-bg) !important;
	color: var(--wpht-ct-tab-color) !important;
	border: 0 !important;
	border-radius: var(--wpht-ct-tab-radius) !important;
	box-shadow: none !important;
	text-decoration: none !important;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease;
	-webkit-tap-highlight-color: transparent;
}
.wpht-ct .wpht-ct-tab { position: relative; }
.wpht-ct .wpht-ct-tab + .wpht-ct-tab::before { content: ""; position: absolute; top: 0; inset-inline: 12px; height: 1px; background: var(--wpht-ct-divider); pointer-events: none; }
.wpht-ct .wpht-ct-tab.is-active::before,
.wpht-ct .wpht-ct-tab.is-active + .wpht-ct-tab::before,
.wpht-ct .wpht-ct-tab:hover::before,
.wpht-ct .wpht-ct-tab:hover + .wpht-ct-tab::before { opacity: 0; }
.wpht-ct .wpht-ct-tab:hover,
.wpht-ct .wpht-ct-tab:focus { background: var(--wpht-ct-tab-hover-bg) !important; color: var(--wpht-ct-tab-hover-color) !important; }
.wpht-ct .wpht-ct-tab.is-active,
.wpht-ct .wpht-ct-tab.is-active:hover,
.wpht-ct .wpht-ct-tab.is-active:focus { background: var(--wpht-ct-tab-active-bg) !important; color: var(--wpht-ct-tab-active-color) !important; box-shadow: none !important; }
.wpht-ct .wpht-ct-tab:focus-visible { outline: 2px solid var(--wpht-ct-tab-active-bg); outline-offset: 2px; }
.wpht-ct-tab-label { flex: 1 1 auto; min-width: 0; }
.wpht-ct-chev { flex: 0 0 auto; opacity: .7; }
.wpht-ct-nav-end .wpht-ct-chev { transform: scaleX(-1); }

/* ---- Table card ---- */
.wpht-ct-card {
	background: var(--wpht-ct-card-bg);
	border-radius: var(--wpht-ct-card-radius);
	overflow: hidden;
	box-shadow: 0 2px 14px rgba(15, 23, 42, 0.06);
	border: 1px solid #eef0f4;
}
.wpht-ct-head {
	display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
	background: var(--wpht-ct-head-bg);
	padding: 14px 18px;
}
.wpht-ct .wpht-ct-head .wpht-ct-title {
	flex: 1 1 auto; margin: 0; padding: 0; min-width: 0;
	font-size: 17px; font-weight: 700; line-height: 1.5;
	color: var(--wpht-ct-head-title) !important;
	text-align: start;
	background: none; border: 0;
}
.wpht-ct-date { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; color: var(--wpht-ct-date-color); font-size: 13px; white-space: nowrap; }
.wpht-ct-cal { color: var(--wpht-ct-date-icon); flex: 0 0 auto; }

/* VAT switch */
.wpht-ct-vat {
	display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; margin: 0;
	background: var(--wpht-ct-vat-bg); color: var(--wpht-ct-vat-color);
	border-radius: 999px; padding: 5px 6px 5px 12px;
	font-size: 13px; font-weight: 500; line-height: 1.4; cursor: pointer; user-select: none;
	order: 0;
}
.wpht-ct-vat input.wpht-vat-toggle { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.wpht-ct-switch { position: relative; flex: 0 0 auto; width: 38px; height: 22px; border-radius: 999px; background: var(--wpht-ct-switch-off); transition: background-color .2s ease; }
.wpht-ct-switch::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: inset-inline-start .2s ease; }
.wpht-ct-vat input:checked + .wpht-ct-switch { background: var(--wpht-ct-switch-on); }
.wpht-ct-vat input:checked + .wpht-ct-switch::after { inset-inline-start: calc(100% - 19px); }
.wpht-ct-vat input:focus-visible + .wpht-ct-switch { outline: 2px solid var(--wpht-ct-switch-on); outline-offset: 2px; }
/* Desktop: title first, then the switch, the date at the far end. */
.wpht-ct-head .wpht-ct-title { order: 1; }
.wpht-ct-head .wpht-ct-vat { order: 2; }
.wpht-ct-head .wpht-ct-date { order: 3; }

/* Desktop table inside the card */
.wpht-ct .wpht-table-scroll { margin: 0; border: 0; border-radius: 0; }
.wpht-ct .wpht-comparison-table { margin: 0; border: 0; width: 100%; }
.wpht-ct .wpht-comparison-table th,
.wpht-ct .wpht-comparison-table td { border-inline: 0; border-top: 0; border-bottom: 1px solid #f0f1f4; padding: 13px 12px; text-align: center; vertical-align: middle; }
.wpht-ct .wpht-comparison-table th.wpht-ct-col-name,
.wpht-ct .wpht-comparison-table td.wpht-ct-col-name { text-align: start; padding-inline-start: 18px; }
.wpht-ct .wpht-comparison-table tbody tr:nth-child(odd) { background: transparent; }
.wpht-ct .wpht-comparison-table tbody tr:nth-child(even) { background: var(--wpht-ct-stripe); }
.wpht-ct .wpht-comparison-table tbody tr:hover { background: var(--wpht-primary-light); }
.wpht-ct .wpht-comparison-table tbody tr:last-child td { border-bottom: 0; }
.wpht-ct .wpht-comparison-table td.wpht-ct-col-name { font-weight: 600; }
.wpht-ct .wpht-up { color: var(--wpht-ct-up); }
.wpht-ct .wpht-down { color: var(--wpht-ct-down); }
.wpht-change-arrow { display: inline-block; font-size: 12px; line-height: 1; cursor: default; }
.wpht-change-arrow.wpht-flat { color: #9ca3af; font-size: 9px; }
.wpht-ct .wpht-table-footer { border-top: 1px solid #f0f1f4; }

/* ---- «View all» button ---- */
.wpht-ct-more-wrap { display: grid; justify-items: var(--wpht-ct-more-align); padding-top: 16px; }
.wpht-ct .wpht-ct-more,
.wpht-ct .wpht-ct-more:link,
.wpht-ct .wpht-ct-more:visited {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 12px 26px;
	background: var(--wpht-ct-more-bg) !important;
	color: var(--wpht-ct-more-color) !important;
	border-radius: var(--wpht-ct-more-radius);
	font-weight: 700; font-size: 14px; line-height: 1.5;
	text-decoration: none !important; box-shadow: none !important; border: 0 !important; background-image: none !important;
	transition: background-color .15s ease, color .15s ease;
}
.wpht-ct .wpht-ct-more:hover,
.wpht-ct .wpht-ct-more:focus { background: var(--wpht-ct-more-hover-bg) !important; color: var(--wpht-ct-more-hover-color) !important; }
.wpht-ct-more-text.is-mobile { display: none; }
.wpht-ct-more-wrap .wpht-ct-more { max-width: 100%; }

@media (max-width: 767px) {
.wpht-ct { --wpht-ct-tab-bg: rgba(255, 255, 255, 0.12); --wpht-ct-tab-hover-bg: rgba(255, 255, 255, 0.2); }
.wpht-ct .wpht-ct-layout,
.wpht-ct.wpht-ct-nav-end .wpht-ct-layout { flex-direction: column; align-items: stretch; gap: 18px; }
.wpht-ct .wpht-ct-nav { flex: 0 0 auto; width: 100%; position: static; padding: 12px; }
.wpht-ct .wpht-ct-nav-title { display: none; }
.wpht-ct.has-mobile-nav-title .wpht-ct-nav-title { display: block; padding-bottom: 10px; }
.wpht-ct .wpht-ct-tabs { display: grid; grid-template-columns: repeat(var(--wpht-ct-cols), minmax(0, 1fr)); gap: 8px; }
.wpht-ct .wpht-ct-tab { justify-content: center; text-align: center; padding: 10px 4px; font-size: 13px; min-height: 44px; }
.wpht-ct .wpht-ct-tab + .wpht-ct-tab::before { display: none; }
.wpht-ct .wpht-ct-tab .wpht-ct-chev { display: none !important; }
.wpht-ct .wpht-ct-tab-label { flex: 0 1 auto; white-space: normal; overflow-wrap: anywhere; line-height: 1.45; }
.wpht-ct .wpht-ct-head { padding: 10px 12px; gap: 8px; flex-wrap: nowrap; }
.wpht-ct .wpht-ct-head .wpht-ct-vat { order: 1; padding: 4px 4px 4px 10px; font-size: 12px; gap: 6px; }
.wpht-ct .wpht-ct-head .wpht-ct-title { order: 2; text-align: center; font-size: 16px; }
.wpht-ct .wpht-ct-head .wpht-ct-date { order: 3; font-size: 12px; }
.wpht-ct .wpht-ct-date-label { display: none; }
.wpht-ct.has-mobile-date-label .wpht-ct-date-label { display: inline; }
.wpht-ct .wpht-ct-switch { width: 34px; height: 20px; }
.wpht-ct .wpht-ct-switch::after { width: 14px; height: 14px; }
.wpht-ct .wpht-ct-vat input:checked + .wpht-ct-switch::after { inset-inline-start: calc(100% - 17px); }
.wpht-ct .wpht-mt-wrap { border: 0; padding: 4px 8px 8px; }
.wpht-ct .wpht-mt-table { border-collapse: separate; border-spacing: 0; }
.wpht-ct .wpht-mt-table th,
.wpht-ct .wpht-mt-table td { border-bottom: 0; padding: 12px 6px; font-size: 13.5px; }
.wpht-ct .wpht-mt-table thead th { background: var(--wpht-thead-bg, transparent) !important; color: var(--wpht-thead-color, #1f2433) !important; font-size: 13.5px; font-weight: 700; padding-top: 12px; padding-bottom: 12px; }
.wpht-ct .wpht-mt-row.is-even > td { background: var(--wpht-ct-stripe, #f1f3f7); }
.wpht-ct .wpht-mt-row > td:first-child { border-start-start-radius: 10px; border-end-start-radius: 10px; }
.wpht-ct .wpht-mt-row > td:last-child { border-start-end-radius: 10px; border-end-end-radius: 10px; }
.wpht-ct .wpht-mt-table td.wpht-mt-name { font-weight: 600; }
.wpht-ct .wpht-ct-more-wrap { padding-top: 12px; }
.wpht-ct .wpht-ct-more { width: 100%; }
.wpht-ct .wpht-ct-more-text.is-desktop { display: none; }
.wpht-ct .wpht-ct-more-text.is-mobile { display: inline; }
}

.wpht-ct.wpht-device-mobile { --wpht-ct-tab-bg: rgba(255, 255, 255, 0.12); --wpht-ct-tab-hover-bg: rgba(255, 255, 255, 0.2); }
.wpht-ct.wpht-device-mobile .wpht-ct-layout,
.wpht-ct.wpht-device-mobile.wpht-ct-nav-end .wpht-ct-layout { flex-direction: column; align-items: stretch; gap: 18px; }
.wpht-ct.wpht-device-mobile .wpht-ct-nav { flex: 0 0 auto; width: 100%; position: static; padding: 12px; }
.wpht-ct.wpht-device-mobile .wpht-ct-nav-title { display: none; }
.wpht-ct.wpht-device-mobile.has-mobile-nav-title .wpht-ct-nav-title { display: block; padding-bottom: 10px; }
.wpht-ct.wpht-device-mobile .wpht-ct-tabs { display: grid; grid-template-columns: repeat(var(--wpht-ct-cols), minmax(0, 1fr)); gap: 8px; }
.wpht-ct.wpht-device-mobile .wpht-ct-tab { justify-content: center; text-align: center; padding: 10px 4px; font-size: 13px; min-height: 44px; }
.wpht-ct.wpht-device-mobile .wpht-ct-tab + .wpht-ct-tab::before { display: none; }
.wpht-ct.wpht-device-mobile .wpht-ct-tab .wpht-ct-chev { display: none !important; }
.wpht-ct.wpht-device-mobile .wpht-ct-tab-label { flex: 0 1 auto; white-space: normal; overflow-wrap: anywhere; line-height: 1.45; }
.wpht-ct.wpht-device-mobile .wpht-ct-head { padding: 10px 12px; gap: 8px; flex-wrap: nowrap; }
.wpht-ct.wpht-device-mobile .wpht-ct-head .wpht-ct-vat { order: 1; padding: 4px 4px 4px 10px; font-size: 12px; gap: 6px; }
.wpht-ct.wpht-device-mobile .wpht-ct-head .wpht-ct-title { order: 2; text-align: center; font-size: 16px; }
.wpht-ct.wpht-device-mobile .wpht-ct-head .wpht-ct-date { order: 3; font-size: 12px; }
.wpht-ct.wpht-device-mobile .wpht-ct-date-label { display: none; }
.wpht-ct.wpht-device-mobile.has-mobile-date-label .wpht-ct-date-label { display: inline; }
.wpht-ct.wpht-device-mobile .wpht-ct-switch { width: 34px; height: 20px; }
.wpht-ct.wpht-device-mobile .wpht-ct-switch::after { width: 14px; height: 14px; }
.wpht-ct.wpht-device-mobile .wpht-ct-vat input:checked + .wpht-ct-switch::after { inset-inline-start: calc(100% - 17px); }
.wpht-ct.wpht-device-mobile .wpht-mt-wrap { border: 0; padding: 4px 8px 8px; }
.wpht-ct.wpht-device-mobile .wpht-mt-table { border-collapse: separate; border-spacing: 0; }
.wpht-ct.wpht-device-mobile .wpht-mt-table th,
.wpht-ct.wpht-device-mobile .wpht-mt-table td { border-bottom: 0; padding: 12px 6px; font-size: 13.5px; }
.wpht-ct.wpht-device-mobile .wpht-mt-table thead th { background: var(--wpht-thead-bg, transparent) !important; color: var(--wpht-thead-color, #1f2433) !important; font-size: 13.5px; font-weight: 700; padding-top: 12px; padding-bottom: 12px; }
.wpht-ct.wpht-device-mobile .wpht-mt-row.is-even > td { background: var(--wpht-ct-stripe, #f1f3f7); }
.wpht-ct.wpht-device-mobile .wpht-mt-row > td:first-child { border-start-start-radius: 10px; border-end-start-radius: 10px; }
.wpht-ct.wpht-device-mobile .wpht-mt-row > td:last-child { border-start-end-radius: 10px; border-end-end-radius: 10px; }
.wpht-ct.wpht-device-mobile .wpht-mt-table td.wpht-mt-name { font-weight: 600; }
.wpht-ct.wpht-device-mobile .wpht-ct-more-wrap { padding-top: 12px; }
.wpht-ct.wpht-device-mobile .wpht-ct-more { width: 100%; }
.wpht-ct.wpht-device-mobile .wpht-ct-more-text.is-desktop { display: none; }
.wpht-ct.wpht-device-mobile .wpht-ct-more-text.is-mobile { display: inline; }

@media (max-width: 380px) {
	.wpht-ct .wpht-ct-tab { font-size: 12px; }
	.wpht-ct .wpht-ct-head .wpht-ct-vat .wpht-ct-vat-text { font-size: 11px; }
	.wpht-ct .wpht-ct-head .wpht-ct-title { font-size: 15px; }
}
@media print {
	.wpht-ct-nav, .wpht-ct-more-wrap, .wpht-ct-vat { display: none !important; }
	.wpht-ct-panel[hidden] { display: block !important; }
}
.wpht-ct.wpht-comparison-wrap { margin-bottom: 0; }
.wpht-ct .wpht-ct-panel.wpht-comparison-table-block { margin: 0; }
.wpht-ct .wpht-ct-cal { width: 18px; height: 18px; }

/* ==== «بازشونده» variant on desktop (.wpht-ctx .wpht-ctx-table): the
   phone-style rows + drawers, laid out for a wide screen. ==== */
.wpht-ctx .wpht-ctx-table { border: 0; padding: 4px 10px 10px; }
.wpht-ctx .wpht-ctx-table .wpht-mt-table { width: 100%; margin: 0; border: 0; border-collapse: separate; border-spacing: 0; }
.wpht-ctx .wpht-ctx-table .wpht-mt-table th,
.wpht-ctx .wpht-ctx-table .wpht-mt-table td { border: 0; padding: 13px 12px; font-size: 14px; text-align: center; vertical-align: middle; background: none; }
.wpht-ctx .wpht-ctx-table .wpht-mt-table thead th {
	background: var(--wpht-thead-bg, transparent) !important;
	color: var(--wpht-thead-color, #4b5563) !important;
	font-size: 13px; font-weight: 700; white-space: nowrap; border-bottom: 1px solid #eef0f4;
}
.wpht-ctx .wpht-ctx-table .wpht-mt-table .wpht-mt-name { text-align: start; padding-inline-start: 14px; white-space: normal; }
.wpht-ctx .wpht-ctx-table .wpht-mt-table td.wpht-mt-name { font-weight: 600; }
.wpht-ctx .wpht-ctx-table td:not(.wpht-mt-name) { color: var(--wpht-attr-color, inherit); white-space: nowrap; }
.wpht-ctx .wpht-ctx-table .wpht-mt-icon-cell { width: 44px; }
.wpht-ctx .wpht-ctx-table .wpht-mt-row.is-even > td { background: var(--wpht-ct-stripe); }
.wpht-ctx .wpht-ctx-table .wpht-mt-row > td:first-child { border-start-start-radius: 10px; border-end-start-radius: 10px; }
.wpht-ctx .wpht-ctx-table .wpht-mt-row > td:last-child { border-start-end-radius: 10px; border-end-end-radius: 10px; }
.wpht-ctx .wpht-ctx-table .wpht-mt-row.has-drawer:hover > td { background: var(--wpht-primary-light); }
.wpht-ctx .wpht-ctx-table .wpht-mt-row.is-open > td { background: var(--wpht-primary-light); border-end-start-radius: 0; border-end-end-radius: 0; }
.wpht-ctx .wpht-ctx-table .wpht-m-chevron { display: inline-flex; transition: transform .2s ease; }
.wpht-ctx .wpht-ctx-table .wpht-mt-row.is-open .wpht-m-chevron { transform: rotate(180deg); }
.wpht-ctx .wpht-ctx-table tr.wpht-mt-drawer > td { background: var(--wpht-primary-light); padding: 0 12px 12px; text-align: start; border-end-start-radius: 10px; border-end-end-radius: 10px; }
.wpht-ctx .wpht-ctx-table .wpht-mt-drawer-inner {
	display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 24px;
	background: #fff; border-radius: 8px; padding: 6px 16px;
}
.wpht-ctx .wpht-ctx-table .wpht-mt-drawer-inner .wpht-m-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; font-size: 13.5px; border-top: 0; border-bottom: 1px dashed #e9edf2; }
.wpht-ctx .wpht-ctx-table .wpht-m-label { color: #6b7280; }
.wpht-ctx .wpht-ctx-table .wpht-m-value { font-weight: 600; text-align: end; }
.wpht-ctx .wpht-ctx-table .wpht-mt-drawer[hidden] { display: none; }
@media print { .wpht-ctx .wpht-ctx-table .wpht-mt-drawer { display: table-row !important; } }

/* ---- Every other row tinted on phones too (table + cards) ---- */
.wpht-mt-row.is-even > td,
.wpht-mt-row.is-even + .wpht-mt-drawer > td { background: var(--wpht-stripe-bg, #edf1f6); }
.wpht-mt-row.is-open > td,
.wpht-mt-row.is-open + .wpht-mt-drawer > td { background: var(--wpht-row-hover, var(--wpht-primary-light)); }
.wpht-m-card.is-even { background: var(--wpht-stripe-bg, #edf1f6); }
