/* Mascote do atendimento: fica por cima do ícone verde do chat e abre o chat ao ser clicado. */
.mascote {
    position: fixed;
    /* Um degrau acima do botão do widget de chat, para cobri-lo. */
    z-index: 2147483100;
    width: 64px;
    height: 64px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 250ms cubic-bezier(.2, .9, .3, 1.4);
    animation: mascote-entrada 500ms cubic-bezier(.2, .9, .3, 1.3) both;
}

.mascote[hidden] {
    display: none;
}

.mascote:hover {
    transform: scale(1.08);
}

.mascote:active {
    transform: scale(0.94);
}

.mascote:focus-visible {
    outline: 3px solid var(--escuro);
    outline-offset: 3px;
}

.mascote__esfera {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 50%;
    background: linear-gradient(135deg, #34d3ab 0%, #1fa187 55%, #177a67 100%);
    box-shadow:
        inset -6px -8px 14px rgba(0, 0, 0, 0.14),
        inset 4px 4px 12px rgba(255, 255, 255, 0.22),
        0 10px 24px -6px rgba(23, 122, 103, 0.6);
    animation: mascote-flutuar 4.2s ease-in-out infinite;
}

/* Brilho no alto da esfera. */
.mascote__esfera::before {
    content: "";
    position: absolute;
    top: 7%;
    left: 16%;
    width: 38%;
    height: 22%;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0));
    transform: rotate(-24deg);
    pointer-events: none;
}

/* Olhos: acompanham o ponteiro pelas variáveis --olho-x e --olho-y. */
.mascote__olhos {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 12%;
    padding-top: 34%;
    pointer-events: none;
}

.mascote__olho {
    width: 13%;
    height: 28%;
    border-radius: 100px;
    background: #fff;
    transform: translate(var(--olho-x, 0px), var(--olho-y, 0px)) scaleY(1);
    transform-origin: center;
    transition: transform 120ms ease-out;
}

.mascote.is-piscando .mascote__olho {
    transform: translate(var(--olho-x, 0px), var(--olho-y, 0px)) scaleY(0.06);
}

@keyframes mascote-entrada {
    from {
        opacity: 0;
        transform: scale(0.4);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes mascote-flutuar {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

@media (prefers-reduced-motion: reduce) {
    .mascote,
    .mascote__esfera,
    .mascote__olho {
        animation: none;
        transition-duration: 0.01ms !important;
    }
}

@media print {
    .mascote {
        display: none;
    }
}
