/* Force styles to win against theme */
.tlc-booknow-wrap { display:inline-flex !important; align-items:center !important; gap:10px !important; }
.tlc-booknow-btn{
background:#A88873 !important;
color:#ffffff !important;
padding:10px 18px !important;
border-radius:0px !important; /* rectangular */
text-decoration:none !important;
font-family:"SA Marion", serif !important;
font-weight:600 !important;
letter-spacing:.02em !important;
text-transform:uppercase !important;
display:inline-block !important;
line-height:1 !important;
border:0 !important;
}
/* Keep mobile reasonable (not full width, not sticky) */
@media (max-width:768px){
.tlc-booknow-btn{ padding:10px 16px !important; font-size:15px !important; }
}
/* Tiny status badge so we can see if Boulevard is actually ready */
.tlc-blvd-status{
font: 12px/1.2 Arial, sans-serif !important;
padding:4px 8px !important;
border-radius:10px !important;
background:#eee !important;
color:#333 !important;
user-select:none !important;
}
.tlc-blvd-status.ready{ background:#dff3df !important; color:#1f6b1f !important; }
.tlc-blvd-status.fail{ background:#ffe1e1 !important; color:#8a1f1f !important; }
(function(){
var BUSINESS_ID = 'bc952a77-5546-43c3-a6e6-2e1b73c26350';
var GA_ID = 'G-69K19Y2SYW';
var btn = document.getElementById('tlc-booknow-btn');
var statusEl = document.getElementById('tlc-blvd-status');
if (!btn || !statusEl) return;
function setStatus(text, cls){
statusEl.textContent = text;
statusEl.classList.remove('ready','fail');
if (cls) statusEl.classList.add(cls);
}
function injectBlvd(){
if (document.getElementById('tlc-blvd-injector')) return;
var s = document.createElement('script');
s.id = 'tlc-blvd-injector';
s.src = 'https://static.joinboulevard.com/injector.min.js';
s.async = true;
s.onload = function(){
try {
if (window.blvd && typeof window.blvd.init === 'function') {
window.blvd.init({ businessId: BUSINESS_ID, gaMeasurementId: GA_ID });
}
} catch(e) {}
};
s.onerror = function(){
setStatus('BLVD: blocked', 'fail');
};
(document.head || document.body).appendChild(s);
}
function waitForReady(cb){
var tries = 0;
var maxTries = 80; // ~20s
(function check(){
if (window.blvd && typeof window.blvd.openBookingWidget === 'function') {
setStatus('BLVD: ready', 'ready');
cb();
return;
}
tries++;
if (tries >= maxTries){
setStatus('BLVD: not ready', 'fail');
return;
}
setTimeout(check, 250);
})();
}
// Start loading immediately
injectBlvd();
waitForReady(function(){ /* just set status */ });
function openOverlay(e){
e.preventDefault();
injectBlvd();
waitForReady(function(){
window.blvd.openBookingWidget();
});
}
// Mobile + desktop
btn.addEventListener('click', openOverlay);
btn.addEventListener('touchend', openOverlay, { passive:false });
})();
