.fmpanel {
	--fm-accent: #e85941;
	--fm-accent-soft: rgba(232, 89, 65, 0.1);
	--fm-dark: #2e3f50;
	--fm-dark-deep: #1a2832;
	--fm-text: #18191d;
	--fm-muted: #6b7a88;
	--fm-line: rgba(46, 63, 80, 0.1);
	--fm-radius: 18px;
	--fm-ease: 0.32s cubic-bezier(0.22, 1, 0.36, 1);
	width: 100%;
	max-width: var(--fm-site);
	margin: 0 auto;
	padding: 1.5rem var(--fm-page-gutter) 3rem;
	font-family: "Yekan Bakh", Tahoma, sans-serif;
	direction: rtl;
	color: var(--fm-text);
	box-sizing: border-box;
}

.fmpanel *,
.fmpanel *::before,
.fmpanel *::after {
	box-sizing: border-box;
}

.fmpanel__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	padding: 0.72rem 1.1rem;
	border-radius: 10px;
	font: inherit;
	font-size: 0.88rem;
	font-weight: 700;
	text-decoration: none;
	border: 1px solid transparent;
	cursor: pointer;
	transition: all var(--fm-ease);
}

.fmpanel__btn--primary {
	background: var(--fm-accent);
	color: #fff !important;
	box-shadow: 0 8px 20px rgba(232, 89, 65, 0.22);
}

.fmpanel__btn--primary:hover {
	background: #d14a34;
	color: #fff !important;
}

.fmpanel__btn--ghost {
	background: #fff;
	color: var(--fm-dark) !important;
	border-color: var(--fm-line);
}

.fmpanel__btn--ghost:hover {
	border-color: rgba(232, 89, 65, 0.35);
	color: var(--fm-accent) !important;
}

.fmpanel__btn--cta {
	background: var(--fm-accent);
	color: #fff !important;
	box-shadow: 0 8px 20px rgba(232, 89, 65, 0.22);
	white-space: nowrap;
}

.fmpanel__btn--cta:hover {
	background: #d14a34;
	color: #fff !important;
	transform: translateY(-1px);
}

