/* ============================================================
   מדריכי מחשבונים - עיצוב
   צבעי האתר: רקע #FFFDFA, הדגשה #d32f2f
   ============================================================ */

/* ---------- פס הפתיחה ---------- */

.imsg-bar {
	display: flex;
	align-items: center;
	gap: 14px;
	max-width: 1000px;
	margin: 8px auto 24px;
	padding: 14px 20px;
	background: #FFFDFA;
	border: 1px solid #ece5da;
	border-right: 4px solid #d32f2f;
	border-radius: 10px;
	direction: rtl;
	cursor: pointer;
	transition: box-shadow .18s ease, transform .18s ease;
	box-sizing: border-box;
}

.imsg-bar:hover,
.imsg-bar:focus-visible {
	box-shadow: 0 3px 14px rgba(0,0,0,.07);
	transform: translateY(-1px);
	outline: none;
}

.imsg-bar-icon {
	flex-shrink: 0;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: #d32f2f;
	color: #fff;
	font-weight: 700;
	font-size: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

.imsg-bar-text {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.imsg-bar-text strong {
	font-size: 15px;
	color: #2b2b2b;
	font-weight: 700;
}

.imsg-bar-text span {
	font-size: 13px;
	color: #6f6a63;
}

.imsg-bar-cta {
	flex-shrink: 0;
	font-size: 13px;
	font-weight: 600;
	color: #d32f2f;
	border: 1px solid #edd4d4;
	border-radius: 20px;
	padding: 6px 16px;
	white-space: nowrap;
}

/* ---------- החלונית ---------- */

/* גובה סרגל הניהול של וורדפרס. אפס לגולש רגיל. */
:root { --imsg-top: 0px; }

body.admin-bar { --imsg-top: 32px; }

@media screen and (max-width: 782px) {
	body.admin-bar { --imsg-top: 46px; }
}

.imsg-panel {
	position: fixed;
	/* מתחיל מתחת לסרגל הניהול של וורדפרס. המשתנה מוגדר למעלה
	   ומקבל ערך אחר כשמשתמש מחובר, כדי שהכותרת לא תיחתך. */
	top: var(--imsg-top, 0px);
	right: 0;
	width: 420px;
	max-width: 92vw;
	height: calc(100vh - var(--imsg-top, 0px));
	background: #fff;
	border-left: 1px solid #e8e2d8;
	box-shadow: -6px 0 24px rgba(0,0,0,.10);
	z-index: 99998;
	display: flex;
	flex-direction: column;
	direction: rtl;
	transform: translateX(100%);
	transition: transform .28s cubic-bezier(.4,0,.2,1);
	box-sizing: border-box;
}

.imsg-panel.is-open { transform: translateX(0); }

/* במסך רחב החלונית דוחפת את התוכן במקום לכסות אותו. */
@media (min-width: 1200px) {
	body { transition: margin-right .28s cubic-bezier(.4,0,.2,1); }
	body.imsg-open { margin-right: 420px; }
}

.imsg-panel-head {
	flex-shrink: 0;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: 20px 24px 16px;
	border-bottom: 1px solid #f0ebe3;
	background: #FFFDFA;
}

.imsg-panel-title {
	margin: 0;
	font-size: 17px;
	font-weight: 700;
	color: #2b2b2b;
	line-height: 1.4;
}

.imsg-close {
	flex-shrink: 0;
	width: 32px;
	height: 32px;
	border: 1px solid #ece5da;
	border-radius: 8px;
	background: #fff;
	color: #6f6a63;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	transition: background .15s ease, color .15s ease;
}

.imsg-close:hover,
.imsg-close:focus-visible {
	background: #d32f2f;
	border-color: #d32f2f;
	color: #fff;
	outline: none;
}

.imsg-panel-body {
	flex: 1;
	overflow-y: auto;
	padding: 8px 24px 40px;
	-webkit-overflow-scrolling: touch;
}

/* ---------- סעיפי המדריך ---------- */

.imsg-section {
	padding: 18px 0;
	border-bottom: 1px solid #f4f0e9;
}

.imsg-section:last-of-type { border-bottom: none; }

.imsg-section-head {
	margin: 0 0 8px;
	font-size: 15px;
	font-weight: 700;
	color: #d32f2f;
	line-height: 1.5;
}

.imsg-section-body {
	font-size: 14px;
	line-height: 1.85;
	color: #45403a;
}

.imsg-section-body p { margin: 0 0 10px; }
.imsg-section-body p:last-child { margin-bottom: 0; }

.imsg-section-body ul,
.imsg-section-body ol { margin: 8px 0 10px; padding-right: 20px; }

.imsg-section-body li { margin-bottom: 5px; }
.imsg-section-body strong { color: #2b2b2b; }

.imsg-section-body table {
	width: 100%;
	border-collapse: collapse;
	margin: 10px 0;
	font-size: 13.5px;
}

.imsg-section-body th,
.imsg-section-body td {
	border: 1px solid #eee7dd;
	padding: 7px 10px;
	text-align: right;
}

.imsg-section-body th { background: #FFFDFA; font-weight: 600; }

.imsg-note {
	margin-top: 20px;
	padding: 14px 16px;
	background: #FFFDFA;
	border: 1px solid #f0ebe3;
	border-radius: 8px;
	font-size: 12.5px;
	line-height: 1.7;
	color: #6f6a63;
}

.imsg-note p { margin: 0 0 6px; }
.imsg-note p:last-child { margin-bottom: 0; }

/* ---------- מובייל: נפתח מלמטה ---------- */

@media (max-width: 782px) {
	.imsg-panel {
		top: auto;
		bottom: 0;
		right: 0;
		left: 0;
		width: 100%;
		max-width: 100%;
		height: 82vh;
		max-height: calc(100vh - var(--imsg-top, 0px) - 40px);
		border-left: none;
		border-top: 1px solid #e8e2d8;
		border-radius: 16px 16px 0 0;
		box-shadow: 0 -6px 24px rgba(0,0,0,.14);
		transform: translateY(100%);
	}

	.imsg-panel.is-open { transform: translateY(0); }

	.imsg-panel-head { padding: 16px 18px 14px; }
	.imsg-panel-body { padding: 4px 18px 32px; }

	.imsg-bar {
		flex-wrap: wrap;
		gap: 10px;
		padding: 12px 16px;
	}

	.imsg-bar-cta { display: none; }
}

@media print {
	.imsg-bar, .imsg-panel { display: none; }
}