﻿*, *::before, *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

:root {
	--ink: #1a1814;
	--ink-2: #4a4740;
	--ink-3: #9a958e;
	--paper: white;
	--paper-2: #f5f5f5;
	--paper-3: #e8e0d0;
	--accent: #2d5a3d;
	--accent-light: #e8f0eb;
	--accent-mid: #4a8c62;
	--gold: #b5862a;
	--gold-light: #fdf4e3;
	--danger: #c0392b;
	--danger-light: #fdf0ee;
	--border: rgba(26,24,20,0.12);
	--border-strong: rgba(26,24,20,0.22);
	--radius: 10px;
	--radius-lg: 16px;
	--shadow: 0 2px 12px rgba(26,24,20,0.08);
	--shadow-lg: 0 8px 40px rgba(26,24,20,0.12);
}

body {
	font-family: 'DM Sans', sans-serif;
	background: white;
	color: var(--ink);
	min-height: 100vh;
	font-size: 15px;
	line-height: 1.6;
}

/* ── NAV ── */
nav {
	background: #f5f5f5;
	border-bottom: 1px solid var(--border);
	padding: 0 2rem;
	height: 60px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	position: sticky;
	top: 0;
	z-index: 100;
}

.logo {
	flex: 1 1 0;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 10px;
	font-family: inherit;
	font-size: 22px;
	color: var(--ink);
	text-decoration: none;
	margin-inline-end: 16px;
}

.logo-mark {
	width: 32px;
	height: 32px;
	background: var(--accent);
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
}

	.logo-mark svg {
		width: 18px;
		height: 18px;
	}

.nav-tag {
	font-size: 12px;
	font-weight: 500;
	background: var(--accent-light);
	color: var(--accent);
	padding: 4px 10px;
	border-radius: 100px;
	letter-spacing: 0.02em;
}

.lang-switcher {
	flex: 1 1 0;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	margin-inline-start: 16px;
}

.lang-btn {
	font-size: 13px;
	font-weight: 600;
	color: var(--accent);
	background: var(--accent-light);
	border: 1px solid transparent;
	border-radius: 100px;
	padding: 4px 14px;
	text-decoration: none;
	letter-spacing: 0.04em;
	transition: background 0.15s, border-color 0.15s;
}

	.lang-btn:hover {
		background: var(--accent-mid);
		color: white;
	}

/* ── PROGRESS STEPPER ── */
.stepper {
	visibility: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2rem 2rem 0;
	gap: 0;
	max-width: 700px;
	margin: 0 auto;
}

.stepper.ready {
	visibility: visible;
}

.step {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	flex: 1;
	position: relative;
}

	.step:not(:last-child)::after {
		content: '';
		position: absolute;
		top: 16px;
		left: calc(50% + 20px);
		right: calc(-50% + 20px);
		height: 1px;
		background: var(--border-strong);
		transition: background 0.4s;
	}

	.step.done:not(:last-child)::after {
		background: var(--accent);
	}

.step-num {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: 1.5px solid var(--border-strong);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	font-weight: 500;
	color: var(--ink-3);
	background: var(--paper);
	transition: all 0.3s;
	position: relative;
	z-index: 1;
}

.step.active .step-num {
	border-color: var(--accent);
	color: var(--accent);
	background: var(--accent-light);
}

.step.done .step-num {
	background: var(--accent);
	border-color: var(--accent);
	color: #fff;
	font-size: 11px;
}

.step-label {
	font-size: 12px;
	color: var(--ink-3);
	font-weight: 400;
	white-space: nowrap;
}

.step.active .step-label {
	color: var(--accent);
	font-weight: 500;
}

.step.done .step-label {
	color: var(--accent-mid);
}

/* ── MAIN LAYOUT ── */
main {
	visibility: hidden;
	max-width: 900px;
	margin: 0 auto;
	padding: 2.5rem 2rem 4rem;
	min-height: calc(100vh - 60px - 52px);
}

main.ready {
	visibility: visible;
}

main:has(#panel-2.active) {
	max-width: none;
	padding-bottom: 0; 
}

/* ── PANELS ── */
.panel {
	display: none;
	animation: fadeIn 0.35s ease;
	background: white;
	box-shadow: none;
}

.panel.active {
	display: block;
}

