(function(){
'use strict';
document.body.addEventListener('click', function(e){
if(e.target.classList.contains('tmb-info-icon')){
e.preventDefault();
var breakdownId=e.target.getAttribute('data-breakdown-id');
var modal=document.getElementById(breakdownId);
if(modal){
modal.style.display='block';
document.body.style.overflow='hidden';
}}
if(e.target.classList.contains('tmb-breakdown-close')){
e.preventDefault();
e.stopPropagation();
var modal=e.target.closest('.tmb-breakdown-modal');
if(modal){
modal.style.display='none';
document.body.style.overflow='';
}}
if(e.target.classList.contains('tmb-breakdown-overlay')){
e.preventDefault();
e.stopPropagation();
var modal=e.target.closest('.tmb-breakdown-modal');
if(modal){
modal.style.display='none';
document.body.style.overflow='';
}}
});
document.addEventListener('keydown', function(e){
if(e.key==='Escape'||e.keyCode===27){
var modals=document.querySelectorAll('.tmb-breakdown-modal');
modals.forEach(function(modal){
if(modal.style.display==='block'){
modal.style.display='none';
document.body.style.overflow='';
}});
}});
})();