/* Shared tooltip appearance; page-specific circle styling retains precedence. */
.product-custom-tooltip {
    position: relative;
    display: inline-block;
    cursor: pointer;
}
.product-custom-tooltip span {
    width: 20px;
    height: 20px;
    color: #8a8a8a;
    background-color: #e6e6e6;
    display: inline-block;
    border-radius: 50%;
    text-align: center;
    line-height: 20px;
}

.product-custom-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 125%;
    background-color: #333;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    font-size: 13px;
    z-index: 1000;
    white-space: pre-line;
    min-width: 300px;
}

.product-custom-tooltip:hover::after {
    opacity: 1;
}

/* The scripted tooltip is hoverable, dismissible and available to AT.
   Keep the original pseudo-tooltip as a no-JavaScript hover fallback. */
.product-custom-tooltip[data-product-tooltip-ready]::after {
    content: none;
}
.product-img-desc-tooltip {
    position: fixed;
    z-index: 100000;
    box-sizing: border-box;
    width: 320px;
    max-width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    overflow: auto;
    padding: 6px 10px;
    border-radius: 6px;
    background: #333;
    color: #fff;
    white-space: pre-line;
    overflow-wrap: anywhere;
}
.product-img-desc-tooltip[hidden] { display: none; }
.product-custom-tooltip[data-product-tooltip-ready]:focus-visible,
.product-img-desc-tooltip:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}
