/* ============================================
   Tracking Status Checker – Frontend Styles
   ============================================ */

.tsc-wrapper {
	width: 100%;
	display: flex;
	justify-content: center;
	padding: 16px 0;
	font-family: 'Vazirmatn', 'IRANSans', Tahoma, Arial, sans-serif;
	box-sizing: border-box;
}

.tsc-wrapper * {
	box-sizing: border-box;
}

/* کارت اصلی - بزرگ‌تر و با فضای بیشتر */
.tsc-card {
	width: 100%;
	max-width: 620px;
	background: #ffffff;
	border-radius: 20px;
	padding: 40px 38px 36px;
	box-shadow:
		0 20px 60px -15px rgba(20, 20, 43, 0.18),
		0 4px 16px rgba(20, 20, 43, 0.06);
	border: 1px solid rgba(0, 0, 0, 0.05);
}

/* هدر */
.tsc-header {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin-bottom: 10px;
}

.tsc-icon {
	width: 28px;
	height: 28px;
	color: #6366f1;
	flex-shrink: 0;
}

.tsc-title {
	margin: 0;
	font-size: 22px;
	font-weight: 700;
	color: #1a1a2e;
}

.tsc-intro {
	margin: 0 0 28px;
	font-size: 14.5px;
	line-height: 1.9;
	color: #6b7280;
	text-align: center;
}

/* لیبل فیلد */
.tsc-label {
	display: block;
	font-size: 13.5px;
	font-weight: 600;
	color: #374151;
	margin-bottom: 10px;
	text-align: right;
}

/* ردیف ورودی */
.tsc-input-row {
	display: flex;
	gap: 10px;
}

.tsc-input {
	flex: 1;
	min-width: 0;
	padding: 15px 18px;
	font-size: 16px;
	border: 2px solid #e5e7eb;
	border-radius: 14px;
	background: #f9fafb;
	color: #111827;
	transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
	font-family: inherit;
	letter-spacing: 0.5px;
}

.tsc-input:focus {
	outline: none;
	border-color: #6366f1;
	background: #ffffff;
	box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.tsc-input::placeholder {
	color: #b4bac4;
}

/* دکمه */
.tsc-button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 15px 28px;
	font-size: 15.5px;
	font-weight: 700;
	color: #fff;
	background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
	border: none;
	border-radius: 14px;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s;
	white-space: nowrap;
	font-family: inherit;
	min-width: 140px;
}

.tsc-button:hover:not(:disabled) {
	box-shadow: 0 8px 20px -4px rgba(79, 70, 229, 0.55);
	transform: translateY(-2px);
}

.tsc-button:active:not(:disabled) {
	transform: translateY(0);
	box-shadow: none;
}

.tsc-button:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

/* اسپینر */
.tsc-spinner {
	display: none;
	width: 16px;
	height: 16px;
	border: 2.5px solid rgba(255,255,255,0.35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: tsc-spin 0.65s linear infinite;
	flex-shrink: 0;
}

.tsc-button.is-loading .tsc-spinner { display: inline-block; }
.tsc-button.is-loading .tsc-btn-text { opacity: 0.8; }

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

/* باکس نتیجه */
.tsc-result {
	margin-top: 22px;
	padding: 20px 20px 18px;
	border-radius: 14px;
	background: #f9fafb;
	border-right: 4px solid #e5e7eb;
	opacity: 0;
	transform: translateY(-8px);
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.tsc-result.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.tsc-result.is-error {
	background: #fef2f2;
	border-right-color: #ef4444;
}

/* بج وضعیت */
.tsc-status-badge {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 8px 18px 8px 14px;
	border-radius: 999px;
	border: 1.5px solid;
	margin-bottom: 12px;
}

.tsc-status-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	flex-shrink: 0;
	box-shadow: 0 0 0 2px rgba(255,255,255,0.6);
}

.tsc-status-text {
	font-size: 15px;
	font-weight: 700;
}

/* متا (تاریخ) */
.tsc-result-meta {
	font-size: 12.5px;
	color: #9ca3af;
	margin-top: 4px;
}

/* خطا */
.tsc-error-inner {
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.tsc-error-inner svg {
	width: 18px;
	height: 18px;
	color: #ef4444;
	flex-shrink: 0;
	margin-top: 2px;
}

.tsc-error-inner p {
	margin: 0;
	font-size: 14px;
	color: #b91c1c;
	line-height: 1.7;
}

/* یادداشت غنی */
.tsc-result-note {
	margin-top: 16px;
	padding-top: 14px;
	border-top: 1px solid rgba(0,0,0,0.07);
	font-size: 14px;
	color: #374151;
	line-height: 2;
}

.tsc-result-note p { margin: 0 0 10px; }
.tsc-result-note p:last-child { margin-bottom: 0; }

.tsc-result-note img {
	max-width: 100%;
	height: auto;
	border-radius: 10px;
	display: block;
	margin: 10px 0;
}

.tsc-result-note a { color: #4f46e5; text-decoration: underline; }

.tsc-result-note ul,
.tsc-result-note ol {
	padding-right: 22px;
	margin: 0 0 10px;
}

.tsc-result-note table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.tsc-result-note table td,
.tsc-result-note table th {
	border: 1px solid #e5e7eb;
	padding: 7px 10px;
}

/* ریسپانسیو */
@media (max-width: 560px) {
	.tsc-card {
		padding: 28px 20px 24px;
		border-radius: 16px;
	}

	.tsc-input-row {
		flex-direction: column;
	}

	.tsc-button {
		width: 100%;
		min-width: unset;
		padding: 15px;
	}

	.tsc-title {
		font-size: 19px;
	}
}
