/* Custom Tooltip Styles */
.custom-tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
/*     border-bottom: 1px dotted #333; */
    transition: all 0.3s ease;
}

.custom-tooltip:hover {
    color: #0073aa;
}

/* Simple non-interactive tooltips using CSS only */
.custom-tooltip:not(.tooltip-interactive)::before {
    content: attr(data-tooltip-text);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    white-space: nowrap;
    font-size: 14px;
    line-height: 1.4;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9999;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.custom-tooltip:not(.tooltip-interactive)::after {
    content: '';
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    border: 6px solid transparent;
    border-top-color: #333;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9999;
    pointer-events: none;
}

.custom-tooltip:not(.tooltip-interactive):hover::before,
.custom-tooltip:not(.tooltip-interactive):hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Interactive tooltip bubble (created via JS) */
.interactive-tooltip-bubble {
    position: fixed;
    background-color: #333;
    color: #fff;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.6;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    max-width: 300px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: auto;
}

.interactive-tooltip-bubble.show {
    opacity: 1;
}

/* Arrow for interactive tooltip */
.interactive-tooltip-bubble::after {
    content: '';
    position: absolute;
    border: 6px solid transparent;
}

.interactive-tooltip-bubble[data-position="top"]::after {
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    border-top-color: #333;
}

.interactive-tooltip-bubble[data-position="bottom"]::after {
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    border-bottom-color: #333;
}

.interactive-tooltip-bubble[data-position="left"]::after {
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    border-left-color: #333;
}

.interactive-tooltip-bubble[data-position="right"]::after {
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    border-right-color: #333;
}

/* Button styling inside tooltip */
.tooltip-button {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 16px;
    background-color: #0073aa;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    transition: background-color 0.2s ease;
    border: none;
    cursor: pointer;
}

.tooltip-button:hover {
    background-color: #005a87;
    color: #fff !important;
}

/* Position variations for simple tooltips */
.custom-tooltip:not(.tooltip-interactive)[data-position="bottom"]::before {
    bottom: auto;
    top: 125%;
    transform: translateX(-50%) translateY(-10px);
}

.custom-tooltip:not(.tooltip-interactive)[data-position="bottom"]::after {
    bottom: auto;
    top: 125%;
    border-top-color: transparent;
    border-bottom-color: #333;
    transform: translateX(-50%) translateY(-10px);
}

.custom-tooltip:not(.tooltip-interactive)[data-position="bottom"]:hover::before,
.custom-tooltip:not(.tooltip-interactive)[data-position="bottom"]:hover::after {
    transform: translateX(-50%) translateY(0);
}

.custom-tooltip:not(.tooltip-interactive)[data-position="left"]::before {
    bottom: auto;
    left: auto;
    right: 125%;
    top: 50%;
    transform: translateY(-50%) translateX(10px);
}

.custom-tooltip:not(.tooltip-interactive)[data-position="left"]::after {
    bottom: auto;
    left: auto;
    right: 125%;
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    border-top-color: transparent;
    border-left-color: #333;
}

.custom-tooltip:not(.tooltip-interactive)[data-position="left"]:hover::before,
.custom-tooltip:not(.tooltip-interactive)[data-position="left"]:hover::after {
    transform: translateY(-50%) translateX(0);
}

.custom-tooltip:not(.tooltip-interactive)[data-position="right"]::before {
    bottom: auto;
    left: 125%;
    top: 50%;
    transform: translateY(-50%) translateX(-10px);
}

.custom-tooltip:not(.tooltip-interactive)[data-position="right"]::after {
    bottom: auto;
    left: 125%;
    top: 50%;
    transform: translateY(-50%) translateX(-10px);
    border-top-color: transparent;
    border-right-color: #333;
}

.custom-tooltip:not(.tooltip-interactive)[data-position="right"]:hover::before,
.custom-tooltip:not(.tooltip-interactive)[data-position="right"]:hover::after {
    transform: translateY(-50%) translateX(0);
}