/* ================================================================
   Bloomberg-style custom tooltip system.
   Any element with data-tip="..." gets a themed tooltip on hover.
   Works on desktop (hover) and mobile (tap-and-hold).
   ================================================================ */

/* Visual hint on anything that has data-tip so users know content is there. */
[data-tip] {
    position: relative;
    cursor: help !important;
    border-bottom: 1px dotted rgba(78,154,241,0.55);
    text-decoration: none;
}
[data-tip] .tip-icon,
.tip-icon {
    display: inline-block;
    margin-left: 4px;
    color: #4e9af1;
    opacity: 0.8;
    font-size: 10px;
    font-weight: 400;
    user-select: none;
    vertical-align: baseline;
}

/* The floating tooltip element itself (injected once into body). */
#dclTooltip {
    position: fixed;
    z-index: 99999;
    max-width: 360px;
    padding: 10px 12px;
    background: linear-gradient(180deg, rgba(14,21,38,0.98), rgba(20,28,48,0.98));
    color: #e8e8f0;
    border: 1px solid rgba(78,154,241,0.45);
    border-left: 3px solid #4e9af1;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6), 0 0 0 1px rgba(0,0,0,0.4);
    font-size: 11.5px;
    line-height: 1.45;
    font-weight: 400;
    letter-spacing: 0.1px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 110ms ease-out;
    white-space: normal;
}
#dclTooltip.visible {
    opacity: 1;
}
#dclTooltip .tip-title {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #4e9af1;
    text-transform: uppercase;
    margin-bottom: 6px;
}
#dclTooltip .tip-body strong { color: #f39c12; }
#dclTooltip .tip-body em { color: #9b59b6; font-style: normal; }

/* Table headers with tooltips: subtle dotted underline but preserve layout. */
th[data-tip] {
    cursor: help;
    border-bottom: 1px dotted rgba(78,154,241,0.45);
}

/* Clickable form-type chips inside EDGAR table also get tooltips. */
.edgar-form-chip {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 10.5px;
    border: 1px solid rgba(255,255,255,0.08);
    cursor: help;
}

/* CTS-UI-FIX 2026-05-25 — owner-reported double tooltip:
   when we mass-converted title= → data-tip= in trading.js to unify under
   tooltips.js (the blue-bordered #dclTooltip), the [data-tip] dotted-underline
   visual hint started appearing on table cells / buttons / badges where it
   looked broken. Suppress on those element types — hover behavior stays. */
td[data-tip],
th[data-tip],
button[data-tip],
.btn-neumorphic[data-tip],
.cts-condition[data-tip] {
    border-bottom: none !important;
    cursor: help;
}
