﻿/**
 * Eprodes WhatsApp Chat
 * Copyright (c) 2026 Eprodes Solutions S.L.
 * Web: https://eprodes.es
 * @license Código propietario / Proprietary code
 *
 * v1.2.0: Clases FO prefijadas con epd-wac- para coexistencia con whatsappchat original.
 * Mapeo de clases antiguas → nuevas:
 *   .whatsapp           → .epd-wac-widget
 *   .whatsapp-icon      → .epd-wac-icon
 *   .whatsapp-icon-3x   → .epd-wac-icon-3x
 *   .whatsapp-badge     → .epd-wac-badge
 *   .whatsapp-offline   → .epd-wac-offline
 *   .float              → .epd-wac-float
 *   .float-*            → .epd-wac-float-*
 *   .label-container    → .epd-wac-label-container
 *   .label-text         → .epd-wac-label-text
 */

/* ---- Widget base ---- */
.epd-wac-widget {
    clear: both;
    padding: 10px 0;
}

.epd-wac-widget:focus {
    border: 0;
    outline: none !important;
}

.epd-wac-widget span {
    border-radius: 4px;
    background: #25D366;
    color: #fff;
    font-size: 13px;
    padding: 6px 8px;
    display: inline-block;
    outline: none;
    cursor: pointer;
}

.epd-wac-widget a:-moz-focusring {
    color: transparent;
    text-shadow: 0 0 0 #000;
}

/* ---- Iconos ---- */
.epd-wac-icon {
    position: relative;
    background-image: url('../img/whatsapp.png');
    background-repeat: no-repeat;
    display: inline-block;
    height: 18px;
    width: 18px;
    top: -1px;
    vertical-align: middle;
    background-size: contain;
}

.epd-wac-icon-3x {
    position: relative;
    background-image: url('../img/whatsapp3x.png');
    background-repeat: no-repeat;
    display: inline-block;
    height: 38px;
    width: 38px;
    background-size: 38px 38px;
    top: 10px;
    vertical-align: middle;
    left: 2px;
}

/* ---- Social sharing button ---- */
.epd-wac-social-button {
    background-image: url('../img/whatsapp-social.png')!important;
    background-size: 24px;
    background-repeat: no-repeat;
    background-position: center;
    background-position-y: 5px;
}

.epd-wac-social-button:hover {
    background-image: url('../img/whatsapp3x.png')!important;
    background-size: 24px;
    background-repeat: no-repeat;
    background-position: center;
    background-position-y: 5px;
    background-color: #25d366;
    height: 34px;
}

.epd-wac-social-button-alt {
    background-image: url('../img/whatsapp3x.png')!important;
}

li.whatsapp_custom.AngarTheme a:before {
    content: "\f232"!important;
}

.epd-wac-hookDisplayEpdWhatsAppProductSocialButtons {display: none;}

.epd-wac-widget i.icon-whatsapp {
    font-size: 21px;
    line-height: 21px;
    padding-right: 7px;
}

/* ---- Alineación ---- */
.epd-wac-widget.left    { text-align: left; }
.epd-wac-widget.center  { text-align: center; }
.epd-wac-widget.right   { text-align: right; }
.epd-wac-widget.bottom-left  { left: 0; }
.epd-wac-widget.bottom-right { right: 0; }

/* ---- Badge ---- */
.epd-wac-badge.top-right {
    top: 0!important;
    right: 0!important;
    height: 55px;
}

.epd-wac-badge.top-left {
    top: 0!important;
    left: 0!important;
    height: 55px;
}

.epd-wac-badge.left {
    top: 46%!important;
    left: 0!important;
    height: 55px;
}

.epd-wac-badge.center {
    top: 46%!important;
    left: 46%!important;
    height: 55px;
}

.epd-wac-badge.right {
    top: 46%!important;
    right: 0!important;
    height: 55px;
}

/* ---- Hooks específicos ---- */
.epd-wac-hookDisplayFooter {
    clear: none;
}

.epd-wac-hookDisplayNav {
    clear: none;
    float: left;
    margin-left: 15px;
    padding: 0;
}

.epd-wac-hookDisplayNav span {
    float: left;
    padding: 5px 0 10px;
    line-height: 18px;
    background: none;
}

.epd-wac-hookDisplayNav .epd-wac-icon {
    background-image: url('../img/whatsapp-green.png');
    top: 0;
    vertical-align: baseline;
}

.epd-wac-hookDisplayNav i.icon-whatsapp {
    vertical-align: 0;
}

.epd-wac-badge {
    position: fixed;
    bottom: 0;
    z-index: 10000;
    margin: 10px;
    width: auto !important;
}

.epd-wac-widget p {
    display: inline;
    color: #fff;
    font-size: inherit;
    font-weight: inherit;
}

