/**
 * FLOATING WHATSAPP BUTTON
 * Pływający przycisk kontaktu w prawym dolnym rogu
 * ================================================
 */

.floating-whatsapp {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-whatsapp:hover {
    transform: translateY(-5px) scale(1.05);
}

.whatsapp-button {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #ffffff;
    padding: 15px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 
        0 8px 24px rgba(37, 211, 102, 0.4),
        0 0 40px rgba(37, 211, 102, 0.2);
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
    animation: whatsapp-pulse 2s ease-in-out infinite;
}

.whatsapp-button:hover {
    background: linear-gradient(135deg, #2be577 0%, #15a085 100%);
    box-shadow: 
        0 12px 32px rgba(37, 211, 102, 0.6),
        0 0 60px rgba(37, 211, 102, 0.3);
    color: #ffffff;
    transform: scale(1.02);
}

.whatsapp-icon {
    width: 32px;
    height: 32px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.whatsapp-text {
    font-weight: 700;
    line-height: 1.2;
}

.whatsapp-text small {
    display: block;
    font-size: 12px;
    font-weight: 400;
    opacity: 0.9;
}

/* Animacja pulsowania */
@keyframes whatsapp-pulse {
    0%, 100% {
        box-shadow: 
            0 8px 24px rgba(37, 211, 102, 0.4),
            0 0 40px rgba(37, 211, 102, 0.2);
    }
    50% {
        box-shadow: 
            0 8px 24px rgba(37, 211, 102, 0.6),
            0 0 50px rgba(37, 211, 102, 0.4);
    }
}

/* Animacja wejścia */
.floating-whatsapp {
    animation: whatsapp-enter 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes whatsapp-enter {
    0% {
        opacity: 0;
        transform: translateY(100px) scale(0.5);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Tooltip */
.whatsapp-tooltip {
    position: absolute;
    bottom: 100%;
    right: 0;
    background: #ffffff;
    color: #333;
    padding: 12px 18px;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 30px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #ffffff;
}

.floating-whatsapp:hover .whatsapp-tooltip {
    opacity: 1;
    transform: translateY(0);
}

/* Badge z liczbą (opcjonalnie) */
.whatsapp-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4444;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    border: 2px solid #ffffff;
    animation: badge-pulse 1.5s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Wersja uproszczona (tylko ikona) */
.floating-whatsapp.icon-only .whatsapp-button {
    width: 65px;
    height: 65px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
}

.floating-whatsapp.icon-only .whatsapp-text {
    display: none;
}

.floating-whatsapp.icon-only .whatsapp-icon {
    width: 40px;
    height: 40px;
    font-size: 24px;
}

/* Responsywne */
@media (max-width: 768px) {
    .floating-whatsapp {
        bottom: 20px;
        right: 20px;
    }
    
    /* Na mobile pokazuj tylko ikonę */
    .whatsapp-text {
        display: none;
    }
    
    .whatsapp-button {
        width: 60px;
        height: 60px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }
    
    .whatsapp-icon {
        width: 35px;
        height: 35px;
        font-size: 22px;
    }
    
    .whatsapp-tooltip {
        display: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .whatsapp-tooltip {
        background: #2c2c2c;
        color: #ffffff;
    }
    
    .whatsapp-tooltip::after {
        border-top-color: #2c2c2c;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .floating-whatsapp,
    .whatsapp-button,
    .whatsapp-tooltip {
        animation: none;
        transition: none;
    }
}

/* Print - ukryj */
@media print {
    .floating-whatsapp {
        display: none !important;
    }
}

