/* Keyframes - can't be inline */
@keyframes th-pulse      { 0%{transform:scale(1);opacity:.7} 70%{transform:scale(2.8);opacity:0} 100%{transform:scale(1);opacity:0} }
@keyframes th-rotate     { to{transform:rotate(360deg)} }
@keyframes th-fade-in    { from{opacity:0;transform:translateY(4px)} to{opacity:1;transform:translateY(0)} }
@keyframes th-trace-in   { from{opacity:0;transform:translateY(4px)} to{opacity:1;transform:translateY(0)} }
@keyframes th-dot-bounce { from{opacity:.3;transform:scaleY(.6)} to{opacity:1;transform:scaleY(1.3)} }

/* Pulse ring animation */
#th-member-lookup .th-pulse-ring { animation: th-pulse 1.8s ease-out infinite !important; }

/* Spinner */
#th-member-lookup .th-spin { animation: th-rotate 0.8s linear infinite !important; }

/* Focus ring - can't be inline */
#th-member-lookup input:focus, #th-member-lookup select:focus {
	border-color: #AD8466 !important;
	box-shadow: 0 0 0 3px rgba(173,132,102,0.12) !important;
	outline: none !important;
}

/* Strip theme bullet styles from panel list */
#th-member-lookup ul { list-style: none !important; }
#th-member-lookup ul li::before { display: none !important; content: none !important; }
#th-member-lookup ul li::marker { display: none !important; }

/* Results - rendered by JS so must live in CSS */
#th-member-lookup .th-results:not(:empty) { border-top: 1px solid #e5e7eb !important; }
#th-member-lookup .th-result-card { padding:18px 24px !important; border-bottom:1px solid #f3f4f6 !important; background:#fff !important; animation:th-fade-in 0.3s ease !important; }
#th-member-lookup .th-result-card:last-child { border-bottom:none !important; }
#th-member-lookup .th-result-top { display:flex !important; align-items:flex-start !important; justify-content:space-between !important; gap:10px !important; margin-bottom:10px !important; }
#th-member-lookup .th-result-name { font-size:15px !important; font-weight:700 !important; color:#1f2937 !important; margin:0 !important; }
#th-member-lookup .th-result-name-en { font-size:13px !important; color:#6b7280 !important; margin-top:2px !important; }
#th-member-lookup .th-result-company { font-size:13px !important; color:#6b7280 !important; margin-top:2px !important; }
#th-member-lookup .th-status-badge { display:inline-flex !important; align-items:center !important; gap:4px !important; padding:4px 10px !important; border-radius:20px !important; font-size:12px !important; font-weight:600 !important; white-space:nowrap !important; flex-shrink:0 !important; }
#th-member-lookup .th-status-badge.active    { background:#f0fdf4 !important; color:#16a34a !important; border:1px solid #bbf7d0 !important; }
#th-member-lookup .th-status-badge.expired   { background:#fffbeb !important; color:#d97706 !important; border:1px solid #fde68a !important; }
#th-member-lookup .th-status-badge.suspended { background:#fef2f2 !important; color:#dc2626 !important; border:1px solid #fecaca !important; }
#th-member-lookup .th-result-meta { display:flex !important; flex-wrap:wrap !important; gap:6px !important; margin-bottom:6px !important; padding:0 !important; }
#th-member-lookup .th-meta-chip { display:inline-flex !important; align-items:center !important; gap:3px !important; background:#f3f4f6 !important; color:#4b5563 !important; font-size:12px !important; padding:3px 8px !important; border-radius:4px !important; }
#th-member-lookup .th-tier-vip      { background:#fef3c7 !important; color:#92400e !important; border:1px solid #fcd34d !important; }
#th-member-lookup .th-tier-premium  { background:#f0f9ff !important; color:#0369a1 !important; border:1px solid #bae6fd !important; }
#th-member-lookup .th-tier-standard { background:#f9fafb !important; color:#374151 !important; border:1px solid #e5e7eb !important; }
#th-member-lookup .th-result-bio    { font-size:13px !important; color:#6b7280 !important; line-height:1.6 !important; margin:8px 0 0 !important; padding-top:8px !important; border-top:1px solid #f0f0f0 !important; }
#th-member-lookup .th-not-found     { padding:24px !important; display:flex !important; gap:14px !important; align-items:flex-start !important; background:#fff !important; }
#th-member-lookup .th-not-found-icon { flex-shrink:0 !important; width:36px !important; height:36px !important; background:#f3f4f6 !important; border-radius:50% !important; display:flex !important; align-items:center !important; justify-content:center !important; color:#6b7280 !important; }
#th-member-lookup .th-not-found-title { font-size:14px !important; font-weight:700 !important; color:#1f2937 !important; margin:0 0 4px !important; }
#th-member-lookup .th-not-found-text  { font-size:13px !important; color:#6b7280 !important; margin:0 !important; line-height:1.6 !important; }
#th-member-lookup .th-error { padding:14px 24px !important; background:#fef2f2 !important; color:#dc2626 !important; font-size:13px !important; display:flex !important; align-items:center !important; gap:8px !important; }

