/* =========================================================
   ESPAGLOBAL
   FLOATING ACTIONS
========================================================= */


/* =========================================================
   ROOT
========================================================= */

.espa-floating-actions {
    --espa-floating-bottom: 24px;

    position: fixed;

    bottom:
            calc(
                    var(--espa-floating-bottom)
                    + env(safe-area-inset-bottom)
            );

    z-index: 1040;

    display: flex;
    flex-direction: column;
    align-items: flex-end;

    gap: 10px;

    pointer-events: none;
}


.espa-floating-actions--right {
    right: 20px;
}


.espa-floating-actions--left {
    left: 20px;

    align-items: flex-start;
}


/* =========================================================
   ACTION
========================================================= */

.espa-floating-action {
    position: relative;

    display: flex;
    align-items: center;

    gap: 8px;

    border: 0;

    padding: 0;

    background: transparent;

    color:
            var(--espa-heading);

    font-family:
            var(--font-family-base);

    text-decoration: none;

    pointer-events: auto;

    cursor: pointer;

    outline: none;
}


/* =========================================================
   BUTTON
========================================================= */

.espa-floating-action__button {
    position: relative;

    width: 48px;
    height: 48px;

    flex:
            0 0 48px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border:
            1px solid
            rgba(
                    15,
                    23,
                    42,
                    .08
            );

    border-radius: 50%;

    background: #ffffff;

    color:
            var(--espa-heading);

    box-shadow:
            0 8px 22px
            rgba(
                    15,
                    23,
                    42,
                    .14
            );

    transition:
            transform .2s ease,
            box-shadow .2s ease,
            background-color .2s ease,
            color .2s ease,
            border-color .2s ease;
}


.espa-floating-action__button
iconify-icon {
    display: block;

    font-size: 21px;
}


/* =========================================================
   LABEL
========================================================= */

.espa-floating-action__label {
    position: absolute;

    right: calc(100% + 10px);

    max-width: 220px;

    padding:
            8px 12px;

    border:
            1px solid
            rgba(
                    15,
                    23,
                    42,
                    .07
            );

    border-radius: 9px;

    background: #ffffff;

    color:
            var(--espa-heading);

    box-shadow:
            0 7px 20px
            rgba(
                    15,
                    23,
                    42,
                    .10
            );

    font-size: 12px;
    font-weight: 600;

    line-height: 1.2;

    white-space: nowrap;

    opacity: 0;
    visibility: hidden;

    pointer-events: none;

    transform:
            translateX(5px);

    transition:
            opacity .16s ease,
            visibility .16s ease,
            transform .16s ease;
}


.espa-floating-actions--left
.espa-floating-action__label {
    right: auto;

    left: calc(100% + 10px);

    transform:
            translateX(-5px);
}


/* =========================================================
   HOVER
========================================================= */

.espa-floating-action:hover
.espa-floating-action__button,
.espa-floating-action:focus-visible
.espa-floating-action__button {
    transform:
            translateY(-2px);

    box-shadow:
            0 12px 28px
            rgba(
                    15,
                    23,
                    42,
                    .18
            );
}


.espa-floating-action:hover
.espa-floating-action__label,
.espa-floating-action:focus-visible
.espa-floating-action__label {
    opacity: 1;
    visibility: visible;

    transform:
            translateX(0);
}


/* =========================================================
   SCROLL
========================================================= */

.espa-floating-action--scroll
.espa-floating-action__button {
    background:
            var(--espa-heading);

    border-color:
            var(--espa-heading);

    color: #ffffff;
}


.espa-floating-action--scroll:hover
.espa-floating-action__button {
    background:
            var(--espa-primary);

    border-color:
            var(--espa-primary);
}


/* =========================================================
   INSTAGRAM
========================================================= */

.espa-floating-action--instagram
.espa-floating-action__button {
    color: #c13584;
}


.espa-floating-action--instagram:hover
.espa-floating-action__button {
    background: #c13584;

    border-color: #c13584;

    color: #ffffff;
}


/* =========================================================
   FACEBOOK
========================================================= */

.espa-floating-action--facebook
.espa-floating-action__button {
    color: #1877f2;
}


.espa-floating-action--facebook:hover
.espa-floating-action__button {
    background: #1877f2;

    border-color: #1877f2;

    color: #ffffff;
}


/* =========================================================
   YOUTUBE
========================================================= */

.espa-floating-action--youtube
.espa-floating-action__button {
    color: #ff0000;
}


.espa-floating-action--youtube:hover
.espa-floating-action__button {
    background: #ff0000;

    border-color: #ff0000;

    color: #ffffff;
}


/* =========================================================
   TIKTOK
========================================================= */

.espa-floating-action--tiktok
.espa-floating-action__button {
    color: #111111;
}


.espa-floating-action--tiktok:hover
.espa-floating-action__button {
    background: #111111;

    border-color: #111111;

    color: #ffffff;
}


/* =========================================================
   WHATSAPP
========================================================= */

.espa-floating-action--whatsapp
.espa-floating-action__button {
    background: #25d366;

    border-color: #25d366;

    color: #ffffff;
}


.espa-floating-action--whatsapp:hover
.espa-floating-action__button {
    background: #1ebe5b;

    border-color: #1ebe5b;
}


/* =========================================================
   PHONE
========================================================= */

.espa-floating-action--phone
.espa-floating-action__button {
    background:
            var(--espa-primary);

    border-color:
            var(--espa-primary);

    color: #ffffff;
}


.espa-floating-action--phone:hover
.espa-floating-action__button {
    background:
            var(--espa-primary-hover);

    border-color:
            var(--espa-primary-hover);
}


/* =========================================================
   COOKIE
========================================================= */

.espa-floating-action--cookie
.espa-floating-action__button {
    background: #ffffff;

    border-color:
            rgba(
                    15,
                    23,
                    42,
                    .12
            );

    color: #b7791f;
}


.espa-floating-action--cookie:hover
.espa-floating-action__button {
    background: #b7791f;

    border-color: #b7791f;

    color: #ffffff;
}


/* =========================================================
   MOBILE
========================================================= */

@media
(max-width: 767.98px) {

    .espa-floating-actions {
        gap: 8px;
    }


    .espa-floating-actions--right {
        right: 12px;
    }


    .espa-floating-actions--left {
        left: 12px;
    }


    .espa-floating-action__button {
        width: 44px;
        height: 44px;

        flex-basis: 44px;
    }


    .espa-floating-action__button
    iconify-icon {
        font-size: 20px;
    }


    .espa-floating-action__label {
        display: none;
    }

}


/* =========================================================
   VERY SMALL PHONE
========================================================= */

@media
(max-width: 380px) {

    .espa-floating-action__button {
        width: 42px;
        height: 42px;

        flex-basis: 42px;
    }

}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media
(prefers-reduced-motion: reduce) {

    .espa-floating-action__button,
    .espa-floating-action__label {
        transition:
                none !important;
    }

}