/**
 * Botón Flotante de Contacto (FAB - Floating Action Button)
 * Botón circular de WhatsApp que se expande para mostrar tarjeta de contacto
 * 
 * @package KenkatsuTheme
 * @version 2.0
 */

/* ═══════════════════════════════════════════════════════════════════════════
   OCULTAR BOTÓN EN PÁGINA LAUNCH (COMING SOON)
   =========================================================================== */

/* Ocultar el botón flotante en la página Launch */
body.page-template-templates-page-launch .kenkatsu-floating-contact,
body.page-id-launch .kenkatsu-floating-contact,
body.page-slug-launch .kenkatsu-floating-contact {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CONTENEDOR PRINCIPAL DEL BOTÓN FLOTANTE
   =========================================================================== */

.kenkatsu-floating-contact {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9998;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BOTÓN PRINCIPAL (CIRCULAR - WHATSAPP) - PREMIUM
   =========================================================================== */

/* ═══════════════════════════════════════════════════════════════════════════
   BOTÓN PRINCIPAL (CIRCULAR - WHATSAPP) - PREMIUM
   =========================================================================== */

.kenkatsu-floating-contact__main-button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #1F5E6B;
    /* Corporate Deep Teal - Flat */
    border: none;
    /* Remove 3D border */
    box-shadow: 0 4px 12px rgba(31, 94, 107, 0.3);
    /* Subtle teal shadow */
    cursor: pointer;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    /* Smooth interaction */
    position: relative;
    z-index: 2;
    overflow: hidden;
    padding: 0 !important;
}

.kenkatsu-floating-contact__main-button:hover {
    transform: translateY(-2px);
    /* Slight lift, flat feel */
    background: #184b56;
    /* Slightly darker teal for hover */
    box-shadow: 0 8px 20px rgba(31, 94, 107, 0.4);
}

.kenkatsu-floating-contact__main-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(31, 94, 107, 0.3);
}

/* Icono de WhatsApp en el botón principal - MÁS GRANDE Y CENTRADO */
.kenkatsu-floating-contact__main-icon {
    width: 24px !important;
    height: 24px !important;
    fill: #FFFFFF !important;
    stroke: none !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1)) !important;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    /* position: relative removed for flex centering */
    z-index: 1 !important;
    display: block !important;
    margin: 0 !important;
    /* Flexbox handles centering */
    opacity: 1 !important;
    flex-shrink: 0 !important;
    background: transparent !important;
    /* Asegurar fondo transparente */
}

.kenkatsu-floating-contact__main-button:hover .kenkatsu-floating-contact__main-icon {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
    opacity: 1;
}

/* Efecto de brillo/glow alrededor del botón - ESTILO PREMIUM CON GLOW IZQUIERDO */
/* Efectos de brillo eliminados para un diseño más limpio */
.kenkatsu-floating-contact__main-button::before {
    display: none;
}

.kenkatsu-floating-contact__main-button::after {
    display: none;
}

.kenkatsu-floating-contact__main-button:hover::after {
    display: none;
}



/* ═══════════════════════════════════════════════════════════════════════════
   TARJETA DE CONTACTO - DISEÑO INSPIRADO EN APPLE
   Minimalista, limpio, con sombras sutiles y glassmorphism
   =========================================================================== */

body .kenkatsu-floating-contact__card,
.kenkatsu-floating-contact .kenkatsu-floating-contact__card {
    position: absolute !important;
    bottom: 85px !important;
    right: 0 !important;
    width: 360px !important;
    background: rgba(255, 255, 255, 0.75) !important;
    background-color: rgba(255, 255, 255, 0.75) !important;
    border-radius: 24px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08) !important,
        0 2px 8px rgba(0, 0, 0, 0.04) !important,
        0 0 0 0.5px rgba(0, 0, 0, 0.04) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(20px) scale(0.96) !important;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    overflow: hidden !important;
    z-index: 1 !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
}

body .kenkatsu-floating-contact.is-expanded .kenkatsu-floating-contact__card,
.kenkatsu-floating-contact.is-expanded .kenkatsu-floating-contact__card {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) scale(1) !important;
}

/* Efecto hover en la tarjeta completa - Muy sutil estilo Apple */
body .kenkatsu-floating-contact__card:hover,
.kenkatsu-floating-contact__card:hover {
    background: rgba(255, 255, 255, 1) !important;
    background-color: rgba(255, 255, 255, 1) !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1) !important,
        0 4px 12px rgba(0, 0, 0, 0.06) !important,
        0 0 0 0.5px rgba(0, 0, 0, 0.06) !important;
    transform: translateY(-1px) scale(1) !important;
}

