/* Mani_form (com_maniform) — front-end styles. Relies on Bootstrap already
   loaded by the site template for grid/.form-control/.btn/.form-check; this
   file only adds what Mani_form needs on top of that. */

.mf-form-wrap { padding: 32px 0 48px; }

.mf-form {
	background: #fff;
	border-radius: 18px;
	padding: 32px clamp(20px, 4vw, 40px);
	box-shadow: 0 2px 8px rgba(20,30,50,.04), 0 12px 40px rgba(20,30,50,.06);
	border: 1px solid #eef1f5;
}

/* ---- Hero header ---- */
.mf-hero {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	color: #fff;
	padding: 20px;
	background-color: #2d7dd2;
}
.mf-hero-title { font-size: 2.1rem; font-weight: 800; letter-spacing: -.01em; margin: 0 0 10px; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.2); }
.mf-hero-subtitle { font-size: 1.08rem; margin: 0; max-width: 640px; opacity: .95; line-height: 1.6; }

.mf-form-col { padding-top: 4px; }

/* ---- Field labels ---- */
.mf-form .form-label { font-size: .92rem; font-weight: 600; color: #2b3542; margin-bottom: 8px; }

/* ---- Icon-inside-field ----
   The wrap uses CSS *logical* properties (inset-inline-start / padding-inline-start)
   instead of left/right. Logical properties automatically flip with the page's
   dir (ltr/rtl), which is what actually fixes the icon landing on the wrong side
   in Persian — no separate rtl stylesheet needed for the common case. */
.mf-input-icon-wrap { position: relative; }
.mf-field-icon {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	inset-inline-start: 14px;
	width: 21px;
	height: 21px;
	color: #9aa5b3;
	pointer-events: none;
	transition: color .15s ease;
}
.mf-input-icon-wrap .form-control:not(textarea) {
	padding-inline-start: 44px;
	height: 48px;
	border-radius: 11px;
	border: 1.5px solid #e3e7ed;
	font-size: .96rem;
	transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
	background: #fbfcfd;
}
.mf-input-icon-wrap textarea.form-control {
	padding-inline-start: 44px;
	border-radius: 11px;
	border: 1.5px solid #e3e7ed;
	font-size: .96rem;
	transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
	background: #fbfcfd;
}
select.form-control { height: 48px; }
textarea.form-control { height: auto; min-height: 150px; padding-top: 13px; padding-bottom: 13px; resize: none; }

/* ---- File field: fully custom control (icon | filename | button in one flex
   row), with the real <input type=file> layered invisibly on top so a click
   anywhere opens the native picker. This avoids fighting native file-input
   internals with CSS, which is what caused the text/button overlap before. ---- */
.mf-file-wrap {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	height: 48px;
	padding-inline-start: 14px;
	padding-inline-end: 6px;
	border-radius: 11px;
	border: 1.5px solid #e3e7ed;
	background: #fbfcfd;
	cursor: pointer;
}
.mf-file-wrap .mf-field-icon { position: static; flex: none; color: #9aa5b3; }
.mf-file-display {
	flex: 1 1 auto;
	min-width: 0;
	font-size: .88rem;
	color: #9aa5b3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.mf-file-display.mf-file-has-value { color: #40495a; }
.mf-file-btn {
	flex: none;
	color: #2d7dd2;
	background: #eef5fc;
	border-radius: 8px;
	padding: 7px 16px;
	font-weight: 600;
	font-size: .86rem;
}
.mf-file-input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}
.mf-input-icon-wrap.mf-icon-top .mf-field-icon { top: 18px; transform: none; }
.mf-input-icon-wrap:focus-within .mf-field-icon { color: #2d7dd2; }
.mf-form .form-control:hover { border-color: #cfd6e0; }
.mf-form .form-control:focus { background: #fff; }

/* Fields deliberately forced dir="ltr" inside an RTL page (email/phone/number/captcha):
   the icon itself has no dir of its own, so it already inherits the *page's* rtl
   direction and lands on the correct (physical right) side automatically via the
   base rule above — no override needed there.
   The <input>, though, has dir="ltr" explicitly, so ITS padding-inline-start
   resolves against its OWN direction (physical left) instead of the page's —
   that's the one thing that needs a physical, non-logical override here, or the
   reserved space for the icon ends up on the wrong side and the icon overlaps the text. */
[dir="rtl"] .mf-input-icon-wrap.mf-force-ltr .form-control,
[dir="rtl"] .mf-calendar-field .mf-input-icon-wrap .form-control {
	padding-left: 16px;
	padding-right: 44px;
}

.mf-desc { font-size: .84rem; color: #8992a0; margin-top: 6px; }
.mf-error { font-size: .84rem; color: #d64545; margin-top: 6px; font-weight: 500; }
.mf-intro { margin-bottom: 26px; font-size: 1.02rem; line-height: 1.7; color: #40495a; }
.mf-submit-btn {
	padding: 13px 40px;
	font-weight: 700;
	font-size: 1rem;
	border-radius: 12px;
	border: 0;
	box-shadow: 0 6px 18px rgba(45,125,210,.28);
	transition: transform .12s ease, box-shadow .12s ease;
}
.mf-submit-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(45,125,210,.35); }
.mf-submit-btn:active { transform: translateY(0); }

/* ---- Calendar field: "closed" — looks like a normal input, opens a popup on click ---- */
.mf-calendar-field { position: relative; }
.mf-calendar-display { cursor: pointer; background: #fbfcfd; }
.mf-calendar-popup {
	position: absolute;
	z-index: 60;
	top: calc(100% + 8px);
	inset-inline-start: 0;
	width: 320px;
	max-width: 92vw;
	background: #fff;
	border: 1px solid #e2e5ea;
	border-radius: 14px;
	box-shadow: 0 16px 40px rgba(20,30,50,.14);
	padding: 16px;
}
.mf-calendar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; font-weight: 700; }
.mf-calendar-header button { border: 0; background: #f2f4f7; border-radius: 8px; width: 32px; height: 32px; cursor: pointer; font-size: 16px; transition: background .12s ease; }
.mf-calendar-header button:hover { background: #e6ecf3; }
.mf-calendar-header button:disabled { visibility: hidden; }
.mf-calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.mf-calendar-grid-lg .mf-day { padding: 11px 0; font-size: 15px; }
.mf-day {
	border: 0;
	background: transparent;
	border-radius: 9px;
	padding: 9px 0;
	cursor: pointer;
	text-align: center;
	transition: background .12s ease;
}
.mf-day:hover { background: #f0f4fa; }
.mf-day-disabled { color: #ccc; cursor: not-allowed; }
.mf-day-selected { background: #2d7dd2 !important; color: #fff !important; font-weight: 700; }

/* ---- Success / thank-you card ---- */
.mf-success-card {
	max-width: 560px;
	margin: 0 auto;
	text-align: center;
	background: #fff;
	border: 1px solid #eef1f5;
	border-radius: 20px;
	padding: 40px 30px;
	box-shadow: 0 2px 8px rgba(20,30,50,.04), 0 16px 44px rgba(20,30,50,.08);
}
.mf-success-icon { margin-bottom: 14px; }
.mf-success-content { font-size: 1.05rem; line-height: 1.75; margin-bottom: 16px; color: #2b3542; }
.mf-reference-badge {
	display: inline-block;
	background: #eef6fd;
	color: #1f5c8b;
	border: 1px solid #cfe6f7;
	border-radius: 24px;
	padding: 7px 18px;
	font-size: .9rem;
	margin-bottom: 18px;
	font-weight: 600;
}
.mf-success-summary {
	list-style: none;
	padding: 16px 20px;
	margin: 0 0 18px;
	text-align: start;
	background: #f8f9fb;
	border-radius: 14px;
}
.mf-success-summary li { padding: 5px 0; font-size: .92rem; }
.mf-success-note { color: #8992a0; font-size: .85rem; margin-bottom: 18px; }
.mf-btn-outline { border-radius: 24px; padding: 9px 26px; font-weight: 600; }

/* ---- Honeypot: invisible to real visitors, still present in the DOM for bots ---- */
.mf-hp-field {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	inset-inline-start: -9999px;
}

.mf-form-banner {
	background: #fdeeee;
	border: 1px solid #f5c6c6;
	color: #b03636;
	border-radius: 12px;
	padding: 12px 16px;
	margin-bottom: 18px;
	font-size: .92rem;
	font-weight: 500;
}

.mf-captcha-submit-col { display: flex; align-items: flex-end; }
.mf-submit-btn-inline { width: 100%; height: 48px; padding: 0 20px; }
@media (max-width: 767px) {
	.mf-captcha-submit-col { align-items: stretch; }
}

/* ---- Closed-form notice ---- */
.mf-closed-notice { max-width: 560px; margin: 0 auto; text-align: center; border-radius: 14px; padding: 18px 20px; }
.mf-closed-card {
	max-width: 520px;
	margin: 0 auto;
	text-align: center;
	background: linear-gradient(180deg, #fffaf0, #fff);
	border: 1px solid #f3e2bd;
	border-radius: 20px;
	padding: 36px 28px;
	box-shadow: 0 2px 8px rgba(20,30,50,.04), 0 16px 40px rgba(20,30,50,.06);
}
.mf-closed-icon { margin-bottom: 14px; }
.mf-closed-text { font-size: 1.02rem; line-height: 1.8; color: #6b5527; font-weight: 500; }

/* ---- Layout modes (contact-page use) ---- */
.mf-layout-two_col { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.mf-layout-two_col .mf-contact-col { flex: 1 1 320px; min-width: 280px; }
.mf-layout-two_col .mf-form-col { flex: 1 1 380px; min-width: 280px; }
.mf-contact-block { margin-bottom: 24px; }

/* ---- Google map embed ---- */
.mf-map-embed { margin-top: 28px; border-radius: 16px; overflow: hidden; box-shadow: 0 2px 8px rgba(20,30,50,.06); }
.mf-map-embed iframe { width: 100%; height: var(--mf-map-h-desktop, 400px); border: 0; display: block; }
@media (max-width: 767px) {
	.mf-map-embed iframe { height: var(--mf-map-h-mobile, 250px); }
}

/* ---- Phone with embedded, searchable country picker ---- */
.mf-tel-wrap-embedded { position: relative; }
/* .mf-input-icon-wrap.mf-tel-wrap-embedded (both classes on the same element)
   is used here specifically to out-rank the base ".mf-input-icon-wrap .form-control"
   rule, which otherwise wins on specificity and silently overrides this padding —
   the same class of bug that hit the textarea earlier. */
.mf-input-icon-wrap.mf-tel-wrap-embedded .form-control { padding-inline-start: 96px; }
[dir="rtl"] .mf-input-icon-wrap.mf-tel-wrap-embedded .form-control { padding-left: 16px; padding-right: 96px; }

.mf-cc-picker {
	position: absolute;
	top: 0;
	inset-inline-start: 0;
	height: 48px;
	z-index: 5;
	display: flex;
	align-items: center;
}
[dir="rtl"] .mf-cc-picker { inset-inline-start: auto; right: 0; }
.mf-cc-picker::after {
	content: "";
	width: 1px;
	height: 22px;
	background: #dde2e8;
	margin-inline-start: 4px;
}
.mf-cc-toggle {
	height: 48px;
	display: flex;
	align-items: center;
	gap: 5px;
	padding: 0 10px 0 14px;
	border: 0;
	background: transparent;
	cursor: pointer;
	color: #40495a;
	font-size: .88rem;
}
.mf-cc-flag { font-size: 1.15rem; line-height: 1; }
.mf-cc-code { font-family: monospace; }
.mf-cc-panel {
	display: none;
	position: absolute;
	top: calc(100% + 6px);
	inset-inline-start: 0;
	width: 280px;
	max-width: 88vw;
	background: #fff;
	border: 1px solid #e2e5ea;
	border-radius: 14px;
	box-shadow: 0 16px 40px rgba(20,30,50,.14);
	padding: 10px;
	z-index: 60;
}
.mf-cc-panel.mf-cc-open { display: block; }
.mf-cc-search {
	width: 100%;
	padding: 8px 12px;
	border: 1px solid #e3e7ed;
	border-radius: 8px;
	margin-bottom: 8px;
	font-size: .9rem;
}
.mf-cc-list { max-height: 240px; overflow-y: auto; }
.mf-cc-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 7px 8px;
	border-radius: 8px;
	cursor: pointer;
	font-size: .88rem;
}
.mf-cc-item:hover { background: #f2f6fb; }
.mf-cc-item .mf-cc-flag { font-size: 1.1rem; }
.mf-cc-item .mf-cc-name { flex: 1 1 auto; color: #40495a; }
.mf-cc-item .mf-cc-dial { color: #9aa5b3; font-family: monospace; font-size: .82rem; }

/* ---- Hero parallax ---- */
.mf-hero-text { position: relative; will-change: transform; }

/* ---- Conditional fields ---- */
.mf-field-col[data-cond-field] { display: none; }
.mf-field-col[data-cond-field].mf-cond-visible { display: block; }
