/* ===========================================================
   دفتر اسناد رسمی ۶۶۲ — استایل فرانت سیستم رزرو و ارسال مدارک
   پالت رنگی: طلایی #D3B574 | کرم #f3e9d6 | سرمه‌ای #002279
=========================================================== */

.notary662-wrap {
	--n662-gold: #D3B574;
	--n662-cream: #f3e9d6;
	--n662-navy: #002279;
	--n662-navy-2: #001a5c;
	--n662-ink: #1c2333;
	--n662-muted: #6b7280;
	--n662-radius: 16px;
	--n662-shadow: 0 10px 30px -8px rgba(0, 34, 121, 0.18);
	font-family: inherit;
	color: var(--n662-ink);
	box-sizing: border-box;
}
.notary662-wrap *,
.notary662-wrap *::before,
.notary662-wrap *::after {
	box-sizing: border-box;
}

/* ---------- گرید کارت‌ها ---------- */
.notary662-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 18px;
	margin: 0 auto;
	max-width: 1120px;
	align-items: stretch;
}
@media (max-width: 980px) {
	.notary662-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
	.notary662-grid { grid-template-columns: 1fr; }
}

.notary662-card {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 10px;
	background: linear-gradient(180deg, #ffffff 0%, var(--n662-cream) 140%);
	border: 1px solid rgba(211, 181, 116, 0.45);
	border-radius: var(--n662-radius);
	padding: 20px 20px 16px;
	cursor: pointer;
	text-align: right;
	font-family: inherit;
	overflow: hidden;
	transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease, border-color .35s ease;
	animation: n662-card-in .5s cubic-bezier(.2,.8,.2,1) both;
}
.notary662-grid .notary662-card:nth-child(1){animation-delay:.02s}
.notary662-grid .notary662-card:nth-child(2){animation-delay:.08s}
.notary662-grid .notary662-card:nth-child(3){animation-delay:.14s}
.notary662-grid .notary662-card:nth-child(4){animation-delay:.20s}
.notary662-grid .notary662-card:nth-child(5){animation-delay:.26s}
.notary662-grid .notary662-card:nth-child(6){animation-delay:.32s}

@keyframes n662-card-in {
	from { opacity: 0; transform: translateY(14px) scale(.98); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

.notary662-card::before {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(120px 80px at 15% 15%, rgba(0,34,121,.06), transparent 70%);
	opacity: 0;
	transition: opacity .35s ease;
	pointer-events: none;
}
.notary662-card:hover,
.notary662-card:focus-visible {
	transform: translateY(-4px);
	box-shadow: var(--n662-shadow);
	border-color: var(--n662-gold);
	outline: none;
}
.notary662-card:hover::before { opacity: 1; }
.notary662-card:active { transform: translateY(-1px) scale(.99); }

.notary662-card-head {
	display: flex;
	align-items: center;
	gap: 14px;
}

.notary662-card-icon {
	flex: 0 0 auto;
	width: 52px;
	height: 52px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 14px;
	background: linear-gradient(145deg, var(--n662-navy), var(--n662-navy-2));
	color: var(--n662-gold);
	box-shadow: inset 0 0 0 1px rgba(211,181,116,.35);
	transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.notary662-card-icon svg { width: 26px; height: 26px; }
.notary662-card:hover .notary662-card-icon { transform: rotate(-6deg) scale(1.06); }

.notary662-card-title {
	flex: 1 1 auto;
	font-size: 18px;
	font-weight: 800;
	color: var(--n662-navy);
}

.notary662-card-desc {
	display: block;
	font-size: 13.5px;
	font-weight: 500;
	line-height: 1.9;
	color: var(--n662-muted);
	flex: 1 1 auto;
}

.notary662-card-footer {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 6px;
	margin-top: auto;
	padding-top: 10px;
	border-top: 1px dashed rgba(211,181,116,.5);
	color: var(--n662-gold);
	font-size: 12.5px;
	font-weight: 700;
}
.notary662-card-footer svg {
	transform: translateX(0);
	transition: transform .3s ease;
}
.notary662-card:hover .notary662-card-footer svg { transform: translateX(-4px); }
.notary662-card:hover .notary662-card-footer { color: var(--n662-navy); }

/* ---------- Overlay / Modal ---------- */
.notary662-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 12, 46, 0.55);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	opacity: 0;
	visibility: hidden;
	transition: opacity .3s ease, visibility .3s ease;
}
.notary662-overlay.is-open {
	opacity: 1;
	visibility: visible;
}

.notary662-modal {
	position: relative;
	width: 100%;
	max-width: 720px;
	max-height: 88vh;
	overflow-y: auto;
	background: #fff;
	border-radius: 20px;
	padding: 30px 30px 26px;
	box-shadow: 0 30px 80px -20px rgba(0,10,40,.5);
	transform: translateY(24px) scale(.96);
	opacity: 0;
	transition: transform .38s cubic-bezier(.2,.9,.25,1.05), opacity .3s ease;
	scrollbar-width: thin;
	scrollbar-color: var(--n662-gold) transparent;
}
.notary662-overlay.is-open .notary662-modal {
	transform: translateY(0) scale(1);
	opacity: 1;
}
.notary662-modal::-webkit-scrollbar { width: 6px; }
.notary662-modal::-webkit-scrollbar-thumb { background: var(--n662-gold); border-radius: 10px; }

.notary662-close {
	position: absolute;
	top: 16px;
	left: 16px;
	width: 34px;
	height: 34px;
	border: none;
	border-radius: 50%;
	background: var(--n662-cream);
	color: var(--n662-navy);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background .25s ease, transform .25s ease;
}
.notary662-close:hover { background: var(--n662-gold); transform: rotate(90deg); }

.notary662-modal-head { text-align: center; margin-bottom: 18px; }
.notary662-modal-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 58px;
	height: 58px;
	border-radius: 16px;
	background: linear-gradient(145deg, var(--n662-navy), var(--n662-navy-2));
	color: var(--n662-gold);
	margin-bottom: 10px;
}
.notary662-modal-icon svg { width: 30px; height: 30px; }
.notary662-modal-head h3 { margin: 0 0 4px; font-size: 23px; font-weight: 800; color: var(--n662-navy); }
.notary662-modal-sub { margin: 0; color: var(--n662-muted); font-size: 15px; font-weight: 600; }

/* ---------- فرم ---------- */
.notary662-section {
	border: 1px solid #ecebe4;
	border-radius: 14px;
	padding: 16px 16px 10px;
	margin: 0 0 16px;
}
.notary662-section legend {
	padding: 0 8px;
	font-weight: 800;
	color: var(--n662-navy);
	font-size: 16.5px;
}

.notary662-field-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px 14px;
}
@media (max-width: 560px) {
	.notary662-field-grid { grid-template-columns: 1fr; }
}

