/* GABA3 — nube dos agentes da portada e do registro (ajuda das categorias,
   boas-vindas e dicas dos campos). Cores próprias: funciona sobre fundo
   claro ou escuro. Sem flechas de rolagem nativas; texto longo quebra. */
[hidden].gaba3-nube { display: none !important; }

.gaba3-nube {
    --gaba3-nube-fundo: #10240f;
    --gaba3-nube-borda: rgba(120, 220, 60, .55);
    --gaba3-nube-texto: #eefce9;
    --gaba3-nube-destaque: #8fff67;
    box-sizing: border-box;
    background: var(--gaba3-nube-fundo);
    color: var(--gaba3-nube-texto);
    border: 1px solid var(--gaba3-nube-borda);
    border-radius: 22px;
    box-shadow: 0 14px 38px rgba(0, 0, 0, .38);
    font-size: 14px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}
.gaba3-nube *, .gaba3-nube *::before, .gaba3-nube *::after { box-sizing: border-box; }

/* Nubes flutuantes (categoria e boas-vindas) */
.gaba3-nube-categoria,
.gaba3-nube-boas-vindas {
    position: fixed;
    z-index: 10050;
    width: min(360px, calc(100vw - 24px));
    padding: 16px 16px 12px;
    animation: gaba3-nube-entra .22s ease-out;
}
.gaba3-nube-categoria { top: 120px; left: 12px; }
/* Rabinho da nube apontando para o ícone tocado (só na web). */
.gaba3-nube-categoria::before {
    content: '';
    position: absolute;
    top: -8px;
    left: calc(var(--gaba3-nube-seta, 40px) - 8px);
    width: 16px;
    height: 16px;
    background: var(--gaba3-nube-fundo);
    border-left: 1px solid var(--gaba3-nube-borda);
    border-top: 1px solid var(--gaba3-nube-borda);
    transform: rotate(45deg);
}
.gaba3-nube-boas-vindas {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(400px, calc(100vw - 24px));
    animation: gaba3-nube-centro .22s ease-out;
}

.gaba3-nube-fechar {
    position: absolute;
    top: 6px;
    right: 8px;
    width: 32px;
    height: 32px;
    border: 0;
    background: none;
    color: var(--gaba3-nube-texto);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    opacity: .8;
}
.gaba3-nube-titulo {
    display: block;
    margin: 0 30px 4px 0;
    color: var(--gaba3-nube-destaque);
    font-size: 15.5px;
}
.gaba3-nube-texto { margin: 0 0 12px; opacity: .92; }
.gaba3-nube-passos { padding-left: 20px; line-height: 1.45; }
.gaba3-nube-passos li + li { margin-top: 6px; }

.gaba3-nube-form { display: flex; gap: 8px; margin-bottom: 10px; }
.gaba3-nube-form input {
    flex: 1;
    min-width: 0;
    height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .22);
    background: rgba(255, 255, 255, .08);
    color: var(--gaba3-nube-texto);
    font: inherit;
}
.gaba3-nube-form input::placeholder { color: rgba(238, 252, 233, .6); }
.gaba3-nube-form input:focus { outline: 2px solid var(--gaba3-nube-destaque); outline-offset: 1px; }
.gaba3-nube-form input::-webkit-search-cancel-button { display: none; }
.gaba3-nube-form button,
.gaba3-nube-acoes button {
    height: 42px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    background: #55c900;
    color: #071406;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.gaba3-nube-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.gaba3-nube-chips button {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--gaba3-nube-borda);
    background: transparent;
    color: var(--gaba3-nube-texto);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}
.gaba3-nube-chips button:hover,
.gaba3-nube-chips button:focus-visible { background: rgba(143, 255, 103, .14); outline: none; }

.gaba3-nube-acoes { display: grid; gap: 8px; margin-bottom: 8px; }
.gaba3-nube-acoes button { width: 100%; text-align: left; }
.gaba3-nube-acoes button + button {
    background: rgba(255, 255, 255, .08);
    color: var(--gaba3-nube-texto);
    border: 1px solid rgba(255, 255, 255, .16);
}

.gaba3-nube-nao {
    display: block;
    margin: 2px auto 0;
    padding: 6px 10px;
    border: 0;
    background: none;
    color: var(--gaba3-nube-texto);
    opacity: .7;
    font: inherit;
    font-size: 12.5px;
    cursor: pointer;
    text-decoration: underline;
}

/* Dica dos campos do registro: nube pequena logo abaixo do campo. */
.gaba3-nube-campo {
    position: relative;
    margin: 10px 0 4px;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 13px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
    animation: gaba3-nube-entra .18s ease-out;
}
.gaba3-nube-campo::before {
    content: '';
    position: absolute;
    top: -7px;
    left: 22px;
    width: 12px;
    height: 12px;
    background: var(--gaba3-nube-fundo);
    border-left: 1px solid var(--gaba3-nube-borda);
    border-top: 1px solid var(--gaba3-nube-borda);
    transform: rotate(45deg);
}

