/* WhatsApp Widget for Elementor - Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* WhatsApp Button - Bottom Right Corner */
.whatsapp-widget .whatsapp-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
    animation: pulse 2s infinite;
}

.whatsapp-widget .whatsapp-button:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(37, 211, 102, 0.6);
}

.whatsapp-widget .whatsapp-button svg {
    width: 35px;
    height: 35px;
    fill: white;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 8px 25px rgba(37, 211, 102, 0.7), 0 0 0 10px rgba(37, 211, 102, 0.1), 0 0 0 20px rgba(37, 211, 102, 0.05);
    }
}

/* WhatsApp Chat Box */
.whatsapp-widget .whatsapp-chat-box {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 350px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 999;
    display: none;
    animation: slideUp 0.3s ease;
}

.whatsapp-widget .whatsapp-chat-box.active {
    display: block;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.whatsapp-widget .chat-header {
    background: linear-gradient(135deg, #505050 0%, #2a2a2a 100%);
    color: white;
    padding: 20px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.whatsapp-widget .chat-header h3 {
    font-size: 18px;
    margin: 0;
}

.whatsapp-widget .chat-header .close-chat {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.whatsapp-widget .chat-header .close-chat:hover {
    background: rgba(255, 255, 255, 0.2);
}

.whatsapp-widget .chat-body {
    padding: 20px;
}

.whatsapp-widget .chat-body label {
    display: block;
    margin-bottom: 10px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.whatsapp-widget .chat-body textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    resize: vertical;
    min-height: 100px;
    transition: border-color 0.3s ease;
}

.whatsapp-widget .chat-body textarea:focus {
    outline: none;
    border-color: #505050;
}

.whatsapp-widget .chat-footer {
    padding: 0 20px 20px 20px;
}

.whatsapp-widget .send-button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #505050 0%, #2a2a2a 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(80, 80, 80, 0.3);
}

.whatsapp-widget .send-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(80, 80, 80, 0.4);
}

.whatsapp-widget .send-button:active {
    transform: translateY(0);
}

/* Promotional Messages - Next to WhatsApp Button */
.whatsapp-widget .message-container {
    position: fixed;
    bottom: 30px;
    right: 110px;
    max-width: 320px;
    z-index: 999;
}

.whatsapp-widget .message-bubble {
    background: white;
    padding: 20px 25px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: slideInLeft 0.5s ease;
    margin-bottom: 15px;
}

.whatsapp-widget .message-bubble::before {
    content: '';
    position: absolute;
    bottom: 15px;
    right: -10px;
    width: 0;
    height: 0;
    border-left: 15px solid white;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.whatsapp-widget .message-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    gap: 10px;
}

.whatsapp-widget .avatar {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #505050 0%, #2a2a2a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    font-weight: bold;
}

.whatsapp-widget .message-info h4 {
    color: #505050;
    font-size: 16px;
    margin-bottom: 3px;
}

.whatsapp-widget .message-info span {
    color: #888;
    font-size: 12px;
}

.whatsapp-widget .message-text {
    color: #333;
    line-height: 1.6;
    font-size: 14px;
    margin-bottom: 15px;
}

.whatsapp-widget .message-text strong {
    color: #2a2a2a;
    font-size: 16px;
    display: block;
    margin-bottom: 8px;
}

.whatsapp-widget .cta-button {
    background: linear-gradient(135deg, #505050 0%, #2a2a2a 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(80, 80, 80, 0.3);
    font-size: 14px;
}

.whatsapp-widget .cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(80, 80, 80, 0.4);
}

.whatsapp-widget .close-message {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #999;
    font-size: 20px;
    cursor: pointer;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.whatsapp-widget .close-message:hover {
    background: #f0f0f0;
    color: #333;
}

/* Fading Messages */
.whatsapp-widget .message-bubble.fade-out {
    animation: fadeOut 0.5s ease forwards;
}

.whatsapp-widget .message-bubble.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(-20px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .whatsapp-widget .message-container {
        display: none !important;
    }

    .whatsapp-widget .whatsapp-button {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
    }

    .whatsapp-widget .whatsapp-chat-box {
        bottom: 90px;
        right: 15px;
        left: 15px;
        width: calc(100% - 30px);
    }

    .whatsapp-widget .chat-header h3 {
        font-size: 16px;
    }

    .whatsapp-widget .chat-body textarea {
        min-height: 80px;
    }

    .whatsapp-widget .whatsapp-button svg {
        width: 30px;
        height: 30px;
    }

    .whatsapp-widget .message-bubble {
        padding: 15px 20px;
    }

    .whatsapp-widget .message-text {
        font-size: 13px;
    }
}
