/* Vision Home – chat guidata. Tutto è racchiuso in .vh-chat. I colori principali arrivano dalle impostazioni. */
.vh-chat {
	--vh-ink: #2B2B2B;
	--vh-quiet: #6B6B6B;
	--vh-line: #E2DFD3;
	--vh-me: #F2F0E8;
	max-width: 760px;
	margin: 0 auto;
	color: var(--vh-ink);
	font-family: inherit;
	font-size: 16px;
	line-height: 1.6;
	text-align: left;
}
.vh-chat *, .vh-chat *::before, .vh-chat *::after { box-sizing: border-box; }
.vh-chat .vh-c-hello { text-align: center; padding: 8px 0 24px; }
.vh-chat .vh-c-brand { margin: 0 0 10px; font-size: 13px; letter-spacing: .28em; text-transform: uppercase; color: var(--vh-gold); }
.vh-chat .vh-c-title { letter-spacing: normal; text-transform: none; margin: 0 0 12px; font-size: clamp(30px, 5vw, 44px); line-height: 1.15; font-weight: 300; color: var(--vh-ink); }
.vh-chat .vh-c-sub { margin: 0 auto; max-width: 560px; color: var(--vh-quiet); font-size: 16px; }

.vh-chat .vh-c-log { display: flex; flex-direction: column; gap: 14px; max-height: min(560px, 62vh); overflow-y: auto; padding: 4px 2px 8px; }
.vh-chat .vh-c-log:empty { display: none; }
.vh-chat .vh-c-msg { max-width: 88%; font-size: 16px; }
.vh-chat .vh-c-bot { align-self: flex-start; color: var(--vh-ink); }
.vh-chat .vh-c-me { align-self: flex-end; background: var(--vh-me); border-radius: 18px; padding: 10px 16px; }
.vh-chat .vh-sum { margin: 8px 0; padding: 12px 16px; list-style: none; background: #fff; border: 1px solid var(--vh-line); border-radius: 12px; }
.vh-chat .vh-sum li { margin: 0; padding: 4px 0; }
.vh-chat .vh-sum span { display: inline-block; min-width: 84px; color: var(--vh-quiet); }

.vh-chat .vh-c-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.vh-chat .vh-c-chip {
	display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px;
	border: 1px solid var(--vh-line); background: #fff; color: var(--vh-ink); font: inherit; font-size: 15px;
	cursor: pointer; text-decoration: none; line-height: 1.2; box-shadow: none; text-transform: none; letter-spacing: normal;
}
.vh-chat .vh-c-chip:hover { border-color: var(--vh-gold); }
.vh-chat .vh-c-chip[aria-pressed="true"], .vh-chat .vh-c-primary { background: var(--vh-accent); border-color: var(--vh-accent); color: #fff; }
.vh-chat .vh-c-link { color: var(--vh-accent); }
.vh-chat .vh-c-chip:focus-visible, .vh-chat .vh-c-style:focus-visible, .vh-chat .vh-c-send:focus-visible, .vh-chat textarea:focus-visible, .vh-chat .vh-c-file:focus-visible + label {
	outline: 3px solid var(--vh-gold); outline-offset: 2px;
}

.vh-chat .vh-c-styles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; }
.vh-chat .vh-c-style { display: flex; flex-direction: column; padding: 0; border-radius: 12px; overflow: hidden; border: 3px solid #fff; background: #fff; box-shadow: 0 0 0 1px var(--vh-line); cursor: pointer; text-align: left; font: inherit; color: var(--vh-ink); }
.vh-chat .vh-c-style[aria-pressed="true"] { border-color: var(--vh-accent); box-shadow: none; }
.vh-chat .vh-c-sw { display: flex; height: 64px; width: 100%; }
.vh-chat .vh-c-sw i { flex: 1; display: block; }
.vh-chat .vh-c-sn { padding: 8px 10px; font-size: 14px; }

.vh-chat .vh-c-up { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.vh-chat .vh-c-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.vh-chat .vh-c-thumbs { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.vh-chat .vh-c-thumb { position: relative; width: 72px; height: 72px; border-radius: 8px; overflow: hidden; background: var(--vh-me); font-size: 11px; display: flex; align-items: center; justify-content: center; text-align: center; word-break: break-all; padding: 2px; }
.vh-chat .vh-c-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vh-chat .vh-c-rm { position: absolute; top: 2px; right: 2px; width: 26px; height: 26px; padding: 0; border: none; border-radius: 13px; background: rgba(43, 43, 43, .75); color: #fff; font-size: 17px; line-height: 26px; cursor: pointer; }

.vh-chat .vh-c-typing { display: flex; gap: 5px; margin: 0; padding: 6px 0; }
.vh-chat .vh-c-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--vh-gold); opacity: .5; }
@media (prefers-reduced-motion: no-preference) {
	.vh-chat .vh-c-typing i { animation: vh-dot 1s infinite ease-in-out; }
	.vh-chat .vh-c-typing i:nth-child(2) { animation-delay: .15s; }
	.vh-chat .vh-c-typing i:nth-child(3) { animation-delay: .3s; }
}
@keyframes vh-dot { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
.vh-chat .vh-c-progress { margin: 0; color: var(--vh-accent); font-weight: 600; }
.vh-chat .vh-c-error { margin: 8px 0 0; color: #9A2B17; font-size: 14px; }

.vh-chat .vh-c-composer { display: flex; align-items: flex-end; gap: 8px; margin-top: 14px; padding: 10px 10px 10px 18px; background: #fff; border: 1px solid var(--vh-line); border-radius: 22px; box-shadow: 0 2px 12px rgba(0, 0, 0, .05); }
.vh-chat .vh-c-composer[aria-disabled="true"] { opacity: .55; }
.vh-chat .vh-c-composer textarea { flex: 1; min-height: 28px; max-height: 160px; padding: 6px 0; border: none; outline: none; resize: none; background: transparent; color: var(--vh-ink); font: inherit; font-size: 16px; box-shadow: none; margin: 0; }
.vh-chat .vh-c-composer textarea:focus-visible { outline: none; }
.vh-chat .vh-c-composer:focus-within { border-color: var(--vh-gold); }
.vh-chat .vh-c-send { flex: none; width: 40px; height: 40px; padding: 0; border: none; border-radius: 20px; background: var(--vh-accent); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.vh-chat .vh-c-send:disabled { background: #CFCBBE; cursor: default; }
.vh-chat .vh-c-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 560px) {
	.vh-chat .vh-c-styles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.vh-chat .vh-c-msg { max-width: 94%; }
}
