/* Twinstar Crew — installable app layer */

/* Install button in the portal header (shown only when installing is possible) */
.tsp-install{display:none;margin-left:12px;align-items:center;gap:6px;background:var(--g,#B0884F);color:#0B1F3A;border:0;border-radius:4px;padding:6px 12px;font:600 13px/1.2 Inter,system-ui,-apple-system,"Segoe UI",Arial,sans-serif;cursor:pointer;min-height:32px}
.tsp-install::before{content:"";width:14px;height:14px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3v12m0 0-5-5m5 5 5-5M4 19h16' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3v12m0 0-5-5m5 5 5-5M4 19h16' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat}
.tsp-install:hover{filter:brightness(1.08)}
.tsp-install:focus-visible{outline:2px solid #fff;outline-offset:2px}
html.tsp-can-install .tsp-install{display:inline-flex}

/* Offline notice */
.tsp-offline{position:fixed;left:50%;bottom:calc(16px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);z-index:100000;display:flex;align-items:center;gap:10px;background:#1B2433;color:#fff;border-left:3px solid #B0884F;border-radius:4px;padding:10px 14px;font:500 13px/1.3 Inter,system-ui,-apple-system,"Segoe UI",Arial,sans-serif;box-shadow:0 6px 24px rgba(0,0,0,.25);max-width:calc(100vw - 32px)}
.tsp-offline .dot{width:8px;height:8px;border-radius:50%;background:#E0A93B;flex:none}
.tsp-offline.back{border-left-color:#3FA46A}
.tsp-offline button{background:#B0884F;color:#0B1F3A;border:0;border-radius:3px;padding:5px 10px;font:600 12px/1 inherit;cursor:pointer;min-height:28px}

/* iPhone "Add to Home Screen" instructions */
.tsp-sheet{position:fixed;inset:0;z-index:100001;background:rgba(7,13,24,.6);display:flex;align-items:flex-end;justify-content:center}
.tsp-sheet-in{background:#fff;color:#1B2433;width:100%;max-width:440px;border-radius:14px 14px 0 0;padding:24px 22px calc(22px + env(safe-area-inset-bottom,0px));border-top:3px solid #B0884F;font:15px/1.45 Inter,system-ui,-apple-system,"Segoe UI",Arial,sans-serif;text-align:left}
.tsp-sheet-in img{display:block;border-radius:12px;margin:0 0 12px}
.tsp-sheet-in h2{margin:0 0 10px;font-size:20px;color:#0B1F3A}
.tsp-sheet-in ol{margin:0 0 18px;padding-left:20px}
.tsp-sheet-in li{margin:0 0 8px}
.tsp-sheet-in .warn{background:#FFF6E5;border-left:3px solid #E0A93B;padding:8px 10px;margin:0 0 12px;font-size:14px}
.tsp-sheet-in .share{display:inline-block;width:16px;height:18px;vertical-align:-3px;background:#0A84FF;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 24'%3E%3Cpath d='M10 15V2m0 0L6 6m4-4 4 4M6 10H3v12h14V10h-3' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 24'%3E%3Cpath d='M10 15V2m0 0L6 6m4-4 4 4M6 10H3v12h14V10h-3' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat}
.tsp-sheet-ok{width:100%;background:#0B1F3A;color:#fff;border:0;border-radius:6px;padding:13px;font:600 15px/1 inherit;min-height:46px;cursor:pointer}

/* ---------- Full-screen look when running as the installed app ----------
 * Two triggers: the display-mode media query (Android, desktop, iOS 16.4+) and the
 * .tsp-standalone class set in <head> from navigator.standalone (older iPhones). */
@media (display-mode: standalone){
	html{margin-top:0!important}
	#wpadminbar,.skip,.site-header,.site-footer,.page-head,.hero,
	.gtranslate_wrapper,#gt_float_wrapper,.gt_float_switcher,.gt_switcher_wrapper,.gt-switcher,[id^="gt_float"],
	.ht-ctc,.ht_ctc_chat,.joinchat,.qlwapp,.wa__btn_popup,.wa__popup_chat_box,#wa,.whatsapp-float,.float-whatsapp,.wa-float,
	body>a[href*="wa.me/"],body>a[href*="api.whatsapp.com"],body>[class*="whatsapp" i],body>[id*="whatsapp" i]{display:none!important}
	body{background:#F4F6F9!important;padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}
	.page-body,.sec.page-body{padding:0!important;background:#F4F6F9!important}
	.page-body>.wrap{max-width:none;padding:0 calc(12px + env(safe-area-inset-right,0px)) 0 calc(12px + env(safe-area-inset-left,0px))}
	.tsp-app{margin:0 0 24px}
	.tsp-top{position:sticky;top:env(safe-area-inset-top,0px);z-index:50;margin:0 -12px}
	.tsp-login{margin:max(40px,12vh) auto 40px}
	html::before{content:"";position:fixed;top:0;left:0;right:0;height:env(safe-area-inset-top,0px);background:#0B1F3A;z-index:60}
}
html.tsp-standalone{margin-top:0!important}
html.tsp-standalone #wpadminbar,html.tsp-standalone .skip,html.tsp-standalone .site-header,html.tsp-standalone .site-footer,html.tsp-standalone .page-head,html.tsp-standalone .hero,
html.tsp-standalone .gtranslate_wrapper,html.tsp-standalone #gt_float_wrapper,html.tsp-standalone .gt_float_switcher,html.tsp-standalone .gt_switcher_wrapper,html.tsp-standalone .gt-switcher,html.tsp-standalone [id^="gt_float"],
html.tsp-standalone .ht-ctc,html.tsp-standalone .ht_ctc_chat,html.tsp-standalone .joinchat,html.tsp-standalone .qlwapp,html.tsp-standalone .wa__btn_popup,html.tsp-standalone .wa__popup_chat_box,html.tsp-standalone #wa,html.tsp-standalone .whatsapp-float,html.tsp-standalone .float-whatsapp,html.tsp-standalone .wa-float,
html.tsp-standalone body>a[href*="wa.me/"],html.tsp-standalone body>a[href*="api.whatsapp.com"],html.tsp-standalone body>[class*="whatsapp" i],html.tsp-standalone body>[id*="whatsapp" i]{display:none!important}
html.tsp-standalone body{background:#F4F6F9!important;padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}
html.tsp-standalone .page-body{padding:0!important;background:#F4F6F9!important}
html.tsp-standalone .page-body>.wrap{max-width:none;padding:0 calc(12px + env(safe-area-inset-right,0px)) 0 calc(12px + env(safe-area-inset-left,0px))}
html.tsp-standalone .tsp-app{margin:0 0 24px}
html.tsp-standalone .tsp-top{position:sticky;top:env(safe-area-inset-top,0px);z-index:50;margin:0 -12px}
html.tsp-standalone .tsp-login{margin:max(40px,12vh) auto 40px}
html.tsp-standalone::before{content:"";position:fixed;top:0;left:0;right:0;height:env(safe-area-inset-top,0px);background:#0B1F3A;z-index:60}
