/* Ruksaat AI chat: simple text chat window. */
.rkc {
	--rkc-gold: var(--rk-gold, #c9a45c);
	--rkc-ink: var(--rk-black, #0b0b0d);
	--rkc-line: var(--rk-line, #e7e2d7);
	--rkc-text: var(--rk-text, #1c1c21);
	--rkc-muted: var(--rk-muted, #63636e);
	--rkc-paper: var(--rk-paper, #f6f4ef);
	font-family: var(--rk-font, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif);
}
.rkc-launch {
	position: fixed; right: 20px; bottom: 88px; z-index: 950;
	width: 56px; height: 56px; padding: 0; border-radius: 50%;
	display: grid; place-items: center; cursor: pointer;
	background: var(--rkc-ink); color: var(--rkc-gold);
	border: 1px solid rgba(201, 164, 92, 0.6);
	box-shadow: 0 12px 28px -10px rgba(11, 11, 13, 0.55);
}
.rkc-launch svg { width: 26px; height: 26px; }
.rkc[data-state="open"] .rkc-launch { display: none; }
.rkc-launch:focus-visible, .rkc-close:focus-visible, .rkc-send:focus-visible, .rkc-link:focus-visible { outline: 2px solid var(--rkc-gold); outline-offset: 2px; }
.rkc-panel {
	position: fixed; right: 20px; bottom: 20px; z-index: 950;
	width: 370px; max-width: calc(100vw - 24px); height: 540px; max-height: calc(100vh - 40px);
	display: flex; flex-direction: column; overflow: hidden;
	background: #fff; color: var(--rkc-text);
	border: 1px solid var(--rkc-line); border-radius: 16px;
	box-shadow: 0 30px 60px -20px rgba(11, 11, 13, 0.45);
}
.rkc-panel[hidden] { display: none; }
.rkc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; background: var(--rkc-ink); color: #fff; }
.rkc-head__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rkc-head strong { font-size: 15px; font-weight: 700; color: #fff; }
.rkc-head span { font-size: 12px; color: rgba(255, 255, 255, 0.72); }
.rkc-close { flex: none; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.rkc-close:hover { background: rgba(255, 255, 255, 0.12); }
.rkc-log { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 16px; overflow-y: auto; overscroll-behavior: contain; background: var(--rkc-paper); }
.rkc-msg { max-width: 86%; padding: 10px 13px; border-radius: 14px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.rkc-msg--bot { align-self: flex-start; background: #fff; border: 1px solid var(--rkc-line); border-bottom-left-radius: 4px; }
.rkc-msg--user { align-self: flex-end; background: var(--rkc-ink); color: #fff; border-bottom-right-radius: 4px; }
.rkc-msg a { color: var(--rk-gold-ink, #85672b); text-decoration: underline; }
.rkc-msg--user a { color: var(--rkc-gold); }
.rkc-msg.is-typing { color: var(--rkc-muted); font-style: italic; }
.rkc-msg.is-note { font-size: 12px; color: var(--rkc-muted); background: #fffaf0; }
.rkc-msg.is-error { background: #fff6f6; border-color: #e8c3c3; }
.rkc-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--rkc-line); background: #fff; margin: 0; }
.rkc-form textarea {
	flex: 1; min-height: 42px; max-height: 120px; margin: 0; padding: 10px 12px; resize: none;
	border: 1px solid var(--rkc-line); border-radius: 12px; background: #fff; color: var(--rkc-text);
	font: 16px/1.35 var(--rk-font, inherit);
}
.rkc-form textarea:focus { outline: none; border-color: var(--rkc-gold); box-shadow: 0 0 0 2px rgba(201, 164, 92, 0.25); }
.rkc-send { flex: none; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 12px; display: grid; place-items: center; background: var(--rkc-gold); color: var(--rkc-ink); cursor: pointer; }
.rkc-send:disabled { opacity: 0.5; cursor: default; }
.rkc-send svg { width: 18px; height: 18px; }
.rkc-foot { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 12px 12px; background: #fff; }
.rkc .rkc-link {
	flex: 1 1 0; min-width: 0; min-height: 38px; margin: 0; padding: 6px 10px;
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	border: 1px solid var(--rkc-line); border-radius: 10px; background: #fff;
	color: var(--rkc-text) !important; font: 600 13px/1.2 var(--rk-font, inherit);
	text-decoration: none !important; white-space: nowrap; cursor: pointer; box-shadow: none;
}
.rkc .rkc-link:hover { border-color: var(--rkc-gold); }
.rkc .rkc-link--wa { border-color: #25d366; color: #0f7a40 !important; }
.rkc .rkc-link svg { width: 16px; height: 16px; }
.rkc-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
/* Keep theme button resets (hover/focus colours) away from the chat controls. */
.rkc button.rkc-launch, .rkc button.rkc-launch:hover, .rkc button.rkc-launch:focus { background: var(--rkc-ink); color: var(--rkc-gold); }
.rkc button.rkc-send, .rkc button.rkc-send:hover, .rkc button.rkc-send:focus { background: var(--rkc-gold); color: var(--rkc-ink); }
.rkc button.rkc-close, .rkc button.rkc-close:focus { background: transparent; color: #fff; }
.rkc button.rkc-close:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.rkc button.rkc-link:hover, .rkc button.rkc-link:focus { background: #fff; color: var(--rkc-text); }
.rkc-form textarea { overflow-y: hidden; }
@media (max-width: 600px) {
	.rkc-launch { right: 16px; bottom: 86px; width: 52px; height: 52px; }
	.rkc-panel { right: 0; left: 0; bottom: 0; width: 100%; max-width: none; height: 85vh; height: 85dvh; max-height: none; border-radius: 16px 16px 0 0; }
}
@media print { .rkc { display: none !important; } }
