.mhs {
	--mhs-ink: #102847;
	--mhs-navy: #102d53;
	--mhs-blue: #205bb0;
	--mhs-light: #eaf3ff;
	--mhs-border: #d1dfef;
	--mhs-muted: #405976;
	--mhs-page: #f5f9ff;
	--mhs-white: #fff;
	--mhs-font: IRANYekanX, IRANYekan, MahamirYekan, sans-serif;
	direction: rtl;
	text-align: start;
	color: var(--mhs-ink);
	font: 400 16px/1.8 var(--mhs-font);
	max-inline-size: 1140px;
	inline-size: 100%;
	min-inline-size: 0;
	margin: 22px auto 38px;
	padding: clamp(12px, 3vw, 28px);
	background: var(--mhs-page);
	border: 1px solid var(--mhs-border);
	border-radius: 20px;
}

.mhs.mhs-admin {
	inline-size: auto;
	margin: 18px 0 24px;
}

.mhs-woodmart-portal .main-page-wrapper > .page-title,
.mhs-woodmart-portal :is(.sidebar-container, .woodmart-sidebar, #secondary).wd-sidebar {
	display: none;
}
.mhs-woodmart-portal .main-page-wrapper .site-content {
	flex: 0 0 100%;
	inline-size: 100%;
	max-inline-size: 100%;
}

.mhs.mhs-portal {
	background: #f5f9ff;
	border-radius: 16px;
}
.mhs-portal-nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 18px;
	padding-block-end: 12px;
	margin-block-end: 16px;
	border-block-end: 1px solid var(--mhs-border);
}
.mhs .mhs-portal-home { color: var(--mhs-navy); font-weight: 800; text-decoration: none; }
.mhs-portal-nav > div { display: flex; flex-wrap: wrap; gap: 4px; }
.mhs .mhs-portal-nav a {
	display: inline-flex;
	align-items: center;
	min-block-size: 44px;
	padding-inline: 10px;
	text-decoration: none;
	border-radius: 6px;
}
.mhs .mhs-portal-nav a:is(:hover,[aria-current]) { background: var(--mhs-light); color: var(--mhs-navy); }