@@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(8px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

.panel-head {
	text-align: center;
	margin-bottom: 2rem;
}

	.panel-head h1 {
		font-family: inherit;
		font-size: 32px;
		font-weight: 400;
		margin-bottom: 8px;
		line-height: 1.2;
	}

	.panel-head p {
		color: var(--ink-2);
		max-width: 480px;
		margin: 0 auto;
		font-size: 15px;
	}

/* ── UPLOAD ZONE ── */
.upload-zone {
	border: 1.5px dashed var(--border-strong);
	border-radius: var(--radius-lg);
	padding: 4rem 2rem;
	text-align: center;
	cursor: pointer;
	transition: all 0.25s;
	background: var(--paper-2);
	position: relative;
}

	.upload-zone:hover, .upload-zone.drag-over {
		border-color: var(--accent);
		background: var(--accent-light);
	}

	.upload-zone input[type="file"] {
		position: absolute;
		inset: 0;
		opacity: 0;
		cursor: pointer;
		width: 100%;
		height: 100%;
	}

.upload-icon {
	width: 56px;
	height: 56px;
	background: var(--paper);
	border: 1px solid var(--border);
	border-radius: 14px;
	margin: 0 auto 1rem;
	display: flex;
	align-items: center;
	justify-content: center;
}

	.upload-icon svg {
		width: 24px;
		height: 24px;
		stroke: var(--accent);
	}

.upload-zone h3 {
	font-size: 16px;
	font-weight: 500;
	margin-bottom: 6px;
}

.upload-zone p {
	font-size: 13px;
	color: var(--ink-3);
}

.upload-zone .browse-link {
	color: var(--accent);
	font-weight: 500;
	text-decoration: underline;
	cursor: pointer;
}

/* ── FILE PILL (after upload) ── */
.file-pill {
	display: flex;
	align-items: center;
	gap: 12px;
	background: var(--paper);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 12px 16px;
	margin-top: 1rem;
}

.file-pill-icon {
	width: 36px;
	height: 36px;
	background: var(--danger-light);
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

	.file-pill-icon svg {
		width: 18px;
		height: 18px;
		stroke: var(--danger);
	}

.file-pill-name {
	font-size: 14px;
	font-weight: 500;
	flex: 1;
	color: var(--ink);
}

.file-pill-size {
	font-size: 13px;
	color: var(--ink-3);
}

.file-pill-remove {
	cursor: pointer;
	color: var(--ink-3);
	transition: color 0.2s;
}

	.file-pill-remove:hover {
		color: var(--danger);
	}

/* ── FORMS ── */
.form-section {
	background: var(--paper);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 1.75rem;
	margin-bottom: 1.25rem;
}

.form-section-head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 1.25rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--border);
}

.party-badge {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 600;
	flex-shrink: 0;
}

.form-section-head h3 {
	font-size: 17px;
	font-weight: 500;
}

.form-section-head p {
	font-size: 13px;
	color: var(--ink-3);
	margin-left: auto;
}

.field-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin-bottom: 12px;
}

	.field-row.full {
		grid-template-columns: 1fr;
	}

.field label {
	display: block;
	font-size: 12px;
	font-weight: 500;
	color: var(--ink-2);
	margin-bottom: 5px;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

.field input, .field select {
	width: 100%;
	height: 40px;
	padding: 0 12px;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius);
	font-family: inherit;
	font-size: 14px;
	color: var(--ink);
	background: var(--paper);
	outline: none;
	transition: border-color 0.2s;
}

	.field input:focus, .field select:focus {
		border-color: var(--accent);
	}

	.field input::placeholder {
		color: var(--ink-3);
	}

/* ── PLACEHOLDER TAGS ── */
.placeholder-builder {
	background: var(--paper-2);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 1.5rem;
	margin-bottom: 1.25rem;
}

	.placeholder-builder h3 {
		font-size: 15px;
		font-weight: 500;
		margin-bottom: 4px;
	}

	.placeholder-builder p {
		font-size: 13px;
		color: var(--ink-3);
		margin-bottom: 1.25rem;
	}

.tag-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ph-tag {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border-radius: 100px;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	border: 1px solid transparent;
	transition: all 0.2s;
	user-select: none;
}

	.ph-tag.p1-tag {
		border-color: rgba(45,90,61,0.2);
	}

	.ph-tag.p2-tag {
		border-color: rgba(181,134,42,0.2);
	}

	.ph-tag:hover {
		transform: translateY(-1px);
		box-shadow: var(--shadow);
	}

	.ph-tag svg {
		width: 13px;
		height: 13px;
	}

