/* Floating WhatsApp Widget */
.floating-wpp {
    position: fixed;
    bottom: 15px;
    left: 15px;
    font-size: 14px;
    transition: bottom .2s;
    z-index: 999999;
}

.floating-wpp:hover {
    bottom: 17px;
}

/* Button Styles */
.floating-wpp .floating-wpp-button {
    position: relative;
    border-radius: 50%;
    box-shadow: 1px 1px 4px rgba(60, 60, 60, .4);
    transition: box-shadow .2s;
    cursor: pointer;
    overflow: hidden;
    z-index: 999999;
}

.floating-wpp:hover .floating-wpp-button {
    box-shadow: 1px 2px 8px rgba(60, 60, 60, .4);
}

.floating-wpp .floating-wpp-button img,
.floating-wpp .floating-wpp-button svg {
    position: absolute;
    width: 100%;
    height: auto;
    object-fit: cover;
    top: 50%;
    left: 50%;
    transform: translate3d(-50%, -50%, 0);
    border-radius: 50%;
}

/* Popup Styles */
.floating-wpp .floating-wpp-popup {
    border-radius: 6px;
    background-color: #E5DDD5;
    position: absolute;
    overflow: hidden;
    padding: 0;
    box-shadow: 1px 2px 8px rgba(60, 60, 60, .25);
    width: 0;
    height: 0;
    bottom: 0;
    opacity: 0;
    transition: bottom .1s ease-out, opacity .2s ease-out;
    transform-origin: bottom;
    z-index: 1000000;
}

/* Forzar colores del popup en modo oscuro */
.dark .floating-wpp .floating-wpp-popup {
    background-color: #E5DDD5 !important;
}

.floating-wpp .floating-wpp-popup.active {
    padding: 0 12px 12px;
    width: 260px;
    height: auto;
    bottom: 82px;
    opacity: 1;
}

/* Message Styles */
.floating-wpp .floating-wpp-popup .floating-wpp-message {
    background-color: #fff;
    padding: 8px;
    border-radius: 0 5px 5px;
    box-shadow: 1px 1px 1px rgba(0, 0, 0, .15);
    opacity: 0;
    transition: opacity .2s;
    color: #333 !important; /* Forzar color negro siempre */
}

/* Forzar texto negro en modo oscuro también */
.dark .floating-wpp .floating-wpp-popup .floating-wpp-message {
    color: #333 !important;
    background-color: #fff !important;
}

.floating-wpp .floating-wpp-popup.active .floating-wpp-message {
    opacity: 1;
    transition-delay: .2s;
    color: #333 !important; /* Asegurar color negro cuando está activo */
}

/* Header Styles */
.floating-wpp .floating-wpp-popup .floating-wpp-head {
    text-align: right;
    color: #fff;
    margin: 0 -15px 10px;
    padding: 6px 12px;
    display: flex;
    justify-content: space-between;
    cursor: pointer;
}

/* Input Area Styles */
.floating-wpp .floating-wpp-input-message {
    background-color: #fff;
    margin: 10px -15px -15px;
    padding: 0 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Forzar fondo blanco del área de input en modo oscuro */
.dark .floating-wpp .floating-wpp-input-message {
    background-color: #fff !important;
}

.floating-wpp .floating-wpp-input-message textarea {
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: none;
    padding: 8px;
    margin: 10px 0;
    width: 100%;
    max-width: 100%;
    font-family: inherit;
    font-size: inherit;
    resize: none;
}

/* Send Button Styles */
.floating-wpp .floating-wpp-btn-send {
    margin-left: 12px;
    font-size: 0;
    cursor: pointer;
}

/* Custom Chat Button Styles */
.floating-wpp .floating-wpp-chat-button {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border: none;
    border-radius: 25px;
    color: white;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: center;
    transition: all 0.3s ease;
    margin: 15px 0;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    font-family: inherit;
    outline: none;
    position: relative;
    overflow: hidden;
}

.floating-wpp .floating-wpp-chat-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.floating-wpp .floating-wpp-chat-button:hover::before {
    left: 100%;
}

.floating-wpp .floating-wpp-chat-button:hover {
    background: linear-gradient(135deg, #128C7E 0%, #25D366 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
}

.floating-wpp .floating-wpp-chat-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
}

.floating-wpp .floating-wpp-chat-button .whatsapp-icon {
    width: 18px;
    height: 18px;
    stroke-width: 2.5;
    z-index: 1;
    position: relative;
}

.floating-wpp .floating-wpp-chat-button span {
    font-size: 13px;
    letter-spacing: 0.3px;
    z-index: 1;
    position: relative;
}

/* Estilos adicionales para modo oscuro - WhatsApp Widget */
.dark .floating-wpp .floating-wpp-popup * {
    color: inherit;
}

.dark .floating-wpp .floating-wpp-popup .floating-wpp-message,
.dark .floating-wpp .floating-wpp-popup .floating-wpp-message * {
    color: #333 !important;
}

/* Asegurar que el texto del mensaje siempre sea legible */
.floating-wpp .floating-wpp-popup .floating-wpp-message,
.floating-wpp .floating-wpp-popup .floating-wpp-message * {
    color: #333 !important;
    text-shadow: none !important;
}