.notary662-field { margin-bottom: 12px; }
.notary662-field label {
	display: block;
	font-size: 15px;
	font-weight: 700;
	color: #333d4f;
	margin-bottom: 6px;
}
.notary662-optional { font-size: 13px; color: #a8905f; font-weight: 700; }
.notary662-required { font-size: 13px; color: #b3372f; font-weight: 800; }
.notary662-field input,
.notary662-field textarea,
.notary662-field select {
	width: 100%;
	border: 1.5px solid #e4e1d6;
	background: #fbfaf6;
	border-radius: 10px;
	padding: 11px 12px;
	font-size: 16.5px;
	font-weight: 500;
	font-family: inherit;
	color: var(--n662-ink);
	transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.notary662-field textarea { resize: vertical; min-height: 80px; }
.notary662-field input:focus,
.notary662-field textarea:focus,
.notary662-field select:focus {
	outline: none;
	border-color: var(--n662-navy);
	background: #fff;
	box-shadow: 0 0 0 4px rgba(0,34,121,.08);
}
.notary662-field.has-error input,
.notary662-field.has-error textarea {
	border-color: #d64545;
	background: #fff6f6;
}
.notary662-error {
	display: block;
	color: #d64545;
	font-size: 13px;
	font-weight: 700;
	min-height: 15px;
	margin-top: 4px;
}

/* ---------- بارگذاری فایل ---------- */
.notary662-file-note {
	background: var(--n662-cream);
	border-right: 3px solid var(--n662-gold);
	padding: 8px 12px;
	border-radius: 8px;
	font-size: 14.5px;
	font-weight: 700;
	color: var(--n662-navy);
	margin: 0 0 12px;
}
.notary662-file-note:empty { display: none; }

.notary662-dropzone {
	border: 2px dashed #d8d3c2;
	border-radius: 14px;
	padding: 26px 16px;
	text-align: center;
	cursor: pointer;
	background: #fbfaf6;
	transition: border-color .25s ease, background .25s ease, transform .15s ease;
}
.notary662-dropzone:hover { border-color: var(--n662-gold); background: #fdf9ef; }
.notary662-dropzone.is-dragover {
	border-color: var(--n662-navy);
	background: #eef1fb;
	transform: scale(1.01);
}
.notary662-dz-icon { color: var(--n662-gold); margin-bottom: 6px; }
.notary662-dz-text { display: block; font-size: 16px; font-weight: 800; color: var(--n662-navy); }
.notary662-dz-hint { display: block; font-size: 13.5px; font-weight: 600; color: var(--n662-muted); margin-top: 4px; }

.notary662-file-list {
	list-style: none;
	margin: 12px 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.notary662-file-list li {
	display: flex;
	align-items: center;
	gap: 10px;
	background: #fff;
	border: 1px solid #ecebe4;
	border-radius: 10px;
	padding: 8px 10px;
	font-size: 13.5px;
	font-weight: 500;
	animation: n662-file-in .25s ease both;
}
@keyframes n662-file-in {
	from { opacity: 0; transform: translateY(-6px); }
	to { opacity: 1; transform: translateY(0); }
}
.notary662-file-list .n662-file-ext-badge {
	flex: 0 0 auto;
	background: var(--n662-navy);
	color: var(--n662-gold);
	font-size: 10px;
	font-weight: 700;
	padding: 3px 6px;
	border-radius: 6px;
}
.notary662-file-list .n662-file-name { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notary662-file-list .n662-file-size { flex: 0 0 auto; color: var(--n662-muted); }
.notary662-file-list button {
	flex: 0 0 auto;
	border: none;
	background: transparent;
	color: #c33;
	cursor: pointer;
	font-size: 16px;
	line-height: 1;
	padding: 4px;
	border-radius: 6px;
	transition: background .2s ease;
}
.notary662-file-list button:hover { background: #fbe6e6; }

/* ---------- ارسال ---------- */
.notary662-submit-row { display: flex; justify-content: center; margin-top: 6px; }
.notary662-submit-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-width: 200px;
	border: none;
	border-radius: 12px;
	padding: 13px 26px;
	background: linear-gradient(135deg, var(--n662-navy), var(--n662-navy-2));
	color: #fff;
	font-weight: 800;
	font-size: 16.5px;
	font-family: inherit;
	cursor: pointer;
	box-shadow: 0 10px 22px -8px rgba(0,34,121,.55);
	transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}
.notary662-submit-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 26px -8px rgba(0,34,121,.6); }
.notary662-submit-btn:active { transform: translateY(0); }
.notary662-submit-btn:disabled { opacity: .75; cursor: progress; transform: none; }

.notary662-spinner {
	display: none;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 2.5px solid rgba(255,255,255,.35);
	border-top-color: #fff;
	animation: n662-spin .7s linear infinite;
}
.notary662-submit-btn.is-loading .notary662-spinner { display: inline-block; }
.notary662-submit-btn.is-loading .notary662-btn-text { opacity: .85; }
@keyframes n662-spin { to { transform: rotate(360deg); } }

.notary662-btn-secondary,
.notary662-btn-primary {
	border: none;
	border-radius: 10px;
	padding: 11px 20px;
	font-family: inherit;
	font-weight: 800;
	font-size: 14.5px;
	cursor: pointer;
	transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.notary662-btn-primary {
	background: linear-gradient(135deg, var(--n662-navy), var(--n662-navy-2));
	color: #fff;
	box-shadow: 0 10px 22px -8px rgba(0,34,121,.5);
}
.notary662-btn-primary:hover { transform: translateY(-2px); }
.notary662-btn-secondary {
	background: var(--n662-cream);
	color: var(--n662-navy);
	border: 1px solid rgba(211,181,116,.6);
}
.notary662-btn-secondary:hover { background: #ecdfc0; }

/* ---------- toast خطای کلی ---------- */
.notary662-toast-error {
	background: #fff3f3;
	border: 1px solid #f3c9c9;
	color: #b33;
	border-radius: 10px;
	padding: 10px 14px;
	font-size: 13px;
	margin-bottom: 14px;
	animation: n662-shake .4s ease;
}
@keyframes n662-shake {
	0%,100% { transform: translateX(0); }
	20% { transform: translateX(-6px); }
	40% { transform: translateX(6px); }
	60% { transform: translateX(-4px); }
	80% { transform: translateX(4px); }
}

/* ---------- صفحه موفقیت ---------- */
.notary662-success {
	display: none;
	text-align: center;
	padding: 20px 6px 6px;
}
.notary662-success.is-visible { display: block; animation: n662-fade-up .4s ease both; }
@keyframes n662-fade-up {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: translateY(0); }
}
.notary662-success-icon {
	width: 84px;
	height: 84px;
	margin: 0 auto 16px;
	color: #2f9e5c;
}
.notary662-success-icon svg { width: 100%; height: 100%; }
.notary662-success-icon circle {
	stroke: #2f9e5c;
	stroke-width: 2.5;
	stroke-dasharray: 166;
	stroke-dashoffset: 166;
	animation: n662-draw-circle .55s ease forwards;
}
.notary662-success-icon path {
	stroke: #2f9e5c;
	stroke-width: 3.2;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-dasharray: 48;
	stroke-dashoffset: 48;
	animation: n662-draw-check .35s ease forwards .55s;
}
@keyframes n662-draw-circle { to { stroke-dashoffset: 0; } }
@keyframes n662-draw-check { to { stroke-dashoffset: 0; } }

.notary662-success h3 { color: var(--n662-navy); margin: 0 0 8px; font-size: 20px; font-weight: 800; }
.notary662-success p { color: var(--n662-muted); font-size: 14.5px; font-weight: 500; max-width: 420px; margin: 0 auto 22px; line-height: 1.9; }
.notary662-success-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* حالت مخفی برای فرم بعد از ارسال موفق */
.notary662-form.is-hidden { display: none; }

/* ---------- انتخاب‌گر تاریخ شمسی ---------- */
.notary662-field-date { position: relative; }
.notary662-date-input-wrap {
	display: flex;
	align-items: stretch;
	gap: 6px;
}
.notary662-date-input {
	flex: 1 1 auto;
	direction: ltr;
	text-align: left;
}
.notary662-date-toggle {
	flex: 0 0 auto;
	width: 44px;
	border: 1.5px solid #e4e1d6;
	background: var(--n662-cream);
	color: var(--n662-navy);
	border-radius: 10px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .2s ease, border-color .2s ease, transform .15s ease;
}
.notary662-date-toggle:hover {
	background: var(--n662-gold);
	color: #fff;
	border-color: var(--n662-gold);
	transform: translateY(-1px);
}

.notary662-datepicker {
	z-index: 100050;
	width: 264px;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 20px 50px -12px rgba(0,10,40,.35);
	border: 1px solid #ecebe4;
	padding: 12px;
	font-family: inherit;
	direction: rtl;
	animation: n662-dp-in .18s ease both;
}
@keyframes n662-dp-in { from { opacity:0; transform: translateY(-6px); } to { opacity:1; transform: translateY(0); } }

.notary662-dp-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 10px; }
.notary662-dp-nav {
	flex: 0 0 auto;
	width: 30px;
	height: 30px;
	border: none;
	border-radius: 8px;
	background: var(--n662-cream);
	color: var(--n662-navy);
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	transition: background .2s ease;
}
.notary662-dp-nav:hover { background: var(--n662-gold); color: #fff; }
.notary662-dp-selects { display: flex; gap: 6px; flex: 1 1 auto; }
.notary662-dp-select {
	flex: 1 1 auto;
	border: 1px solid #e4e1d6;
	border-radius: 8px;
	padding: 5px 4px;
	font-size: 13.5px;
	font-weight: 600;
	font-family: inherit;
	background: #fbfaf6;
	color: var(--n662-ink);
}
.notary662-dp-weekrow { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; margin-bottom: 4px; }
.notary662-dp-weekrow span { font-size: 12px; color: var(--n662-muted); font-weight: 800; }
.notary662-dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.notary662-dp-day {
	border: none;
	background: transparent;
	border-radius: 8px;
	padding: 7px 0;
	font-size: 13.5px;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	color: var(--n662-ink);
	transition: background .15s ease, color .15s ease;
}
.notary662-dp-day:hover { background: var(--n662-cream); }
.notary662-dp-day.is-selected { background: var(--n662-navy); color: #fff; font-weight: 700; }

/* ---------- افراد متعدد هر طرف ---------- */
.notary662-person {
	background: #fdfcf9;
	border: 1px solid #ece7d8;
	border-radius: 12px;
	padding: 14px 14px 4px;
	margin-bottom: 14px;
	position: relative;
	animation: n662-person-in .3s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes n662-person-in {
	from { opacity: 0; transform: translateY(-8px) scale(.98); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}
.notary662-person-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
}
.notary662-person-title {
	font-size: 14.5px;
	font-weight: 800;
	color: var(--n662-navy);
	background: var(--n662-cream);
	padding: 3px 12px;
	border-radius: 20px;
}
.notary662-person-remove {
	border: none;
	background: transparent;
	color: #c33;
	font-size: 13.5px;
	font-weight: 700;
	cursor: pointer;
	padding: 4px 8px;
	border-radius: 6px;
	transition: background .2s ease;
	display: flex;
	align-items: center;
	gap: 4px;
}
.notary662-person-remove:hover { background: #fbe6e6; }

.notary662-add-person {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 100%;
	border: 1.5px dashed var(--n662-gold);
	background: #fffdf8;
	color: var(--n662-navy);
	border-radius: 10px;
	padding: 9px;
	font-size: 14.5px;
	font-weight: 800;
	font-family: inherit;
	cursor: pointer;
	margin-bottom: 6px;
	transition: background .2s ease, transform .15s ease;
}
.notary662-add-person:hover { background: var(--n662-cream); transform: translateY(-1px); }

/* ---------- راهنمای همیشگی زیر فیلد (نه فقط خطا) ---------- */
.notary662-hint {
	display: block;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--n662-muted);
	margin-top: 4px;
}

@media (max-width: 480px) {
	.notary662-modal { padding: 24px 16px 20px; border-radius: 16px; }
	.notary662-success-actions { flex-direction: column; }
	.notary662-btn-primary, .notary662-btn-secondary { width: 100%; }
	.notary662-datepicker { width: 240px; }
}