.placed-tags-area {
	margin-top: 1.25rem;
	min-height: 80px;
	border: 1.5px dashed var(--border);
	border-radius: var(--radius);
	padding: 1rem;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-content: flex-start;
}

	.placed-tags-area .empty-msg {
		font-size: 13px;
		color: var(--ink-3);
		width: 100%;
		text-align: center;
		padding-top: 12px;
	}

.placed-tag {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 10px;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 500;
	position: relative;
}

	/* p1/p2 accent colors shared across tag and badge elements */
	.ph-tag.p1-tag,
	.placed-tag.p1-tag,
	.party-badge.p1 {
		background: var(--accent-light);
		color: var(--accent);
	}

	.ph-tag.p2-tag,
	.placed-tag.p2-tag,
	.party-badge.p2 {
		background: var(--gold-light);
		color: var(--gold);
	}

.placed-tag-remove {
	cursor: pointer;
	opacity: 0.6;
	transition: opacity 0.2s;
	display: flex;
	align-items: center;
}

	.placed-tag-remove:hover {
		opacity: 1;
	}

/* ── SIGNATURE PAD ── */
.sig-area {
	background: var(--paper);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 1.75rem;
	margin-bottom: 1.25rem;
}

	.sig-area h3 {
		font-size: 15px;
		font-weight: 500;
		margin-bottom: 4px;
	}

	.sig-area > p {
		font-size: 13px;
		color: var(--ink-3);
		margin-bottom: 1.25rem;
	}

.sig-tabs {
	display: flex;
	gap: 6px;
	margin-bottom: 1.25rem;
}

.sig-tab {
	padding: 7px 16px;
	border-radius: var(--radius);
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	border: 1px solid var(--border);
	background: transparent;
	color: var(--ink-2);
	transition: all 0.2s;
	font-family: inherit;
}

	.sig-tab.active {
		background: var(--accent);
		color: #fff;
		border-color: var(--accent);
	}

.sig-canvas-wrap {
	border: 1px solid var(--border-strong);
	border-radius: var(--radius);
	background: #fff;
	overflow: hidden;
	position: relative;
}

canvas#sigCanvas {
	display: block;
	width: 100%;
	height: 180px;
	cursor: crosshair;
	touch-action: none;
}

.sig-canvas-hint {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-family: inherit;
	font-size: 18px;
	color: var(--ink-3);
	pointer-events: none;
	transition: opacity 0.3s;
}

.sig-type-input {
	font-family: inherit;
	font-size: 26px;
	width: 100%;
	height: 80px;
	padding: 0 1rem;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius);
	color: var(--ink);
	outline: none;
	background: #fff;
}

	.sig-type-input:focus {
		border-color: var(--accent);
	}

.sig-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 10px;
}

.sig-clear {
	font-size: 13px;
	color: var(--ink-3);
	cursor: pointer;
	background: none;
	border: none;
	font-family: inherit;
	transition: color 0.2s;
}

	.sig-clear:hover {
		color: var(--danger);
	}

.sig-color-dots {
	display: flex;
	gap: 8px;
}

.sig-dot {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	cursor: pointer;
	border: 2px solid transparent;
	transition: border-color 0.2s;
}

	.sig-dot.active {
		border-color: var(--ink);
	}


/* ── BUTTONS ── */
.btn-row {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	margin-top: 2rem;
}


.btn {
	height: 44px;
	padding: 0 24px;
	border-radius: var(--radius);
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	border: none;
	transition: all 0.2s;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #f3f7f4;
}

	.btn svg {
		width: 16px;
		height: 16px;
	}

.btn-primary {
	background: var(--accent);
	color: #fff;
}

	.btn-primary:hover {
		background: var(--accent-mid);
	}

	.btn-primary:disabled {
		background: var(--border-strong);
		cursor: not-allowed;
	}

.btn-ghost {
	background: transparent;
	color: var(--ink-2);
	border: 1px solid var(--border-strong);
}

	.btn-ghost:hover {
		background: var(--paper-2);
	}


/* ── DOCUMENT PREVIEW ── */
.doc-preview {
	background: var(--paper);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	overflow: clip;
	margin-bottom: 1.25rem;
}

.doc-preview-head {
	padding: 12px 1.25rem;
	background: var(--paper-2);
	border-bottom: 1px solid var(--border);
	font-size: 13px;
	color: var(--ink-2);
}

	.doc-preview-head strong {
		color: var(--ink);
		font-weight: 500;
	}