.fmpanel--lookup {
	min-height: min(62vh, 580px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding-block: 2rem 3rem;
}

.fmpanel__lookup-card {
	width: min(100%, 520px);
	padding: 1.75rem 1.4rem 1.6rem;
	border-radius: calc(var(--fm-radius) + 4px);
	border: 1px solid var(--fm-line);
	background:
		radial-gradient(circle at 100% 0%, rgba(232, 89, 65, 0.1), transparent 42%),
		linear-gradient(145deg, rgba(46, 63, 80, 0.04), rgba(255, 255, 255, 0.96));
	box-shadow: 0 10px 30px rgba(24, 25, 29, 0.04);
}

.fmpanel__eyebrow {
	display: inline-block;
	margin-bottom: 0.5rem;
	font-size: 0.78rem;
	font-weight: 700;
	color: var(--fm-accent);
	letter-spacing: 0.02em;
}

.fmpanel__title {
	margin: 0 0 0.75rem;
	font-size: clamp(1.5rem, 3vw, 2rem);
	line-height: 1.45;
	color: var(--fm-dark);
}

.fmpanel__lead {
	margin: 0;
	max-width: 58ch;
	font-size: 0.95rem;
	line-height: 1.9;
	color: var(--fm-muted);
}

.fmpanel__lookup-card .fmpanel__lead {
	margin-bottom: 1.25rem;
}

.fmpanel__label {
	display: block;
	margin-bottom: 0.35rem;
	font-size: 0.84rem;
	font-weight: 600;
	color: var(--fm-dark);
}

.fmpanel__lookup-row {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.65rem;
}

.fmpanel__input {
	width: 100%;
	padding: 0.85rem 1rem;
	border: 1px solid var(--fm-line);
	border-radius: 10px;
	background: #f8fafc;
	font: inherit;
	font-size: 1rem;
	color: var(--fm-dark);
	letter-spacing: 0.04em;
	transition: border-color var(--fm-ease), box-shadow var(--fm-ease), background var(--fm-ease);
}

.fmpanel__input:focus {
	outline: none;
	border-color: rgba(232, 89, 65, 0.55);
	background: #fff;
	box-shadow: 0 0 0 4px rgba(232, 89, 65, 0.12);
}

.fmpanel__hint {
	margin: 0.75rem 0 0;
	font-size: 0.8rem;
	line-height: 1.7;
	color: var(--fm-muted);
}

.fmpanel__status {
	margin: 0.85rem 0 0;
	padding: 0.7rem 0.85rem;
	border-radius: 10px;
	font-size: 0.86rem;
	line-height: 1.7;
}

.fmpanel__status.is-error {
	background: #fff1f0;
	color: #b42318;
	border: 1px solid rgba(180, 35, 24, 0.15);
}

.fmpanel__status.is-success {
	background: #ecfdf3;
	color: #027a48;
	border: 1px solid rgba(2, 122, 72, 0.15);
}

.fmpanel__breadcrumb {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem;
	margin-bottom: 1.5rem;
	font-size: 0.82rem;
	color: var(--fm-muted);
}

.fmpanel__breadcrumb a {
	color: var(--fm-muted);
	text-decoration: none;
	transition: color var(--fm-ease);
}

.fmpanel__breadcrumb a:hover {
	color: var(--fm-accent);
}

.fmpanel__breadcrumb span:last-child {
	color: var(--fm-dark);
	font-weight: 600;
}

.fmpanel__bc-sep {
	opacity: 0.45;
}

.fmpanel__hero {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
	margin-bottom: 2rem;
}

.fmpanel__gallery {
	display: grid;
	gap: 0.85rem;
}

.fmpanel__gallery-main {
	position: relative;
	border-radius: var(--fm-radius);
	overflow: hidden;
	background: linear-gradient(145deg, #f8fafc, #eef2f6);
	border: 1px solid var(--fm-line);
	display: block;
}

.fmpanel__gallery--multi .fmpanel__gallery-main {
	aspect-ratio: 16 / 10;
	display: flex;
	align-items: center;
	justify-content: center;
}

.fmpanel__gallery-main--placeholder {
	background: linear-gradient(135deg, rgba(232, 89, 65, 0.06), transparent 55%), #f1f5f9;
	min-height: 220px;
}

.fmpanel__gallery-hero {
	display: block;
	width: 100%;
	height: auto;
	object-fit: contain;
	object-position: center;
}

.fmpanel__gallery--multi .fmpanel__gallery-hero {
	height: 100%;
	object-fit: cover;
}

.fmpanel__gallery-thumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem;
}

.fmpanel__gallery-thumb {
	padding: 0;
	border: 2px solid transparent;
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
	cursor: pointer;
	transition: border-color var(--fm-ease), transform 0.2s ease;
}

.fmpanel__gallery-thumb.is-active,
.fmpanel__gallery-thumb:hover {
	border-color: var(--fm-accent);
}

.fmpanel__gallery-thumb img {
	display: block;
	width: 72px;
	height: 72px;
	object-fit: cover;
}

.fmpanel__layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
	align-items: start;
}

.fmpanel__aside {
	display: grid;
	gap: 1rem;
}

.fmpanel__meta-box,
.fmpanel__cta-box {
	padding: 1.25rem;
	border-radius: var(--fm-radius);
	border: 1px solid var(--fm-line);
	background: #fff;
	box-shadow: 0 10px 30px rgba(24, 25, 29, 0.04);
}

.fmpanel__meta-title,
.fmpanel__section-title {
	margin: 0 0 1rem;
	font-size: 1rem;
	font-weight: 700;
	color: var(--fm-dark);
}

.fmpanel__meta-row {
	display: grid;
	gap: 0.25rem;
	padding: 0.75rem 0;
	border-bottom: 1px solid var(--fm-line);
}

.fmpanel__meta-row:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.fmpanel__meta-label {
	font-size: 0.78rem;
	font-weight: 700;
	color: var(--fm-accent);
}

.fmpanel__meta-value {
	font-size: 0.9rem;
	line-height: 1.7;
	color: var(--fm-dark);
	word-break: break-word;
}

.fmpanel__cta-box {
	display: grid;
	gap: 0.65rem;
}

.fmpanel__cta-box .fmpanel__btn {
	width: 100%;
}

.fmpanel__section {
	margin-top: 2rem;
}

.fmpanel__section--first {
	margin-top: 0;
}

