(function otaPremiumCards(){'use strict';function getServiceData(card){var input=card.querySelector('input[id^="input-service-"]');if(!input)return null;var serviceId=parseInt(input.id.replace('input-service-',''),10);if(isNaN(serviceId)||typeof services==='undefined')return null;return services.find(function(s){return s.id===serviceId})||null}function formatPrice(amount,currency){if(typeof formatToLocaleMoney==='function'){return formatToLocaleMoney(amount,currency)}return'$'+amount.toLocaleString()}function processCard(card){if(card.dataset.otaProcessed)return;card.dataset.otaProcessed='true';var imageContainer=card.querySelector('.service-item__image');var durationEl=card.querySelector('.service-item__extra-duration');var titleEl=card.querySelector('.service-item__title');if(!imageContainer)return;if(durationEl){var durationText=durationEl.querySelector('.service__duration-category');if(durationText){var badge=document.createElement('div');badge.className='ota-duration-badge';var clonedSpan=durationText.cloneNode(true);clonedSpan.classList.remove('service__duration-category');badge.appendChild(clonedSpan);imageContainer.appendChild(badge)}}setTimeout(function(){var svc=getServiceData(card);var overlay=document.createElement('div');overlay.className='ota-card-overlay';if(titleEl){var fullTitle=titleEl.textContent.trim();var hyphenMatch=fullTitle.match(/\s[\u2013\u2014-]\s/);var hyphenIndex=hyphenMatch?hyphenMatch.index:-1;if(hyphenIndex!==-1){var mainTitle=fullTitle.substring(0,hyphenIndex).trim();var subtitle=fullTitle.substring(hyphenIndex+hyphenMatch[0].length).trim();var overlayTitle=document.createElement('div');overlayTitle.className='ota-card-overlay__title';overlayTitle.textContent=mainTitle;overlay.appendChild(overlayTitle);var overlaySubtitle=document.createElement('div');overlaySubtitle.className='ota-card-overlay__subtitle';overlaySubtitle.textContent=subtitle;overlay.appendChild(overlaySubtitle)}else{var overlayTitle2=document.createElement('div');overlayTitle2.className='ota-card-overlay__title';overlayTitle2.textContent=fullTitle;overlay.appendChild(overlayTitle2)}}if(svc){var priceDiv=document.createElement('div');priceDiv.className='ota-card-overlay__price';var displayPrice=svc.priceType==='deposit'&&svc.remainingAmount>0?svc.price+svc.remainingAmount:svc.price;var priceHTML=formatPrice(displayPrice,svc.currency);if(svc.currencyCode){priceHTML+=' '+svc.currencyCode}if(svc.crossedPrice&&svc.crossedPrice>displayPrice){priceHTML+=' <span class="ota-overlay-crossed">'+formatPrice(svc.crossedPrice,svc.currency)+'</span>'}priceDiv.innerHTML=priceHTML;overlay.appendChild(priceDiv);if(svc.crossedPrice&&svc.crossedPrice>displayPrice){var pct=Math.round(((svc.crossedPrice-displayPrice)/svc.crossedPrice)*100);if(pct>=1&&!imageContainer.querySelector('.ota-discount-badge')){var discountBadge=document.createElement('div');discountBadge.className='ota-discount-badge';discountBadge.textContent='-'+pct+'%';imageContainer.appendChild(discountBadge)}}}imageContainer.appendChild(overlay)},300)}function processAllCards(){document.querySelectorAll('.service-item:not([data-ota-processed])').forEach(processCard)}if(document.readyState==='loading'){document.addEventListener('DOMContentLoaded',function(){setTimeout(processAllCards,200)})}else{setTimeout(processAllCards,200)}var observer=new MutationObserver(function(mutations){var hasNewCards=false;for(var m=0;m<mutations.length;m++){for(var n=0;n<mutations[m].addedNodes.length;n++){var node=mutations[m].addedNodes[n];if(node.nodeType===1){if((node.classList&&node.classList.contains('service-item'))||(node.querySelector&&node.querySelector('.service-item'))){hasNewCards=true;break}}}if(hasNewCards)break}if(hasNewCards){setTimeout(processAllCards,250)}});observer.observe(document.body,{childList:true,subtree:true})})();