/* Ofnoa Testimony Form – שכפול מבנה "טופס מסירת עדות" */
.otf-wrap {
	--otf-navy: #1b375f;
	--otf-ink: #1d2d50;
	--otf-cell: #8eaedb;
	--otf-line: #2b2b2b;
	direction: rtl;
	text-align: right;
	font-family: Arial, "Arial Hebrew", "Segoe UI", Tahoma, sans-serif;
	color: var(--otf-ink);
	font-size: 14.5px;
	line-height: 1.45;
	max-width: 100%;
}
.otf-wrap *, .otf-wrap *::before, .otf-wrap *::after { box-sizing: border-box; }
.otf-wrap p { margin: 0 0 9px; }

.otf-doc { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.otf-page {
	position: relative;
	width: 100%;
	max-width: 794px;
	min-height: 1123px;
	background: #fff;
	padding: 52px 50px 48px;
	border: 1px solid #e2e6ee;
	box-shadow: 0 3px 16px rgba(20, 35, 70, .10);
}

.otf-head { text-align: center; margin: 0 0 58px; }
.otf-head img { display: inline-block; width: 52%; max-width: 454px; height: auto; border: 0; box-shadow: none; }

.otf-title {
	text-align: center;
	font-family: inherit;
	font-size: 20px;
	font-weight: 700;
	color: var(--otf-ink);
	text-decoration: underline;
	text-underline-offset: 4px;
	text-decoration-thickness: 2px;
	margin: 0 0 26px;
	padding: 0;
	line-height: 1.3;
	letter-spacing: 0;
	text-transform: none;
}
.otf-intro { margin-bottom: 20px; }

.otf-bar {
	background: var(--otf-navy);
	color: #fff;
	font-weight: 700;
	font-size: 14.5px;
	padding: 3px 5px 4px;
	margin-top: 14px;
	-webkit-print-color-adjust: exact;
	print-color-adjust: exact;
}
.otf-bar-first { margin-top: 4px; }
.otf-bar-tall { min-height: 50px; }
.otf-bar-sub { display: block; font-weight: 400; font-size: 12px; opacity: .75; margin-top: 2px; }

/* טבלת פרטי מוסר העדות */
.otf-grid { margin-top: 4px; border: 1px solid var(--otf-cell); border-bottom: 0; }
.otf-row { display: flex; border-bottom: 1px solid var(--otf-cell); }
.otf-cell {
	display: block;
	flex-grow: 0;
	flex-shrink: 0;
	min-height: 58px;
	padding: 3px 6px 6px;
	border-left: 1px solid var(--otf-cell);
	margin: 0;
	font-weight: 400;
	cursor: text;
}
.otf-cell:last-child { border-left: 0; }
.otf-lbl { display: block; font-size: 14.5px; font-weight: 400; color: var(--otf-ink); }

.otf-wrap input.otf-in,
.otf-wrap .otf-val {
	display: block;
	width: 100%;
	margin: 3px 0 0;
	padding: 3px 6px;
	min-height: 28px;
	border: 0;
	border-radius: 2px;
	background: #f3f7fc;
	box-shadow: none;
	font: inherit;
	font-size: 15px;
	color: #000;
	line-height: 1.4;
}
.otf-wrap .otf-val { background: transparent; padding: 3px 2px; }
.otf-wrap input.otf-in:focus { outline: 2px solid #7ea6dc; outline-offset: 0; background: #fff; }

/* שאלות הכרות */
.otf-qbox { margin-top: 4px; border: 1px solid #333; }
.otf-q { display: block; padding: 4px 8px 14px; border-bottom: 1px solid #333; margin: 0; font-weight: 400; cursor: text; }
.otf-q:last-child { border-bottom: 0; }
.otf-q .otf-lbl { font-size: 14px; }

.otf-wrap textarea.otf-line,
.otf-wrap .otf-line {
	display: block;
	width: calc(100% - 10px);
	margin: 12px 4px 0;
	padding: 2px 4px;
	min-height: 30px;
	border: 0;
	border-bottom: 1px solid var(--otf-line);
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	resize: none;
	overflow: hidden;
	font: inherit;
	font-size: 15px;
	line-height: 26px;
	color: #000;
	white-space: pre-wrap;
	word-wrap: break-word;
}
.otf-wrap textarea.otf-line:focus { outline: none; background: #f3f7fc; }

/* תיאור העדות – שורות שמתרחבות ללא הגבלה */
.otf-tbox { border: 1px solid #333; margin-top: 4px; padding: 10px 10px 18px; }
.otf-tbox p { font-size: 14px; }
.otf-wrap textarea.otf-testimony,
.otf-wrap .otf-testimony {
	display: block;
	width: calc(100% - 10px);
	margin: 18px 4px 0;
	padding: 0 4px;
	min-height: 210px; /* 7 שורות */
	border: 0;
	border-radius: 0;
	box-shadow: none;
	resize: none;
	overflow: hidden;
	font: inherit;
	font-size: 15px;
	line-height: 30px;
	color: #000;
	white-space: pre-wrap;
	word-wrap: break-word;
	background-color: transparent;
	background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 29px, var(--otf-line) 29px, var(--otf-line) 30px);
	background-attachment: local;
	-webkit-print-color-adjust: exact;
	print-color-adjust: exact;
}
.otf-wrap textarea.otf-testimony:focus { outline: none; background-color: #f8fafd; }

/* אופן החשיפה */
.otf-obox { border: 1px solid #333; margin-top: 4px; padding: 14px 4px 30px 12px; }
.otf-opt { display: flex; align-items: center; gap: 4px; margin: 0 0 14px; font-size: 14px; }
.otf-opt > span { flex: 0 0 auto; }
.otf-wrap .otf-fill {
	flex: 1 1 auto;
	min-width: 60px;
	display: inline-block;
	margin: 0;
	padding: 0 4px;
	height: 22px;
	border: 0;
	border-bottom: 1px solid var(--otf-line);
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	font: inherit;
	font-size: 14.5px;
	color: #000;
	line-height: 21px;
}
.otf-wrap input.otf-fill:focus { outline: none; background: #f3f7fc; }

/* תיבות סימון */
.otf-box {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 26px;
	height: 24px;
	margin: 0 0 0 2px;
	border: 1px solid #222;
	background: #fff;
	cursor: pointer;
	vertical-align: middle;
}
.otf-box input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
	z-index: 2;
}
.otf-box > span::after { content: ""; font-size: 17px; line-height: 1; color: #000; font-weight: 700; }
.otf-box input:checked + span::after,
.otf-box.is-on > span::after { content: "\2714"; }
.otf-box input:focus-visible + span { outline: 2px solid #7ea6dc; outline-offset: 4px; }

/* תחתית: תאריך + אישור דיגיטלי + חתימה */
.otf-foot { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 78px; font-size: 14px; }
.otf-date { display: flex; align-items: flex-end; gap: 8px; }
.otf-wrap .otf-date-in {
	display: inline-block;
	width: 170px;
	height: 26px;
	margin: 0;
	padding: 0 4px;
	border: 0;
	border-bottom: 1px solid var(--otf-line);
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	font: inherit;
	font-size: 14.5px;
	color: #000;
	text-align: center;
}
.otf-digital { display: flex; align-items: center; gap: 22px; margin-left: 40px; }
.otf-digital .otf-box { width: 28px; height: 28px; }

.otf-sign { width: 260px; margin: 34px auto 0 26%; text-align: center; font-size: 14px; }
.otf-sig-area { height: 90px; position: relative; }
.otf-sig-area canvas {
	display: block;
	width: 100%;
	height: 90px;
	border: 1px dashed #b5c3d8;
	background: #fbfcfe;
	touch-action: none;
	cursor: crosshair;
}
.otf-sig-area img { max-width: 100%; max-height: 90px; display: block; margin: 0 auto; }
.otf-sig-line { border-top: 1px solid var(--otf-line); margin: 0 0 10px; }
.otf-sig-clear { margin-top: 6px; background: none; border: 0; color: #2a5ba8; text-decoration: underline; cursor: pointer; font: inherit; font-size: 13px; padding: 0; }

/* רכיבי מסך */
.otf-notice { max-width: 794px; margin: 0 auto 14px; font-size: 13px; color: #556; background: #f4f7fb; border: 1px solid #dde5f0; padding: 8px 12px; }
.otf-errors { max-width: 794px; margin: 0 auto 16px; background: #fff3f3; border: 1px solid #e2a1a1; color: #8a1c1c; padding: 10px 14px; }
.otf-errors ul { margin: 6px 20px 0 0; padding: 0; }
.otf-client-err { color: #a11; font-weight: 700; margin-bottom: 10px; min-height: 1px; }
.otf-actions { text-align: center; margin: 26px auto 10px; }
.otf-btn {
	display: inline-block;
	background: var(--otf-navy, #1b375f);
	color: #fff !important;
	border: 0;
	border-radius: 4px;
	padding: 12px 28px;
	font: inherit;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	text-decoration: none !important;
	margin: 4px;
}
.otf-btn:hover { filter: brightness(1.15); }
.otf-btn-ghost { background: #fff; color: #1b375f !important; border: 1px solid #1b375f; }
.otf-hp { position: absolute !important; right: -10000px; width: 1px; height: 1px; overflow: hidden; }
.otf-done { max-width: 640px; margin: 30px auto; text-align: center; background: #fff; border: 1px solid #dde5f0; padding: 30px 20px; }
.otf-done h2 { color: #1b375f; margin: 0 0 12px; }
.otf-small { font-size: 13px; color: #667; }

/* עמוד ההדפסה העצמאי */
.otf-print-body { margin: 0; background: #e9edf3; }
.otf-print-body .otf-wrap { padding: 20px 10px 40px; }
.otf-toolbar {
	position: sticky; top: 0; z-index: 5;
	display: flex; align-items: center; justify-content: center; gap: 16px;
	direction: rtl; font-family: Arial, sans-serif; font-size: 14px; color: #334;
	background: #fff; border-bottom: 1px solid #d5dce8; padding: 8px 12px;
}

/* מובייל */
@media screen and (max-width: 700px) {
	.otf-page { min-height: 0; padding: 22px 14px 30px; }
	.otf-head { margin-bottom: 26px; }
	.otf-head img { width: 88%; }
	.otf-row { flex-wrap: wrap; }
	.otf-cell { flex-basis: 100% !important; border-left: 0; border-bottom: 1px solid var(--otf-cell); }
	.otf-cell:last-child { border-bottom: 0; }
	.otf-cell:empty { display: none; }
	.otf-opt { flex-wrap: wrap; align-items: flex-start; }
	.otf-opt > span { flex: 1 1 calc(100% - 40px); min-width: 0; padding-top: 2px; }
	.otf-wrap .otf-opt .otf-fill { flex: 1 1 100%; margin-right: 32px; }
	.otf-foot { flex-direction: column; align-items: flex-start; margin-top: 36px; }
	.otf-digital { margin-left: 0; }
	.otf-sign { margin: 30px auto 0; max-width: 100%; }
}

/* הדפסה */
@media print {
	@page { size: A4; margin: 9mm 13mm 8mm; }
	html, body { background: #fff !important; }
	.otf-screen, .otf-toolbar, .otf-notice, .otf-errors, .otf-actions, .otf-sig-clear { display: none !important; }
	.otf-print-body .otf-wrap { padding: 0; }
	.otf-doc { display: block; }
	.otf-page { max-width: none; width: auto; min-height: 0; padding: 0; border: 0; box-shadow: none; }
	.otf-page + .otf-page { break-before: page; page-break-before: always; }
	.otf-head { margin-bottom: 30px; }
	.otf-title { margin-bottom: 18px; }
	.otf-intro { margin-bottom: 12px; }
	.otf-bar { break-after: avoid; page-break-after: avoid; }
	.otf-q, .otf-opt, .otf-row { break-inside: avoid; page-break-inside: avoid; }
	.otf-wrap input.otf-in, .otf-wrap input.otf-in:focus { background: transparent; outline: 0; }
	.otf-sig-area canvas { border: 0; background: transparent; }
	.otf-keep, .otf-bar, .otf-obox, .otf-foot, .otf-sign { break-inside: avoid; page-break-inside: avoid; }
	.otf-wrap input[type="date"]::-webkit-calendar-picker-indicator { display: none; }

	/* הדפסה מתוך עמוד הטופס באתר – מציג רק את הטופס */
	body.otf-printing * { visibility: hidden !important; }
	body.otf-printing .otf-wrap, body.otf-printing .otf-wrap * { visibility: visible !important; }
	body.otf-printing .otf-wrap { position: absolute; top: 0; right: 0; left: 0; width: 100%; }
	body.otf-printing .otf-hp, body.otf-printing .otf-screen { display: none !important; }
}
