
/**
 * =========================================================
 * VVIEIRA | WHATSAPP FLUTUANTE GLOBAL
 * =========================================================
 *
 * Componente independente.
 * Sem dependência de JavaScript.
 * Desktop e mobile.
 *
 * =========================================================
 */

.vv-whatsapp-floating {
    --vv-wa-size: 58px;
    --vv-wa-offset: 26px;
    --vv-wa-green: #25D366;

    position: fixed;
    right: var(--vv-wa-offset);
    bottom: var(--vv-wa-offset);
    bottom: calc(
        var(--vv-wa-offset) + env(safe-area-inset-bottom, 0px)
    );

    z-index: 9998;

    display: flex;
    align-items: center;
    justify-content: center;

    width: var(--vv-wa-size);
    height: var(--vv-wa-size);

    padding: 13px;
    margin: 0;

    box-sizing: border-box;

    background: var(--vv-wa-green);
    color: #ffffff;

    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;

    box-shadow:
        0 5px 18px rgba(0, 0, 0, 0.15),
        0 2px 5px rgba(0, 0, 0, 0.07);

    text-decoration: none;

    opacity: 1;
    visibility: visible;

    cursor: pointer;

    transform: translateZ(0);

    transition:
        background-color 180ms ease,
        box-shadow 180ms ease,
        transform 180ms ease;
}

/* =========================================================
   ICONE OFICIAL
   ========================================================= */

.vv-whatsapp-floating__icon {
    display: block;

    width: 100%;
    height: 100%;

    flex: 0 0 auto;

    fill: currentColor;
    stroke: none;

    color: #ffffff;

    pointer-events: none;
}

/* =========================================================
   INTERACAO
   ========================================================= */

@media (hover: hover) and (pointer: fine) {
    .vv-whatsapp-floating:hover {
        background: #20bd5a;
        color: #ffffff;

        transform: translateY(-2px);

        box-shadow:
            0 8px 22px rgba(0, 0, 0, 0.19),
            0 3px 7px rgba(0, 0, 0, 0.08);
    }
}

.vv-whatsapp-floating:active {
    transform: scale(0.96);
}

.vv-whatsapp-floating:focus-visible {
    outline: 3px solid #0f2a44;
    outline-offset: 4px;
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1024px) {
    .vv-whatsapp-floating {
        --vv-wa-size: 56px;
        --vv-wa-offset: 22px;
    }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {
    .vv-whatsapp-floating {
        --vv-wa-size: 54px;
        --vv-wa-offset: 18px;

        padding: 12px;

        box-shadow:
            0 4px 15px rgba(0, 0, 0, 0.16),
            0 2px 5px rgba(0, 0, 0, 0.06);
    }
}

/* =========================================================
   ACESSIBILIDADE
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
    .vv-whatsapp-floating {
        transition: none;
    }

    .vv-whatsapp-floating:hover,
    .vv-whatsapp-floating:active {
        transform: none;
    }
}

/* =========================================================
   IMPRESSAO
   ========================================================= */

@media print {
    .vv-whatsapp-floating {
        display: none;
    }
}
