/* VIEWPORT TOOLTIPS v2 — replace the complete previous tooltip stylesheet. */
:root {
    /* CUSTOMIZE these values. Width is capped at 300px by the script. */
    --tooltip-background: #27C2F5;
    --tooltip-color: #303b40;
    --tooltip-border: #718096;
    --tooltip-max-width: 300px;
    --tooltip-delay: 350ms; /* 500ms = half a second; 1000ms = one second */
    --tooltip-layer: 30000;
}

/* Disable the old CSS-generated bubble when migrating to the JS version. */
.site-tooltip[data-tooltip]::after {
    content: none !important;
    display: none !important;
}

/* This element is attached to body, outside the surrounding cards. */
#site-tooltip-layer {
    all: initial;
    position: fixed;
    inset: auto;
    display: block;
    box-sizing: border-box;
    width: max-content;
    min-width: 0;
    max-width: min(300px, calc(100vw - 24px));
    height: auto;
    margin: 0;
    padding: 6px 10px;
    border: 1px solid var(--tooltip-border, #718096);
    border-radius: 6px;
    background: var(--tooltip-background, #27C2F5);
    color: var(--tooltip-color, #303b40);
    box-shadow: 0 3px 12px rgba(0,0,0,.2);
    font: 600 15px/1.5 Arial, Helvetica, sans-serif;
    font-style: normal;
    letter-spacing: .07em;
    word-spacing: normal;
    text-align: left;
    text-indent: 0;
    text-transform: uppercase;
    text-decoration: none;
    white-space: pre-line; /* Preserve {br} line breaks while wrapping long lines. */
    overflow-wrap: anywhere;
    word-break: normal;
    writing-mode: horizontal-tb;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    z-index: var(--tooltip-layer, 30000);
    opacity: 0;
    visibility: hidden;
    pointer-events: auto;
    transition: opacity .12s ease;
}
#site-tooltip-layer[data-open="true"] {
    opacity: 1;
    visibility: visible;
}
#site-tooltip-layer[hidden] { display: none !important; }
#site-tooltip-layer::before,
#site-tooltip-layer::after { content: none !important; }
#site-tooltip-layer::backdrop { background: transparent; pointer-events: none; }

/* Applied according to the available viewport width, including zoom. */
#site-tooltip-layer[data-small="true"] {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .03em;
    line-height: 1.4;
}

/* Separate descriptions preserve each control's accessible description. */
.site-tooltip-description {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
@media (prefers-reduced-motion: reduce) {
    #site-tooltip-layer { transition: none; }
}
@media print {
    #site-tooltip-layer,
    .site-tooltip-description { display: none !important; }
}

/* Optional WordPress shortcode text. */
.jesusabc-tooltip-text { text-decoration: underline dotted; text-underline-offset: .15em; cursor: help; }