/* ---- Anchos completos ---- */
.epd-wac-topWidth {
    padding: 0;
    text-align: center;
}

.epd-wac-topWidthSticky {
    padding: 0;
    text-align: center;
    position: sticky;
    top: 0;
    left: 0;
    z-index: 1500;
    width: 100%;
}

.epd-wac-topWidthSticky span {
    width: 100%;
    border-radius: inherit;
}

.epd-wac-bottomWidth {
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 10000;
    margin: 0;
    padding: 0;
    width: 100%!important;
    text-align: center;
}

/* ---- Floating button — etiqueta lateral ---- */
.epd-whatsappchat.epd-wac-label-container {
    position: fixed;
    bottom: 34px;
    right: 95px;
    display: table;
    visibility: hidden;
    border-radius: 10px;
}

.epd-whatsappchat.epd-wac-label-container-top-right {
    position: fixed;
    top: 30px;
    right: 95px;
    display: table;
    visibility: hidden;
}

.epd-whatsappchat.epd-wac-label-container-top-left {
    position: fixed;
    top: 30px;
    left: 95px;
    display: table;
    visibility: hidden;
}

.epd-whatsappchat.epd-wac-label-container-bottom-left {
    position: fixed;
    bottom: 35px;
    left: 95px;
    display: table;
    visibility: hidden;
}

.epd-whatsappchat.epd-wac-label-container-left {
    top: 47%;
    position: fixed;
    bottom: 30px;
    left: 85px;
    display: table;
    visibility: hidden;
}

.epd-whatsappchat.epd-wac-label-container-right {
    top: 47%;
    position: fixed;
    bottom: 30px;
    right: 90px;
    display: table;
    visibility: hidden;
}

.epd-whatsappchat.epd-wac-label-container-center {
    position: fixed;
    bottom: 47%;
    left: 51.5%;
    display: table;
    visibility: hidden;
}

.epd-whatsappchat .epd-wac-label-text {
    color: #FFF;
    background: rgba(51,51,51,0.5);
    display: table-cell;
    vertical-align: middle;
    padding: 10px;
    border-radius: 10px;
}

.epd-whatsappchat .epd-wac-label-text p {
    color: #FFF;
    margin-bottom: 0;
}

div.epd-whatsappchat.epd-wac-label-container:not([class*="-left"]):after {
    content: "";
    position: absolute;
    width: 0;
    height: 0;
    bottom: 10px;
    margin-left: -1px;
    box-sizing: border-box;
    border: 5px solid;
    border-color: transparent transparent #959595 #959595;
    transform-origin: 0 0;
    transform: rotate(-135deg);
    box-shadow: #333 -3.5px 1.7px 2px -1px;
}

/* ---- Floating button — posiciones ---- */
.epd-wac-float-center {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 25px;
    left: 47.5%;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    box-shadow: 2px 2px 3px #999;
}

.epd-wac-float-floating.epd-wac-float-left {
    top: 46%;
    position: fixed;
    width: 60px;
    height: 60px;
    left: 20px;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    box-shadow: 2px 2px 3px #999;
}

.epd-wac-float-floating.epd-wac-float-right {
    top: 46%;
    position: fixed;
    width: 60px;
    height: 60px;
    right: 20px;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    box-shadow: 2px 2px 3px #999;
}

.epd-wac-float-top-left {
    position: fixed;
    width: 60px;
    height: 60px;
    top: 25px;
    left: 25px;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    box-shadow: 2px 2px 3px #999;
}

.epd-wac-float-top-right {
    position: fixed;
    width: 60px;
    height: 60px;
    top: 25px;
    right: 25px;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    box-shadow: 2px 2px 3px #999;
}

.epd-wac-float-bottom-right {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 25px;
    right: 25px;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    box-shadow: 2px 2px 3px #999;
}

.epd-wac-float-bottom-left {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 25px;
    left: 25px;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    box-shadow: 2px 2px 3px #999;
}

.epd-wac-float-bottom {
    z-index: 10000;
}

.epd-wac-float-center {
    top: 46%;
    z-index: 10000;
}

.epd-wac-float-floating i.icon-whatsapp {
    position: relative;
    top: 11px;
    left: 1px;
}

.epd-wac-float-floating {
    z-index: 10000;
    color: #FFF!important;
}

.epd-wac-my-float {
    font-size: 24px;
    margin-top: 18px;
}

/* ---- Hover de etiqueta lateral ---- */
a.epd-wac-float + div.epd-wac-label-container {
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.5s, opacity 0.5s ease;
    box-shadow: #333 1.95px 1.95px 2.6px;
    max-width: 315px;
    margin-left: 5px;
    border-radius: 10px;
}

