/* ==========================================================================
   AVM Advogado · validador.css (página /consulta/)
   ========================================================================== */

:root {
	--c-dark: #0F2A33;
	--c-mid: #1C4450;
	--c-gold: #C9A45C;
	--c-gold-light: #E2C98F;
	--f-title: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
	--f-text: "Inter", ui-sans-serif, system-ui, sans-serif;
	--safe-b: env(safe-area-inset-bottom, 0px);
	--safe-t: env(safe-area-inset-top, 0px);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body.vd-body {
	margin: 0; overflow: hidden;
	font-family: var(--f-text); font-size: 1.0625rem; line-height: 1.5; color: #fff;
	background:
		radial-gradient(90% 60% at 50% 0%, rgba(28, 68, 80, .9) 0%, rgba(28, 68, 80, 0) 70%),
		linear-gradient(180deg, var(--c-dark) 0%, #0b2028 100%);
	background-color: var(--c-dark);
	-webkit-font-smoothing: antialiased;
}
button { font: inherit; }
:focus-visible { outline: 3px solid var(--c-gold-light); outline-offset: 3px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.icon { width: 18px; height: 18px; flex: none; }

.vd {
	display: flex; flex-direction: column;
	height: 100vh; height: 100dvh;
	max-width: 720px; margin: 0 auto;
}

/* Topo fixo */
.vd__top {
	position: relative; flex: none;
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: calc(12px + var(--safe-t)) 16px 14px;
	background: rgba(15, 42, 51, .82);
	-webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
	border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.vd__agent { display: flex; align-items: center; gap: 12px; min-width: 0; }
.vd__avatar {
	position: relative; display: grid; place-items: center; flex: none;
	width: 46px; height: 46px; border-radius: 50%;
	background: var(--c-gold); color: var(--c-dark);
	font-family: var(--f-title); font-weight: 800; font-size: 1rem; letter-spacing: .02em;
}
.vd__online { position: absolute; right: 0; bottom: 1px; width: 12px; height: 12px; border-radius: 50%; background: #3DDC84; box-shadow: 0 0 0 2.5px var(--c-dark); }
.vd__who { display: flex; flex-direction: column; min-width: 0; }
.vd__who strong { font-family: var(--f-title); font-size: 1.0625rem; line-height: 1.25; }
.vd__who small { font-size: .8125rem; line-height: 1.3; color: rgba(255, 255, 255, .72); }
.vd__lawyer { flex: none; max-width: 30%; text-align: right; line-height: 1.3; font-size: .8125rem; color: var(--c-gold-light); text-decoration: none; font-weight: 600; }
.vd__progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: rgba(255, 255, 255, .08); }
.vd__progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--c-gold), var(--c-gold-light)); border-radius: 0 3px 3px 0; transition: width .5s ease; }

/* Conversa */
.vd__chat { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 22px 16px 8px; display: flex; flex-direction: column; -webkit-overflow-scrolling: touch; }
.vd__log { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.vd__msg {
	max-width: 86%; padding: 12px 16px; border-radius: 20px;
	font-size: 1.0625rem; line-height: 1.5; word-wrap: break-word;
	animation: vd-in .28s ease both;
}
.vd__msg--bot { align-self: flex-start; background: var(--c-mid); color: #fff; border-bottom-left-radius: 6px; }
.vd__msg--user { align-self: flex-end; background: var(--c-gold); color: var(--c-dark); font-weight: 600; border-bottom-right-radius: 6px; margin: 4px 0 10px; }
.vd__msg--bot + .vd__msg--bot { margin-top: -2px; }
.vd__typing { display: inline-flex; gap: 5px; padding: 16px 18px; }
.vd__typing span { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .7); animation: vd-dot 1s infinite ease-in-out; }
.vd__typing span:nth-child(2) { animation-delay: .15s; }
.vd__typing span:nth-child(3) { animation-delay: .3s; }
@keyframes vd-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes vd-dot { 0%, 80%, 100% { opacity: .35; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.vd__footer { margin-top: 28px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .08); text-align: center; font-size: .8125rem; line-height: 1.5; color: rgba(255, 255, 255, .62); }
.vd__footer p { margin: 0 0 4px; }
.vd__footer a { color: rgba(255, 255, 255, .85); }
.vd__noscript { text-align: center; }

/* Respostas (fixas embaixo) */
.vd__dock {
	flex: none; padding: 12px 16px calc(14px + var(--safe-b));
	background: linear-gradient(180deg, rgba(11, 32, 40, 0) 0%, rgba(11, 32, 40, .92) 22%);
}
.vd__dock:empty { display: none; }
.vd__answers { display: grid; gap: 8px; }
.vd__options { display: grid; gap: 8px; max-height: 52vh; max-height: 52dvh; overflow-y: auto; padding: 2px; }
.vd__opt {
	display: flex; align-items: center; justify-content: center; width: 100%;
	min-height: 52px; padding: 10px 20px; border-radius: 999px;
	border: 1.5px solid var(--c-gold); background: transparent; color: #fff;
	font-weight: 600; font-size: 1.0625rem; line-height: 1.3; text-align: center; cursor: pointer;
	animation: vd-in .25s ease both;
	transition: background-color .15s, color .15s;
	-webkit-tap-highlight-color: transparent;
}
.vd__opt:hover, .vd__opt:active, .vd__opt:focus-visible { background: var(--c-gold); color: var(--c-dark); }
.vd__opt--primary { background: var(--c-gold); color: var(--c-dark); font-family: var(--f-title); font-weight: 800; }
.vd__options .vd__opt:nth-child(2) { animation-delay: .04s; }
.vd__options .vd__opt:nth-child(3) { animation-delay: .08s; }
.vd__options .vd__opt:nth-child(4) { animation-delay: .12s; }
.vd__options .vd__opt:nth-child(5) { animation-delay: .16s; }
.vd__options .vd__opt:nth-child(n+6) { animation-delay: .2s; }

.vd__form { display: flex; gap: 8px; }
.vd__input {
	flex: 1; min-width: 0; min-height: 52px; padding: 10px 20px; border-radius: 999px;
	border: 1.5px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .06); color: #fff;
	font: inherit; font-size: 1.0625rem;
}
.vd__input::placeholder { color: rgba(255, 255, 255, .55); }
.vd__input:focus { outline: none; border-color: var(--c-gold); }
.vd__send { flex: none; min-height: 52px; padding: 0 22px; border-radius: 999px; border: 0; background: var(--c-gold); color: var(--c-dark); font-family: var(--f-title); font-weight: 800; cursor: pointer; }
.vd__error { margin: 6px 4px 0; min-height: 0; font-size: .9375rem; color: #FFC9A8; }
.vd__error:empty { display: none; }

.vd__cta {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	min-height: 58px; padding: 6px 6px 6px 24px; border-radius: 999px;
	background: var(--c-gold); color: var(--c-dark); text-decoration: none;
	font-family: var(--f-title); font-weight: 800; font-size: 1.0625rem;
	animation: vd-in .3s ease both;
}
.vd__cta i { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: #fff; color: var(--c-dark); }
.vd__cta--ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px var(--c-gold); }
.vd__cta--ghost i { background: var(--c-gold); }

.vd__back {
	display: inline-flex; align-items: center; gap: 4px; margin: 10px auto 0;
	min-height: 44px; padding: 8px 14px; border: 0; border-radius: 999px; background: transparent;
	color: rgba(255, 255, 255, .72); font-size: .9375rem; cursor: pointer;
}
.vd__back[hidden] { display: none; }
.vd__back:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.vd__dock { display: flex; flex-direction: column; }

@media (min-width: 760px) {
	.vd__chat { padding: 28px 24px 8px; }
	.vd__dock { padding-inline: 24px; }
	.vd__top { padding-inline: 24px; }
	.vd__msg { max-width: 78%; }
}

@media (prefers-reduced-motion: reduce) {
	.vd__msg, .vd__opt, .vd__cta { animation: none; }
	.vd__typing span { animation: none; opacity: .7; }
	.vd__progress span { transition: none; }
}
