/* ==========================================================================
   فرم اسقاط — استایل مدرن با Micro-interactions
   ========================================================================== */

.jk-form {
	margin: 1rem 0;
	padding: var(--jk-box-pad);
	background: var(--jk-white);
	border: 1px solid var(--jk-gray-200);
	border-radius: var(--jk-radius-lg);
	box-shadow: var(--jk-shadow);
}

.jk-form__grid {
	display: grid;
	gap: 0.75rem;
	min-width: 0;
}

.jk-field {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	min-width: 0;
}

.jk-form__header {
	margin-bottom: 0.875rem;
}

.jk-form__badge {
	display: inline-block;
	padding: 0.2rem 0.5rem;
	margin-bottom: 0.375rem;
	font-size: 0.6875rem;
	font-weight: 600;
	color: var(--jk-green-700);
	background: var(--jk-green-50);
	border-radius: 999px;
}

.jk-form__title {
	margin: 0 0 0.25rem;
	font-size: clamp(1.125rem, 3.5vw, 1.25rem);
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.35;
}

.jk-form__subtitle {
	margin: 0;
	font-size: 0.8125rem;
	color: var(--jk-gray-500);
	line-height: 1.55;
}

.jk-field--full {
	margin-top: 0.75rem;
}

.jk-field__label {
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--jk-gray-700);
}

.jk-field__label span {
	color: #dc2626;
}

.jk-field__input {
	width: 100%;
	padding: var(--jk-input-pad);
	font-family: inherit;
	font-size: var(--jk-input-fs);
	color: var(--jk-gray-900);
	background: var(--jk-white);
	border: 1.5px solid var(--jk-gray-200);
	border-radius: var(--jk-radius);
	transition: border-color var(--jk-transition), box-shadow var(--jk-transition);
	appearance: none;
}

.jk-field__input::placeholder {
	color: #9ca3af;
}

.jk-field__input:hover {
	border-color: #d1d5db;
}

.jk-field__input:focus {
	outline: none;
	border-color: var(--jk-green-600);
	box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}

.jk-field__input.is-invalid {
	border-color: #dc2626;
	animation: jk-shake 0.35s ease;
}

.jk-field__select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1.4.6 6 5.2 10.6.6 12 2l-6 6-6-6z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: left 0.875rem center;
	padding-left: 2.25rem;
	cursor: pointer;
}

.jk-field__textarea {
	resize: vertical;
	min-height: 3.5rem;
}

.jk-form__actions {
	display: flex;
	flex-direction: column;
	gap: 0.625rem;
	margin-top: 1rem;
}

.jk-form .jk-btn {
	padding: 0.75rem 1.125rem;
	font-size: 0.875rem;
}

.jk-btn--ghost {
	color: var(--jk-green-700);
	background: var(--jk-green-50);
	border: 1px solid transparent;
}

.jk-btn--ghost:hover {
	background: #dcfce7;
	color: var(--jk-green-700);
}

.jk-btn__loader {
	width: 1rem;
	height: 1rem;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top-color: #fff;
	border-radius: 50%;
	animation: jk-spin 0.6s linear infinite;
}

.jk-btn.is-loading .jk-btn__text {
	opacity: 0.7;
}

.jk-btn.is-loading .jk-btn__loader {
	display: inline-block !important;
}

.jk-form__trust {
	margin: 0.75rem 0 0;
	font-size: 0.75rem;
	color: var(--jk-gray-500);
	text-align: center;
	line-height: 1.5;
}

.jk-form__message {
	margin-top: 0.75rem;
	padding: 0.75rem 0.875rem;
	font-size: 0.875rem;
	border-radius: var(--jk-radius);
	animation: jk-fade-in 0.3s ease;
}

.jk-form__message.is-success {
	color: var(--jk-green-700);
	background: var(--jk-green-50);
	border: 1px solid #bbf7d0;
}

.jk-form__message.is-error {
	color: #b91c1c;
	background: #fef2f2;
	border: 1px solid #fecaca;
}

