/**
 * Enhanced tooltip positioning and styling
 */
.alp-tooltip {
    position: absolute !important;
    right: -20px !important; /* Adjusted positioning to the right */
    left: auto !important; /* Override any left positioning */
    width: 320px !important; /* Consistent width */
    max-width: 80vw !important; /* Responsive width limit */
    transform: none !important; /* Remove transform for better positioning */
    top: calc(100% + 8px) !important; /* Increased spacing from icon */
    line-height: 1.5 !important; /* Improved readability */
    max-height: 300px !important; /* Maximum height */
    overflow-y: auto !important; /* Scrollable content */
    font-size: 13px !important; /* Readable font size */
    z-index: 999999 !important; /* Ensure tooltips stay on top */
    background: #23282d !important; /* Consistent dark background */
    color: #fff !important; /* White text */
    padding: 12px 15px !important; /* Comfortable padding */
    border-radius: 4px !important; /* Rounded corners */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important; /* Subtle shadow */
}

/* Consistent positioning for all tooltips */
.alp-search-item .alp-help-icon .alp-tooltip {
    right: -150px !important; /* Adjusted positioning for search tooltip */
    width: 320px !important;
}

.alp-stat-item .alp-help-icon .alp-tooltip,
.alp-settings-section .alp-help-icon .alp-tooltip,
.alp-log-filters .alp-help-icon .alp-tooltip {
    right: -350px !important; /* Consistent right positioning */
    width: 320px !important; /* Consistent width */
}

/* Special positioning for Log Database Size tooltip */
.alp-stat-item:has(.alp-stat-label:contains("Log Database Size")) .alp-help-icon .alp-tooltip {
    right: -150px !important; /* Adjusted positioning for better visibility */
}

/* Special positioning for Log Database Size tooltip */
.alp-stat-item.alp-db-size-stat .alp-help-icon .alp-tooltip {
    right: -15px !important; /* Adjusted positioning for better visibility */
}

/* Arrow removed */
.alp-tooltip:before {
    display: none !important;
}

/* Add custom scroll styling for tooltip */
.alp-tooltip::-webkit-scrollbar {
    width: 6px;
}

.alp-tooltip::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.alp-tooltip::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.alp-tooltip::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}