a.epd-wac-float:hover + div.epd-wac-label-container {
    visibility: visible;
    opacity: 1;
    box-shadow: #333 1.95px 1.95px 2.6px;
    border-radius: 10px;
}

div.epd-wac-label-container:hover {
    visibility: visible!important;
    opacity: 1!important;
    box-shadow: #333 1.95px 1.95px 2.6px!important;
    border-radius: 10px!important;
}

div.epd-wac-label-container .epd-wac-label-text:after:hover {
    visibility: visible!important;
    opacity: 1!important;
    box-shadow: #333 1.95px 1.95px 2.6px!important;
    border-radius: 10px!important;
}

div.epd-wac-label-container.show {
    visibility: visible!important;
    opacity: 1!important;
    box-shadow: #333 1.95px 1.95px 2.6px!important;
    border-radius: 10px!important;
}

a.epd-wac-float + div.epd-wac-label-container.hide {
    visibility: hidden!important;
    opacity: 0!important;
    transition: visibility 0.5s, opacity 0.5s ease!important;
    max-width: 315px;
    margin-left: 5px;
    border-radius: 10px!important;
}

@media (max-width: 411px) {
    a.epd-wac-float + div.epd-wac-label-container {
        max-width: 190px;
    }
    a.epd-wac-float + div.epd-wac-label-container.hide {
        max-width: 190px;
    }
}

@media (max-width: 302px) {
    a.epd-wac-float + div.epd-wac-label-container {
        max-width: 140px;
    }
    a.epd-wac-float + div.epd-wac-label-container.hide {
        max-width: 140px;
    }
}

.epd-wac-float .fa-whatsapp:before {
    font-size: xx-large;
    top: 14px;
    left: 1px;
    position: relative;
}

/* ---- Offline ---- */
/* 1.8.1: color controlado 100% por inline style (color_offline / color del bloque).
   No hardcodear background-color aquí: anularía el inline style aunque lleve !important. */
.epd-wac-offline {
    /* background-color eliminado — el color se aplica como inline style desde el template */
}

/* ---- Agents popup ---- */
div.epd-whatsappchat-agents-container {
    width: 300px;
    z-index: 1500;
}

div.epd-whatsappchat-agents-content {
    position: relative;
    color: inherit;
    padding: 4px 5px;
}

div.epd-whatsappchat-agents-content-info {
    position: relative;
    color: inherit;
    padding: 15px 0 0 0;
}

div.epd-whatsappchat-agents-content-info17 {
    padding: 8px 0 0 0;
}

a.epd-whatsappchat-agents-content-agent {
    color: inherit;
    display: block;
    border-radius: 10px;
    position: relative;
    z-index: 3;
}

a.epd-whatsappchat-agents-content-agent:hover {
    background-color: rgba(245, 245, 245, 1);
}

div.epd-whatsappchat-agents-title {
    padding: 15px 15px;
    color: white;
    font-weight: bold;
    border-radius: 3px 3px 0 0;
}

div.epd-whatsappchat-agents-title17 {
    font-weight: inherit!important;
}

span.epd-whatsappchat-agents-content-department {
    font-size: 11px;
    line-height: 100%;
    opacity: .5;
}

span.epd-whatsappchat-agents-content-name {
    font-weight: bold;
    display: block;
}

span.epd-whatsappchat-agents-content-name17 {
    font-size: smaller;
}

div.epd-whatsappchat-agents-content-image img {
    height: 48px;
    width: 48px;
    background-repeat: no-repeat;
    background-position: 50%;
    border-radius: 50%;
    background-size: 100% auto;
    overflow: hidden;
    position: relative;
    z-index: 2;
    float: left;
    margin: 5px 10px 5px 0;
}

.epd-whatsappchat-agents-content-image:after {
    content: '';
    display: block;
    width: 12px;
    height: 12px;
    position: absolute;
    bottom: 2px;
    left: 40px;
    background-color: #25d366;
    background-size: cover;
    z-index: 4;
    border-radius: 50%;
}

body.content_only div.epd-wac-widget { display: none; }

/* ── Icono custom (1.5.0) ── */
.epd-wac-icon--custom {
    background-repeat: no-repeat;
    background-size: contain;
}
.epd-wac-icon-3x.epd-wac-icon--custom {
    background-repeat: no-repeat;
}

/* ══════════════════════════════════════════════════════════════════
   EFECTOS DE ATENCIÓN (1.6.0)
   Clase aplicada por JS (inline en template) tras N segundos sin interacción.
   Solo transform / filter / opacity → GPU compositing, sin layout shift.
   Hover/focus pausa la animación. Respeta prefers-reduced-motion.
   ══════════════════════════════════════════════════════════════════ */

