/* Kardanan Labor Law Chat */

.klc-cta,
.klc-panel,
.klc-overlay {
	--klc-teal-900: #08443d;
	--klc-teal-800: #0b5d53;
	--klc-teal-700: #0e7a6b;
	--klc-teal-600: #12907d;
	--klc-teal-100: #e4f3f0;
	--klc-teal-50: #f4faf8;
	--klc-ink: #1d2b29;
	--klc-muted: #61736f;
	--klc-line: #dbe8e5;
	--klc-amber: #f7b02b;
	--klc-amber-light: #ffcd5c;
	box-sizing: border-box;
	direction: rtl;
	text-align: right;
}
.klc-cta *,
.klc-panel *,
.klc-overlay * {
	box-sizing: border-box;
}
.klc-cta button,
.klc-panel button,
.klc-panel textarea {
	font-family: inherit;
	letter-spacing: normal;
	text-transform: none;
}

/* ===================== CTA section ===================== */

.klc-cta {
	position: relative;
	isolation: isolate;
	container-type: inline-size;
	container-name: klc-cta;
	overflow: hidden;
	margin: 0;
	padding: clamp(44px, 6vw, 92px) clamp(20px, 5vw, 72px);
	color: #fff;
	font-family: inherit;
	background:
		radial-gradient(900px 420px at 92% -10%, rgba(255, 255, 255, 0.14), transparent 62%),
		radial-gradient(700px 520px at 0% 110%, rgba(247, 176, 43, 0.16), transparent 60%),
		linear-gradient(135deg, var(--klc-teal-900) 0%, var(--klc-teal-700) 52%, var(--klc-teal-600) 100%);
}
.klc-cta::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background-image: radial-gradient(rgba(255, 255, 255, 0.2) 1.2px, transparent 1.4px);
	background-size: 20px 20px;
	-webkit-mask-image: linear-gradient(to left, transparent 0%, #000 70%);
	mask-image: linear-gradient(to left, transparent 0%, #000 70%);
	opacity: 0.45;
}
.klc-cta::after {
	content: "";
	position: absolute;
	z-index: -1;
	width: 520px;
	height: 520px;
	left: -160px;
	top: -200px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.14);
	box-shadow: 0 0 0 60px rgba(255, 255, 255, 0.03), 0 0 0 120px rgba(255, 255, 255, 0.02);
}
.klc-cta__inner {
	max-width: 1180px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
	gap: clamp(28px, 5vw, 76px);
	align-items: center;
}
.klc-cta .klc-cta__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 7px 16px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.12);
	border: 1px solid rgba(255, 255, 255, 0.24);
	font-size: 14px;
	line-height: 1.6;
	color: #eafff9;
}
.klc-pulse {
	position: relative;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: #7ef0c6;
	flex: none;
}
.klc-pulse::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: #7ef0c6;
	animation: klc-ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}
.klc-cta .klc-cta__title {
	margin: 20px 0 14px;
	padding: 0;
	font-family: inherit;
	font-size: clamp(30px, 4.3vw, 54px);
	font-weight: 800;
	line-height: 1.4;
	color: #fff;
	border: 0;
	text-shadow: 0 2px 24px rgba(0, 0, 0, 0.18);
	text-wrap: balance;
}
.klc-cta .klc-cta__lead {
	margin: 0 0 30px;
	text-wrap: pretty;
	max-width: 36em;
	font-size: clamp(16px, 1.55vw, 20px);
	line-height: 2.05;
	color: rgba(255, 255, 255, 0.9);
}
.klc-cta .klc-cta__button {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	min-height: 64px;
	padding: 16px 36px;
	border: 0;
	border-radius: 18px;
	cursor: pointer;
	font-size: clamp(18px, 1.7vw, 22px);
	font-weight: 800;
	line-height: 1.4;
	color: #2b1b00;
	background: linear-gradient(180deg, var(--klc-amber-light) 0%, var(--klc-amber) 100%);
	box-shadow: 0 18px 34px -14px rgba(247, 176, 43, 0.75), inset 0 -3px 0 rgba(0, 0, 0, 0.12);
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.klc-cta .klc-cta__button svg {
	width: 26px;
	height: 26px;
}
.klc-cta .klc-cta__button:hover {
	transform: translateY(-2px);
	box-shadow: 0 22px 40px -14px rgba(247, 176, 43, 0.85), inset 0 -3px 0 rgba(0, 0, 0, 0.12);
}
.klc-cta .klc-cta__button:active {
	transform: translateY(0);
}
.klc-cta button:focus-visible,
.klc-panel button:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 3px;
}
.klc-cta__examples {
	margin-top: 30px;
}
.klc-cta .klc-cta__examples-label {
	display: block;
	margin-bottom: 12px;
	font-size: 14px;
	color: rgba(255, 255, 255, 0.72);
}
.klc-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.klc-cta .klc-chip {
	padding: 9px 16px;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.3);
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	font-size: 14.5px;
	line-height: 1.7;
	text-align: right;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease;
}
.klc-cta .klc-chip:hover {
	background: rgba(255, 255, 255, 0.18);
	border-color: rgba(255, 255, 255, 0.5);
}
.klc-cta .klc-cta__foot {
	margin: 26px 0 0;
	font-size: 13px;
	color: rgba(255, 255, 255, 0.62);
}