.fmpanel__content {
	font-size: 0.95rem;
	line-height: 1.95;
	color: var(--fm-text);
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.fmpanel__content p {
	margin: 0 0 1rem;
}

.fmpanel__content img {
	max-width: 100%;
	height: auto;
	border-radius: 12px;
}

.fmpanel__content table {
	width: 100%;
	min-width: 480px;
	border-collapse: collapse;
	margin: 1rem 0;
}

.fmpanel__equip {
	border: 1px solid var(--fm-line);
	border-radius: var(--fm-radius);
	overflow: hidden;
	background: #fff;
	box-shadow: 0 10px 30px rgba(24, 25, 29, 0.04);
}

.fmpanel__equip-head,
.fmpanel__equip-row {
	display: grid;
	grid-template-columns: 1.4fr 1fr 0.7fr;
	gap: 0.75rem;
	padding: 0.8rem 1rem;
	border-bottom: 1px solid var(--fm-line);
}

.fmpanel__equip-row:last-child {
	border-bottom: 0;
}

.fmpanel__equip-head {
	background: linear-gradient(145deg, rgba(46, 63, 80, 0.06), rgba(255, 255, 255, 0.9));
	font-size: 0.84rem;
	font-weight: 700;
	color: var(--fm-dark);
}

.fmpanel__equip-row {
	font-size: 0.9rem;
	color: var(--fm-text);
}

.fmpanel__equip-row:nth-child(even) {
	background: #f8fafc;
}

.fmpanel__docs {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.75rem;
}

.fmpanel__doc {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	width: 100%;
	padding: 0.95rem 1rem;
	border: 1px solid var(--fm-line);
	border-radius: var(--fm-radius);
	background: #fff;
	text-align: right;
	cursor: pointer;
	font: inherit;
	box-shadow: 0 8px 24px rgba(24, 25, 29, 0.04);
	transition: border-color var(--fm-ease), transform var(--fm-ease), box-shadow var(--fm-ease);
}

.fmpanel__doc:hover {
	border-color: rgba(232, 89, 65, 0.35);
	transform: translateY(-2px);
	box-shadow: 0 16px 36px rgba(24, 25, 29, 0.08);
}

.fmpanel__doc-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 48px;
	height: 48px;
	border-radius: 12px;
	background: var(--fm-dark);
	color: #fff;
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.04em;
}

.fmpanel__doc-body {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}

.fmpanel__doc-body strong {
	color: var(--fm-dark);
	font-size: 0.95rem;
}

.fmpanel__doc-body em {
	font-style: normal;
	font-size: 0.8rem;
	color: var(--fm-muted);
}

.fmpanel__pdf-dialog {
	width: min(960px, calc(100vw - 2rem));
	max-width: 960px;
	height: min(86vh, 860px);
	padding: 0;
	border: 0;
	border-radius: 16px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 24px 60px rgba(24, 25, 29, 0.28);
}

.fmpanel__pdf-dialog::backdrop {
	background: rgba(26, 40, 50, 0.55);
	backdrop-filter: blur(3px);
}

.fmpanel__pdf-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.85rem 1rem;
	border-bottom: 1px solid var(--fm-line);
	background: #f8fafc;
}

.fmpanel__pdf-bar strong {
	font-size: 0.92rem;
	color: var(--fm-dark);
}

.fmpanel__pdf-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
}

.fmpanel__pdf-frame {
	display: block;
	width: 100%;
	height: calc(100% - 62px);
	border: 0;
	background: #eef2f6;
}

@media (min-width: 640px) {
	.fmpanel__lookup-row {
		grid-template-columns: 1fr auto;
	}

	.fmpanel__docs {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 768px) {
	.fmpanel__hero {
		grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
		align-items: center;
	}
}

@media (min-width: 992px) {
	.fmpanel__layout {
		grid-template-columns: minmax(0, 1fr) 320px;
	}

	.fmpanel__lookup-card {
		padding: 2rem 1.75rem 1.85rem;
	}
}

@media (max-width: 575px) {
	.fmpanel {
		padding: 1.15rem var(--fm-page-gutter) 2.5rem;
	}

	.fmpanel__gallery-thumb img {
		width: 56px;
		height: 56px;
	}

	.fmpanel__meta-box,
	.fmpanel__cta-box {
		padding: 1.1rem;
	}

	.fmpanel__equip-head,
	.fmpanel__equip-row {
		grid-template-columns: 1.2fr 0.9fr 0.6fr;
		gap: 0.4rem;
		padding: 0.7rem 0.75rem;
		font-size: 0.8rem;
	}
}

.elementor-widget-shortcode:has(.fmpanel),
.elementor-widget-shortcode:has(.fmpanel) .elementor-widget-container,
.elementor-element:has(.fmpanel) {
	width: 100% !important;
	max-width: 100% !important;
	height: auto !important;
	min-height: 0 !important;
	align-self: stretch !important;
}

body.fm-panel-lookup-page .page-header,
body.fm-panel-lookup-page .entry-header,
body.fm-panel-lookup-page .entry-title,
body.fm-panel-lookup-page h1.entry-title,
body.fm-panel-lookup-page .elementor-page-title,
body.fm-panel-lookup-page .elementor-widget-theme-page-title {
	display: none !important;
}