.placeholders .doc-preview-body {
	padding: 1.25rem;
	background: #fff;
}

#pdfCanvas {
	display: block;
	max-width: 100%;
	margin: 0 auto;
}

#panel2Actions {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 100;
	background: #f5f5f5;
	border-top: 1px solid var(--border);
	padding: 0.875rem 1.5rem;
	box-shadow: 0 -2px 8px rgba(0, 0, 0, .06);
}

#signaturesSection {
	position: sticky;
	top: 50px;
	align-self: flex-start;
	background: white;
	z-index: 9;
}

.notice {
	font-size: 13px;
	color: var(--ink-3);
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin-top: 1.25rem;
	padding: 12px 14px;
	background: var(--paper-2);
	border-radius: var(--radius);
}

	.notice svg {
		width: 14px;
		height: 14px;
		flex-shrink: 0;
		margin-top: 2px;
		stroke: var(--ink-3);
	}

/* ── RTL SUPPORT ── */
[dir="rtl"] body {
	font-family: 'Cairo', 'DM Sans', sans-serif;
}

[dir="rtl"] .step:not(:last-child)::after {
	left: calc(-50% + 20px);
	right: calc(50% + 20px);
}

[dir="rtl"] .form-section-head p {
	margin-left: 0;
	margin-right: auto;
}

[dir="rtl"] .arrow-icon {
	transform: scaleX(-1);
}

[dir="rtl"] .file-pill-name {
	text-align: right;
}

/* ── Begin Cobra ESignature ── */
.signature-option {
	padding: 10px;
	cursor: pointer;
	border: 1px solid #d7d7d7;
	margin-bottom: 10px;
	border-radius: 5px;
}

	.signature-option:hover {
		background: #d9d9d9;
	}

	.signature-option i {
		margin-right: 5px;
	}

html[dir=rtl] .signature-option i {
	margin-left: 5px;
	margin-right: 0;
}

/* ── SELECTABLE CARDS (shared base) ── */
.identity-card,
.signer-count-card,
.role-card {
	position: relative;
	border: 2px solid var(--border);
	border-radius: var(--radius-lg);
	cursor: pointer;
	background: var(--paper);
	transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
	user-select: none;
}

.signer-count-card,
.role-card {
	display: flex;
	align-items: center;
}

.identity-card:hover,
.signer-count-card:hover,
.role-card:hover {
	border-color: var(--border-strong);
	box-shadow: var(--shadow);
}

.identity-card.selected,
.signer-count-card.selected,
.role-card.selected {
	border-color: var(--accent);
	background: var(--accent-light);
	box-shadow: 0 0 0 3px rgba(45, 90, 61, 0.10);
}

/* ── IDENTITY CARDS (Step 4) ── */
.identity-card {
	flex: 1;
	padding: 2rem 1.25rem 1.5rem;
	text-align: center;
}

.identity-card-icon {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 12px;
}

	.identity-card-icon.p1 {
		background: var(--accent-light);
	}

	.identity-card-icon.p1 svg {
		stroke: var(--accent);
		width: 26px;
		height: 26px;
	}

	.identity-card-icon.p2 {
		background: var(--gold-light);
	}

	.identity-card-icon.p2 svg {
		stroke: var(--gold);
		width: 26px;
		height: 26px;
	}

.identity-card-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	font-size: 11px;
	font-weight: 700;
	margin-bottom: 8px;
}

	.identity-card-badge.p1 {
		background: var(--accent);
		color: #fff;
	}

	.identity-card-badge.p2 {
		background: var(--gold);
		color: #fff;
	}

.identity-card-title {
	font-size: 15px;
	font-weight: 600;
	color: var(--ink);
	margin: 0 0 4px;
}

.identity-card-email {
	font-size: 15px;
	color: var(--ink-3);
	word-break: break-all;
	margin: 0 0 4px;
}

.identity-card-check {
	position: absolute;
	top: 10px;
	inset-inline-end: 10px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--accent);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transform: scale(0.6);
	transition: opacity 0.2s, transform 0.2s;
}

/* Note: shared check-circle animation is also applied via .signer-count-check, .role-card-check */

	.identity-card-check svg {
		width: 12px;
		height: 12px;
		stroke: #fff;
	}

	.identity-card.selected .identity-card-check {
		opacity: 1;
		transform: scale(1);
	}

