/* ==========================================================================
   Unicar Chat — conversational inquiry assistant

   Palette from the unicar.sk Elementor kit:
     primary #000000 · secondary #B6CE1C · accent #84990F · text #808080
     borders #ECECEC / #DADADA · surface #FFFFFF · background #F6F6F6
   Font: "Active Grotesk", Sans-serif

   Every selector is prefixed with `.uc-chat` (0,2,0) so Elementor kit and
   theme rules (`.elementor-kit-6 button`, `h2`, `a`) cannot override it.
   ========================================================================== */

.uc-chat {
	--uc-surface:       #ffffff;
	--uc-bg:            #f6f6f6;
	--uc-bot:           #f6f6f6;
	--uc-bot-text:      #000000;
	--uc-user:          #b6ce1c;
	--uc-user-text:     #000000;
	--uc-border:        #ececec;
	--uc-border-strong: #dadada;
	--uc-text:          #000000;
	--uc-muted:         #808080;
	--uc-green:         #b6ce1c;
	--uc-green-hover:   #a9c015;
	--uc-green-text:    #84990f;
	--uc-green-soft:    rgba(182, 206, 28, 0.18);
	--uc-on-green:      #000000;
	--uc-error:         #cf2e2e;
	--uc-shadow:        0 12px 40px rgba(0, 0, 0, 0.18);
	--uc-radius:        18px;
	--uc-radius-sm:     6px;
	--uc-font:          "Active Grotesk", "Helvetica Neue", Arial, Sans-serif;

	box-sizing: border-box;
	color: var(--uc-text);
	font-family: var(--uc-font);
	font-size: 15px;
	font-weight: 400;
	line-height: 1.45;
	letter-spacing: 0;
	text-align: left;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.uc-chat.uc-chat--dark {
	--uc-surface:       #111111;
	--uc-bg:            #000000;
	--uc-bot:           #1c1c1c;
	--uc-bot-text:      #ffffff;
	--uc-user:          #b6ce1c;
	--uc-user-text:     #000000;
	--uc-border:        rgba(255, 255, 255, 0.10);
	--uc-border-strong: rgba(255, 255, 255, 0.18);
	--uc-text:          #ffffff;
	--uc-muted:         #9a9a9a;
	--uc-green-hover:   #e1f659;
	--uc-green-text:    #b6ce1c;
	--uc-green-soft:    #31370e;
	--uc-error:         #ff6b6b;
	--uc-shadow:        0 12px 40px rgba(0, 0, 0, 0.6);
}

.uc-chat *,
.uc-chat *::before,
.uc-chat *::after {
	box-sizing: border-box;
}

.uc-chat [hidden] {
	display: none !important;
}

.uc-chat p,
.uc-chat form,
.uc-chat label,
.uc-chat strong {
	margin: 0;
	padding: 0;
	font-family: var(--uc-font);
	color: inherit;
}

.uc-chat button {
	-webkit-appearance: none;
	appearance: none;
	margin: 0;
	/* Themes reset bare buttons (Hello Elementor sets white-space: nowrap); let our text wrap. */
	white-space: normal;
	font-family: var(--uc-font);
	text-transform: none;
	letter-spacing: 0;
	text-decoration: none;
}

.uc-chat svg.uc-chat__icon {
	display: inline-block;
	width: 1em;
	height: 1em;
	flex: none;
	vertical-align: middle;
	fill: none;
	stroke: currentColor;
}

.uc-chat .uc-chat__sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* --------------------------------------------------------------------------
   Panel
   -------------------------------------------------------------------------- */
.uc-chat .uc-chat__panel {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 600px;
	max-height: 85vh;
	background: var(--uc-surface);
	border: 1px solid var(--uc-border);
	border-radius: var(--uc-radius);
	box-shadow: var(--uc-shadow);
	overflow: hidden;
}

.uc-chat.uc-chat--inline .uc-chat__panel {
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.uc-chat .uc-chat__header {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 14px 14px 18px;
	background: var(--uc-surface);
	border-bottom: 1px solid var(--uc-border);
}

.uc-chat .uc-chat__avatar {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: var(--uc-green);
	color: var(--uc-on-green);
	font-size: 18px;
	font-weight: 500;
	line-height: 1;
}

.uc-chat .uc-chat__who {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.uc-chat .uc-chat__name {
	font-size: 16px;
	font-weight: 500;
	line-height: 1.2;
	color: var(--uc-text);
}

.uc-chat .uc-chat__status {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	line-height: 1.2;
	color: var(--uc-muted);
}

.uc-chat .uc-chat__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--uc-green);
}

.uc-chat .uc-chat__iconbtn {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 50%;
	box-shadow: none;
	color: var(--uc-muted);
	font-size: 18px;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.uc-chat .uc-chat__iconbtn:hover,
.uc-chat .uc-chat__iconbtn:focus,
.uc-chat .uc-chat__iconbtn:focus-visible {
	background: var(--uc-bg);
	color: var(--uc-text);
	outline: none;
}

/* --------------------------------------------------------------------------
   Log + messages
   -------------------------------------------------------------------------- */
.uc-chat .uc-chat__iconbtn:focus-visible,
.uc-chat .uc-chat__send:focus-visible,
.uc-chat .uc-chat__launcher:focus-visible {
	box-shadow: 0 0 0 3px var(--uc-green-soft);
}

.uc-chat .uc-chat__log {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 18px 16px;
	overflow-y: auto;
	overscroll-behavior: contain;
	background: var(--uc-surface);
	scroll-behavior: smooth;
}

.uc-chat .uc-chat__msg {
	display: flex;
	flex-direction: column;
	max-width: 82%;
	animation: uc-chat-in 0.22s ease-out both;
}

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

@media (prefers-reduced-motion: reduce) {
	.uc-chat .uc-chat__msg { animation: none; }
}

.uc-chat .uc-chat__msg--bot {
	align-self: flex-start;
	align-items: flex-start;
}

.uc-chat .uc-chat__msg--user {
	align-self: flex-end;
	align-items: flex-end;
}

.uc-chat .uc-chat__bubble {
	padding: 11px 15px;
	border-radius: 16px;
	font-size: 15px;
	line-height: 1.45;
	word-wrap: break-word;
	overflow-wrap: anywhere;
	white-space: pre-line;
}

.uc-chat .uc-chat__msg--bot .uc-chat__bubble {
	background: var(--uc-bot);
	color: var(--uc-bot-text);
	border-bottom-left-radius: 6px;
}

.uc-chat .uc-chat__msg--user .uc-chat__bubble {
	background: var(--uc-user);
	color: var(--uc-user-text);
	border-bottom-right-radius: 6px;
	font-weight: 500;
}

.uc-chat .uc-chat__msg--error .uc-chat__bubble {
	color: var(--uc-error);
}

/* Typing indicator */
.uc-chat .uc-chat__typing {
	display: inline-flex;
	gap: 4px;
	padding: 14px 16px;
}

.uc-chat .uc-chat__typing i {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--uc-muted);
	opacity: 0.5;
	animation: uc-chat-typing 1s infinite ease-in-out;
}

.uc-chat .uc-chat__typing i:nth-child(2) { animation-delay: 0.15s; }
.uc-chat .uc-chat__typing i:nth-child(3) { animation-delay: 0.3s; }

@keyframes uc-chat-typing {
	0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
	30%           { transform: translateY(-4px); opacity: 1; }
}

/* Quick replies (chips) */
.uc-chat .uc-chat__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 4px;
	max-width: 100%;
}

