/* 
 * CK Whatsapp Plugin - Estilos
 * Versão: 1.0.0
 */

/* Container principal */
.ck-whatsapp-container {
    position: fixed;
    bottom: var(--ck-whatsapp-margin-bottom, 30px);
    right: var(--ck-whatsapp-margin-side, 20px);
    z-index: 999999999;
    display: block;
    visibility: visible !important;
}

.ck-whatsapp-container[data-position="left"] {
    left: var(--ck-whatsapp-margin-side, 20px);
    right: auto;
}

/* Botão principal */
.ck-whatsapp-button {
    position: relative;
    width: 60px;
    height: 60px;
    border: none;
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    border-radius: 50%;
    background: #25D366;
    cursor: pointer;
    animation: ck-whatsapp-pulse 1.25s infinite cubic-bezier(0.16, 0, 0, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.3s ease;
    border: 3px solid rgba(255,255,255,0.2);
}

.ck-whatsapp-button:hover {
    animation: none;
    transform: scale(1.1);
    text-decoration: none;
}

.ck-whatsapp-button:focus {
    outline: none;
}

/* Ícone SVG do WhatsApp */
.ck-whatsapp-icon {
    width: 30px;
    height: 30px;
    display: block;
}

.ck-whatsapp-icon-small {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    flex-shrink: 0;
}

/* Menu dropdown */
.ck-whatsapp-menu {
    position: absolute;
    bottom: 70px;
    right: 0;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 999999999;
    overflow: hidden;
}

.ck-whatsapp-container[data-position="left"] .ck-whatsapp-menu {
    left: 0;
    right: auto;
}

.ck-whatsapp-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Itens do menu */
.ck-whatsapp-menu-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.ck-whatsapp-menu-item:hover {
    background-color: #f8f9fa;
    text-decoration: none;
    color: #333;
}

.ck-whatsapp-menu-item:first-child {
    border-radius: 15px 15px 0 0;
}

.ck-whatsapp-menu-item:last-child {
    border-bottom: none;
    border-radius: 0 0 15px 15px;
}

.ck-whatsapp-menu-item:first-child:last-child {
    border-radius: 15px;
}

.ck-whatsapp-menu-item i {
    color: #25D366 !important;
    font-size: 18px;
    margin-right: 10px;
    font-family: "Font Awesome 6 Brands", "Font Awesome 5 Brands", "FontAwesome" !important;
    font-weight: 400 !important;
    font-style: normal !important;
    position: relative;
}

.ck-whatsapp-menu-item i.fab.fa-whatsapp:before {
    content: "\f232" !important;
    font-family: "Font Awesome 6 Brands", "Font Awesome 5 Brands", "FontAwesome" !important;
}

/* Fallback para menu */
.ck-whatsapp-menu-item i.fab.fa-whatsapp:after {
    content: "📱";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif !important;
    font-size: 16px;
    display: none;
}

.ck-whatsapp-menu-item i.fab.fa-whatsapp:empty:after,
.ck-whatsapp-menu-item i.fab.fa-whatsapp[data-fallback]:after {
    display: block;
}

.ck-whatsapp-menu-item span {
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
}

/* Animação pulse */
@keyframes ck-whatsapp-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Responsividade para ícones SVG */
@media (max-width: 768px) {
    .ck-whatsapp-button {
        width: 55px;
        height: 55px;
    }
    
    .ck-whatsapp-icon {
        width: 26px;
        height: 26px;
    }
    
    .ck-whatsapp-menu {
        min-width: 180px;
        bottom: 65px;
    }
}

@media (max-width: 480px) {
    .ck-whatsapp-button {
        width: 50px;
        height: 50px;
    }
    
    .ck-whatsapp-icon {
        width: 24px;
        height: 24px;
    }
    
    .ck-whatsapp-icon-small {
        width: 16px;
        height: 16px;
    }
    
    .ck-whatsapp-menu {
        min-width: 160px;
        bottom: 60px;
    }
    
    .ck-whatsapp-menu-item {
        padding: 10px 12px;
    }
    
    .ck-whatsapp-menu-item span {
        font-size: 13px;
    }
}