/* ── SIGNER COUNT CARDS (inside Step 1) ── */
.upload-section-label {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: var(--ink-3);
	margin-bottom: 10px;
}

.signer-count-card {
	gap: 14px;
	padding: 14px 16px;
	height: 100%;
}

.signer-count-icon {
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--accent-light);
	display: flex;
	align-items: center;
	justify-content: center;
}

.signer-count-icon svg {
	stroke: var(--accent);
}

.signer-count-card.selected .signer-count-icon {
	background: rgba(45, 90, 61, 0.15);
}

.signer-count-body {
	flex: 1;
	min-width: 0;
}

.signer-count-body h4 {
	font-size: 14px;
	font-weight: 600;
	color: var(--ink);
	margin: 0 0 2px;
}

.signer-count-body p {
	font-size: 12px;
	color: var(--ink-3);
	margin: 0;
	white-space: normal;
}

.signer-count-check,
.role-card-check {
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--accent);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transform: scale(0.6);
	transition: opacity 0.2s, transform 0.2s;
}

.signer-count-check svg,
.role-card-check svg {
	width: 11px;
	height: 11px;
	stroke: #fff;
}

.signer-count-card.selected .signer-count-check,
.role-card.selected .role-card-check {
	opacity: 1;
	transform: scale(1);
}

/* ── ROLE CARDS (Step 3) ── */
.role-card {
	gap: 14px;
	padding: 16px 18px;
	height: 100%;
}

.role-card-badge {
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	font-weight: 700;
	color: #fff;
}

.role-card-badge.p1 { background: var(--accent); }
.role-card-badge.p2 { background: var(--gold); }

.role-card-behalf-icon {
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--border);
	display: flex;
	align-items: center;
	justify-content: center;
}

.role-card-behalf-icon svg {
	width: 18px;
	height: 18px;
	stroke: var(--ink-3);
}

.role-card.selected .role-card-behalf-icon {
	background: rgba(45, 90, 61, 0.15);
}

.role-card.selected .role-card-behalf-icon svg {
	stroke: var(--accent);
}

.role-card-label-group {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.role-card-label {
	font-size: 14px;
	font-weight: 500;
	color: var(--ink);
}

.role-card-email {
	font-size: 12px;
	color: var(--ink-3);
	margin-top: 2px;
	word-break: break-all;
}

#roleEmailFields {
	margin-top: 1.25rem;
}

#roleEmailFields .field {
	margin-bottom: 1rem;
}

/* ── VERIFICATION MODAL ── */
.verification-code-input {
	text-align: center;
	font-size: 22px;
	font-weight: 600;
	letter-spacing: 0.25em;
	height: 52px;
}

/* ── LANGUAGE CARDS ── */

/* Equal-height cards */
#langCardContainer .row {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
}

#langCardContainer .col-xs-12 {
	display: flex;
	flex-direction: column;
	margin-bottom: 12px;
}

.lang-card {
	display: flex;
	flex-direction: column;
	flex: 1;
	border: 1.5px solid var(--border-strong);
	border-radius: var(--radius-lg);
	padding: 1rem;
	cursor: pointer;
	transition: border-color 0.2s, box-shadow 0.2s;
	background: var(--paper);
	user-select: none;
	position: relative;
	margin: 0;
	min-width: 0;
}

	.lang-card input[type="radio"] {
		position: absolute;
		top: 12px;
		inset-inline-end: 12px;
		width: 16px;
		height: 16px;
		accent-color: var(--accent);
		cursor: pointer;
		flex-shrink: 0;
	}

	.lang-card:hover {
		border-color: var(--accent-mid);
		box-shadow: var(--shadow);
	}

	.lang-card.selected {
		border-color: var(--accent);
		background: var(--accent-light);
		box-shadow: 0 0 0 3px rgba(45, 90, 61, 0.12);
	}

.lang-card-header {
	margin-bottom: 10px;
	padding-inline-end: 24px;
}