.uc-chat .uc-chat__chip {
	display: inline-flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	padding: 10px 14px;
	background: var(--uc-surface);
	border: 1px solid var(--uc-border-strong);
	border-radius: 14px;
	box-shadow: none;
	color: var(--uc-text);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.25;
	text-align: left;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}

.uc-chat .uc-chat__chip:hover,
.uc-chat .uc-chat__chip:focus,
.uc-chat .uc-chat__chip:focus-visible {
	background: var(--uc-green-soft);
	border-color: var(--uc-green);
	color: var(--uc-text);
	outline: none;
}

.uc-chat .uc-chat__chip:focus-visible {
	box-shadow: 0 0 0 3px var(--uc-green-soft);
}

.uc-chat .uc-chat__chip:active {
	transform: scale(0.98);
}

.uc-chat .uc-chat__chip--primary {
	background: var(--uc-green);
	border-color: var(--uc-green);
	color: var(--uc-on-green);
	font-size: 12px;
	font-weight: 600;
	line-height: 1em;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	padding: 14px 18px;
	border-radius: var(--uc-radius-sm);
}

.uc-chat .uc-chat__chip--primary:hover,
.uc-chat .uc-chat__chip--primary:focus,
.uc-chat .uc-chat__chip--primary:focus-visible {
	background: var(--uc-green-hover);
	border-color: var(--uc-green-hover);
	color: var(--uc-on-green);
}

