/* Ajustes de responsividade para celulares (iOS Safari / Chrome Android / Xiaomi). Só atua em telas pequenas ou toque. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; color-scheme: light; }
html:has(body.dark-theme), html:has(body.dark-mode) { color-scheme: dark; }

/* iOS dá zoom automático em campos com fonte menor que 16px */
@media (max-width: 991.98px) {
    input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=color]):not([type=submit]):not([type=button]):not([type=image]),
    select, textarea { font-size: 16px !important; }
}

/* alvos de toque mínimos (44px recomendados pela Apple/Google) */
@media (pointer: coarse) {
    .hv-more, .navbar-mobile-brand { min-height: 44px; }
    .hv-popular a { min-height: 38px; }
    .hv-tab { height: 42px; }
    .mx-iconbtn, .mx-me { width: 44px; height: 44px; }
    .mx-chip { height: 38px; }
    .btn-sm, .btn.btn-sm { min-height: 38px; min-width: 38px; }
    .navbar-mobile-compact .nav-icon-link { width: 44px; height: 44px; }
}

/* home: busca visível na primeira tela e menos peso de animação */
@media (max-width: 575.98px) {
    .hv-hero__art { min-height: 150px; margin: -6px 0 -14px; }
    .hv-controller { width: 72%; margin-left: 0; }
    .hv-title { font-size: 2rem; margin: 14px 0 10px; }
    .hv-sub { font-size: .98rem; margin-bottom: 18px; line-height: 1.5; }
    .hv-eyebrow { font-size: .74rem; }
    .hv-popular { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin-right: -12px; padding: 0 12px 4px 0; }
    .hv-popular::-webkit-scrollbar { display: none; }
    .hv-popular > * { flex: 0 0 auto; white-space: nowrap; }
}
@media (max-width: 767.98px) {
    .hv-float { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--hv-card); }
    .hv-controller, .hv-orbit span:first-child { animation: none !important; will-change: auto; }
    .hv-hero__grid { display: none; }
}

/* chat de suporte (balão) em tela cheia: respeita a barra do navegador e o teclado */
@media (max-width: 490px) {
    .support-chatbot { height: 100vh; height: 100dvh; max-height: 100dvh; padding-bottom: env(safe-area-inset-bottom); }
}

/* chat: tela fixa na altura visível (teclado do iPhone não empurra o cabeçalho) */
@media (max-width: 768px) {
    body.chat { box-sizing: border-box; position: fixed; left: 0; right: 0; top: var(--mx-vvt, 0px); width: 100%; height: var(--mx-vvh, 100dvh); padding-top: env(safe-area-inset-top) !important; overscroll-behavior: none; }
    body.chat #message-input, body.chat .mx-search input { font-size: 16px; }
}

/* botão de suporte: some ao rolar para baixo e volta ao rolar para cima (não cobre preços/botões) */
@media (max-width: 991.98px) {
    .support-chat-toggler { width: 52px; height: 52px; transition: transform .25s ease, opacity .25s ease, box-shadow .3s ease; }
    .support-chat-toggler.fab-hide { transform: translateY(140px); opacity: 0; pointer-events: none; }
}