@keyframes jk-shake {
	0%, 100% { transform: translateX(0); }
	25% { transform: translateX(-4px); }
	75% { transform: translateX(4px); }
}

@keyframes jk-spin {
	to { transform: rotate(360deg); }
}

@keyframes jk-fade-in {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 640px) {
	.jk-form {
		padding: var(--jk-box-pad-lg) 1.5rem;
	}

	.jk-form__grid {
		grid-template-columns: 1fr 1fr;
		gap: 0.75rem 1rem;
	}

	.jk-field--shamsi-date {
		grid-column: 1 / -1;
	}

	.jk-form__actions {
		flex-direction: row;
		align-items: center;
		flex-wrap: wrap;
	}
}

/* ==========================================================================
   هاب خدمات — اسقاط / حمل / قطعه
   ========================================================================== */

.jk-services-hub {
	margin: 1rem 0;
}

.jk-services-hub__intro {
	margin: 0 0 0.75rem;
	padding: 0.625rem 0.875rem;
	font-size: 0.8125rem;
	line-height: 1.65;
	color: var(--jk-gray-700);
	background: var(--jk-gray-100);
	border: 1px solid var(--jk-gray-200);
	border-radius: var(--jk-radius);
}

.jk-services-hub__tabs {
	display: grid;
	grid-template-columns: repeat(var(--jk-svc-tabs, 3), 1fr);
	gap: 0.35rem;
	padding: 0.35rem;
	background: var(--jk-gray-100);
	border: 1px solid var(--jk-gray-200);
	border-radius: var(--jk-radius-lg) var(--jk-radius-lg) 0 0;
}

.jk-services-hub__tab {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.2rem;
	padding: 0.55rem 0.35rem;
	font-family: inherit;
	font-size: 0.6875rem;
	font-weight: 700;
	color: var(--jk-gray-700);
	background: transparent;
	border: 2px solid transparent;
	border-radius: var(--jk-radius);
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.jk-services-hub__tab:hover {
	background: var(--jk-white);
	color: var(--jk-navy-900);
}

.jk-services-hub__tab.is-active {
	color: var(--jk-white);
	background: linear-gradient(135deg, var(--jk-navy-900) 0%, #003d7a 100%);
	border-color: var(--jk-navy-900);
}

.jk-services-hub__tab-icon {
	font-size: 1.125rem;
	line-height: 1;
}

.jk-services-hub .jk-form {
	margin: 0;
	border-radius: 0 0 var(--jk-radius-lg) var(--jk-radius-lg);
	box-shadow: var(--jk-shadow);
}

.jk-services-hub .jk-form[hidden] {
	display: none;
}

#jk-scrap-form,
#jk-pickup-form,
#jk-parts-form,
#jk-services-hub,
#jk-price-wizard,
#jk-importers {
	scroll-margin-top: 4.5rem;
	scroll-margin-bottom: calc(var(--jk-contact-bar-h) + env(safe-area-inset-bottom, 0px) + 0.5rem);
}

@media (min-width: 768px) {
	#jk-scrap-form,
	#jk-pickup-form,
	#jk-parts-form,
	#jk-services-hub,
	#jk-price-wizard,
	#jk-importers {
		scroll-margin-bottom: 1rem;
	}
}

.jk-form__badge--pickup {
	color: #0369a1;
	background: #e0f2fe;
}

.jk-form__badge--parts {
	color: #7c3aed;
	background: #f3e8ff;
}

.jk-btn--bale {
	color: var(--jk-white);
	background: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%);
	border: none;
}

.jk-btn--bale:hover {
	color: var(--jk-white);
	background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
}

.jk-field__hint {
	font-size: 0.6875rem;
	color: var(--jk-gray-500);
}

.jk-field__file {
	padding: 0.5rem 0;
	font-size: 0.8125rem;
	background: transparent;
	border-style: dashed;
}