/* Agent trace */
#th-member-lookup .th-agent-trace   { padding:16px 24px 8px !important; background:#fff !important; }
#th-member-lookup .th-trace-header  { font-size:11px !important; font-weight:700 !important; text-transform:uppercase !important; letter-spacing:.8px !important; color:#9ca3af !important; margin-bottom:10px !important; }
#th-member-lookup .th-trace-step    { display:flex !important; align-items:center !important; gap:10px !important; padding:7px 0 !important; border-bottom:1px solid #f9fafb !important; font-size:13px !important; opacity:0; animation:th-trace-in .25s ease forwards !important; }
#th-member-lookup .th-trace-step:last-child { border-bottom:none !important; }
#th-member-lookup .th-trace-icon    { width:22px !important; height:22px !important; border-radius:50% !important; display:flex !important; align-items:center !important; justify-content:center !important; flex-shrink:0 !important; }
#th-member-lookup .th-trace-icon.pending { background:#f3f4f6 !important; color:#d1d5db !important; }
#th-member-lookup .th-trace-icon.active  { background:#fef3e8 !important; }
#th-member-lookup .th-trace-icon.done    { background:#f0fdf4 !important; color:#22c55e !important; }
#th-member-lookup .th-trace-label        { flex:1 !important; color:#9ca3af !important; }
#th-member-lookup .th-trace-label.active { color:#1f2937 !important; font-weight:500 !important; }
#th-member-lookup .th-trace-label.done   { color:#9ca3af !important; }
#th-member-lookup .th-trace-dots  { display:flex !important; gap:3px !important; align-items:center !important; }
#th-member-lookup .th-dot { width:4px !important; height:4px !important; border-radius:50% !important; background:#AD8466 !important; animation:th-dot-bounce .6s ease-in-out infinite alternate !important; }
#th-member-lookup .th-dot:nth-child(2) { animation-delay:.15s !important; }
#th-member-lookup .th-dot:nth-child(3) { animation-delay:.30s !important; }

/* ── MOBILE ── */
@media (max-width: 639px) {

	/* Cancel the full-width bleed — it breaks inside narrow page builder columns */
	#th-member-lookup {
		width: 100% !important;
		left: auto !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
		padding: 32px 16px !important;
		box-sizing: border-box !important;
	}

	/* Stack logo + text vertically, centered */
	#th-member-lookup .th-header-row {
		flex-direction: column !important;
		align-items: center !important;
		text-align: center !important;
		gap: 20px !important;
	}
	#th-member-lookup .th-header-row img {
		width: 200px !important;
		max-width: 80% !important;
		margin: 0 auto !important;
	}
	/* Title font size */
	#th-member-lookup .th-header-row > div:last-child > div:first-child {
		font-size: 22px !important;
		text-align: center !important;
	}
	/* Subtitle */
	#th-member-lookup .th-header-row > div:last-child > div:last-child {
		font-size: 13px !important;
		text-align: center !important;
	}

	/* Stack brown panel on top, form card below */
	#th-member-lookup .th-body-row {
		flex-direction: column !important;
		border-radius: 10px !important;
	}

	/* Brown panel full width */
	#th-member-lookup .th-panel-col {
		flex: none !important;
		width: 100% !important;
		min-width: 0 !important;
		text-align: left !important;
		align-items: flex-start !important;
		padding: 24px 20px !important;
		box-sizing: border-box !important;
	}

	/* Form header: wrap pill under title on very small screens */
	#th-member-lookup .th-form-header-inner {
		flex-wrap: wrap !important;
		gap: 10px !important;
	}

	/* Result card stacks name + badge vertically */
	#th-member-lookup .th-result-top {
		flex-direction: column !important;
		gap: 8px !important;
		align-items: flex-start !important;
	}
}

/* ── TABLET 640-959px ── */
@media (min-width: 640px) and (max-width: 959px) {
	#th-member-lookup {
		padding: 40px 20px !important;
	}
}
