/* Bio Float Buttons - Contact Form Overlay */

#bfb-float-container {
    position: fixed;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Posiciones del contenedor */
#bfb-float-container.bfb-bottom-right {
    bottom: 60px;
    right: 20px;
}

#bfb-float-container.bfb-bottom-left {
    bottom: 60px;
    left: 20px;
}

#bfb-float-container.bfb-top-right {
    top: 60px;
    right: 20px;
}

#bfb-float-container.bfb-top-left {
    top: 60px;
    left: 20px;
}

/* Ocultar en móvil cuando está deshabilitado */
#bfb-float-container.bfb-hide-mobile {
    display: none;
}

@media (min-width: 769px) {
    #bfb-float-container.bfb-hide-mobile {
        display: block;
    }
}

/* === BOTÓN PRINCIPAL === */

#bfb-main-button {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    border: none;
    outline: none;
    z-index: 10003;
}

#bfb-main-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

#bfb-main-button:focus {
    outline: 3px solid rgba(255, 255, 255, 0.5);
    outline-offset: 3px;
}

.bfb-main-icon {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 1;
    transform: scale(1) rotate(0deg);
    width: 45px;
    height: 45px;
}

/* Efecto de pulso en el botón principal */
#bfb-main-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: inherit;
    opacity: 0;
    transform: scale(1);
    animation: pulse 3s ease-in-out infinite;
    z-index: -1;
}

@keyframes pulse {
    0% {
        opacity: 0.4;
        transform: scale(1);
    }

    50% {
        opacity: 0.2;
        transform: scale(1.2);
    }

    100% {
        opacity: 0;
        transform: scale(1.4);
    }
}

/* === OVERLAY DE PANTALLA COMPLETA === */
#bfb-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    background: #30B5F8;
    z-index: 10001;
    display: none;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

#bfb-overlay.active {
    display: flex;
    opacity: 1;
    align-items: center;
    justify-content: center;
}

/* === CONTENEDOR DEL FORMULARIO === */

.bfb-form-wrapper {
    width: 100%;
    position: relative;
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    max-width: 839px;
    margin: 0 auto;
    gap: 30px;
    padding: 42px 0 60px;
}

.bfb-form-wrapper-bg {
    position: absolute;
    z-index: -1;
    right: -162px;
    top: 78px;
}

#bfb-overlay.active .bfb-form-wrapper {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition-delay: 0.1s;
}

/* Botón de cerrar */
.bfb-close-button:not(.button) {
    position: fixed;
    bottom: 60px;
    right: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 10;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #4A4F54;
}

.bfb-close-button:hover {
    transform: rotate(90deg);
}

.bfb-close-button svg {
    width: 36px;
    height: 36px;
}

.bfb-form-content-text {
    max-width: 296px;
}

.bfb-form-title {
    color: #27282A;
    font-size: 44px;
    font-style: normal;
    font-weight: 450;
    line-height: 50px;
    letter-spacing: -0.352px;
    margin-bottom: 10px;
}

.bfb-form-description {
    color: #27282A;
    font-size: 18px;
    font-style: normal;
    font-weight: 450;
    line-height: 24px;
    padding-right: 24px;
}

/* Botón de sApp */
.bfb-form-content-text .button {
    margin-top: 24px;
    padding-inline: 53px;
}

/* Estilos del formulario CF7 */

.bfb-cf7-wrapper .wpcf7-form {
    gap: 24px;
}

/* Mensaje cuando no hay formulario */
.bfb-no-form-message {
    padding: 30px;
    text-align: center;
    color: #666;
    background: #f9f9f9;
    border-radius: 8px;
    font-size: 14px;
}

/* === RESPONSIVE DESIGN === */

@media (max-width: 768px) {
    .bfb-main-icon {
        width: 35px;
        height: 35px;
    }

    #bfb-overlay {
        padding: 0;
    }
}

@media (max-width: 480px) {
    .bfb-form-wrapper {
        flex-direction: column;
        padding: 40px 24px 80px;
    }

    .bfb-form-content-text {
        max-width: 100%;
    }

    .bfb-close-button:not(.button) {
        bottom: 15px;
        left: 50%;
        width: 50px;
        height: 50px;
        transform: translateX(-50%);
    }

    .bfb-close-button:not(.button) svg {
        width: 26px;
        height: 26px;
    }
}

/* === MEJORAS DE ACCESIBILIDAD === */

/* Ocultar scroll cuando overlay está activo */
body.bfb-no-scroll {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
}

/* Asegurar que el overlay esté por encima de todo */
#bfb-overlay {
    pointer-events: auto;
    user-select: none;
}

/* Scrollbar personalizado para el formulario */
.bfb-form-wrapper::-webkit-scrollbar {
    width: 8px;
}

.bfb-form-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.bfb-form-wrapper::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.bfb-form-wrapper::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Loading state para el formulario */
.bfb-form-wrapper.loading {
    pointer-events: none;
    opacity: 0.7;
}

.bfb-form-wrapper.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1000;
}

/* Estilos para párrafos y contenido HTML en descripciones y mensajes */
.bfb-form-description p,
.bfb-success-text p {
    margin: 0 0 15px 0;
    line-height: 1.6;
}

.bfb-form-description p:last-child,
.bfb-success-text p:last-child {
    margin-bottom: 0;
}

.bfb-form-description ul,
.bfb-form-description ol,
.bfb-success-text ul,
.bfb-success-text ol {
    margin: 10px 0 15px 20px;
    padding-left: 20px;
}

.bfb-form-description li,
.bfb-success-text li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.bfb-form-description a,
.bfb-success-text a {
    color: #007cba;
    text-decoration: underline;
}

.bfb-form-description a:hover,
.bfb-success-text a:hover {
    color: #005a87;
}

.bfb-form-description strong,
.bfb-form-description b,
.bfb-success-text strong,
.bfb-success-text b {
    font-weight: 800;
}

.bfb-form-description em,
.bfb-form-description i,
.bfb-success-text em,
.bfb-success-text i {
    font-style: italic;
}

/* Estilos para imagen personalizada de éxito */
.bfb-success-custom-image {
    max-width: 360px;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.bfb-success-content {
    display: flex;
    column-gap: 106px;
    row-gap: 40px;
    flex-direction: row-reverse;
}

.bfb-success-title {
    color: #27282A;
    font-size: 44px;
    font-style: normal;
    font-weight: 450;
    line-height: 50px;
    letter-spacing: -0.352px;
    margin-bottom: 10px;
}

.bfb-success-text {
    color: #27282A;
    font-size: 18px;
    font-style: normal;
    font-weight: 450;
    line-height: 24px;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .bfb-success-content {
        flex-direction: column;
    }
}