SILVALURE

Filtrer nedenfor:
Fluefanger Fly Bag
149 NOK
Kjøp!
Info
Logg inn
Choose country
(function () { const STYLE_ID = 'toll-info-style'; function addStyles() { if (document.getElementById(STYLE_ID)) return; const style = document.createElement('style'); style.id = STYLE_ID; style.textContent = ` .toll-info-btn { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; margin-left: 5px; padding: 0; border: 0; border-radius: 50%; background: #FFD400; color: #000; font-family: Arial, sans-serif; font-size: 11px; font-weight: 700; line-height: 16px; cursor: pointer; vertical-align: middle; } .toll-info-wrap { position: relative; display: inline-block; } .toll-info-tooltip { display: none; position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); z-index: 999999; width: 280px; max-width: calc(100vw - 30px); padding: 12px 14px; background: #fff; color: #111; border: 1px solid #ddd; border-radius: 6px; box-shadow: 0 5px 20px rgba(0,0,0,.18); font-size: 13px; font-weight: 400; line-height: 1.45; text-align: left; white-space: normal; } .toll-info-tooltip.is-open { display: block; } .toll-info-tooltip strong { display: block; margin-bottom: 4px; } `; document.head.appendChild(style); } function initTollInfo() { const headerUsp = document.querySelector('ul.header-usp'); if (!headerUsp) { return false; } const tollItem = Array.from(headerUsp.querySelectorAll('li')).find(function (li) { return li.textContent.toLowerCase().includes('tollavgift'); }); if (!tollItem) { return false; } // Redan tillagd if (tollItem.querySelector('.toll-info-wrap')) { return true; } addStyles(); const wrapper = document.createElement('span'); wrapper.className = 'toll-info-wrap'; const button = document.createElement('button'); button.type = 'button'; button.className = 'toll-info-btn'; button.textContent = 'i'; button.setAttribute('aria-label', 'Information om tullavgiften'); button.setAttribute('aria-expanded', 'false'); const tooltip = document.createElement('div'); tooltip.className = 'toll-info-tooltip'; tooltip.innerHTML = ` Om tullavgiften Du betalar en fast tullavgift på 29 NOK + mva. Inga ytterligare avgifter tillkommer efter leverans. `; wrapper.appendChild(button); wrapper.appendChild(tooltip); tollItem.appendChild(wrapper); button.addEventListener('click', function (event) { event.preventDefault(); event.stopPropagation(); const open = tooltip.classList.toggle('is-open'); button.setAttribute('aria-expanded', open ? 'true' : 'false'); }); document.addEventListener('click', function (event) { if (!wrapper.contains(event.target)) { tooltip.classList.remove('is-open'); button.setAttribute('aria-expanded', 'false'); } }); return true; } // Försök direkt if (initTollInfo()) return; // Om headern laddas in dynamiskt const observer = new MutationObserver(function () { if (initTollInfo()) { observer.disconnect(); } }); observer.observe(document.documentElement, { childList: true, subtree: true }); })();