/* Preview card */
.klc-cta__visual {
	position: relative;
}
.klc-mock {
	position: relative;
	max-width: 430px;
	margin-inline: auto;
	border-radius: 24px;
	overflow: hidden;
	color: var(--klc-ink);
	background: #fff;
	box-shadow: 0 40px 70px -28px rgba(0, 0, 0, 0.55), 0 0 0 10px rgba(255, 255, 255, 0.07);
	transform: rotate(-2.5deg);
	animation: klc-float 7s ease-in-out infinite;
	cursor: pointer;
}
.klc-mock__head {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 18px;
	border-bottom: 1px solid var(--klc-line);
}
.klc-avatar {
	display: inline-grid;
	place-items: center;
	flex: none;
	width: 42px;
	height: 42px;
	border-radius: 14px;
	color: #fff;
	background: linear-gradient(135deg, var(--klc-teal-800), var(--klc-teal-600));
}
.klc-mock__who {
	display: flex;
	flex-direction: column;
	line-height: 1.6;
}
.klc-mock__who strong {
	font-size: 15px;
}
.klc-mock__who small {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	color: var(--klc-muted);
}
.klc-online {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #2bc48a;
	box-shadow: 0 0 0 3px rgba(43, 196, 138, 0.18);
}
.klc-mock__body {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 18px;
	background: var(--klc-teal-50);
}
.klc-mock__msg {
	max-width: 88%;
	padding: 11px 14px;
	border-radius: 16px;
	font-size: 14px;
	line-height: 1.95;
}
.klc-mock__msg--user {
	align-self: flex-end;
	color: #fff;
	background: var(--klc-teal-700);
	border-top-left-radius: 6px;
}
.klc-mock__msg--bot {
	align-self: flex-start;
	background: #fff;
	border: 1px solid var(--klc-line);
	border-top-right-radius: 6px;
}
.klc-mock__msg--bot strong {
	color: var(--klc-teal-800);
}
.klc-mock__typing {
	align-self: flex-start;
	display: inline-flex;
	gap: 5px;
	padding: 12px 14px;
	border-radius: 16px;
	background: #fff;
	border: 1px solid var(--klc-line);
}
.klc-mock__typing span {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #9db3ae;
	animation: klc-bounce 1.2s infinite ease-in-out;
}
.klc-mock__typing span:nth-child(2) { animation-delay: 0.15s; }
.klc-mock__typing span:nth-child(3) { animation-delay: 0.3s; }
.klc-mock__input {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin: 14px;
	padding: 8px 14px 8px 8px;
	border: 1px solid var(--klc-line);
	border-radius: 16px;
	font-size: 14px;
	color: #8b9d99;
}
.klc-mock__send {
	display: inline-grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border-radius: 12px;
	color: #fff;
	background: var(--klc-teal-700);
}
.klc-mock__send svg,
.klc-send svg {
	transform: scaleX(-1);
}

/* ===================== Chat panel ===================== */

