/* NM Booking – استایل فرانت (همه‌چیز زیر .nmb اسکوپ شده است) */

@font-face {
	font-family: 'NMB Yekan Bakh';
	src: url('../fonts/yekanbakh-400.woff') format('woff');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'NMB Yekan Bakh';
	src: url('../fonts/yekanbakh-500.woff') format('woff');
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'NMB Yekan Bakh';
	src: url('../fonts/yekanbakh-700.woff') format('woff');
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

.nmb {
	--nmb-p: #1f2a44;
	--nmb-p-rgb: 31, 42, 68;
	--nmb-a: #b8975a;
	--nmb-a-rgb: 184, 151, 90;
	--nmb-bg: #f6f7fa;
	--nmb-card: #ffffff;
	--nmb-text: #1b2236;
	--nmb-muted: #6b7388;
	--nmb-line: rgba(var(--nmb-p-rgb), .10);
	--nmb-ok: #1f8a5b;
	--nmb-bad: #c0392b;
	--nmb-r: 18px;

	box-sizing: border-box;
	max-width: 1040px;
	margin: 0 auto;
	padding: 8px 0 24px;
	color: var(--nmb-text);
	font-family: 'NMB Yekan Bakh', Tahoma, sans-serif;
	font-size: 15px;
	line-height: 1.9;
	text-align: right;
	-webkit-text-size-adjust: 100%;
}
.nmb.nmb--themefont { font-family: inherit; }
.nmb *, .nmb *::before, .nmb *::after { box-sizing: border-box; }
.nmb button, .nmb input, .nmb textarea { font-family: inherit; font-size: inherit; }
.nmb h2, .nmb h3, .nmb h4, .nmb p, .nmb ul, .nmb ol, .nmb dl, .nmb dd { margin: 0; padding: 0; }
.nmb ul, .nmb ol { list-style: none; }
.nmb button { cursor: pointer; }
.nmb button:disabled { cursor: not-allowed; }

/* ---------- سربرگ ---------- */
.nmb-head { margin-bottom: 22px; }
.nmb-title { font-size: 28px; font-weight: 700; line-height: 1.5; color: var(--nmb-p); }
.nmb-title::after { content: ''; display: block; width: 54px; height: 4px; margin-top: 10px; border-radius: 4px; background: var(--nmb-a); }
.nmb-sub { margin-top: 12px; color: var(--nmb-muted); max-width: 640px; }

/* ---------- کارت ---------- */
.nmb-card {
	background: var(--nmb-card);
	border: 1px solid var(--nmb-line);
	border-radius: var(--nmb-r);
	padding: 24px;
	box-shadow: 0 1px 2px rgba(var(--nmb-p-rgb), .04), 0 12px 32px -16px rgba(var(--nmb-p-rgb), .18);
}
.nmb-h { font-size: 19px; font-weight: 700; margin-bottom: 18px; color: var(--nmb-p); }
.nmb-muted { color: var(--nmb-muted); }
.nmb-loading, .nmb-empty { text-align: center; color: var(--nmb-muted); padding: 40px 24px; }

/* ---------- گام‌ها ---------- */
.nmb-steps { display: flex; gap: 0; margin: 0 0 18px; padding: 0; counter-reset: none; }
.nmb-step { flex: 1; position: relative; text-align: center; }
.nmb-step::before {
	content: ''; position: absolute; top: 17px; left: 50%; width: 100%; height: 2px;
	background: var(--nmb-line); z-index: 0;
}
.nmb-step:first-child::before { display: none; }
.nmb-step.is-done::before, .nmb-step.is-active::before { background: var(--nmb-a); }
.nmb-step > span, .nmb-step > button {
	position: relative; z-index: 1; display: inline-flex; flex-direction: column; align-items: center; gap: 6px;
	background: none; border: 0; padding: 0; color: var(--nmb-muted);
}
.nmb-step-dot {
	display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px;
	border-radius: 50%; background: #fff; border: 2px solid var(--nmb-line); font-weight: 700; font-size: 14px;
	transition: all .2s ease;
}
.nmb-step.is-active .nmb-step-dot { background: var(--nmb-p); border-color: var(--nmb-p); color: #fff; box-shadow: 0 0 0 5px rgba(var(--nmb-p-rgb), .10); }
.nmb-step.is-done .nmb-step-dot { background: var(--nmb-a); border-color: var(--nmb-a); color: #fff; }
.nmb-step-label { font-size: 13px; font-weight: 500; }
.nmb-step.is-active .nmb-step-label { color: var(--nmb-p); font-weight: 700; }
.nmb-step.is-done .nmb-step-label { color: var(--nmb-text); }
.nmb-step > button:hover .nmb-step-dot { transform: translateY(-1px); }

/* ---------- چیدمان ---------- */
.nmb-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.nmb-layout.is-single { grid-template-columns: minmax(0, 1fr); }
.nmb-aside { position: sticky; top: 24px; }

.nmb-alert {
	background: #fdecea; color: #8e2a1f; border: 1px solid #f5c6c0; border-radius: 12px;
	padding: 12px 16px; margin-bottom: 14px; font-weight: 500;
}

/* ---------- خدمات ---------- */
.nmb-services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.nmb-service {
	position: relative; display: flex; align-items: flex-start; gap: 14px; text-align: right; width: 100%;
	background: #fff; border: 1.5px solid var(--nmb-line); border-radius: 16px; padding: 18px; color: inherit;
	transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.nmb-service:hover { transform: translateY(-2px); border-color: rgba(var(--nmb-a-rgb), .8); box-shadow: 0 14px 28px -16px rgba(var(--nmb-p-rgb), .35); }
.nmb-service.is-selected { border-color: var(--nmb-a); background: rgba(var(--nmb-a-rgb), .07); }
.nmb-service-icon {
	flex: none; display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px;
	border-radius: 14px; background: rgba(var(--nmb-p-rgb), .07); color: var(--nmb-p); font-size: 26px; line-height: 1;
}
.nmb-service-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.nmb-service-body strong { font-size: 16.5px; font-weight: 700; color: var(--nmb-p); line-height: 1.6; }
.nmb-service-body small { color: var(--nmb-muted); font-size: 13.5px; line-height: 1.8; }
.nmb-service-arrow { align-self: center; color: var(--nmb-a); opacity: 0; transform: translateX(6px); transition: all .18s ease; }
.nmb-service:hover .nmb-service-arrow { opacity: 1; transform: none; }
.nmb-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.nmb-chip {
	display: inline-flex; align-items: center; gap: 5px; padding: 3px 11px; border-radius: 999px;
	background: rgba(var(--nmb-p-rgb), .06); color: var(--nmb-p); font-size: 12.5px; font-weight: 500;
}
.nmb-chip--price { background: rgba(var(--nmb-a-rgb), .16); }

/* ---------- تقویم و ساعت ---------- */
.nmb-time-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 26px; align-items: start; }
.nmb-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.nmb-cal-title { font-weight: 700; font-size: 17px; color: var(--nmb-p); }
.nmb-icon-btn {
	width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
	border-radius: 12px; border: 1px solid var(--nmb-line); background: #fff; color: var(--nmb-p); transition: all .15s;
}
.nmb-icon-btn:hover:not(:disabled) { background: var(--nmb-p); color: #fff; border-color: var(--nmb-p); }
.nmb-icon-btn:disabled { opacity: .35; }
.nmb-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; transition: opacity .15s; }
.nmb-cal-grid.is-loading { opacity: .45; pointer-events: none; }
.nmb-cal-dow { text-align: center; font-size: 12.5px; font-weight: 700; color: var(--nmb-muted); padding: 4px 0 6px; }
.nmb-cal-empty { aspect-ratio: 1; }
.nmb-day {
	position: relative; aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
	border-radius: 12px; border: 1.5px solid transparent; background: transparent; color: var(--nmb-muted);
	font-weight: 500; font-size: 15px; line-height: 1.2; padding: 0; transition: all .15s ease;
}
.nmb-day i { font-style: normal; font-size: 10px; margin-top: 2px; }
.nmb-day--open { background: rgba(var(--nmb-p-rgb), .06); color: var(--nmb-p); font-weight: 700; }
.nmb-day--open:hover { border-color: var(--nmb-a); background: rgba(var(--nmb-a-rgb), .14); transform: translateY(-1px); }
.nmb-day--full { background: rgba(var(--nmb-bad-rgb, 192, 57, 43), .07); color: #b45b52; text-decoration: line-through; text-decoration-thickness: 1px; }
.nmb-day--full i { text-decoration: none; }
.nmb-day--closed, .nmb-day--past, .nmb-day--out { opacity: .38; }
.nmb-day.is-today { box-shadow: inset 0 0 0 1.5px rgba(var(--nmb-a-rgb), .9); }
.nmb-day.is-selected, .nmb-day.is-selected:hover { background: var(--nmb-p); color: #fff; border-color: var(--nmb-p); transform: none; }
.nmb-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px; font-size: 12.5px; color: var(--nmb-muted); }
.nmb-legend span { display: inline-flex; align-items: center; gap: 6px; }
.nmb-dot { width: 10px; height: 10px; border-radius: 4px; display: inline-block; }
.nmb-dot--open { background: rgba(var(--nmb-p-rgb), .25); }
.nmb-dot--full { background: rgba(192, 57, 43, .35); }
.nmb-dot--off { background: #d5d8e0; }

.nmb-slots { background: rgba(var(--nmb-p-rgb), .035); border-radius: 16px; padding: 18px; min-height: 220px; scroll-margin-top: 20px; }
.nmb-slots-title { font-weight: 700; color: var(--nmb-p); margin-bottom: 12px; }
.nmb-slots-empty { text-align: center; color: var(--nmb-muted); padding: 34px 10px; }
.nmb-slots-ico { width: 52px; height: 52px; margin: 0 auto 10px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #fff; color: var(--nmb-a); }
.nmb-slots-ico svg { width: 24px; height: 24px; }
.nmb-part + .nmb-part { margin-top: 14px; }
.nmb-part > span { display: block; font-size: 12.5px; font-weight: 700; color: var(--nmb-muted); margin-bottom: 8px; }
.nmb-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.nmb-time {
	padding: 9px 6px; border-radius: 12px; background: #fff; border: 1.5px solid var(--nmb-line);
	color: var(--nmb-p); font-weight: 700; transition: all .15s ease;
}
.nmb-time:hover { border-color: var(--nmb-a); transform: translateY(-1px); }
.nmb-time.is-selected { background: var(--nmb-p); border-color: var(--nmb-p); color: #fff; }

/* skeleton */
.nmb-skel--cal { height: 340px; border-radius: 16px; }
.nmb-skel--cal, .nmb-skel-row i {
	background: linear-gradient(90deg, rgba(var(--nmb-p-rgb), .05) 25%, rgba(var(--nmb-p-rgb), .10) 37%, rgba(var(--nmb-p-rgb), .05) 63%);
	background-size: 400% 100%; animation: nmb-shimmer 1.3s ease infinite;
}
.nmb-skel-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.nmb-skel-row i { height: 40px; border-radius: 12px; }
@keyframes nmb-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------- فرم ---------- */
.nmb-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.nmb-field { display: flex; flex-direction: column; gap: 6px; }
.nmb-field--full { grid-column: 1 / -1; }
.nmb-field > span { font-weight: 700; font-size: 14px; color: var(--nmb-p); }
.nmb-field small { color: var(--nmb-muted); font-size: 12.5px; }
.nmb-field input, .nmb-field textarea {
	width: 100%; padding: 12px 14px; border-radius: 12px; border: 1.5px solid rgba(var(--nmb-p-rgb), .16);
	background: #fff; color: var(--nmb-text); outline: none; transition: border-color .15s, box-shadow .15s;
}
.nmb-field input[dir="ltr"] { text-align: right; }
.nmb-field input:focus, .nmb-field textarea:focus { border-color: var(--nmb-a); box-shadow: 0 0 0 4px rgba(var(--nmb-a-rgb), .18); }
.nmb-form { position: relative; }
.nmb-hp { position: absolute; top: 0; right: 0; width: 1px; height: 1px; overflow: hidden; opacity: 0; clip-path: inset(50%); pointer-events: none; }
.nmb-terms details { background: rgba(var(--nmb-p-rgb), .04); border-radius: 12px; padding: 10px 14px; margin-bottom: 10px; font-size: 13.5px; }
.nmb-terms summary { cursor: pointer; font-weight: 700; color: var(--nmb-p); }
.nmb-terms details p { margin-top: 8px; color: var(--nmb-muted); }
.nmb-check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; }
.nmb-check input { width: 20px; height: 20px; accent-color: var(--nmb-p); flex: none; }

/* ---------- مرور / نتیجه ---------- */
.nmb-dl > div { display: flex; justify-content: space-between; gap: 18px; padding: 11px 0; border-bottom: 1px dashed var(--nmb-line); }
.nmb-dl > div:last-child { border-bottom: 0; }
.nmb-dl dt { color: var(--nmb-muted); flex: none; }
.nmb-dl dd { font-weight: 700; color: var(--nmb-p); text-align: left; }
.nmb-code { letter-spacing: 2px; font-family: monospace; direction: ltr; }
.nmb-total {
	display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding: 16px 18px;
	border-radius: 14px; background: rgba(var(--nmb-a-rgb), .13);
}
.nmb-total strong { font-size: 20px; color: var(--nmb-p); }
.nmb-secure, .nmb-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 14px; font-size: 13.5px; color: var(--nmb-muted); }
.nmb-secure svg { flex: none; margin-top: 6px; color: var(--nmb-ok); }

.nmb-sum h4 { font-size: 16px; font-weight: 700; margin-bottom: 8px; color: var(--nmb-p); }
.nmb-sum li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--nmb-line); font-size: 14px; }
.nmb-sum li span { color: var(--nmb-muted); flex: none; }
.nmb-sum li b { text-align: left; font-weight: 700; }
.nmb-sum-total { border-bottom: 0 !important; padding-top: 12px !important; }
.nmb-sum-total b { color: var(--nmb-p); font-size: 16px; }
.nmb-sum-contact { margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--nmb-line); font-size: 13px; color: var(--nmb-muted); display: grid; gap: 6px; }
.nmb-sum-contact > div { display: flex; gap: 8px; align-items: flex-start; }
.nmb-sum-contact svg { flex: none; margin-top: 6px; color: var(--nmb-a); }

.nmb-result { text-align: center; padding: 38px 24px; max-width: 560px; margin: 0 auto; }
.nmb-result-icon {
	width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 16px; display: flex; align-items: center; justify-content: center;
}
.nmb-result--ok .nmb-result-icon { background: rgba(31, 138, 91, .12); color: var(--nmb-ok); }
.nmb-result--bad .nmb-result-icon { background: rgba(192, 57, 43, .12); color: var(--nmb-bad); }
.nmb-result h3 { font-size: 22px; font-weight: 700; color: var(--nmb-p); }
.nmb-result-msg { margin: 8px 0 18px; color: var(--nmb-muted); }
.nmb-result .nmb-dl { text-align: right; background: rgba(var(--nmb-p-rgb), .035); border-radius: 14px; padding: 6px 18px; margin-bottom: 18px; }

/* ---------- دکمه‌ها ---------- */
.nmb-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; }
.nmb-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 28px;
	border-radius: 14px; border: 1.5px solid var(--nmb-p); background: var(--nmb-p); color: #fff !important;
	font-weight: 700; text-decoration: none; transition: all .18s ease;
}
.nmb-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 12px 22px -12px rgba(var(--nmb-p-rgb), .7); }
.nmb-btn:disabled { opacity: .45; }
.nmb-btn--ghost { background: transparent; color: var(--nmb-p) !important; border-color: rgba(var(--nmb-p-rgb), .25); }
.nmb-btn--ghost:hover:not(:disabled) { box-shadow: none; background: rgba(var(--nmb-p-rgb), .05); }
.nmb-btn--accent { background: var(--nmb-a); border-color: var(--nmb-a); color: var(--nmb-p) !important; }
.nmb-actions .nmb-btn { min-width: 150px; }