.mhs, .mhs * { box-sizing: border-box; }
.mhs :is(h1,h2,h3,p,ul,dl,dd) { margin: 0; }
.mhs :is(h1,h2,h3,p,label,small,summary,button,input,select,textarea,a,span,time,strong) {
	font-family: var(--mhs-font);
	letter-spacing: normal;
}
.mhs :is(h1,h2,h3) { line-height: 1.5; font-weight: 800; color: inherit; overflow-wrap: anywhere; }
.mhs h2 { font-size: clamp(21px, 2.25vw, 29px); }
.mhs h3 { font-size: 19px; }
.mhs :is(a, button, input, textarea, select, summary):focus-visible { outline: 3px solid #2c68c4; outline-offset: 3px; }
.mhs [hidden] { display: none !important; }
.mhs a { color: var(--mhs-blue); }

.mhs-banner {
	position: relative;
	isolation: isolate;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	padding: clamp(22px, 4.7vw, 46px);
	overflow: hidden;
	color: var(--mhs-white);
	background: var(--mhs-navy);
	border-radius: 14px;
}
.mhs-banner::before {
	content: "";
	position: absolute;
	z-index: -1;
	inset-inline-end: -50px;
	inset-block-end: -168px;
	inline-size: 400px;
	block-size: 300px;
	border-radius: 50%;
	box-shadow: 0 0 0 24px #244a77, 0 0 0 49px #1d3e65, 0 0 0 76px #173658;
	pointer-events: none;
}
.mhs-banner-copy { min-inline-size: 0; }
.mhs .mhs-banner :is(h1,h2) { color: #fff; font-size: clamp(24px, 3.2vw, 38px); }
.mhs .mhs-banner p { margin-block-start: 8px; color: #dfedff; font-size: 15px; }
.mhs .mhs-banner a:focus-visible { outline-color: #fff; }
.mhs .mhs-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	max-inline-size: 100%;
	min-block-size: 44px;
	padding: 8px 15px;
	border: 1px solid transparent;
	border-radius: 8px;
	background: var(--mhs-blue);
	color: var(--mhs-white);
	font: 700 14px/1.6 var(--mhs-font);
	text-align: center;
	text-decoration: none;
	text-transform: none;
	white-space: normal;
	cursor: pointer;
	box-shadow: none;
}
.mhs .mhs-button:hover { background: var(--mhs-navy); color: var(--mhs-white); }
.mhs .mhs-on-banner, .mhs .mhs-outline {
	background: var(--mhs-white);
	color: var(--mhs-navy);
	border-color: var(--mhs-border);
}
.mhs .mhs-on-banner:hover, .mhs .mhs-outline:hover { background: var(--mhs-light); color: var(--mhs-navy); }

.mhs-counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 154px), 1fr)); gap: 10px; margin-block: 15px; }
.mhs.mhs-admin .mhs-queue-metrics a { grid-template-columns: 1fr auto; border-block-start: 3px solid #9bbde7; }
.mhs.mhs-admin .mhs-queue-metrics a:first-child { border-block-start-color: var(--mhs-blue); }
.mhs .mhs-counts a {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 9px;
	min-block-size: 62px;
	padding: 10px 13px;
	background: var(--mhs-white);
	border: 1px solid var(--mhs-border);
	border-radius: 10px;
	color: var(--mhs-ink);
	text-decoration: none;
	font-size: 14px;
}
.mhs .mhs-counts a:is(:hover,[aria-current]) { background: var(--mhs-light); border-color: #98b7df; }
.mhs-counts strong { font-size: 21px; color: var(--mhs-navy); }
.mhs-shell { background: var(--mhs-white); border: 1px solid var(--mhs-border); border-radius: 13px; min-inline-size: 0; }
.mhs-history-title {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 10px 16px;
	padding: 18px 17px 5px;
}
.mhs-history-title h2 { font-size: clamp(19px, 2.1vw, 25px); }
.mhs .mhs-history :is(.mhs-filters, .mhs-history-title) > :is(br, p:empty) { display: none; }
.mhs-history { padding-block-end: 6px; container-type: inline-size; }
.mhs .mhs-history .mhs-filters {
	display: grid;
	grid-template-columns: minmax(0, 1.45fr) repeat(2, minmax(0, 1fr)) auto;
	align-items: end;
	gap: 12px;
	margin: 0;
	padding: 16px 17px 18px;
}
.mhs .mhs-history .mhs-filters-staff {
	grid-template-columns: minmax(0, 1.45fr) repeat(4, minmax(0, 1fr)) auto;
}
.mhs .mhs-filters .mhs-filter-field {
	display: grid;
	grid-template-rows: auto 48px;
	gap: 5px;
	min-inline-size: 0;
	margin: 0;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.5;
}
.mhs .mhs-history .mhs-filters :is(input[type=search], select, .mhs-button) {
	box-sizing: border-box;
	block-size: 48px;
	min-block-size: 48px;
	margin: 0;
}
.mhs .mhs-filters :is(input[type=search], select) {
	display: block;
	inline-size: 100%;
	padding-block: 0;
	font-size: 14px;
	font-weight: 500;
}
.mhs .mhs-filters select { appearance: auto; background-image: none; padding-inline: 11px; }
.mhs-filter-actions { display: flex; flex-wrap: wrap; gap: 6px; min-inline-size: 0; }
.mhs :is(input:not([type=checkbox],[type=hidden]),textarea,select) {
	inline-size: 100%;
	min-inline-size: 0;
	min-block-size: 44px;
	padding: 7px 11px;
	margin: 0;
	border: 1px solid #9eb3cf;
	border-radius: 8px;
	background: #fff;
	color: var(--mhs-ink);
	font-size: 15px;
	line-height: 1.75;
	box-shadow: none;
}
.mhs select { max-inline-size: 100%; padding-inline-end: 26px; }
.mhs input::placeholder, .mhs textarea::placeholder { color: var(--mhs-muted); opacity: 1; }
.mhs textarea { resize: vertical; }
.mhs input[type=file] { padding: 8px; line-height: 1.5; }
.mhs input[type=file]::file-selector-button { font: inherit; border: 0; background: var(--mhs-light); color: var(--mhs-navy); border-radius: 5px; padding: 4px 8px; }
.mhs .mhs-history .mhs-ticket-table {
	inline-size: 100%;
	margin: 0;
	border: 0;
	border-collapse: collapse;
	table-layout: fixed;
}
.mhs .mhs-ticket-table :is(th, td) {
	padding: 12px clamp(10px, 1.45vw, 18px);
	border: 0;
	border-block-start: 1px solid var(--mhs-border);
	color: var(--mhs-ink);
	text-align: start;
	vertical-align: middle;
	overflow-wrap: anywhere;
	font-size: 14px;
}
.mhs .mhs-ticket-table thead th {
	background: var(--mhs-page);
	color: var(--mhs-muted);
	font-size: 13px;
	font-weight: 700;
	text-transform: none;
}
.mhs .mhs-ticket-heading-topic { inline-size: 30%; }
.mhs .mhs-ticket-row:is(:hover, :focus-within) { background: var(--mhs-page); }
.mhs .mhs-ticket-link {
	display: inline-flex;
	flex-direction: column;
	justify-content: center;
	min-block-size: 44px;
	max-inline-size: 100%;
	color: var(--mhs-navy);
	text-decoration: none;
}
.mhs .mhs-ticket-link:is(:hover, :focus-visible) .mhs-ticket-subject { text-decoration: underline; }
.mhs .mhs-ticket-subject { display: inline-block; align-self: start; unicode-bidi: isolate; font-size: 15px; font-weight: 750; }
.mhs .mhs-ticket-link small { display: block; font-weight: 500; }
.mhs small, .mhs time { color: var(--mhs-muted); font-size: 12px; }
.mhs time { display: inline-block; white-space: normal; direction: ltr; unicode-bidi: isolate; }
.mhs .mhs-mobile-label { display: none; }
.mhs-no-time { color: var(--mhs-muted); font-size: 12px; }
.mhs-state { display: inline-block; padding: 3px 9px; border-radius: 7px; background: #dbeaff; color: #153f76; font-size: 12px; font-weight: 700; }
.mhs-state-customer { background: #e8effa; color: #354f73; }
.mhs-state-closed { background: #eef2f8; color: #425877; }
.mhs-empty { padding: 33px 18px; text-align: center; border-block-start: 1px solid var(--mhs-border); }
.mhs-empty p { color: var(--mhs-muted); margin-block-start: 6px; }
.mhs-pager { display: flex; flex-wrap: wrap; gap: 8px; padding: 13px 16px; }
.mhs-alert { margin-block: 13px !important; padding: 11px 13px; border-inline-start: 4px solid var(--mhs-blue); border-radius: 6px; background: var(--mhs-light); }
.mhs-alert-error { border-inline-start-color: #8c3542; color: #742231; }

.mhs-back { display: inline-flex; align-items: center; min-block-size: 44px; margin-block-end: 5px; }
.mhs-thread-grid { display: grid; grid-template-columns: minmax(0, 2.3fr) minmax(215px, 1fr); gap: 15px; margin-block-start: 15px; align-items: start; }
.mhs-thread { min-inline-size: 0; display: grid; gap: 14px; }
.mhs-compose, .mhs-conversation, .mhs-sidebar { padding: clamp(15px, 2vw, 24px); }
.mhs-new { padding: clamp(16px, 4vw, 40px); }
.mhs-new > :is(header,form) { max-inline-size: 660px; margin-inline: auto; }
.mhs-new > header { margin-block-end: 24px; }
.mhs-new > header p { color: var(--mhs-muted); margin-block-start: 5px; }
.mhs-new .mhs-field { margin-block-end: 20px; }
.mhs-upload { padding: 13px; border: 1px dashed #9eb3cf; border-radius: 9px; background: var(--mhs-page); }
.mhs .mhs-upload input[type=file] { background: transparent; border: 0; }
.mhs-upload-enhanced { position: relative; }
.mhs .mhs-upload-enhanced input[type=file] {
	position: absolute;
	inline-size: 1px;
	block-size: 1px;
	min-block-size: 1px;
	padding: 0;
	opacity: 0;
}
.mhs-upload-enhanced label { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; cursor: pointer; }
.mhs-upload-trigger { display: inline-grid; place-items: center; min-block-size: 44px; padding-inline: 12px; border-radius: 6px; background: var(--mhs-light); color: var(--mhs-navy); }
.mhs-upload-enhanced:focus-within .mhs-upload-trigger { outline: 3px solid #2c68c4; outline-offset: 3px; }
.mhs-upload-name { overflow-wrap: anywhere; text-align: start; }
.mhs-upload-name:empty { display: none; }
.mhs-form-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.mhs-assistant { background: var(--mhs-page); padding-inline: 12px; margin-block: 4px 14px; border: 1px solid var(--mhs-border); border-radius: 8px; }
.mhs-assistant[open] { padding-block-end: 12px; }
.mhs-assistant > p { color: var(--mhs-muted); margin-block-end: 9px; }
.mhs-copy-result { display: inline-block; font-size: 13px; }
.mhs > .mhs-compose, .mhs-settings form > section { margin-block-start: 15px; }
.mhs-settings .mhs-compose > :is(h2,p,form), .mhs-compose > h3 { margin-block-end: 12px; }
.mhs-field { display: grid; gap: 6px; margin-block-end: 14px; font-weight: 700; font-size: 14px; min-inline-size: 0; }
.mhs-field small { font-weight: 400; }
.mhs-form-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 12px; }
.mhs-message { margin-block-start: 12px; padding: 11px 14px; border-inline-start: 3px solid #93accd; border-radius: 7px; background: var(--mhs-page); }
.mhs-message:is(.mhs-message-staff,.mhs-message-telegram) { border-inline-start-color: var(--mhs-blue); background: var(--mhs-light); }
.mhs-message:is(.mhs-message-note,.mhs-message-audit) { border: 1px dashed #839bb8; background: #fff; }
.mhs-message-event { padding-block: 6px; background: #fff; }
.mhs-message-event p { margin: 0; }
.mhs-message header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 5px 12px; font-size: 13px; }
.mhs-message p { white-space: pre-wrap; overflow-wrap: anywhere; margin-block: 5px; text-align: start; }
.mhs-file { display: inline-flex; flex-wrap: wrap; gap: 4px; min-block-size: 44px; align-items: center; overflow-wrap: anywhere; }
.mhs-sidebar dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 9px 12px; margin-block: 12px 18px; font-size: 14px; }
.mhs-sidebar dt { color: var(--mhs-muted); }
.mhs-sidebar dd { overflow-wrap: anywhere; }
.mhs summary { cursor: pointer; font-weight: 700; padding-block: 8px; min-block-size: 44px; }
.mhs-assign { border-block-start: 1px solid var(--mhs-border); margin-block-end: 10px; }
.mhs-assign form { margin-block-end: 12px; }
.mhs-template { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; align-items: end; margin-block-end: 13px; }
.mhs-template label { display: grid; min-inline-size: 0; }
.mhs input.mhs-copy-link { max-inline-size: 650px; }
.mhs-menus { display: flex; flex-wrap: wrap; gap: 7px 16px; margin-block-end: 10px; }
.mhs-checkbox, .mhs-menus label { display: inline-flex; align-items: center; gap: 9px; min-block-size: 44px; }
.mhs input[type=checkbox] { inline-size: 18px; block-size: 18px; margin: 0; accent-color: var(--mhs-blue); }

@media (max-width: 782px) {
	.mhs-thread-grid { display: flex; flex-direction: column; }
	.mhs-sidebar { order: -1; }
	.mhs-thread, .mhs-sidebar { inline-size: 100%; }
}
@container (max-width: 960px) {
	.mhs .mhs-history .mhs-filters-staff { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@container (max-width: 670px) {
	.mhs .mhs-history .mhs-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 14px 12px; }
	.mhs-filter-search, .mhs-filter-actions { grid-column: 1 / -1; }
	.mhs .mhs-filter-actions .mhs-button { flex: 1 1 auto; }
	.mhs .mhs-history .mhs-ticket-table, .mhs .mhs-ticket-table tbody { display: block; }
	.mhs .mhs-ticket-table thead {
		position: absolute;
		inline-size: 1px;
		block-size: 1px;
		clip-path: inset(50%);
		overflow: hidden;
		white-space: nowrap;
	}
	.mhs .mhs-ticket-table tbody { padding-inline: 12px; }
	.mhs .mhs-ticket-table .mhs-ticket-row {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px 12px;
		padding: 10px 12px 12px;
		margin-block-end: 10px;
		border: 1px solid var(--mhs-border);
		border-radius: 9px;
	}
	.mhs .mhs-ticket-table .mhs-ticket-row :is(th, td) {
		display: grid;
		align-content: start;
		justify-items: start;
		gap: 3px;
		min-inline-size: 0;
		padding: 0;
		border: 0;
	}
	.mhs .mhs-ticket-table .mhs-ticket-row .mhs-ticket-topic {
		grid-column: 1 / -1;
		border-block-end: 1px solid var(--mhs-border);
		padding-block-end: 6px;
	}
	.mhs .mhs-ticket-table .mhs-mobile-label { display: inline; color: var(--mhs-muted); font-size: 12px; font-weight: 600; }
}
@media (max-width: 480px) {
	.mhs-counts { grid-template-columns: minmax(0,1fr); gap: 5px; }
	.mhs .mhs-counts a { min-block-size: 48px; padding-block: 4px; }
	.mhs-form-grid { grid-template-columns: minmax(0,1fr); gap: 0; }
	.mhs-template { grid-template-columns: minmax(0,1fr); }
}