@keyframes gaba3-nube-entra { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes gaba3-nube-centro { from { opacity: 0; transform: translate(-50%, -46%); } to { opacity: 1; transform: translate(-50%, -50%); } }

/* Celular: a nube da categoria ocupa a largura e fica acima da barra de baixo. */
@media (max-width: 720px) {
    .gaba3-nube-categoria {
        top: auto !important;
        left: 12px !important;
        right: 12px;
        bottom: calc(84px + env(safe-area-inset-bottom, 0px));
        width: auto;
    }
    .gaba3-nube-categoria::before { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .gaba3-nube { animation: none !important; }
}

/* Buscador do topo: "Só em Comércio · Ver tudo" quando a busca veio da nube. */
.buscador-inline-resultados .buscador-inline-faixa-tipo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
    padding: 7px 8px 7px 12px;
    border-radius: 10px;
    background: rgba(16, 36, 15, .85);
    color: #8fff67;
    font-size: 12.5px;
    font-weight: 700;
}
.buscador-inline-resultados .buscador-inline-faixa-tipo button {
    width: auto;
    flex: 0 0 auto;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid rgba(143, 255, 103, .45);
    background: transparent;
    color: #eefce9;
    font-size: 12px;
}

/* Boas-vindas ao visitante sem conta: "Criar minha conta" em destaque e "Já tenho conta" discreto. */
.gaba3-nube-acoes a {
    display: flex; align-items: center; justify-content: center;
    min-height: 44px; padding: 0 16px; border-radius: 999px;
    border: 1px solid var(--gaba3-nube-borda);
    color: var(--gaba3-nube-texto); font-weight: 700; text-decoration: none;
}
.gaba3-nube-acoes a.gaba3-nube-principal { border: 0; background: #55c900; color: #071406; font-size: 16px; }
.gaba3-nube-boas-vindas ul.gaba3-nube-passos { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }


/* ── Boas-vindas: quadro de madeira GABA3 com moldura dourada e movimento suave.
   (2026-10-04: o dono testou a forma de nuvem e preferiu um quadro, "mais apresentável".) ── */
.gaba3-nube-madeira {
    --gaba3-nube-borda: rgba(232, 168, 64, .55);
    --gaba3-nube-texto: #f6ead2;
    --gaba3-nube-destaque: #a6f05a;
    /* centrado sem transform: o transform fica livre para a animação */
    inset: 0;
    left: 0;
    top: 0;
    margin: auto;
    height: fit-content;
    transform: none;
    width: min(420px, calc(100vw - 28px));
    padding: 26px 24px 20px;
    border: 2px solid rgba(240, 190, 90, .85);
    border-radius: 22px;
    background: linear-gradient(160deg, rgba(14, 8, 3, .7), rgba(14, 8, 3, .86)),
        url("../../assets/brand/fondo-madera-oscura-gaba3.webp");
    background-size: 150% 150%;
    /* moldura: filete dourado por dentro + sombra funda por fora */
    box-shadow:
        inset 0 0 0 5px rgba(20, 11, 4, .55),
        inset 0 0 0 6px rgba(240, 190, 90, .38),
        0 22px 48px rgba(0, 0, 0, .62);
    animation:
        gaba3-madeira-entra .6s cubic-bezier(.2, 1.25, .35, 1) both,
        gaba3-madeira-veio 26s linear infinite;
}
.gaba3-nube-madeira .gaba3-nube-titulo { font-size: 19px; margin-bottom: 8px; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.gaba3-nube-madeira .gaba3-nube-texto { opacity: 1; text-shadow: 0 1px 2px rgba(0, 0, 0, .55); }
.gaba3-nube-madeira .gaba3-nube-fechar { top: 12px; right: 14px; }
.gaba3-nube-madeira .gaba3-nube-nao { color: #f0d8a8; }
/* cada linha chega uma depois da outra */
.gaba3-nube-madeira > :not(.gaba3-nube-fechar) { animation: gaba3-madeira-linha .5s ease-out both; }
.gaba3-nube-madeira > :nth-child(2) { animation-delay: .25s; }
.gaba3-nube-madeira > :nth-child(3) { animation-delay: .38s; }
.gaba3-nube-madeira > :nth-child(4) { animation-delay: .5s; }
.gaba3-nube-madeira > :nth-child(5) { animation-delay: .62s; }
.gaba3-nube-madeira > :nth-child(6) { animation-delay: .74s; }
.gaba3-nube-madeira > :nth-child(7) { animation-delay: .86s; }
/* botões: o principal verde GABA3 com um brilho que passa; os outros em madeira clara */
.gaba3-nube-madeira .gaba3-nube-acoes a,
.gaba3-nube-madeira .gaba3-nube-acoes button { position: relative; overflow: hidden; text-align: center; height: auto; min-height: 46px; white-space: normal; }
.gaba3-nube-madeira .gaba3-nube-acoes button + button,
.gaba3-nube-madeira .gaba3-nube-acoes a + button,
.gaba3-nube-madeira .gaba3-nube-acoes a:not(.gaba3-nube-principal) {
    background: rgba(255, 236, 200, .1);
    border: 1px solid var(--gaba3-nube-borda);
    color: var(--gaba3-nube-texto);
}
.gaba3-nube-madeira .gaba3-nube-acoes > :first-child::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0; left: -60%;
    width: 45%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
    transform: skewX(-18deg);
    animation: gaba3-madeira-brilho 3.6s ease-in-out 1.4s infinite;
}
@keyframes gaba3-madeira-entra {
    from { opacity: 0; transform: translateY(26px) scale(.86); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes gaba3-madeira-veio {
    0%, 100% { background-position: 0% 0%; }
    50% { background-position: 100% 100%; }
}
@keyframes gaba3-madeira-linha {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes gaba3-madeira-brilho {
    0%, 55% { left: -60%; }
    100% { left: 130%; }
}
@media (prefers-reduced-motion: reduce) {
    .gaba3-nube-madeira,
    .gaba3-nube-madeira *,
    .gaba3-nube-madeira *::after { animation: none !important; }
}

/* ── Letras grandes, legíveis e animadas (pedido do dono, 2026-10-04) ── */
.gaba3-nube-madeira .gaba3-nube-titulo {
    font-size: clamp(24px, 6.6vw, 30px);
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: .2px;
    margin: 0 34px 10px 0;
    color: #c4ff7a;
    text-shadow: 0 2px 0 rgba(0, 0, 0, .55), 0 0 18px rgba(140, 255, 80, .35);
}
.gaba3-letras-palavra { display: inline-block; white-space: nowrap; }
.gaba3-letra {
    display: inline-block;
    animation:
        gaba3-letra-entra .55s cubic-bezier(.2, 1.5, .4, 1) both,
        gaba3-letra-onda 3.6s ease-in-out infinite;
    animation-delay: calc(.25s + var(--i) * 45ms), calc(1.6s + var(--i) * 80ms);
}
.gaba3-nube-madeira .gaba3-nube-texto { font-size: 17px; line-height: 1.4; color: #fff3da; }
.gaba3-nube-madeira .gaba3-nube-chamada { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.gaba3-nube-visitante ul.gaba3-nube-passos { gap: 9px; margin-bottom: 14px; }
.gaba3-nube-beneficio {
    display: flex; align-items: center; gap: 12px;
    font-size: clamp(17px, 4.8vw, 19px); font-weight: 800; line-height: 1.25; color: #ffffff;
    animation: gaba3-beneficio-entra .55s cubic-bezier(.2, 1.2, .4, 1) both;
    animation-delay: calc(.9s + var(--n) * .22s);
}
/* Ícones de linha da GABA3 (verde da marca, sem bola nem caixa de fundo) */
.gaba3-nube-icone { flex: 0 0 auto; display: inline-grid; place-items: center; width: 22px; height: 22px; color: inherit; }
.gaba3-nube-icone svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gaba3-nube-beneficio .gaba3-nube-icone {
    width: 30px; height: 30px; color: #8fff4a;
    filter: drop-shadow(0 0 6px rgba(120, 255, 60, .45));
    animation: gaba3-icone-pulo 2.8s ease-in-out infinite;
    animation-delay: calc(2s + var(--n) * .35s);
}
.gaba3-nube-madeira .gaba3-nube-acoes a,
.gaba3-nube-madeira .gaba3-nube-acoes button { display: flex; align-items: center; justify-content: center; gap: 10px; }
.gaba3-nube-madeira .gaba3-nube-acoes a,
.gaba3-nube-madeira .gaba3-nube-acoes button { font-size: 17px; font-weight: 800; min-height: 50px; }
.gaba3-nube-madeira .gaba3-nube-acoes a.gaba3-nube-principal { font-size: 19px; }
.gaba3-nube-madeira .gaba3-nube-nao { font-size: 15px; }
.gaba3-nube-madeira .gaba3-nube-passos li { font-size: 17px; }
@keyframes gaba3-letra-entra {
    from { opacity: 0; transform: translateY(18px) scale(.4) rotate(-12deg); }
    to { opacity: 1; transform: none; }
}
@keyframes gaba3-letra-onda {
    0%, 18%, 100% { transform: translateY(0); color: inherit; }
    9% { transform: translateY(-6px); color: #ffe28a; }
}
@keyframes gaba3-beneficio-entra {
    from { opacity: 0; transform: translateX(-26px); }
    to { opacity: 1; transform: none; }
}
@keyframes gaba3-icone-pulo {
    0%, 30%, 100% { transform: none; }
    10% { transform: translateY(-6px) scale(1.18) rotate(-8deg); }
    20% { transform: translateY(0) scale(1) rotate(6deg); }
}
