/* WhatsApp Floating Chat Widget */
.whatsapp-chat-popup {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 9999;
}

.whatsapp-button {
    position: relative;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 24px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    animation: waPulse 2s infinite;
    will-change: box-shadow;
}

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

.whatsapp-button i {
    font-size: 32px;
    color: white;
}

.whatsapp-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff3e3e;
    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 white;
}

@keyframes waPulse {
    0%, 100% {
        box-shadow: 0 4px 24px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 24px rgba(37, 211, 102, 0.4), 0 0 0 15px rgba(37, 211, 102, 0.2);
    }
}

.whatsapp-chat-box {
    position: absolute;
    bottom: 80px;
    left: 0;
    width: 360px;
    max-width: calc(100vw - 60px);
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: waSlideUp 0.3s ease;
}

.whatsapp-chat-box.show {
    display: flex;
}

@keyframes waSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-header {
    background: linear-gradient(135deg, #128c7e 0%, #075e54 100%);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-logo {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.3);
}

.chat-header-info h4 {
    color: white;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.chat-header-info p {
    color: rgba(255,255,255,0.9);
    margin: 4px 0 0;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    display: inline-block;
    animation: waBlink 2s infinite;
}

@keyframes waBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.close-chat {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-chat:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

.chat-body {
    padding: 20px;
    background: #ece5dd;
    min-height: 200px;
    max-height: 350px;
    overflow-y: auto;
}

.chat-message {
    margin-bottom: 15px;
}

.message-content {
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.message-content p {
    margin: 0 0 10px;
    font-size: 14px;
    line-height: 1.5;
    color: #1a202c;
}

.message-content p:last-of-type {
    margin-bottom: 15px;
}

.quick-replies {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.quick-reply {
    background: linear-gradient(135deg, #25d366 0%, #20ba5a 100%);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.2);
}

.quick-reply:hover {
    background: linear-gradient(135deg, #20ba5a 0%, #1a9c4d 100%);
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.chat-footer {
    background: white;
    padding: 15px;
    border-top: 1px solid #e2e8f0;
}

#whatsapp-message-form {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

#whatsapp-message-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

#whatsapp-message-input:focus {
    border-color: #25d366;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.1);
}

.send-button {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #25d366 0%, #20ba5a 100%);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
}

.send-button:hover {
    background: linear-gradient(135deg, #20ba5a 0%, #1a9c4d 100%);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.chat-footer-note {
    text-align: center;
    font-size: 11px;
    color: #64748b;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.chat-footer-note i {
    color: #25d366;
}

@media (max-width: 768px) {
    .whatsapp-chat-popup { bottom: 20px; left: 20px; }
    .whatsapp-button { width: 55px; height: 55px; }
    .whatsapp-button i { font-size: 28px; }
    .whatsapp-chat-box { width: calc(100vw - 40px); bottom: 75px; left: -10px; }
}

@media (max-width: 480px) {
    .whatsapp-chat-popup { bottom: 15px; left: 15px; }
    .whatsapp-button { width: 50px; height: 50px; }
    .whatsapp-button i { font-size: 26px; }
    .whatsapp-chat-box { width: calc(100vw - 30px); bottom: 70px; }
    .chat-header { padding: 15px; }
    .chat-logo { width: 40px; height: 40px; }
    .chat-header-info h4 { font-size: 14px; }
    .chat-header-info p { font-size: 11px; }
}