.uc-chat .uc-chat__chip-desc {
	font-size: 12px;
	font-weight: 400;
	color: var(--uc-muted);
}

.uc-chat .uc-chat__chips.is-done .uc-chat__chip {
	display: none;
}

/* Summary card */
.uc-chat .uc-chat__summary {
	margin-top: 4px;
	padding: 12px 16px;
	max-width: 100%;
	background: var(--uc-surface);
	border: 1px solid var(--uc-border);
	border-radius: 14px;
	font-size: 14px;
}

.uc-chat .uc-chat__summary-row {
	display: flex;
	gap: 10px;
	padding: 5px 0;
	border-bottom: 1px solid var(--uc-border);
}

.uc-chat .uc-chat__summary-row:last-child {
	border-bottom: 0;
}

.uc-chat .uc-chat__summary-key {
	flex: none;
	width: 74px;
	color: var(--uc-muted);
}

.uc-chat .uc-chat__summary-val {
	flex: 1 1 auto;
	min-width: 0;
	color: var(--uc-text);
	font-weight: 500;
	overflow-wrap: anywhere;
}

.uc-chat .uc-chat__summary-val b {
	color: var(--uc-green-text);
	font-weight: 500;
}

/* --------------------------------------------------------------------------
   Composer
   -------------------------------------------------------------------------- */
.uc-chat .uc-chat__composer {
	display: flex;
	align-items: flex-end;
	gap: 10px;
	padding: 12px 14px;
	background: var(--uc-surface);
	border-top: 1px solid var(--uc-border);
}

.uc-chat .uc-chat__field {
	display: block;
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
}

