#boton-whatsapp-widget {
    position: fixed;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    animation: bwa-fadeIn 0.6s ease-out;
}

.bwa-bottom-right {
    right: 22px;
    bottom: 22px;
}

.bwa-bottom-left {
    left: 22px;
    bottom: 22px;
}

.bwa-top-right {
    right: 22px;
    top: 22px;
}

.bwa-top-left {
    left: 22px;
    top: 22px;
}

#boton-whatsapp-widget.bwa-animated {
    animation: bwa-bounce 0.6s ease-out, bwa-pulse 2.5s ease-in-out 0.6s infinite;
}

#boton-whatsapp-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #ffffff;
    padding: 14px 18px;
    border-radius: 999px;
    font-size: 16px;
    min-width: 180px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#boton-whatsapp-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.22);
}

.bwa-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: #ffffff;
    flex-shrink: 0;
}

.bwa-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.bwa-label {
    white-space: nowrap;
}

/* ESTILO 1: Icono + Texto */
#boton-whatsapp-widget.style-1 #boton-whatsapp-link {
    flex-direction: row;
    min-width: 180px;
}

/* ESTILO 2: Ventana de Chat Flotante */
#boton-whatsapp-widget.style-2 #boton-whatsapp-link {
    padding: 0;
    flex-direction: column;
    width: auto;
    min-width: auto;
    background: transparent !important;
    box-shadow: none;
}

#boton-whatsapp-widget.style-2 #boton-whatsapp-link:hover {
    background: transparent !important;
    transform: none;
    box-shadow: none;
}

.bwa-chat-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.bwa-chat-popup {
    display: flex;
    flex-direction: column;
    width: 340px;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
    animation: bwa-slide-in 0.3s ease-out;
}

.bwa-chat-popup.bwa-collapsed {
    display: none;
}

.bwa-collapsed-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    padding: 0;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.bwa-collapsed-icon:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.bwa-collapsed-icon.bwa-active {
    display: flex;
    animation: bwa-pop-in 0.3s ease-out;
}

@keyframes bwa-slide-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bwa-pop-in {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.bwa-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    gap: 8px;
    flex-shrink: 0;
}

.bwa-popup-title {
    font-weight: 600;
    font-size: 16px;
    color: #ffffff;
    flex-grow: 1;
}

.bwa-popup-close {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

.bwa-popup-close:hover {
    opacity: 0.8;
}

.bwa-popup-body {
    padding: 12px 16px;
    background: #2c2c2c;
    min-height: 60px;
    max-height: 120px;
    overflow-y: auto;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
}

.bwa-popup-message {
    background: #dce5e1;
    color: #000000;
    font-size: 13px;
    line-height: 1.5;
    word-break: break-word;
    padding: 8px 12px;
    border-radius: 18px;
    max-width: 85%;
    position: relative;
}

.bwa-popup-message::after {
    content: '';
    position: absolute;
    left: -8px;
    top: 8px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 8px 8px 0;
    border-color: transparent #dce5e1 transparent transparent;
}

.bwa-popup-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    color: #ffffff;
    flex-shrink: 0;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.bwa-popup-footer:hover {
    opacity: 0.9;
}

.bwa-popup-footer-text {
    font-weight: 600;
    font-size: 13px;
}

/* ESTILO 3: Icono + Burbuja de Mensaje */
#boton-whatsapp-widget.style-3 #boton-whatsapp-link {
    flex-direction: column;
    align-items: center;
    gap: 0;
    min-width: auto;
    padding: 0;
    background: transparent !important;
    box-shadow: none;
}

#boton-whatsapp-widget.style-3 #boton-whatsapp-link:hover {
    background: transparent !important;
    transform: none;
    box-shadow: none;
}

.bwa-bubble-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: auto;
}

.bwa-message-bubble {
    background: rgba(37, 211, 102, 0.2);
    color: #333333;
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 13px;
    line-height: 1.4;
    max-width: 220px;
    text-align: center;
    white-space: normal;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(37, 211, 102, 0.3);
}

.bwa-round-button {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.bwa-round-button:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* ESTILO 4: Solo Icono */
#boton-whatsapp-widget.style-4 #boton-whatsapp-link {
    padding: 0;
    min-width: auto;
    border-radius: 50%;
    width: auto;
    height: auto;
    display: contents;
    background: transparent !important;
    box-shadow: none;
}

#boton-whatsapp-widget.style-4 #boton-whatsapp-link:hover {
    background: transparent !important;
    transform: none;
    box-shadow: none;
}

#boton-whatsapp-widget.style-4 .bwa-icon {
    width: 28px;
    height: 28px;
}

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

@keyframes bwa-bounce {
    from { opacity: 0; transform: translateY(20px) scale(0.8); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes bwa-pulse {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@media (max-width: 768px) {
    #boton-whatsapp-widget {
        min-width: auto;
    }

    #boton-whatsapp-link {
        min-width: 140px;
        padding: 12px 14px;
        font-size: 14px;
    }
}
