/* =============================================
   TOOLTIP — HealthSurance
   ============================================= */

[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) scale(.85);
    background: #0F172A;
    color: #fff;
    font-size: .78rem;
    font-weight: 500;
    padding: 7px 12px;
    border-radius: 8px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity .2s ease, transform .2s ease;
    z-index: 9999;
    font-family: "Segoe UI", sans-serif;
    letter-spacing: .2px;
    max-width: 220px;
    white-space: normal;
    text-align: center;
    line-height: 1.4;
}

[data-tooltip]::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%) scale(.85);
    border: 5px solid transparent;
    border-top-color: #0F172A;
    pointer-events: none;
    opacity: 0;
    transition: opacity .2s ease, transform .2s ease;
    z-index: 9999;
}

[data-tooltip]:hover::after,
[data-tooltip]:hover::before {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

/* Tooltip bottom */
[data-tooltip-pos="bottom"]::after {
    bottom: auto;
    top: calc(100% + 10px);
}

[data-tooltip-pos="bottom"]::before {
    bottom: auto;
    top: calc(100% + 4px);
    border-top-color: transparent;
    border-bottom-color: #0F172A;
}

/* Tooltip right */
[data-tooltip-pos="right"]::after {
    bottom: auto;
    top: 50%;
    left: calc(100% + 10px);
    transform: translateY(-50%) scale(.85);
}

[data-tooltip-pos="right"]::before {
    bottom: auto;
    top: 50%;
    left: calc(100% + 4px);
    transform: translateY(-50%) scale(.85);
    border-top-color: transparent;
    border-right-color: #0F172A;
}

[data-tooltip-pos="right"]:hover::after,
[data-tooltip-pos="right"]:hover::before {
    transform: translateY(-50%) scale(1);
}
