/*
 * Öcsiker asszisztens
 * Arculat: navy fej, márkakék ügyfélbuborék, sárga csak a cselekvésre (küldés).
 * Az egyetlen díszítőelem: a fejléc alja egy trapézlemez-profil sziluettje.
 */
.ocb {
	--ocb-navy: #0E1C36;
	--ocb-navy-2: #172B4F;
	--ocb-blue: #256FD0;
	--ocb-blue-ink: #1B58AB;
	--ocb-yellow: #FFC42E;
	--ocb-surface: #F3F6FB;
	--ocb-line: #DFE5EF;
	--ocb-ink: #16213A;
	--ocb-muted: #66748F;
	--ocb-radius: 18px;
	--ocb-shadow: 0 1px 2px rgba(14, 28, 54, .08), 0 18px 50px -12px rgba(14, 28, 54, .35);
	position: fixed;
	right: 22px;
	bottom: 22px;
	z-index: 99990;
	font-family: inherit;
	font-size: 15px;
	line-height: 1.5;
	color: var(--ocb-ink);
	-webkit-font-smoothing: antialiased;
}
.ocb *, .ocb *::before, .ocb *::after { box-sizing: border-box; }
.ocb button { font: inherit; margin: 0; text-transform: none; letter-spacing: normal; min-height: 0; min-width: 0; box-shadow: none; line-height: 1.4; }
.ocb [hidden] { display: none !important; }
.ocb :focus-visible { outline: 2px solid var(--ocb-blue); outline-offset: 2px; }
.ocb .ocb-i { display: block; flex: none; }

/* ---------- indító gomb ---------- */
.ocb .ocb-launcher {
	position: relative;
	width: 58px; height: 58px; padding: 0;
	border: 0; border-radius: 50%; cursor: pointer;
	background: var(--ocb-navy); color: #fff;
	box-shadow: 0 8px 24px -6px rgba(14, 28, 54, .55);
	display: grid; place-items: center;
	transition: transform .18s ease, background-color .18s ease;
	margin-left: auto;
}
.ocb .ocb-launcher:hover { background: var(--ocb-navy-2); transform: translateY(-1px); }
.ocb .ocb-launcher-ico { grid-area: 1 / 1; display: grid; place-items: center; transition: opacity .16s ease, transform .2s ease; }
.ocb .ocb-ico-close { opacity: 0; transform: rotate(-90deg); }
.ocb.is-open .ocb-ico-open { opacity: 0; transform: rotate(90deg); }
.ocb.is-open .ocb-ico-close { opacity: 1; transform: none; }
/* Sárga pötty, amíg a felugró ajánlat látszik. */
.ocb .ocb-launcher::after {
	content: ""; position: absolute; top: 3px; right: 3px;
	width: 12px; height: 12px; border-radius: 50%;
	background: var(--ocb-yellow); border: 2px solid var(--ocb-navy);
	transform: scale(0); transition: transform .2s ease;
}
.ocb.has-teaser .ocb-launcher::after { transform: scale(1); }

/* ---------- felugró ajánlat ---------- */
.ocb .ocb-teaser {
	position: absolute; right: 0; bottom: 72px;
	width: max-content; max-width: 290px;
	display: flex; align-items: flex-start;
	background: #fff; border-radius: 16px 16px 4px 16px;
	box-shadow: var(--ocb-shadow);
	opacity: 0; transform: translateY(8px);
	transition: opacity .22s ease, transform .22s ease;
}
.ocb .ocb-teaser.is-in { opacity: 1; transform: none; }
.ocb .ocb-teaser-body {
	display: flex; gap: 10px; align-items: flex-start; text-align: left;
	background: none; border: 0; padding: 12px 4px 12px 12px; cursor: pointer;
	font-size: 14px; line-height: 1.4; color: var(--ocb-ink);
}
.ocb .ocb-teaser-body:hover .ocb-teaser-text { color: var(--ocb-blue-ink); }
.ocb .ocb-teaser-close {
	flex: none; width: 30px; height: 30px; margin: 6px 6px 0 0;
	display: grid; place-items: center;
	border: 0; border-radius: 8px; background: none; color: var(--ocb-muted); cursor: pointer;
}
.ocb .ocb-teaser-close:hover { background: var(--ocb-surface); color: var(--ocb-ink); }

/* ---------- avatár ---------- */
.ocb .ocb-avatar {
	flex: none; width: 38px; height: 38px; border-radius: 11px;
	display: grid; place-items: center;
	background: var(--ocb-blue); color: #fff;
	font-weight: 700; font-size: 18px; line-height: 1;
}
.ocb .ocb-avatar-sm { width: 30px; height: 30px; border-radius: 9px; font-size: 15px; }