.jk-hp {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.jk-field--shamsi-date {
	min-width: 0;
	margin-top: 0.75rem;
}

.jk-field--shamsi-date .jk-shamsi-date {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.5rem;
}

.jk-field--shamsi-date .jk-field__hint {
	line-height: 1.5;
	word-break: break-word;
}

.jk-shamsi-date__part {
	min-width: 0;
	max-width: 100%;
}

.jk-breadcrumb {
	font-size: 0.8125rem;
	color: var(--jk-gray-500);
	margin-bottom: 1rem;
}

.jk-breadcrumb a {
	color: var(--jk-navy-800);
	text-decoration: none;
}

.jk-breadcrumb a:hover {
	text-decoration: underline;
}

@media (min-width: 640px) {
	.jk-services-hub__tab {
		flex-direction: row;
		font-size: 0.8125rem;
		padding: 0.65rem 0.75rem;
	}
}

/* تقویم شمسی رزرو حمل — فقط داخل همین فرم */
#jk-pickup-form .jk-pickup-schedule {
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
	margin-top: 0.375rem;
}

#jk-pickup-form .jk-pickup-shamsi {
	display: flex;
	flex-direction: column;
	gap: 0.125rem;
	margin-top: 0;
	min-width: 0;
}

#jk-pickup-form .jk-pickup-shamsi__row {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.375rem;
}

#jk-pickup-form .jk-pickup-shamsi .jk-field__hint {
	font-size: 0.6875rem;
	color: var(--jk-gray-500);
	line-height: 1.4;
}

/* فرم‌های هاب — فشرده */
.jk-services-hub .jk-form {
	padding: 0.625rem 0.875rem;
}

.jk-services-hub .jk-form__header {
	margin-bottom: 0.375rem;
}

.jk-services-hub .jk-form__badge {
	margin-bottom: 0.125rem;
	padding: 0.15rem 0.45rem;
	font-size: 0.625rem;
}

.jk-services-hub .jk-form__title {
	font-size: 1rem;
	margin-bottom: 0;
	line-height: 1.3;
}

.jk-services-hub .jk-form__subtitle {
	font-size: 0.6875rem;
	line-height: 1.4;
	margin-top: 0.125rem;
}

.jk-services-hub .jk-form__grid {
	gap: 0.375rem;
}

.jk-services-hub .jk-field {
	gap: 0.125rem;
}

.jk-services-hub .jk-field__label {
	font-size: 0.6875rem;
}

.jk-services-hub .jk-field--full {
	margin-top: 0.375rem;
}

.jk-services-hub .jk-field__input {
	padding: 0.4375rem 0.625rem;
	font-size: 0.8125rem;
}

.jk-services-hub .jk-field__textarea {
	min-height: 2.25rem;
}

.jk-services-hub .jk-field__file {
	padding: 0.375rem 0;
	font-size: 0.75rem;
}

.jk-services-hub .jk-field__hint {
	font-size: 0.625rem;
}

.jk-services-hub .jk-form__actions {
	margin-top: 0.625rem;
}

.jk-services-hub .jk-form .jk-btn {
	padding: 0.5625rem 0.875rem;
	font-size: 0.8125rem;
}

.jk-services-hub__intro {
	margin-bottom: 0.375rem;
	padding: 0.4375rem 0.625rem;
	font-size: 0.6875rem;
	line-height: 1.5;
}

.jk-services-hub__tabs {
	gap: 0.25rem;
	padding: 0.25rem;
}

.jk-services-hub__tab {
	padding: 0.45rem 0.3rem;
	font-size: 0.625rem;
}

@media (min-width: 640px) {
	.jk-services-hub .jk-form {
		padding: 0.75rem 1rem;
	}

	.jk-services-hub .jk-form__grid {
		gap: 0.375rem 0.625rem;
	}

	.jk-services-hub__tab {
		font-size: 0.75rem;
		padding: 0.5rem 0.625rem;
	}

	#jk-pickup-form .jk-pickup-schedule {
		display: grid;
		grid-template-columns: 1.5fr 1fr;
		gap: 0.375rem 0.625rem;
		align-items: start;
	}
}