.nmb-spin {
	width: 20px; height: 20px; border-radius: 50%; display: inline-block; vertical-align: middle;
	border: 2.5px solid rgba(var(--nmb-p-rgb), .2); border-top-color: var(--nmb-a); animation: nmb-rot .7s linear infinite;
}
.nmb-spin--sm { width: 16px; height: 16px; border-width: 2px; border-color: rgba(var(--nmb-p-rgb), .25); border-top-color: var(--nmb-p); }
@keyframes nmb-rot { to { transform: rotate(360deg); } }

.nmb button:focus-visible, .nmb a:focus-visible { outline: 3px solid rgba(var(--nmb-a-rgb), .6); outline-offset: 2px; }

/* ---------- ریسپانسیو ---------- */
@media (max-width: 899px) {
	.nmb-layout { grid-template-columns: minmax(0, 1fr); }
	.nmb-aside { display: none; }
	.nmb-time-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; }
}
@media (max-width: 640px) {
	.nmb { font-size: 14.5px; padding-bottom: 12px; }
	.nmb-title { font-size: 23px; }
	.nmb-card { padding: 16px; border-radius: 16px; }
	.nmb-h { font-size: 17px; margin-bottom: 14px; }
	.nmb-services { grid-template-columns: minmax(0, 1fr); }
	.nmb-service { padding: 14px; }
	.nmb-service-arrow { display: none; }
	.nmb-form { grid-template-columns: minmax(0, 1fr); }
	.nmb-step-label { font-size: 11.5px; }
	.nmb-step-dot { width: 32px; height: 32px; }
	.nmb-step::before { top: 15px; }
	.nmb-cal-grid { gap: 4px; }
	.nmb-day { border-radius: 10px; font-size: 14px; }
	.nmb-times { grid-template-columns: repeat(3, 1fr); }
	.nmb-actions .nmb-btn { flex: 1; min-width: 0; padding: 0 16px; }
	.nmb-actions .nmb-btn--ghost { flex: 0 0 auto; }
	.nmb-dl > div { flex-direction: column; gap: 2px; }
	.nmb-dl dd { text-align: right; }
}

@media (prefers-reduced-motion: reduce) {
	.nmb *, .nmb *::before, .nmb *::after { animation: none !important; transition: none !important; }
}