.klc-panel {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	overflow: hidden;
	border-radius: 22px;
	background: #fff;
	color: var(--klc-ink);
	font-family: inherit;
	font-size: 15.5px;
	line-height: 1.9;
}
.klc-panel__head {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: none;
	padding: 14px 18px;
	color: #fff;
	background: linear-gradient(135deg, var(--klc-teal-900), var(--klc-teal-600));
}
.klc-panel__head .klc-avatar {
	background: rgba(255, 255, 255, 0.14);
}
.klc-panel__titles {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-width: 0;
	line-height: 1.6;
}
.klc-panel__titles strong {
	font-size: 17px;
	font-weight: 800;
}
.klc-panel__titles small {
	display: flex;
	max-width: 100%;
	overflow: hidden;
	white-space: nowrap;
	align-items: center;
	gap: 7px;
	font-size: 12.5px;
	opacity: 0.88;
}
.klc-panel .klc-icon-btn {
	display: inline-grid;
	place-items: center;
	flex: none;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 0;
	border-radius: 13px;
	color: #fff;
	background: rgba(255, 255, 255, 0.13);
	cursor: pointer;
	transition: background 0.15s ease;
}
.klc-panel .klc-icon-btn:hover {
	background: rgba(255, 255, 255, 0.24);
}
.klc-notice {
	flex: none;
	padding: 9px 18px;
	font-size: 13px;
	line-height: 1.9;
	color: #6a4b0f;
	background: #fff6e3;
	border-bottom: 1px solid #f2e0b8;
}
.klc-log {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 22px 18px;
	background: var(--klc-teal-50);
	outline: none;
}
.klc-msg {
	display: flex;
}
.klc-msg--bot {
	justify-content: flex-start;
}
.klc-msg--user {
	justify-content: flex-end;
}
.klc-bubble {
	max-width: min(88%, 640px);
	padding: 12px 16px;
	border-radius: 18px;
	overflow-wrap: anywhere;
}
.klc-msg--bot .klc-bubble {
	background: #fff;
	border: 1px solid var(--klc-line);
	border-top-right-radius: 6px;
	box-shadow: 0 6px 18px -14px rgba(8, 68, 61, 0.35);
}
.klc-msg--user .klc-bubble {
	color: #fff;
	background: var(--klc-teal-700);
	border-top-left-radius: 6px;
}
.klc-bubble p {
	margin: 0 0 0.6em;
	padding: 0;
	font-size: inherit;
	line-height: inherit;
}
.klc-bubble > :last-child {
	margin-bottom: 0;
}
.klc-bubble ul,
.klc-bubble ol {
	margin: 0.2em 0 0.7em;
	padding: 0 1.4em 0 0;
}
.klc-bubble ol {
	list-style-type: persian;
}
.klc-bubble li {
	margin: 0 0 0.3em;
	padding: 0;
}
.klc-bubble strong {
	font-weight: 800;
}
.klc-msg--bot .klc-bubble strong {
	color: var(--klc-teal-900);
}
.klc-bubble .klc-h {
	font-weight: 800;
	color: var(--klc-teal-800);
}
.klc-msg--notice .klc-bubble {
	background: #fff6e3;
	border-color: #f2e0b8;
	color: #6a4b0f;
}
.klc-msg--error .klc-bubble {
	background: #fdeeee;
	border-color: #f3c6c6;
	color: #8a1f1f;
}
.klc-panel .klc-retry {
	margin-top: 8px;
	padding: 6px 14px;
	border: 1px solid #e3a6a6;
	border-radius: 10px;
	background: #fff;
	color: #8a1f1f;
	font-size: 14px;
	cursor: pointer;
}
.klc-dots {
	display: inline-flex;
	gap: 5px;
	padding: 6px 2px;
}
.klc-dots i {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #8fb0a9;
	animation: klc-bounce 1.2s infinite ease-in-out;
}
.klc-dots i:nth-child(2) { animation-delay: 0.15s; }
.klc-dots i:nth-child(3) { animation-delay: 0.3s; }
.klc-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
.klc-suggest {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	padding-right: 4px;
}
.klc-suggest__label {
	width: 100%;
	font-size: 13px;
	color: var(--klc-muted);
}
.klc-panel .klc-suggest__chip {
	padding: 8px 14px;
	border-radius: 999px;
	border: 1px solid #c9e1dc;
	background: #fff;
	color: var(--klc-teal-800);
	font-size: 14px;
	line-height: 1.7;
	text-align: right;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease;
}
.klc-panel .klc-suggest__chip:hover {
	background: var(--klc-teal-100);
	border-color: var(--klc-teal-600);
}
.klc-form {
	position: relative;
	display: flex;
	align-items: flex-end;
	gap: 10px;
	flex: none;
	margin: 0;
	padding: 12px 14px 8px;
	background: #fff;
	border-top: 1px solid var(--klc-line);
}
.klc-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	opacity: 0 !important;
}
.klc-panel .klc-input {
	flex: 1;
	min-height: 52px;
	max-height: 168px;
	margin: 0;
	padding: 12px 16px;
	resize: none;
	border: 1px solid #cfe0dc;
	border-radius: 16px;
	background: #fbfdfc;
	color: var(--klc-ink);
	font-size: 16px;
	line-height: 1.8;
	box-shadow: none;
	outline: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.klc-panel .klc-input:focus {
	border-color: var(--klc-teal-600);
	box-shadow: 0 0 0 4px rgba(18, 144, 125, 0.14);
	background: #fff;
}
.klc-panel .klc-input:disabled {
	background: #f1f4f3;
	cursor: not-allowed;
}
.klc-panel .klc-send {
	display: inline-grid;
	place-items: center;
	flex: none;
	width: 52px;
	height: 52px;
	padding: 0;
	border: 0;
	border-radius: 16px;
	color: #fff;
	background: var(--klc-teal-700);
	cursor: pointer;
	transition: background 0.15s ease, transform 0.15s ease;
}
.klc-panel .klc-send:hover {
	background: var(--klc-teal-800);
}
.klc-panel .klc-send:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}
.klc-panel .klc-send:focus-visible {
	outline-color: var(--klc-teal-600);
}
.klc-foot {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	flex: none;
	padding: 0 18px 10px;
	font-size: 12px;
	line-height: 1.8;
	color: #7b8d89;
	background: #fff;
}
.klc-counter.is-over {
	color: #b42318;
	font-weight: 700;
}