/* Keyframes */
@keyframes epd-wac-bounce {
    0%,20%,53%,80%,100% { transform: translateY(0); }
    40%,43%             { transform: translateY(-18px); }
    70%                 { transform: translateY(-9px); }
    90%                 { transform: translateY(-4px); }
}
@keyframes epd-wac-pulse {
    0%,100% { transform: scale(1); }
    50%     { transform: scale(1.12); }
}
@keyframes epd-wac-shake {
    0%,100%                 { transform: translateX(0); }
    10%,30%,50%,70%,90%    { transform: translateX(-8px); }
    20%,40%,60%,80%        { transform: translateX(8px); }
}
@keyframes epd-wac-wobble {
    0%,100% { transform: translateX(0); }
    15%     { transform: translateX(-10px) rotate(-5deg); }
    30%     { transform: translateX(8px)  rotate(3deg); }
    45%     { transform: translateX(-6px) rotate(-3deg); }
    60%     { transform: translateX(4px)  rotate(2deg); }
    75%     { transform: translateX(-2px) rotate(-1deg); }
}
@keyframes epd-wac-heartbeat {
    0%,70%,100% { transform: scale(1); }
    14%,42%     { transform: scale(1.18); }
}
@keyframes epd-wac-swing {
    0%,100% { transform: rotate(0deg); }
    20%     { transform: rotate(10deg); }
    40%     { transform: rotate(-8deg); }
    60%     { transform: rotate(5deg); }
    80%     { transform: rotate(-3deg); }
}
@keyframes epd-wac-float {
    0%,100% { transform: translateY(0); }
    50%     { transform: translateY(-7px); }
}
@keyframes epd-wac-zoom {
    0%,100% { transform: scale(1); }
    50%     { transform: scale(1.14); }
}
@keyframes epd-wac-glow {
    0%,100% { filter: drop-shadow(0 0 0px rgba(37,211,102,0)); }
    50%     { filter: drop-shadow(0 0 10px rgba(37,211,102,0.85)); }
}
@keyframes epd-wac-tada {
    0%             { transform: scale(1); }
    10%,20%        { transform: scale(0.9) rotate(-3deg); }
    30%,50%,70%,90%{ transform: scale(1.1) rotate(3deg); }
    40%,60%,80%    { transform: scale(1.1) rotate(-3deg); }
    100%           { transform: scale(1) rotate(0deg); }
}

/* Clases de efecto */
.epd-wac-fx-bounce    { animation: epd-wac-bounce    1.4s ease          infinite; transform-origin: center bottom; }
.epd-wac-fx-pulse     { animation: epd-wac-pulse     1.6s ease-in-out   infinite; }
.epd-wac-fx-shake     { animation: epd-wac-shake     0.8s ease-in-out   infinite; }
.epd-wac-fx-wobble    { animation: epd-wac-wobble    1.2s ease-in-out   infinite; }
.epd-wac-fx-heartbeat { animation: epd-wac-heartbeat 1.4s ease-in-out   infinite; }
.epd-wac-fx-swing     { animation: epd-wac-swing     1.0s ease-in-out   infinite; transform-origin: top center; }
.epd-wac-fx-float     { animation: epd-wac-float     3.0s ease-in-out   infinite; }
.epd-wac-fx-zoom      { animation: epd-wac-zoom      2.0s ease-in-out   infinite; }
.epd-wac-fx-glow      { animation: epd-wac-glow      2.0s ease-in-out   infinite; }
.epd-wac-fx-tada      { animation: epd-wac-tada      1.0s ease-in-out   infinite; }

/* Pausa en hover / focus */
.epd-wac-fx-bounce:hover,    .epd-wac-fx-bounce:focus,
.epd-wac-fx-pulse:hover,     .epd-wac-fx-pulse:focus,
.epd-wac-fx-shake:hover,     .epd-wac-fx-shake:focus,
.epd-wac-fx-wobble:hover,    .epd-wac-fx-wobble:focus,
.epd-wac-fx-heartbeat:hover, .epd-wac-fx-heartbeat:focus,
.epd-wac-fx-swing:hover,     .epd-wac-fx-swing:focus,
.epd-wac-fx-float:hover,     .epd-wac-fx-float:focus,
.epd-wac-fx-zoom:hover,      .epd-wac-fx-zoom:focus,
.epd-wac-fx-glow:hover,      .epd-wac-fx-glow:focus,
.epd-wac-fx-tada:hover,      .epd-wac-fx-tada:focus {
    animation-play-state: paused;
}

/* Accesibilidad: sin animaciones si el usuario las prefiere reducidas */
@media (prefers-reduced-motion: reduce) {
    [class*="epd-wac-fx-"] { animation: none !important; }
}
