/* WhatsApp Widget Styles */
.whatsapp-widget {
    position: fixed;
    bottom: 25px;
    left: 25px;
    z-index: 9999;
    font-family: 'Hanken Grotesk', sans-serif;
    max-width: 280px;
    pointer-events: none; /* Widget container'ının tıklanabilirliğini kapat */
}

.whatsapp-button {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border-radius: 28px;
    padding: 12px 18px;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 3px 15px rgba(37, 211, 102, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: pulse 2s infinite;
    border: none;
    cursor: pointer;
    min-width: 200px;
    max-width: 200px;
    overflow: visible;
    position: relative;
    height: 56px;
    justify-content: flex-start;
    padding-left: 20px;
    pointer-events: auto; /* Sadece butonun tıklanabilir olması */
}

.whatsapp-button:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
    color: white;
    text-decoration: none;
}

.whatsapp-button:active {
    transform: translateY(-1px) scale(1.02);
}

/* WhatsApp Icon */
.whatsapp-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    animation: bounce 1.5s infinite;
    pointer-events: none; /* Icon'un tıklanabilirliğini kapat */
}

.whatsapp-icon svg {
    width: 100%;
    height: 100%;
    fill: white;
}

/* Text Animation */
.whatsapp-text {
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 1;
    max-width: none;
    transition: all 0.3s ease;
    overflow: visible;
    margin-left: 5px;
    pointer-events: none; /* Text'in tıklanabilirliğini kapat */
}

/* Pulsing Animation */
@keyframes pulse {
    0% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.7), 0 0 0 10px rgba(37, 211, 102, 0.1);
    }
    100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
}

/* Bounce Animation for Icon */
@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transform: translate3d(0, -8px, 0);
    }
    70% {
        transform: translate3d(0, -4px, 0);
    }
    90% {
        transform: translate3d(0, -2px, 0);
    }
}

/* Notification Badge */
.whatsapp-notification {
    position: absolute;
    top: -8px;
    right: 8px;
    background: #FF3333;
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    animation: ring 2s infinite;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    z-index: 999999;
    pointer-events: none; /* Notification badge'in tıklanabilirliğini kapat */
}

@keyframes ring {
    0% { transform: scale(1) rotate(0deg); }
    10% { transform: scale(1.1) rotate(-5deg); }
    20% { transform: scale(1.1) rotate(5deg); }
    30% { transform: scale(1.1) rotate(-5deg); }
    40% { transform: scale(1) rotate(0deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* Floating Message Bubble */
.whatsapp-message {
    position: absolute;
    bottom: 70px;
    left: 0;
    background: white;
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    max-width: 240px;
    min-width: 200px;
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e0e0e0;
    pointer-events: auto; /* Mesaj baloncuğunun tıklanabilir olması */
}

.whatsapp-message.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.whatsapp-message::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 16px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid white;
    pointer-events: none; /* Ok işaretinin tıklanabilirliğini kapat */
}

.whatsapp-message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    pointer-events: none; /* Header'ın tıklanabilirliğini kapat */
}

.whatsapp-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25D366, #128C7E);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 12px;
    pointer-events: none; /* Avatar'ın tıklanabilirliğini kapat */
}

.whatsapp-name {
    font-weight: 600;
    color: #333;
    font-size: 13px;
    pointer-events: none; /* İsmin tıklanabilirliğini kapat */
}

.whatsapp-message-text {
    color: #555;
    font-size: 13px;
    line-height: 1.3;
    margin: 0;
    pointer-events: none; /* Mesaj metninin tıklanabilirliğini kapat */
}

.whatsapp-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto; /* Close butonunun tıklanabilir olması */
}

.whatsapp-close:hover {
    color: #333;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .whatsapp-widget {
        bottom: 20px;
        left: 20px;
        max-width: 220px;
    }
    
    .whatsapp-button {
        padding: 10px 16px;
        min-width: 180px;
        max-width: 180px;
        height: 50px;
        padding-left: 16px;
    }
    
    .whatsapp-icon {
        width: 22px;
        height: 22px;
    }
    
    .whatsapp-text {
        font-size: 13px;
    }
    
    .whatsapp-message {
        max-width: 200px;
        min-width: 180px;
        padding: 10px 12px;
        bottom: 60px;
    }
    
    .whatsapp-message-text {
        font-size: 12px;
        line-height: 1.2;
    }
    
    .whatsapp-avatar {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }
    
    .whatsapp-name {
        font-size: 12px;
    }
    
    .whatsapp-notification {
        width: 20px;
        height: 20px;
        top: -6px;
        right: 6px;
        font-size: 11px;
        border: 2px solid white;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .whatsapp-message {
        background: #2a2a2a;
        border-color: #404040;
        color: #fff;
    }
    
    .whatsapp-message-text {
        color: #ccc;
    }
    
    .whatsapp-name {
        color: #fff;
    }
}