/* Header de la tarjeta - Estilo Apple Minimalista */
.kenkatsu-floating-contact__card-header {
    background: transparent !important;
    padding: 24px 32px 16px;
    color: #1d1d1f;
    position: relative;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.kenkatsu-floating-contact__card-header::before {
    display: none;
}

.kenkatsu-floating-contact__card-title {
    font-size: 1.375rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
    letter-spacing: -0.015em;
    text-shadow: none;
    position: relative;
    z-index: 1;
    color: #1d1d1f;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Contenedor de opciones de contacto - Estilo Apple */
body .kenkatsu-floating-contact__contact-options,
.kenkatsu-floating-contact__contact-options {
    padding: 8px !important;
    background: transparent !important;
    background-color: transparent !important;
}

/* Opción individual de contacto - Estilo Apple minimalista */
body .kenkatsu-floating-contact__contact-option,
body a.kenkatsu-floating-contact__contact-option,
.kenkatsu-floating-contact__contact-option {
    display: flex !important;
    align-items: center !important;
    padding: 16px 20px !important;
    text-decoration: none !important;
    color: #1d1d1f !important;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    cursor: pointer !important;
    border: none !important;
    background: rgba(255, 255, 255, 0.4) !important;
    background-color: rgba(255, 255, 255, 0.4) !important;
    width: 100% !important;
    text-align: left !important;
    position: relative !important;
    overflow: hidden !important;
    border-radius: 12px !important;
    margin-bottom: 6px !important;
    box-shadow: none !important;
    border: 0.5px solid rgba(0, 0, 0, 0.04) !important;
}

.kenkatsu-floating-contact__contact-option:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* Barra lateral verde en hover */
.kenkatsu-floating-contact__contact-option::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 2px 0 8px rgba(37, 211, 102, 0.3);
}

/* Fondo de hover con gradiente - COLORES CLAROS */
.kenkatsu-floating-contact__contact-option::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            rgba(37, 211, 102, 0.12) 0%,
            rgba(37, 211, 102, 0.06) 50%,
            rgba(255, 255, 255, 0.8) 100%);
    opacity: 0;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
    border-radius: 12px;
}

body .kenkatsu-floating-contact__contact-option:hover,
body a.kenkatsu-floating-contact__contact-option:hover,
.kenkatsu-floating-contact__contact-option:hover {
    background: rgba(255, 255, 255, 0.9) !important;
    background-color: rgba(255, 255, 255, 0.9) !important;
    padding-left: 24px !important;
    transform: translateX(2px) scale(1.01) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

.kenkatsu-floating-contact__contact-option:hover::before {
    transform: scaleY(1);
}

.kenkatsu-floating-contact__contact-option:hover::after {
    opacity: 1;
}

.kenkatsu-floating-contact__contact-option:active {
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 1) 0%,
            rgba(250, 250, 250, 0.9) 50%,
            rgba(245, 245, 245, 1) 100%);
    transform: translateX(3px);
    transition: all 0.15s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Icono circular de cada opción - PREMIUM CON EFECTOS MEJORADOS */
.kenkatsu-floating-contact__option-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 20px;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    z-index: 1;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1),
        0 1px 3px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.kenkatsu-floating-contact__option-icon--whatsapp {
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    border: 0.5px solid rgba(37, 211, 102, 0.2);
}

