/* ==========================================================
   MANOSALVA - CONTACTO FLOTANTE
========================================================== */

/*
 * Selector heredado temporal:
 *
 * #masthead > nav > div > a.btn.btn-success
 *
 * Se mantiene mientras el botón siga siendo generado
 * por el tema padre.
 *
 * .ms-floating-contact será la clase definitiva cuando
 * el componente esté completamente controlado por el child.
 */

#masthead > nav > div > a.btn.btn-success,
.ms-floating-contact {
    position: fixed !important;

    right: 24px !important;
    bottom: 24px !important;

    z-index: 9999 !important;

    display: flex !important;

    width: auto !important;
    min-width: auto !important;

    align-items: center !important;
    justify-content: center !important;

    gap: 8px;

    margin: 0 !important;

    padding: 12px 18px !important;

    border-radius: 999px !important;

    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.25);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


/* ==========================================================
   INTERACCIÓN
========================================================== */

#masthead > nav > div > a.btn.btn-success:hover,
.ms-floating-contact:hover {
    transform: translateY(-3px);

    box-shadow:
        0 9px 24px rgba(0, 0, 0, 0.30);
}


#masthead > nav > div > a.btn.btn-success:focus-visible,
.ms-floating-contact:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
}


/* ==========================================================
   MÓVIL
========================================================== */

@media (max-width: 767.98px) {

    #masthead > nav > div > a.btn.btn-success,
    .ms-floating-contact {
        right: max(12px, env(safe-area-inset-right)) !important;
        bottom: max(12px, env(safe-area-inset-bottom)) !important;

        gap: 6px;

        padding: 9px 12px !important;

        font-size: 13px !important;
        line-height: 1.15 !important;

        box-shadow:
            0 5px 14px rgba(0, 0, 0, 0.22);
    }

}


/* ==========================================================
   ACCESIBILIDAD - REDUCIR MOVIMIENTO
========================================================== */

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

    #masthead > nav > div > a.btn.btn-success,
    .ms-floating-contact {
        transition: none;
    }


    #masthead > nav > div > a.btn.btn-success:hover,
    .ms-floating-contact:hover {
        transform: none;
    }

}