/* WhatsApp Chat Widget Styles */
.whatsapp-chat-widget {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 320px;
    height: 450px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    animation: slideInUp 0.3s ease-out;
}

.whatsapp-chat-widget.active {
    display: flex;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.whatsapp-header {
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: white;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.whatsapp-avatar img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.whatsapp-info {
    flex: 1;
}

.whatsapp-info h6 {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.whatsapp-info small {
    font-size: 11px;
}

.whatsapp-info .fa-circle {
    font-size: 8px;
    animation: pulse 2s infinite;
}

.whatsapp-actions {
    display: flex;
    gap: 5px;
}

.whatsapp-actions .btn {
    padding: 2px 6px;
    font-size: 12px;
    transition: all 0.2s ease;
}

.whatsapp-actions .btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.whatsapp-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f0f0f0;
    max-height: 300px;
}

.message {
    margin-bottom: 15px;
    display: flex;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.received {
    justify-content: flex-start;
}

.message.sent {
    justify-content: flex-end;
}

.message-content {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 18px;
    position: relative;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.message.received .message-content {
    background: white;
    color: #333;
    border-bottom-left-radius: 5px;
}

.message.sent .message-content {
    background: #dcf8c6;
    color: #333;
    border-bottom-right-radius: 5px;
}

.message-content p {
    margin: 0 0 5px 0;
    font-size: 13px;
    line-height: 1.4;
}

.message-content small {
    font-size: 10px;
}

.whatsapp-input {
    padding: 15px;
    background: white;
    border-top: 1px solid #e0e0e0;
}

.whatsapp-input .form-control {
    border-radius: 20px;
    border: 1px solid #e0e0e0;
    font-size: 13px;
    padding: 8px 15px;
    transition: border-color 0.2s ease;
}

.whatsapp-input .form-control:focus {
    border-color: #25d366;
    box-shadow: 0 0 0 0.2rem rgba(37, 211, 102, 0.25);
}

.whatsapp-input .btn {
    border-radius: 50%;
    width: 35px;
    height: 35px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s ease;
}

.whatsapp-input .btn:hover {
    transform: scale(1.1);
}

.whatsapp-input .btn-outline-success {
    border-color: #25d366;
    color: #25d366;
    transition: all 0.2s ease;
}

.whatsapp-input .btn-outline-success:hover {
    background-color: #25d366;
    border-color: #25d366;
    color: white;
}

/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 60px;
    height: 60px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9998;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
}

.whatsapp-float-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.whatsapp-float i {
    color: white;
    font-size: 28px;
}

.whatsapp-tooltip {
    position: absolute;
    right: 70px;
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    border-left: 5px solid #333;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Animations */
@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .whatsapp-chat-widget {
        width: 90vw;
        left: 5vw;
        right: 5vw;
        height: 60vh;
    }

    .whatsapp-float {
        width: 50px;
        height: 50px;
    }

    .whatsapp-float i {
        font-size: 24px;
    }
}