/* Extra-high specificity beats `.elementor-kit-6 input:not(...)` (0,3,1). */
.uc-chat .uc-chat__composer .uc-chat__field .uc-chat__input {
	display: block;
	width: 100%;
	min-height: 48px;
	margin: 0;
	padding: 15px 16px;
	background: var(--uc-bg);
	border: 1px solid var(--uc-border);
	border-radius: 14px;
	box-shadow: none;
	color: var(--uc-text);
	font-family: var(--uc-font);
	font-size: 15px;
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: 0;
	outline: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.uc-chat .uc-chat__composer .uc-chat__field .uc-chat__input::placeholder {
	color: var(--uc-muted);
	opacity: 1;
}

.uc-chat .uc-chat__composer .uc-chat__field .uc-chat__input:focus {
	background: var(--uc-surface);
	border-color: var(--uc-green);
	box-shadow: 0 0 0 3px var(--uc-green-soft);
}

.uc-chat .uc-chat__composer .uc-chat__field .uc-chat__textarea {
	min-height: 48px;
	max-height: 140px;
	line-height: 1.4;
	resize: none;
}

.uc-chat .uc-chat__send {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	background: var(--uc-green);
	border: 0;
	border-radius: 50%;
	box-shadow: none;
	color: var(--uc-on-green);
	font-size: 20px;
	cursor: pointer;
	transition: background 0.15s ease, transform 0.1s ease;
}

.uc-chat .uc-chat__send .uc-chat__icon {
	margin-left: -2px;
	margin-top: 2px;
}

.uc-chat .uc-chat__send:hover,
.uc-chat .uc-chat__send:focus,
.uc-chat .uc-chat__send:focus-visible {
	background: var(--uc-green-hover);
	color: var(--uc-on-green);
	outline: none;
}

.uc-chat .uc-chat__send:active {
	transform: scale(0.96);
}

.uc-chat .uc-chat__consent {
	padding: 8px 16px 10px;
	background: var(--uc-surface);
	text-align: center;
	font-size: 11px;
	line-height: 1.4;
	color: var(--uc-muted);
}

/* --------------------------------------------------------------------------
   Bubble mode (floating launcher)
   -------------------------------------------------------------------------- */
.uc-chat.uc-chat--bubble {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 99999;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 14px;
	width: 380px;
	max-width: calc(100vw - 48px);
	pointer-events: none;
}

.uc-chat.uc-chat--bubble.uc-chat--left {
	right: auto;
	left: 24px;
	align-items: flex-start;
}

.uc-chat.uc-chat--bubble .uc-chat__panel {
	display: none;
	height: 620px;
	max-height: calc(100vh - 120px);
	pointer-events: auto;
	transform-origin: bottom right;
	animation: uc-chat-open 0.22s ease-out both;
}

.uc-chat.uc-chat--bubble.uc-chat--left .uc-chat__panel {
	transform-origin: bottom left;
}

.uc-chat.uc-chat--bubble.is-open .uc-chat__panel {
	display: flex;
}

@keyframes uc-chat-open {
	from { opacity: 0; transform: translateY(10px) scale(0.97); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

.uc-chat .uc-chat__launcher {
	display: inline-flex;
	order: 2;
	align-items: center;
	gap: 10px;
	height: 56px;
	padding: 0 22px 0 18px;
	background: var(--uc-green);
	border: 0;
	border-radius: 999px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
	color: var(--uc-on-green);
	font-size: 12px;
	font-weight: 600;
	line-height: 1em;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	cursor: pointer;
	pointer-events: auto;
	transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.uc-chat .uc-chat__launcher .uc-chat__icon {
	font-size: 22px;
}

.uc-chat .uc-chat__launcher .uc-chat__icon--close {
	display: none;
}

.uc-chat.is-open .uc-chat__launcher .uc-chat__icon--chat {
	display: none;
}

.uc-chat.is-open .uc-chat__launcher .uc-chat__icon--close {
	display: inline-block;
}

.uc-chat .uc-chat__launcher:hover,
.uc-chat .uc-chat__launcher:focus,
.uc-chat .uc-chat__launcher:focus-visible {
	background: var(--uc-green-hover);
	color: var(--uc-on-green);
	transform: translateY(-2px);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.26);
	outline: none;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
	.uc-chat.uc-chat--inline .uc-chat__panel {
		height: 70vh;
		min-height: 460px;
		border-radius: 14px;
	}

	.uc-chat.uc-chat--bubble {
		right: 16px;
		bottom: 16px;
		width: auto;
		max-width: none;
	}

	.uc-chat.uc-chat--bubble.uc-chat--left {
		left: 16px;
	}

	.uc-chat.uc-chat--bubble.is-open {
		inset: 0;
		width: auto;
		gap: 0;
	}

	.uc-chat.uc-chat--bubble.is-open .uc-chat__panel {
		width: 100%;
		height: 100%;
		max-height: none;
		border-radius: 0;
		border: 0;
	}

	.uc-chat.uc-chat--bubble.is-open .uc-chat__launcher {
		display: none;
	}

	.uc-chat .uc-chat__msg {
		max-width: 88%;
	}

	.uc-chat .uc-chat__launcher-label {
		display: none;
	}

	.uc-chat .uc-chat__launcher {
		width: 56px;
		padding: 0;
		justify-content: center;
	}
}