.kenkatsu-floating-contact__option-icon--phone {
    background: linear-gradient(135deg, #F5F5F7 0%, #E5E5EA 100%);
    border: 0.5px solid rgba(31, 94, 107, 0.15);
}

.kenkatsu-floating-contact__option-icon--email {
    background: linear-gradient(135deg, #F5F5F7 0%, #E5E5EA 100%);
    border: 0.5px solid rgba(31, 94, 107, 0.15);
}

.kenkatsu-floating-contact__contact-option:hover .kenkatsu-floating-contact__option-icon {
    transform: scale(1.15) rotate(8deg) translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15),
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.kenkatsu-floating-contact__contact-option:hover .kenkatsu-floating-contact__option-icon--whatsapp {
    background: linear-gradient(135deg, #C8E6C9 0%, #A5D6A7 50%, #81C784 100%);
    border-color: rgba(37, 211, 102, 0.4);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.25),
        0 2px 8px rgba(37, 211, 102, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.kenkatsu-floating-contact__contact-option:hover .kenkatsu-floating-contact__option-icon--phone,
.kenkatsu-floating-contact__contact-option:hover .kenkatsu-floating-contact__option-icon--email {
    background: linear-gradient(135deg, #E0E0E0 0%, #BDBDBD 50%, #9E9E9E 100%);
    border-color: rgba(31, 94, 107, 0.3);
}

.kenkatsu-floating-contact__option-icon svg {
    width: 28px;
    height: 28px;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.kenkatsu-floating-contact__contact-option:hover .kenkatsu-floating-contact__option-icon svg {
    transform: scale(1.15);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

.kenkatsu-floating-contact__option-icon--whatsapp svg {
    fill: #25D366;
}

.kenkatsu-floating-contact__option-icon--phone svg,
.kenkatsu-floating-contact__option-icon--email svg {
    fill: #1F5E6B;
}

/* Texto de la opción - PREMIUM CON EFECTOS MEJORADOS */
.kenkatsu-floating-contact__option-text {
    flex: 1;
    min-width: 0;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.kenkatsu-floating-contact__contact-option:hover .kenkatsu-floating-contact__option-text {
    transform: translateX(4px);
}

.kenkatsu-floating-contact__option-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    line-height: 1.3;
    letter-spacing: -0.015em;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.kenkatsu-floating-contact__contact-option:hover .kenkatsu-floating-contact__option-title {
    color: #128C7E;
    transform: translateX(2px);
    text-shadow: 0 2px 4px rgba(18, 140, 126, 0.1);
}

.kenkatsu-floating-contact__option-subtitle {
    font-size: 0.9375rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
    font-weight: 500;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.01em;
}

.kenkatsu-floating-contact__contact-option:hover .kenkatsu-floating-contact__option-subtitle {
    color: #4b5563;
    transform: translateX(2px);
    font-weight: 600;
}


/* ═══════════════════════════════════════════════════════════════════════════
   OVERLAY OSCURO CUANDO ESTÁ EXPANDIDO
   =========================================================================== */

.kenkatsu-floating-contact__overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: -1;
    pointer-events: none;
}

.kenkatsu-floating-contact.is-expanded .kenkatsu-floating-contact__overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE - TABLETS Y MÓVILES
   =========================================================================== */

@media (max-width: 768px) {
    .kenkatsu-floating-contact {
        bottom: 20px;
        right: 20px;
    }

    .kenkatsu-floating-contact__main-button {
        width: 56px;
        height: 56px;
    }

    .kenkatsu-floating-contact__main-icon {
        width: 28px;
        height: 28px;
    }

    .kenkatsu-floating-contact__card {
        width: 300px;
        bottom: 75px;
    }

    .kenkatsu-floating-contact__card-header {
        padding: 18px 20px;
    }

    .kenkatsu-floating-contact__card-title {
        font-size: 1rem;
    }

    .kenkatsu-floating-contact__contact-option {
        padding: 14px 20px;
    }

    .kenkatsu-floating-contact__option-icon {
        width: 44px;
        height: 44px;
        margin-right: 14px;
    }
}

@media (max-width: 480px) {
    .kenkatsu-floating-contact {
        bottom: 15px;
        right: 15px;
    }

    .kenkatsu-floating-contact__main-button {
        width: 52px;
        height: 52px;
    }

    .kenkatsu-floating-contact__main-icon {
        width: 26px;
        height: 26px;
    }

    .kenkatsu-floating-contact__card {
        width: 280px;
        bottom: 70px;
        right: -10px;
    }

    .kenkatsu-floating-contact__card-header {
        padding: 16px 18px;
    }

    .kenkatsu-floating-contact__card-title {
        font-size: 0.9375rem;
    }

    .kenkatsu-floating-contact__contact-option {
        padding: 12px 18px;
    }

    .kenkatsu-floating-contact__option-icon {
        width: 40px;
        height: 40px;
        margin-right: 12px;
    }

    .kenkatsu-floating-contact__option-icon svg {
        width: 20px;
        height: 20px;
    }

    .kenkatsu-floating-contact__option-title {
        font-size: 0.9375rem;
    }

    .kenkatsu-floating-contact__option-subtitle {
        font-size: 0.8125rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ACCESIBILIDAD
   =========================================================================== */

.kenkatsu-floating-contact__main-button:focus,
.kenkatsu-floating-contact__contact-option:focus {
    outline: 3px solid rgba(37, 211, 102, 0.5);
    outline-offset: 2px;
}

/* Animación reducida para usuarios que prefieren menos movimiento */
@media (prefers-reduced-motion: reduce) {

    .kenkatsu-floating-contact__main-button,
    .kenkatsu-floating-contact__sub-button,
    .kenkatsu-floating-contact__sub-buttons,
    .kenkatsu-floating-contact__overlay {
        transition: none;
    }
}