/* Mulalo: the mascot in the bottom right corner and her chat box. */
.v1m { --v1m-h: 280px; --v1m-w: calc(var(--v1m-h) * var(--v1m-ratio, 0.819)); position: fixed; right: clamp(0px, 1vw, 16px); bottom: 0; z-index: 950; width: var(--v1m-w); height: var(--v1m-h); pointer-events: none; font-family: var(--font-sans); }
.v1m-floor { position: absolute; left: 30%; right: 30%; bottom: 2px; height: 14px; border-radius: 50%; background: radial-gradient(closest-side, rgba(20, 19, 18, 0.34), transparent); }
.v1m-fig { position: absolute; inset: 0; display: block; transform-origin: 50% 100%; transition: transform 0.35s var(--v1-ease-out, ease); }
.v1m-fig canvas, .v1m-fig img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; display: block; object-fit: contain; object-position: bottom; border-radius: 0; }
.v1m.is-live .v1m-fig img { visibility: hidden; }
.v1m-hit { position: absolute; left: 32%; right: 32%; top: 4%; bottom: 0; z-index: 1; padding: 0; border: 0; background: transparent; cursor: pointer; pointer-events: auto; border-radius: 40px 40px 8px 8px; }
.v1m-hit:hover, .v1m-hit:focus { background: transparent; }
.v1m-hit:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.v1m:has(.v1m-hit:hover) .v1m-fig { transform: scale(1.03); }

/* The chat icon beside her */
.v1m-badge { position: absolute; left: 6%; bottom: 44px; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid #0a0908; border-radius: 50%; background: linear-gradient(#2e2d2a, #1c1b19); color: #f4f3ee; box-shadow: var(--gloss-ink), 0 8px 18px rgba(20, 19, 18, 0.24); cursor: pointer; pointer-events: auto; transition: transform 0.2s; }
.v1m-badge:hover, .v1m-badge:focus { transform: translateY(-2px); background: linear-gradient(#2e2d2a, #1c1b19); color: #f4f3ee; }
.v1m-badge svg { width: 21px; height: 21px; }
.v1m-badge:focus-visible { outline: 2px solid #c9f27a; outline-offset: 2px; }
.v1m-badge .x { display: none; }
.v1m.is-open .v1m-badge .x { display: block; }
.v1m.is-open .v1m-badge .c { display: none; }

/* The occasional speech bubble */
.v1m-say { position: absolute; right: 70%; top: 10%; width: max-content; max-width: 210px; padding: 9px 13px; border: 1px solid var(--line); border-radius: 8px 8px 2px 8px; background: var(--surface-raised); color: var(--ink); font: 500 13px/18px var(--font-sans); box-shadow: var(--shadow-card); opacity: 0; transform: translateY(6px); transition: opacity 0.25s, transform 0.25s; }
.v1m-say.is-on { opacity: 1; transform: none; }

/* Chat box: sits to her left, so she stays visible while it is open */
.v1m-chat { --v1m-h: 280px; position: fixed; right: calc(clamp(0px, 1vw, 16px) + var(--v1m-h) * var(--v1m-ratio, 0.819) * 0.72); bottom: 16px; z-index: 960; display: flex; flex-direction: column; width: min(372px, calc(100vw - 16px)); height: min(520px, calc(100vh - 110px)); min-height: 260px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-raised); box-shadow: 0 1px 0 0 var(--line), 0 24px 60px rgba(20, 19, 18, 0.26); color: var(--ink-body); opacity: 0; visibility: hidden; transform: translateY(10px) scale(0.98); transform-origin: 100% 100%; transition: opacity 0.22s, transform 0.22s, visibility 0.22s; }
.v1m-chat.is-open { opacity: 1; visibility: visible; transform: none; }
.v1m-chat-band { flex: none; height: 8px; background: url("../img/venda/band-thin.svg") center / auto 8px repeat-x; }
.v1m-chat-head { flex: none; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); }
.v1m-chat-head img { width: 38px; height: 38px; border-radius: 8px; display: block; }
.v1m-chat-head b { display: block; font: 600 16px/20px var(--font-display); letter-spacing: -0.01em; color: var(--ink); }
.v1m-chat-head span { display: block; font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.v1m-close { margin-left: auto; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--ink-muted); font-size: 19px; line-height: 1; cursor: pointer; }
.v1m-close:hover, .v1m-close:focus { background: var(--surface-cool); color: var(--ink); }
.v1m-log { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 14px; overscroll-behavior: contain; }
.v1m-msg { max-width: 86%; padding: 9px 12px; border-radius: 8px; font-size: 14px; line-height: 20px; }
.v1m-msg.bot { align-self: flex-start; background: var(--surface-cool); color: var(--ink); border-bottom-left-radius: 2px; }
.v1m-msg.me { align-self: flex-end; background: #1f6b45; color: #ffffff; border-bottom-right-radius: 2px; }
.v1m-msg a { color: inherit; text-decoration: underline; }
.v1m-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 0; }
.v1m-chip { padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-raised); color: var(--ink); font: 500 13px/18px var(--font-sans); cursor: pointer; }
.v1m-chip:hover, .v1m-chip:focus { border-color: #1f6b45; background: var(--icon-tile); color: var(--ink); }
.v1m-form { flex: none; display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line-soft); }
.v1m-form input { flex: 1 1 auto; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-raised); color: var(--ink); font: 400 14px/20px var(--font-sans); }
.v1m-form input:focus { outline: 0; border-color: #1f6b45; box-shadow: 0 0 0 3px var(--icon-tile); }
.v1m-form button { flex: none; padding: 8px 13px; border: 1px solid #175236; border-radius: 6px; background: linear-gradient(#2a7f52, #1f6b45); color: #ffffff; font: 500 13px/18px var(--font-sans); box-shadow: var(--gloss-fern); cursor: pointer; }
.v1m-form button:hover, .v1m-form button:focus { background: linear-gradient(#2a7f52, #1f6b45); color: #ffffff; filter: brightness(1.06); }

@media (max-width: 767px) {
  .v1m { --v1m-h: 128px; right: 0; }
  .v1m-badge { left: -8px; bottom: 16px; width: 36px; height: 36px; }
  .v1m-badge svg { width: 18px; height: 18px; }
  .v1m-floor { height: 8px; }
  .v1m-say { display: none; }
  .v1m-chat { right: 8px; bottom: 8px; height: min(540px, calc(100vh - 150px)); z-index: 1100; }
  .v1m.is-open { display: none; }
}
@media (prefers-reduced-motion: reduce) { .v1m-fig, .v1m-say, .v1m-chat { transition: none; } }
@media print { .v1m, .v1m-chat { display: none; } }