.lang-card-title {
	font-size: 13px;
	font-weight: 600;
	color: var(--ink);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.lang-card-body {
	min-width: 0;
}

.lang-card-body p {
	font-size: 12px;
	color: var(--ink-2);
	line-height: 1.5;
	margin-bottom: 10px;
	word-break: break-word;
	overflow-wrap: break-word;
}

.lang-card-btn {
	display: inline-block;
	font-size: 11px;
	font-weight: 600;
	color: #fff;
	background: #348eda;
	border-radius: 4px;
	padding: 4px 12px;
	pointer-events: none;
}

.lang-card-sender:empty::before {
	content: '...';
	opacity: 0.4;
	font-style: italic;
	font-weight: 400;
}

/* ── LANG RADIO BUTTONS (modal step 4) ── */
.lang-radio-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 18px;
	border: 1.5px solid var(--border-strong);
	border-radius: 20px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 500;
	color: var(--ink-2);
	background: var(--paper);
	transition: border-color 0.2s, background 0.2s, color 0.2s;
	user-select: none;
	margin: 0;
}

	.lang-radio-btn input[type="radio"] {
		display: none;
	}

	.lang-radio-btn:hover {
		border-color: var(--accent-mid);
		color: var(--ink);
	}

	.lang-radio-btn.selected {
		border-color: var(--accent);
		background: var(--accent-light);
		color: var(--accent);
	}

/* ── EMAIL PREVIEW CARD (modal step 4) ── */
.lang-preview-card {
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	background: white;
	padding: 1rem 1.25rem;
	font-size: 13px;
	color: var(--ink-2);
	line-height: 1.6;
	margin-top: 4px;
}

/* Recipient email label in the langCardContainer header */
#langCardRecipientEmail {
	word-break: break-all;
	overflow-wrap: break-word;
	min-width: 0;
	flex-shrink: 1;
}

/* langCardContainer section-head: allow wrapping on small screens */
#langCardContainer .form-section-head {
	flex-wrap: wrap;
	row-gap: 4px;
}


/* Prevent text selection during drag */
.draggable, .resizable-signature, .signature-option, .resizable-placeholder {
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	touch-action: none;
}

.resizable-signature, .resizable-placeholder {
	touch-action: none;
	box-sizing: border-box;
	cursor: default;
	position: relative;
	border: 2px dashed #b3b3b3;
}

.resizable-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	text-align: center;
	background: #80808024;
}

.placeholder-delete-btn {
	position: absolute;
	top: 3px;
	inset-inline-start: 3px;
	width: 20px;
	height: 20px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: #e53e3e;
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 1;
	z-index: 10;
}

	.placeholder-delete-btn svg {
		width: 11px;
		height: 11px;
		pointer-events: none;
	}

@media (max-width: 768px) {
	.placeholder-delete-btn {
		width: 24px;
		height: 24px;
	}
}

.resize-handle {
	position: absolute;
	width: 14px;
	height: 14px;
	pointer-events: none;
	background: white;
	border-radius: 2px;
	background: #ededed;
}

.resize-handle.top-left {
	top: 4px;
	left: 4px;
	border-top: 3px solid currentColor;
	border-left: 3px solid currentColor;
}

.resize-handle.top-right {
	top: 4px;
	right: 4px;
	border-top: 3px solid currentColor;
	border-right: 3px solid currentColor;
}

.resize-handle.bottom-left {
	bottom: 4px;
	left: 4px;
	border-bottom: 3px solid currentColor;
	border-left: 3px solid currentColor;
}

.resize-handle.bottom-right {
	bottom: 4px;
	right: 4px;
	border-bottom: 3px solid currentColor;
	border-right: 3px solid currentColor;
}

.resizable-placeholder i {
	margin-right: 5px;
}

html[dir=rtl] .resizable-placeholder i {
	margin-left: 5px;
	margin-right: 0;
}

#bottomSection, #signaturesSection, #saveSignatureImageSection {
	display: none;
}

.signer-circle {
	width: 15px;
	height: 15px;
	border-radius: 50% !important;
	display: inline-block;
	margin-right: 5px;
	margin-left: 5px;
	border: 1px solid #d7d7d7;
}
.initial-signature-pad {
	background: #ececec;
	border: 1px solid;
}

	.initial-signature-pad canvas {
		background: white;
		border-left: 1px solid #cfcfcf !important;
		border-right: 1px solid #cfcfcf !important;
		border-top: 0 !important;
		border-bottom: 0 !important;
		margin-bottom: -4px;
	}

.top-bar {
	padding: 10px;
	position: fixed;
	top: 0;
	z-index: 9;
	width: 100%;
	left: 0;
	background: var(--paper);
	color: var(--ink);
	border-bottom: 1px solid var(--border);
	display: flex;
	flex-direction: row;
	align-items: center;
}

