/* Base común */
.wc-tooltip-simple {
    position: relative;
    cursor: help;
    display: inline-block;
    border-bottom: 1px dotted #666;
}

.wc-tooltip-simple:hover::after {
    content: attr(data-text);
    position: absolute;
    padding: 10px 12px;
    border-radius: 6px;
    white-space: normal;
    z-index: 10000;
    font-size: 12px;
    line-height: 1.3;
    width: 280px;
    max-width: 280px;
    word-wrap: break-word;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    font-weight: 500;
    pointer-events: none;
}

.wc-tooltip-simple:hover::before {
    content: "";
    position: absolute;
    border: 5px solid transparent;
    z-index: 10001;
    pointer-events: none;
}

/* DEFAULT */
.wc-tooltip-default:hover::after {
    background:#2d3748;
    color:#fff;
    border:1px solid #4a5568;
}

/* HALLOWEEN */
.wc-tooltip-halloween:hover::after {
    background:linear-gradient(135deg,#d35400,#e74c3c);
    color:#fff1c1;
    border:1px solid #f39c12;
    font-weight:bold;
}

/* SUCCESS */
.wc-tooltip-success:hover::after {
    background:linear-gradient(135deg,#27ae60,#2ecc71);
    color:#fff;
    border:1px solid #229954;
    font-weight:bold;
}

/* WARNING */
.wc-tooltip-warning:hover::after {
    background:linear-gradient(135deg,#f39c12,#f1c40f);
    color:#2d3748;
    border:1px solid #e67e22;
    font-weight:bold;
}

/* INFO */
.wc-tooltip-info:hover::after {
    background:linear-gradient(135deg,#3498db,#2980b9);
    color:#fff;
    border:1px solid #2471a3;
}

/* PREMIUM */
.wc-tooltip-premium:hover::after {
    background:linear-gradient(135deg,#8e44ad,#9b59b6);
    color:#fff;
    border:1px solid #732d91;
    font-weight:bold;
}

/* POSICIONES */
.wc-tooltip-simple[data-pos="top"]:hover::after {
    bottom:100%;
    left:50%;
    transform:translateX(-50%);
    margin-bottom:8px;
}

.wc-tooltip-simple[data-pos="bottom"]:hover::after {
    top:100%;
    left:50%;
    transform:translateX(-50%);
    margin-top:8px;
}

.wc-tooltip-simple[data-pos="left"]:hover::after {
    right:100%;
    top:50%;
    transform:translateY(-50%);
    margin-right:8px;
}

.wc-tooltip-simple[data-pos="right"]:hover::after {
    left:100%;
    top:50%;
    transform:translateY(-50%);
    margin-left:8px;
}

document.addEventListener("DOMContentLoaded", function () {

    document.querySelectorAll(".iva-tooltip").forEach(function (el) {

        el.addEventListener("click", function () {

            alert("Este precio ya incluye el 21% de IVA conforme a la normativa vigente.");

        });

    });

});