/* ===================== Modal ===================== */

.klc-overlay {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(6, 34, 30, 0.58);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
}
.klc-overlay.is-open {
	display: flex;
	animation: klc-fade 0.18s ease-out;
}
.klc-dialog {
	display: flex;
	width: min(800px, 100%);
	height: min(88vh, 880px);
	animation: klc-rise 0.22s ease-out;
}
.klc-dialog .klc-panel {
	box-shadow: 0 40px 90px -24px rgba(0, 0, 0, 0.55);
}
html.klc-lock,
html.klc-lock body {
	overflow: hidden !important;
}

/* ===================== Inline ===================== */

.klc-inline {
	max-width: 920px;
	height: min(80vh, 840px);
	min-height: 520px;
	margin: 0 auto 48px;
	direction: rtl;
}
.klc-inline .klc-panel {
	border: 1px solid var(--klc-line);
	box-shadow: 0 24px 60px -30px rgba(8, 68, 61, 0.45);
}

/* ===================== Responsive ===================== */

/* The section can sit in a narrow column, so react to its own width. */
@container klc-cta (max-width: 860px) {
	.klc-cta__inner {
		grid-template-columns: 1fr;
	}
	.klc-cta__visual {
		display: none;
	}
}
@container klc-cta (max-width: 560px) {
	.klc-cta .klc-cta__button {
		width: 100%;
		justify-content: center;
	}
}

@media (max-width: 900px) {
	.klc-cta__inner {
		grid-template-columns: 1fr;
	}
	.klc-cta__visual {
		display: none;
	}
}
@media (max-width: 640px) {
	.klc-cta .klc-cta__button {
		width: 100%;
		justify-content: center;
	}
	.klc-overlay {
		padding: 0;
	}
	.klc-dialog {
		width: 100%;
		height: 100vh;
		height: 100dvh;
	}
	.klc-dialog .klc-panel {
		border-radius: 0;
	}
	.klc-inline {
		height: 82vh;
		min-height: 460px;
		margin-bottom: 24px;
	}
	.klc-inline .klc-panel {
		border-radius: 16px;
	}
	.klc-bubble {
		max-width: 92%;
	}
	.klc-foot {
		flex-direction: column;
		gap: 0;
	}
}

/* ===================== Motion ===================== */

@keyframes klc-ping {
	75%, 100% { transform: scale(2.4); opacity: 0; }
}
@keyframes klc-float {
	0%, 100% { transform: rotate(-2.5deg) translateY(0); }
	50% { transform: rotate(-2.5deg) translateY(-10px); }
}
@keyframes klc-bounce {
	0%, 80%, 100% { transform: translateY(0); opacity: 0.55; }
	40% { transform: translateY(-5px); opacity: 1; }
}
@keyframes klc-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}
@keyframes klc-rise {
	from { transform: translateY(14px); opacity: 0; }
	to { transform: translateY(0); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
	.klc-mock,
	.klc-pulse::after,
	.klc-dots i,
	.klc-mock__typing span,
	.klc-overlay.is-open,
	.klc-dialog {
		animation: none !important;
	}
}
