/* احراز هویت اتباع — باکس حساب کاربری + فیلدهای مودال ورود */
.gsp-fx { margin-top: 28px; padding: 18px 20px; border: 1px solid #e5e7eb; border-radius: 14px; background: #fff; }
.gsp-fx summary { cursor: pointer; font-weight: 700; line-height: 1.8; }
.gsp-fx__intro { margin: 12px 0 4px; color: #4b5563; font-size: 14px; line-height: 1.9; }
.gsp-fx__status { margin: 0 0 14px; padding: 12px 14px; border-radius: 10px; font-size: 14px; line-height: 1.9; }
.gsp-fx__status--pending { background: #fffbeb; color: #92400e; }
.gsp-fx__status--rejected { background: #fef2f2; color: #991b1b; }
.gsp-fx__req { color: #dc2626; }
.gsp-fx-form { margin-top: 14px; }
.gsp-fx-msg { margin: 10px 0 0; font-size: 14px; }
.gsp-fx-msg.error { color: #b91c1c; }
.gsp-fx-msg.ok { color: #15803d; }

/* مودال ورود */
.gsp-auth-foreign-box { margin: 4px 0 14px; }
.gsp-auth-foreign-box > .gsp-auth-label { display: block; margin-bottom: 8px; }
.gsp-auth-foreign-toggle { margin: 2px 0 12px; }

/* ═══ فیلد انتخاب عکس — جای input فایلِ خامِ مرورگر ═══
   سلکتورها دوکلاسه‌اند تا استایل عمومیِ label در فرم‌های قالب/مودال رویشان ننشیند. */
.gsp-upload.gsp-upload {
	position: relative; display: block; margin: 0 0 10px; padding: 0;
	font-weight: 400; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.gsp-upload .gsp-upload__input {
	position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; opacity: 0;
}
.gsp-upload .gsp-upload__empty,
.gsp-upload .gsp-upload__preview {
	display: flex; align-items: center; gap: 12px; box-sizing: border-box; min-height: 68px;
	padding: 12px 14px; border-radius: 14px; transition: border-color .15s, background .15s, box-shadow .15s;
}
.gsp-upload .gsp-upload__empty[hidden], .gsp-upload .gsp-upload__preview[hidden] { display: none; }
.gsp-upload .gsp-upload__empty { border: 1.5px dashed #c7d2fe; background: #f8faff; }
.gsp-upload:hover .gsp-upload__empty, .gsp-upload.is-drag .gsp-upload__empty { border-color: #386af6; background: #eef3ff; }
.gsp-upload.is-error .gsp-upload__empty { border-color: #ef4444; background: #fef2f2; }
.gsp-upload:focus-within .gsp-upload__empty,
.gsp-upload:focus-within .gsp-upload__preview { box-shadow: 0 0 0 3px rgba(56,106,246,.22); }

.gsp-upload .gsp-upload__icon {
	flex: none; display: grid; place-items: center; width: 44px; height: 44px;
	border-radius: 12px; background: #fff; color: #386af6; box-shadow: 0 1px 3px rgba(16,24,40,.08);
}
.gsp-upload.is-error .gsp-upload__icon { color: #ef4444; }
.gsp-upload .gsp-upload__icon svg { width: 22px; height: 22px; }
.gsp-upload .gsp-upload__text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; text-align: right; }
.gsp-upload .gsp-upload__title { font-size: 14px; font-weight: 700; color: #1f2937; line-height: 1.6; }
.gsp-upload .gsp-upload__sub { font-size: 11.5px; color: #6b7280; line-height: 1.7; }
.gsp-upload .gsp-upload__cta {
	flex: none; padding: 6px 14px; border-radius: 999px; background: #386af6; color: #fff;
	font-size: 12.5px; font-weight: 700; line-height: 1.6;
}

.gsp-upload .gsp-upload__preview { border: 1.5px solid #bbf7d0; background: #f0fdf4; }
.gsp-upload .gsp-upload__preview img {
	flex: none; width: 72px; height: 48px; object-fit: cover; border-radius: 8px; background: #e5e7eb;
}
.gsp-upload .gsp-upload__preview img.is-broken { visibility: hidden; }
.gsp-upload .gsp-upload__meta { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; text-align: right; }
.gsp-upload .gsp-upload__name {
	overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
	direction: ltr; text-align: right; font-size: 13px; font-weight: 600; color: #166534;
}
.gsp-upload .gsp-upload__change { font-size: 12px; color: #386af6; }
.gsp-upload .gsp-upload__remove {
	flex: none; display: grid; place-items: center; width: 34px; height: 34px; margin: 0; padding: 0;
	border: 0; border-radius: 50%; background: #fff; color: #b91c1c; cursor: pointer;
	box-shadow: 0 1px 3px rgba(16,24,40,.12);
}
.gsp-upload .gsp-upload__remove:hover { background: #fef2f2; }
.gsp-upload .gsp-upload__remove svg { width: 16px; height: 16px; }

@media (max-width: 380px) {
	.gsp-upload .gsp-upload__cta { display: none; }
}

/* در حال آماده‌سازی (خواندن + کوچک‌کردن عکس در مرورگر) */
.gsp-upload.is-busy .gsp-upload__preview { border-color: #c7d2fe; background: #f8faff; }
.gsp-upload.is-busy .gsp-upload__preview img { animation: gsp-upload-pulse 1s ease-in-out infinite alternate; }
.gsp-upload.is-busy .gsp-upload__change { color: #6b7280; }
.gsp-upload.is-busy .gsp-upload__name { color: #374151; }
@keyframes gsp-upload-pulse { from { opacity: .45; } to { opacity: 1; } }
/* عکسی که باز نشد: دلیلش جای توضیح زیر عنوان می‌نشیند */
.gsp-upload.is-error .gsp-upload__sub { color: #b91c1c; font-weight: 600; }

/* عکسی که مرورگر بازش نکرد و خام به سرور می‌رود: جای پیش‌نمایش، آیکون */
.gsp-upload.is-raw .gsp-upload__preview img {
	visibility: visible;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23386af6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='3'/%3E%3Ccircle cx='9' cy='11' r='2'/%3E%3Cpath d='M21 16l-4.5-4.5L9 19'/%3E%3C/svg%3E") center / 26px no-repeat;
	border: 1px solid #dbe4ff;
}

/* دکمه‌ی دوربین زیر کادر — فقط دستگاه لمسی؛ روی دسکتاپ capture نادیده گرفته می‌شود
   و همان پنجره‌ی انتخاب فایل را تکرار می‌کرد. */
.gsp-upload-wrap { margin: 0 0 10px; }
.gsp-upload-wrap > .gsp-upload.gsp-upload { margin-bottom: 0; }
.gsp-upload-wrap .gsp-upload__camera {
	display: inline-flex; align-items: center; gap: 6px; margin: 8px 4px 0; padding: 0;
	color: #386af6; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.gsp-upload-wrap .gsp-upload__camera svg { width: 18px; height: 18px; flex: none; }
.gsp-upload-wrap .gsp-upload__cam-input {
	position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); opacity: 0;
}
@media (hover: hover) and (pointer: fine) {
	.gsp-upload-wrap .gsp-upload__camera { display: none; }
}
