/*
 * CTA flotante multilingue
 * Ascensores BCN PRO
 *
 * El boton es creado dinamicamente por el codigo
 * cargado desde un archivo JavaScript externo.
 */

.floating-call-container {
    position: fixed;
    right: 30px;
    bottom: 30px;
    z-index: 999999;
    display: block !important;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    pointer-events: none;
}

.floating-call-button {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 12px 24px;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.30);
    border-radius: 50px;
    background: linear-gradient(
        135deg,
        #146da0 0%,
        #0b4f79 100%
    );
    color: #ffffff !important;
    text-decoration: none !important;
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.40);
    transition:
        transform 0.3s ease-in-out,
        box-shadow 0.3s ease-in-out,
        filter 0.3s ease-in-out;
    animation:
        pulse-ascensores-call 2.5s infinite;
    font-family:
        Arial,
        Helvetica,
        sans-serif;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    box-sizing: border-box;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
}

.floating-call-button:hover,
.floating-call-button:focus,
.floating-call-button:focus-visible {
    transform: translateY(-5px);
    box-shadow:
        0 12px 30px rgba(20, 109, 160, 0.50);
    filter: brightness(1.10);
    color: #ffffff !important;
    text-decoration: none !important;
}

.floating-call-button:focus {
    outline: none;
}

.floating-call-button:focus-visible {
    outline:
        3px solid rgba(255, 255, 255, 0.90);
    outline-offset: 3px;
}

.floating-call-button:active {
    transform: translateY(-1px);
    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.35);
}

.call-icon {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 32px;
    min-width: 32px;
    height: 32px;
    margin: 0 14px 0 0;
    padding: 0;
    color: #ffffff !important;
    line-height: 1;
    box-sizing: border-box;
    pointer-events: none;
}

.call-icon svg {
    display: block;
    width: 28px;
    height: 28px;
    margin: 0;
    padding: 0;
    fill: currentColor;
    pointer-events: none;
}

.call-text {
    display: inline-block;
    margin: 0;
    padding: 0;
    color: #ffffff !important;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
    pointer-events: none;
}

/*
 * Efecto de llamada de atencion.
 */
@keyframes pulse-ascensores-call {
    0% {
        box-shadow:
            0 0 0 0 rgba(20, 109, 160, 0.70),
            0 8px 25px rgba(0, 0, 0, 0.40);
    }

    70% {
        box-shadow:
            0 0 0 15px rgba(20, 109, 160, 0),
            0 8px 25px rgba(0, 0, 0, 0.40);
    }

    100% {
        box-shadow:
            0 0 0 0 rgba(20, 109, 160, 0),
            0 8px 25px rgba(0, 0, 0, 0.40);
    }
}

/*
 * Respeta la preferencia de reduccion de movimiento.
 */
@media (prefers-reduced-motion: reduce) {
    .floating-call-button {
        animation: none !important;
        transition: none !important;
    }

    .floating-call-button:hover,
    .floating-call-button:focus,
    .floating-call-button:focus-visible,
    .floating-call-button:active {
        transform: none;
    }
}

/*
 * Version movil:
 * boton circular con icono.
 */
@media (max-width: 768px) {
    .floating-call-container {
        right: 20px;
        bottom:
            max(
                20px,
                env(safe-area-inset-bottom)
            );
    }

    .floating-call-button {
        width: 58px;
        min-width: 58px;
        height: 58px;
        min-height: 58px;
        padding: 14px;
        border-radius: 50%;
    }

    .call-text {
        display: none !important;
    }

    .call-icon {
        width: 32px;
        min-width: 32px;
        height: 32px;
        margin: 0;
    }

    .call-icon svg {
        width: 29px;
        height: 29px;
    }
}

/*
 * Ajuste para moviles muy estrechos.
 */
@media (max-width: 380px) {
    .floating-call-container {
        right: 14px;
        bottom:
            max(
                14px,
                env(safe-area-inset-bottom)
            );
    }

    .floating-call-button {
        width: 54px;
        min-width: 54px;
        height: 54px;
        min-height: 54px;
        padding: 12px;
    }

    .call-icon,
    .call-icon svg {
        width: 28px;
        min-width: 28px;
        height: 28px;
    }
}

/*
 * El boton no debe mostrarse al imprimir.
 */
@media print {
    .floating-call-container {
        display: none !important;
    }
}