/* ---------- panel ---------- */
.ocb .ocb-panel {
	position: absolute; right: 0; bottom: 74px;
	width: 392px; height: min(640px, calc(100vh - 116px));
	display: flex; flex-direction: column;
	background: var(--ocb-surface);
	border-radius: var(--ocb-radius);
	box-shadow: var(--ocb-shadow);
	overflow: hidden;
	opacity: 0; transform: translateY(10px) scale(.98); transform-origin: 100% 100%;
	transition: opacity .18s ease, transform .18s ease;
}
.ocb .ocb-panel.is-in { opacity: 1; transform: none; }

.ocb .ocb-head {
	position: relative;
	display: flex; align-items: center; gap: 12px;
	padding: 16px 12px 18px 16px;
	background: var(--ocb-navy); color: #fff;
}
/* Trapézlemez-profil a fejléc alján: navy bordák, sárga élvonal. */
.ocb .ocb-head::after {
	content: ""; position: absolute; left: 0; right: 0; top: 100%;
	height: 9px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='9' viewBox='0 0 40 9'%3E%3Cpath d='M0 0H40V2H34L30 8H18L14 2H0Z' fill='%230E1C36'/%3E%3Cpath d='M0 2H14L18 8H30L34 2H40' fill='none' stroke='%23FFC42E' stroke-width='1.4' stroke-linejoin='round'/%3E%3C/svg%3E") repeat-x left top / 40px 9px;
	z-index: 1;
	pointer-events: none;
}
.ocb .ocb-head-text { flex: 1; min-width: 0; }
.ocb .ocb-head-text strong { display: block; font-size: 16px; font-weight: 700; letter-spacing: -.005em; }
.ocb .ocb-head-text span { display: block; font-size: 12.5px; line-height: 1.35; color: #AEBBD3; margin-top: 2px; }
.ocb .ocb-badge {
	flex: none; font-size: 11px; font-weight: 700; line-height: 1;
	padding: 5px 7px; border-radius: 6px;
	background: rgba(255, 196, 46, .16); color: var(--ocb-yellow);
}
.ocb .ocb-icon-btn {
	flex: none; width: 34px; height: 34px; padding: 0;
	display: grid; place-items: center;
	border: 0; border-radius: 10px; background: none; color: #C9D3E6; cursor: pointer;
	transition: background-color .15s ease, color .15s ease;
}
.ocb .ocb-icon-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }

/* ---------- üzenetek ---------- */
.ocb .ocb-body {
	flex: 1; overflow-y: auto; overscroll-behavior: contain;
	padding: 26px 16px 12px;
	scrollbar-width: thin; scrollbar-color: #C7D0DF transparent;
}
.ocb .ocb-msg {
	width: fit-content; max-width: 86%;
	margin: 0 0 10px; padding: 10px 14px;
	border-radius: 16px; overflow-wrap: anywhere;
}
.ocb .ocb-msg p { margin: 0 0 7px; }
.ocb .ocb-msg p:last-child { margin-bottom: 0; }
.ocb .ocb-msg ul { margin: 4px 0 8px; padding-left: 18px; }
.ocb .ocb-msg li { margin: 3px 0; }
.ocb .ocb-msg strong { font-weight: 700; }
.ocb .ocb-assistant {
	background: #fff; border: 1px solid var(--ocb-line);
	border-bottom-left-radius: 6px;
}
.ocb .ocb-assistant a { color: var(--ocb-blue-ink); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.ocb .ocb-user {
	margin-left: auto;
	background: var(--ocb-blue); color: #fff;
	border-bottom-right-radius: 6px;
}

/* Kezdő javaslatok: egy lista, nem kártyahalom. */
.ocb .ocb-suggest {
	margin: 4px 0 10px; max-width: 92%;
	background: #fff; border: 1px solid var(--ocb-line); border-radius: 14px;
	overflow: hidden;
}
.ocb .ocb-suggest button {
	width: 100%; display: flex; align-items: center; gap: 11px;
	padding: 11px 14px; text-align: left; cursor: pointer;
	background: none; border: 0; border-top: 1px solid var(--ocb-line);
	font-size: 14px; line-height: 1.35; color: var(--ocb-ink);
	transition: background-color .15s ease;
}
.ocb .ocb-suggest button:first-child { border-top: 0; }
.ocb .ocb-suggest button:hover { background: #F7F9FD; }
.ocb .ocb-suggest-ico { color: var(--ocb-blue); display: grid; place-items: center; }

/* Értékelés */
.ocb .ocb-rate {
	display: flex; align-items: center; gap: 2px;
	margin-top: 8px; padding-top: 7px; border-top: 1px solid #EEF1F6;
	font-size: 12px; color: var(--ocb-muted);
}
.ocb .ocb-rate span { margin-right: 4px; }
.ocb .ocb-rate button {
	width: 28px; height: 26px; padding: 0; display: grid; place-items: center;
	border: 0; border-radius: 7px; background: none; color: var(--ocb-muted); cursor: pointer;
}
.ocb .ocb-rate button:hover { background: var(--ocb-surface); color: var(--ocb-blue-ink); }

/* Gépelés jelző */
.ocb .ocb-typing { display: flex; gap: 5px; padding: 14px 16px; }
.ocb .ocb-typing span { width: 7px; height: 7px; border-radius: 50%; background: #9AA6BD; animation: ocb-dot 1.1s infinite ease-in-out; }
.ocb .ocb-typing span:nth-child(2) { animation-delay: .15s; }
.ocb .ocb-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes ocb-dot { 0%, 80%, 100% { opacity: .35; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

/* Admin hibakereső */
.ocb .ocb-debug { margin-top: 8px; font-size: 11.5px; color: var(--ocb-muted); }
.ocb .ocb-debug summary { cursor: pointer; }
.ocb .ocb-debug pre { white-space: pre-wrap; margin: 6px 0 0; font-size: 11px; background: var(--ocb-surface); padding: 7px; border-radius: 7px; }
.ocb .ocb-debug-error { margin-top: 6px; padding: 7px 9px; border-radius: 7px; background: #FDECEC; color: #A42324; font-weight: 600; font-size: 12px; }

/* ---------- beviteli sor ---------- */
.ocb .ocb-form { padding: 10px 12px 8px; background: var(--ocb-surface); }
.ocb .ocb-field {
	display: flex; align-items: flex-end; gap: 6px;
	padding: 5px 5px 5px 14px;
	background: #fff; border: 1px solid var(--ocb-line); border-radius: 16px;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.ocb .ocb-field:focus-within { border-color: var(--ocb-blue); box-shadow: 0 0 0 3px rgba(37, 111, 208, .14); }
.ocb .ocb-field textarea {
	/* A témák textarea-stílusát (keret, min. magasság, fókuszkeret) teljesen felülírjuk. */
	flex: 1 1 auto; width: auto; min-width: 0; resize: none;
	border: 0 !important; border-radius: 0; outline: 0 !important; background: none !important; box-shadow: none !important;
	padding: 8px 0; margin: 0; height: 38px; min-height: 38px !important; max-height: 120px;
	font: inherit; font-size: 15px; line-height: 1.45; color: var(--ocb-ink);
	-webkit-appearance: none; appearance: none;
}
.ocb .ocb-field textarea::placeholder { color: #8A96AD; }
.ocb .ocb-send {
	flex: none; width: 38px; height: 38px; padding: 0;
	display: grid; place-items: center;
	border: 0; border-radius: 12px; cursor: pointer;
	background: var(--ocb-yellow); color: var(--ocb-navy);
	transition: background-color .15s ease, opacity .15s ease;
}
.ocb .ocb-send:hover:not(:disabled) { background: #FFB800; }
.ocb .ocb-send:disabled { background: #E6EAF1; color: #9AA6BD; cursor: default; }

.ocb .ocb-foot { padding: 0 16px 12px; font-size: 11.5px; line-height: 1.4; color: var(--ocb-muted); background: var(--ocb-surface); }
.ocb .ocb-foot a { color: var(--ocb-muted); text-decoration: underline; }

/* ---------- mobil ---------- */
@media (max-width: 520px) {
	.ocb { right: 14px; bottom: 14px; }
	.ocb .ocb-launcher { width: 54px; height: 54px; }
	.ocb .ocb-teaser { bottom: 66px; max-width: min(270px, calc(100vw - 28px)); }
	.ocb .ocb-panel {
		position: fixed; inset: 0; width: auto; height: 100%; height: 100dvh;
		border-radius: 0; transform: translateY(16px);
	}
	.ocb.is-open .ocb-launcher { display: none; }
	.ocb .ocb-head { padding-top: max(14px, env(safe-area-inset-top)); }
	.ocb .ocb-form { padding-bottom: 6px; }
	.ocb .ocb-foot { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
	.ocb .ocb-field textarea { font-size: 16px; } /* iOS ne nagyítson rá */
	html.ocb-lock, html.ocb-lock body { overflow: hidden; }
}

@media (prefers-reduced-motion: reduce) {
	.ocb *, .ocb *::before, .ocb *::after { transition: none !important; animation: none !important; }
}
