/* HelloMester AI Chat */
#hmac-root {
	--hmac-navy: #001635;
	--hmac-red: #c80301;
	--hmac-red-dark: #a00200;
	--hmac-cream: #f4ede2;
	--hmac-white: #ffffff;
	--hmac-text: #1d2433;
	--hmac-muted: #5b6475;
	--hmac-border: #e3dccf;
	--hmac-bottom: 20px;
	position: fixed;
	right: 20px;
	bottom: var(--hmac-bottom);
	z-index: 2147483000;
	font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.45;
	color: var(--hmac-text);
	-webkit-font-smoothing: antialiased;
}
#hmac-root *, #hmac-root *::before, #hmac-root *::after { box-sizing: border-box; }
#hmac-root button { font-family: inherit; text-transform: none; letter-spacing: normal; margin: 0; min-height: 0; line-height: 1.2; box-shadow: none; }

/* Buborék */
#hmac-root .hmac-launcher {
	width: 60px; height: 60px; border-radius: 50%;
	background: var(--hmac-red); color: #fff; border: 0; padding: 0;
	display: flex; align-items: center; justify-content: center;
	box-shadow: 0 8px 24px rgba(0, 22, 53, .28);
	cursor: pointer; transition: transform .15s ease, background .15s ease;
}
#hmac-root .hmac-launcher:hover { background: var(--hmac-red-dark); transform: translateY(-2px); }
#hmac-root .hmac-launcher:focus-visible { outline: 3px solid var(--hmac-navy); outline-offset: 3px; }
#hmac-root .hmac-launcher svg { width: 28px; height: 28px; }
#hmac-root.hmac-open .hmac-launcher { display: none; }

/* Ablak */
#hmac-root .hmac-panel {
	position: absolute; right: 0; bottom: 0;
	width: 380px; height: min(600px, calc(100vh - var(--hmac-bottom) - 24px));
	background: var(--hmac-cream);
	border-radius: 16px; overflow: hidden;
	box-shadow: 0 16px 48px rgba(0, 22, 53, .3);
	display: none; flex-direction: column;
}
#hmac-root.hmac-open .hmac-panel { display: flex; animation: hmac-in .18s ease-out; }
@keyframes hmac-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

#hmac-root .hmac-head {
	background: var(--hmac-navy); color: #fff;
	padding: 14px 12px 14px 16px; display: flex; align-items: center; gap: 12px; flex: 0 0 auto;
}
#hmac-root .hmac-avatar {
	width: 38px; height: 38px; border-radius: 50%; background: var(--hmac-red);
	display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; flex: 0 0 auto;
}
#hmac-root .hmac-head-text { flex: 1 1 auto; min-width: 0; }
#hmac-root .hmac-title { font-weight: 700; font-size: 15px; margin: 0; color: #fff; }
#hmac-root .hmac-sub { font-size: 12px; opacity: .8; margin: 2px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#hmac-root .hmac-icon-btn {
	background: transparent; border: 0; color: #fff; width: 36px; height: 36px; border-radius: 8px;
	display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; opacity: .85;
}
#hmac-root .hmac-icon-btn:hover { background: rgba(255,255,255,.12); opacity: 1; }
#hmac-root .hmac-icon-btn svg { width: 20px; height: 20px; }

#hmac-root .hmac-preview {
	background: #fff3cd; color: #6b4e00; font-size: 12px; padding: 6px 12px; flex: 0 0 auto;
}

/* Üzenetek */
#hmac-root .hmac-body { flex: 1 1 auto; overflow-y: auto; padding: 16px 14px 8px; overscroll-behavior: contain; }
#hmac-root .hmac-msg { display: flex; margin: 0 0 10px; }
#hmac-root .hmac-msg.hmac-user { justify-content: flex-end; }
#hmac-root .hmac-bubble {
	max-width: 85%; padding: 10px 13px; border-radius: 14px; word-wrap: break-word; overflow-wrap: anywhere;
}
#hmac-root .hmac-bot .hmac-bubble { background: var(--hmac-white); border: 1px solid var(--hmac-border); border-bottom-left-radius: 4px; }
#hmac-root .hmac-user .hmac-bubble { background: var(--hmac-navy); color: #fff; border-bottom-right-radius: 4px; white-space: pre-wrap; }
#hmac-root .hmac-bubble p { margin: 0 0 6px; }
#hmac-root .hmac-bubble p:last-child { margin-bottom: 0; }
#hmac-root .hmac-bubble ul, #hmac-root .hmac-bubble ol { margin: 4px 0 6px 18px; padding: 0; }
#hmac-root .hmac-bubble li { margin: 0 0 3px; }
#hmac-root .hmac-bubble a { color: var(--hmac-red); font-weight: 600; text-decoration: underline; }
#hmac-root .hmac-bubble strong { font-weight: 700; }
#hmac-root .hmac-err .hmac-bubble { border-color: #f1b0ae; background: #fff6f6; }