.bottom-bar {
	padding: 20px 10px 20px 10px;
	position: fixed;
	bottom: 0;
	z-index: 9;
	width: 100%;
	left: 0;
	background: var(--paper);
	color: var(--ink);
	border-top: 1px solid var(--border);
}

@media (max-width: 600px) {
	.nav-tag {
		visibility: hidden;
	}

	.header-title {
		margin: 0;
	}

	html[dir=rtl] .header-title {
		margin: auto auto 0 0;
	}

	#pdfContainer {
		padding: 0;
	}
}

@media (max-width: 900px) {
	.hidden-mobile {
		display: none;
	}

	#fieldsContainer {
		display: flex;
		justify-content: space-between;
	}

	#fieldsContainer div {
		display: inline-block;
	}
}
/* ── End Cobra ESignature ── */

/* ══════════════════════════════════════════
   RESPONSIVE – Tablet  (≤ 768 px)
   ══════════════════════════════════════════ */
@@media (max-width: 768px) {
	/* Nav */
	nav {
		padding: 0 1rem;
	}
	/* Stepper – shrink labels */
	.stepper {
		padding: 1.25rem 1rem 0;
	}

	.step-label {
		font-size: 10px;
	}
	/* Main content */
	main {
		padding: 1.75rem 1rem 3rem;
	}
	/* Panel heading */
	.panel-head h1 {
		font-size: 24px;
	}
	/* Upload zone */
	.upload-zone {
		padding: 2.5rem 1.25rem;
	}
	/* Form section inner padding */
	.form-section {
		padding: 1.25rem;
	}
	/* langCardContainer header: smaller font for email */
	#langCardRecipientEmail {
		font-size: 80%;
	}
	/* Ensure buttons don't overflow */
	.btn {
		padding: 0 16px;
	}

	#signaturesSection {
		border-bottom: 1px solid #ebebeb;
		padding-top: 10px;
	}
}

/* ══════════════════════════════════════════
   RESPONSIVE – Mobile  (≤ 480 px)
   ══════════════════════════════════════════ */
@media (max-width: 480px) {

	/* Nav */
	nav {
		padding: 0 0.75rem;
		height: 52px;
	}

	/* Hide nav tag completely */
	.nav-tag {
		display: none;
	}

	/* Logo image */
	.logo img {
		max-width: 110px !important;
	}

	/* Stepper – hide labels, keep numbers */
	.step-label {
		display: none;
	}

	.stepper {
		padding: 1rem 0.75rem 0;
	}

	/* Main */
	main {
		padding: 1.25rem 0.75rem 2.5rem;
	}

	/* Panel heading */
	.panel-head {
		margin-bottom: 1.25rem;
	}

	.panel-head h1 {
		font-size: 20px;
	}

	.panel-head p {
		font-size: 13px;
	}

	/* Upload zone */
	.upload-zone {
		padding: 2rem 1rem;
	}

	.upload-icon {
		width: 44px;
		height: 44px;
	}

	.upload-zone h3 {
		font-size: 14px;
	}

	/* File pill */
	.file-pill {
		flex-wrap: wrap;
		gap: 8px;
	}

	/* Form section */
	.form-section {
		padding: 1rem;
	}

	/* Identity card */
	.identity-card {
		padding: 1.25rem 1rem 1rem;
		margin-bottom: 12px;
	}

	/* Buttons */
	.btn {
		height: 42px;
		font-size: 13px;
		justify-content: center;
	}

	/* Notice box */
	.notice {
		font-size: 12px;
	}

	/* Verification code input */
	.verification-code-input {
		font-size: 18px;
		height: 46px;
	}

	/* Success panel link box */
	#statusLinkBox {
		flex-wrap: wrap;
	}

	#statusLinkInput {
		min-width: 0;
	}

	#signaturesSection {
		border-bottom: 1px solid #ebebeb;
		padding-top: 10px;
	}
}

.st-spin {
    animation: st-spin 1s linear infinite;
}

@keyframes st-spin {
    to { transform: rotate(360deg); }
}

/* -- FOOTER -- */
footer {
	border-top: 1px solid var(--border);
	padding: 0 2rem;
	height: 52px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: auto;
	flex-shrink: 0;
}

.footer-copy {
	font-size: 12px;
	color: var(--ink-3);
}

.footer-links a {
	font-size: 12px;
	color: var(--ink-3);
	text-decoration: none;
}

.footer-links a:hover {
	color: var(--accent);
}