/* Termékkártyák */
#hmac-root .hmac-cards { display: flex; flex-direction: column; gap: 8px; margin: -2px 0 12px; }
#hmac-root .hmac-card {
	display: flex; gap: 10px; align-items: center; background: #fff; border: 1px solid var(--hmac-border);
	border-radius: 12px; padding: 8px; text-decoration: none; color: var(--hmac-text); max-width: 92%;
	transition: border-color .15s ease;
}
#hmac-root .hmac-card:hover { border-color: var(--hmac-red); }
#hmac-root .hmac-card img, #hmac-root .hmac-card .hmac-noimg { width: 52px; height: 52px; object-fit: contain; border-radius: 8px; background: #f7f7f7; flex: 0 0 auto; }
#hmac-root .hmac-card-name { font-size: 13px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#hmac-root .hmac-card-price { font-size: 13px; font-weight: 700; color: var(--hmac-red); margin-top: 3px; }
#hmac-root .hmac-card-price s { color: var(--hmac-muted); font-weight: 400; margin-left: 6px; font-size: 12px; }
#hmac-root .hmac-card-stock { font-size: 11px; color: var(--hmac-muted); }

/* Gyorsgombok */
#hmac-root .hmac-quick { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 12px; }
#hmac-root .hmac-chip {
	background: #fff; color: var(--hmac-navy); border: 1px solid var(--hmac-navy); border-radius: 999px;
	padding: 7px 12px; font-size: 13px; font-weight: 600; cursor: pointer;
}
#hmac-root .hmac-chip:hover { background: var(--hmac-navy); color: #fff; }

/* Gépelés jelző */
#hmac-root .hmac-typing .hmac-bubble { display: inline-flex; gap: 4px; padding: 13px 14px; }
#hmac-root .hmac-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--hmac-muted); animation: hmac-dot 1.2s infinite ease-in-out; }
#hmac-root .hmac-typing span:nth-child(2) { animation-delay: .15s; }
#hmac-root .hmac-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes hmac-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

/* Beviteli sáv */
#hmac-root .hmac-foot { flex: 0 0 auto; background: #fff; border-top: 1px solid var(--hmac-border); padding: 10px 10px 6px; }
#hmac-root .hmac-form { display: flex; align-items: flex-end; gap: 8px; margin: 0; }
#hmac-root .hmac-input {
	flex: 1 1 auto; resize: none; border: 1px solid #cfd5df; border-radius: 12px; padding: 10px 12px;
	font: inherit; font-size: 15px; line-height: 1.35; max-height: 120px; min-height: 42px; height: 42px;
	background: #fff; color: var(--hmac-text); margin: 0; box-shadow: none;
}
#hmac-root .hmac-input:focus { outline: none; border-color: var(--hmac-navy); box-shadow: 0 0 0 2px rgba(0, 22, 53, .12); }
#hmac-root .hmac-send {
	width: 42px; height: 42px; border-radius: 12px; border: 0; background: var(--hmac-red); color: #fff;
	display: flex; align-items: center; justify-content: center; cursor: pointer; flex: 0 0 auto; padding: 0;
}
#hmac-root .hmac-send:disabled { opacity: .45; cursor: default; }
#hmac-root .hmac-send svg { width: 20px; height: 20px; }
#hmac-root .hmac-note { font-size: 11px; color: var(--hmac-muted); text-align: center; margin: 6px 0 0; }
#hmac-root .hmac-note a { color: var(--hmac-muted); text-decoration: underline; }

/* Mobil */
@media (max-width: 480px) {
	#hmac-root { right: 16px; }
	#hmac-root.hmac-open { right: 0; bottom: 0; left: 0; top: 0; }
	#hmac-root .hmac-panel { position: fixed; inset: 0; width: 100%; height: 100%; height: 100dvh; border-radius: 0; }
	#hmac-root .hmac-input { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
	#hmac-root * { animation: none !important; transition: none !important; }
}
