/* ==========================================================================
   Loyalty Engine — Storefront launcher widget
   ========================================================================== */

#loyalty-engine-root {
	--le-w-bg:     #111111;
	--le-w-text:   #ffffff;
	--le-w-accent: #ff6b00;
	--le-w-header-bg:   #111111;
	--le-w-header-text: #ffffff;
	--le-w-btn-text:    #ffffff;
	--le-w-body-text:   #1a1a1a;
	--le-w-panel-bg:    #f6f7f9;
	--le-w-card:        #ffffff;
	--le-w-radius: 20px;
	--le-w-sans:   -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}/* --- Defensive resets — neutralise theme bleed --- */
#loyalty-engine-root,
#loyalty-engine-root *,
#loyalty-engine-root *::before,
#loyalty-engine-root *::after {
	box-sizing: border-box;
	font-family: var(--le-w-sans) !important;
	letter-spacing: normal !important;
	text-transform: none !important;
	text-decoration: none !important;
}
#loyalty-engine-root button,
#loyalty-engine-root input,
#loyalty-engine-root select,
#loyalty-engine-root textarea,
#loyalty-engine-root a {
	appearance: none;
	-webkit-appearance: none;
	background: none;
	border: 0;
	color: inherit;
	font: inherit;
	line-height: 1.2;
	margin: 0;
	padding: 0;
	text-align: inherit;
	outline: none;
	box-shadow: none;
	min-height: 0;
	min-width: 0;
	text-shadow: none;
}
#loyalty-engine-root a { color: inherit !important; }
#loyalty-engine-root img { max-width: 100%; height: auto; }

/* ---------------------------------------------------------------- Launcher */
.le-w-launcher {
	position: fixed; z-index: 99990; bottom: 24px;
	display: inline-flex; align-items: center; gap: 9px;
	padding: 14px 22px; border: none; border-radius: 9999px;
	background: var(--le-w-bg); color: var(--le-w-text);
	font-family: var(--le-w-sans); font-weight: 700; font-size: 15px;
	cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,.25);
	transition: transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .18s;
	line-height: 1;
}#loyalty-engine-root .le-w-launcher:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 14px 38px rgba(0,0,0,.3); }#loyalty-engine-root .le-w-launcher:active { transform: translateY(0) scale(.98); }#loyalty-engine-root .le-w-launcher.pos-right { right: 24px; }#loyalty-engine-root .le-w-launcher.pos-left { left: 24px; }#loyalty-engine-root .le-w-launcher-icon { font-size: 19px; line-height: 1; }#loyalty-engine-root .le-w-launcher.is-open { opacity: 0; pointer-events: none; transform: scale(.6); }/* ---------------------------------------------------------------- Panel */
.le-w-panel {
	position: fixed; z-index: 99991; bottom: 24px;
	color: var(--le-w-body-text);
	width: 360px; max-width: calc(100vw - 32px);
	max-height: min(640px, calc(100vh - 48px));
	background: #fff; border-radius: var(--le-w-radius);
	box-shadow: 0 24px 70px rgba(0,0,0,.3);
	font-family: var(--le-w-sans); color: #1a1a1a;
	display: flex; flex-direction: column; overflow: hidden;
	opacity: 0; transform: translateY(20px) scale(.96); pointer-events: none;
	transition: opacity .22s, transform .22s cubic-bezier(.34,1.3,.64,1);
}#loyalty-engine-root .le-w-panel.pos-right { right: 24px; }#loyalty-engine-root .le-w-panel.pos-left { left: 24px; }#loyalty-engine-root .le-w-panel.is-open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }/* Header */
.le-w-head { background: var(--le-w-header-bg); color: var(--le-w-header-text); padding: 24px 22px 22px; position: relative; }#loyalty-engine-root .le-w-close { position: absolute; top: 16px; right: 16px; width: 30px; height: 30px; border: none; background: rgba(255,255,255,.14); color: inherit; border-radius: 50%; cursor: pointer; font-size: 17px; line-height: 1; display: grid; place-items: center; transition: background .15s; }#loyalty-engine-root .le-w-close:hover { background: rgba(255,255,255,.26); }#loyalty-engine-root .le-w-eyebrow { font-size: 11px; letter-spacing: .09em; text-transform: uppercase; opacity: .65; font-weight: 600; }#loyalty-engine-root .le-w-title { font-size: 21px; font-weight: 700; margin: 7px 0 5px; letter-spacing: -0.01em; }#loyalty-engine-root .le-w-sub { font-size: 13px; opacity: .82; line-height: 1.5; margin: 0; }/* Balance card */
.le-w-balance { margin: 18px 18px 0; background: #f6f7f9; border-radius: 14px; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; }#loyalty-engine-root .le-w-balance-label { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: #9aa3af; font-weight: 600; }#loyalty-engine-root .le-w-balance-val { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; margin-top: 2px; color: var(--le-w-body-text); }#loyalty-engine-root .le-w-balance-worth { font-size: 12px; color: #6b7280; margin-top: 2px; }#loyalty-engine-root .le-w-balance-redeem { background: var(--le-w-accent); color: var(--le-w-btn-text); border: none; padding: 9px 15px; border-radius: 9999px; font-weight: 700; font-size: 12.5px; cursor: pointer; white-space: nowrap; transition: filter .15s; }#loyalty-engine-root .le-w-balance-redeem:hover { filter: brightness(1.07); }/* Body / scroll */
.le-w-body { padding: 16px; overflow-y: auto; flex: 1; background: var(--le-w-panel-bg); }#loyalty-engine-root .le-w-section-title { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: #9aa3af; font-weight: 700; margin: 4px 0 10px; }/* Home cards */
.le-w-card { background: var(--le-w-card); border: 1px solid #eceef1; border-radius: 16px; padding: 20px; margin-bottom: 14px; box-shadow: 0 1px 2px rgba(16,19,23,.04); }#loyalty-engine-root .le-w-card:last-child { margin-bottom: 0; }#loyalty-engine-root .le-w-card-h { font-size: 16px; font-weight: 700; margin: 0 0 4px; text-align: center; color: var(--le-w-body-text); }#loyalty-engine-root .le-w-card-p { font-size: 13px; color: #6b7280; margin: 0 0 16px; text-align: center; line-height: 1.5; }#loyalty-engine-root .le-w-join { text-align: center; }#loyalty-engine-root .le-w-cta { display: block; width: 100%; background: var(--le-w-accent); color: var(--le-w-btn-text); border: none; border-radius: 12px; padding: 15px; font-size: 15px; font-weight: 700; cursor: pointer; transition: filter .15s; font-family: inherit; }#loyalty-engine-root .le-w-cta:hover { filter: brightness(1.05); }#loyalty-engine-root .le-w-cta-sm { margin-top: 16px; padding: 13px; font-size: 14px; }#loyalty-engine-root .le-w-or { margin-top: 16px; padding-top: 16px; border-top: 1px solid #eceef1; font-size: 13.5px; color: #6b7280; }#loyalty-engine-root .le-w-or a { color: var(--le-w-bg); font-weight: 700; text-decoration: underline; }/* Balance card on home */
.le-w-balcard { text-align: center; }#loyalty-engine-root .le-w-balcard .le-w-balance-label { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: #9aa3af; font-weight: 600; }#loyalty-engine-root .le-w-balcard .le-w-balance-val { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; margin: 4px 0 2px; color: var(--le-w-body-text); }#loyalty-engine-root .le-w-balcard .le-w-balance-worth { font-size: 12.5px; color: #6b7280; }/* Nav rows (drill-down) */
.le-w-navcard { padding: 14px; }#loyalty-engine-root .le-w-navcard .le-w-card-h { margin-bottom: 4px; }#loyalty-engine-root .le-w-navcard .le-w-card-p { margin-bottom: 12px; }#loyalty-engine-root .le-w-navrow { display: flex; align-items: center; gap: 14px; width: 100%; background: #fff; border: 1px solid #eceef1; border-radius: 12px; padding: 15px 16px; cursor: pointer; font-family: inherit; transition: border-color .15s, background .15s; margin-bottom: 10px; }#loyalty-engine-root .le-w-navrow:last-child { margin-bottom: 0; }#loyalty-engine-root .le-w-navrow:hover { border-color: #d4d8de; background: #fafbfc; }#loyalty-engine-root .le-w-navrow-icon { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; }#loyalty-engine-root .le-w-navrow-icon svg { width: 21px; height: 21px; }#loyalty-engine-root .le-w-navrow-label { flex: 1; text-align: left; font-size: 15px; font-weight: 600; color: var(--le-w-body-text); }#loyalty-engine-root .le-w-navrow-chev { color: #c2c7cf; display: flex; }#loyalty-engine-root .le-w-navrow-chev svg { width: 18px; height: 18px; }/* Header back button */
.le-w-headback { position: absolute; top: 16px; left: 16px; width: 30px; height: 30px; border: none; background: rgba(255,255,255,.14); color: inherit; border-radius: 50%; cursor: pointer; display: grid; place-items: center; transition: background .15s; }#loyalty-engine-root .le-w-headback:hover { background: rgba(255,255,255,.26); }#loyalty-engine-root .le-w-headback svg { width: 16px; height: 16px; transform: rotate(180deg); }/* Gate (logged-out prompt inside a subview) */
.le-w-gate { text-align: center; padding: 24px 8px; }#loyalty-engine-root .le-w-gate p { font-size: 13.5px; color: #6b7280; margin: 0 0 16px; }/* Rule rows */
.le-w-rule { display: flex; align-items: center; gap: 13px; padding: 13px 4px; border-bottom: 1px solid #f0f1f3; cursor: default; }#loyalty-engine-root .le-w-rule:last-child { border-bottom: 0; }#loyalty-engine-root .le-w-rule-icon { width: 38px; height: 38px; border-radius: 11px; background: #f3f4f6; display: grid; place-items: center; flex-shrink: 0; }#loyalty-engine-root .le-w-rule-icon svg { width: 19px; height: 19px; }#loyalty-engine-root .le-w-rule-main { flex: 1; min-width: 0; }#loyalty-engine-root .le-w-rule-title { font-size: 14px; font-weight: 600; color: var(--le-w-body-text); }#loyalty-engine-root .le-w-rule-sub { font-size: 12px; color: #9aa3af; margin-top: 1px; }#loyalty-engine-root .le-w-rule-action { flex-shrink: 0; }#loyalty-engine-root .le-w-chip { font-size: 12.5px; font-weight: 700; color: var(--le-w-btn-text); background: var(--le-w-accent); padding: 5px 11px; border-radius: 9999px; white-space: nowrap; }#loyalty-engine-root .le-w-rule-btn { font-size: 12.5px; font-weight: 700; color: var(--le-w-btn-text); background: var(--le-w-accent); border: none; padding: 8px 14px; border-radius: 9999px; cursor: pointer; transition: filter .15s; }#loyalty-engine-root .le-w-rule-btn:hover { filter: brightness(1.25); }#loyalty-engine-root .le-w-rule.is-done .le-w-rule-icon { background: #e8f6ee; }#loyalty-engine-root .le-w-done-badge { font-size: 12px; font-weight: 700; color: #0f8a4f; display: inline-flex; align-items: center; gap: 4px; }/* Logged-out CTA */
.le-w-login { text-align: center; padding: 26px 16px; }#loyalty-engine-root .le-w-login p { font-size: 13.5px; color: #6b7280; margin: 0 0 16px; }#loyalty-engine-root .le-w-login-btn { display: inline-block; background: var(--le-w-bg); color: var(--le-w-text); text-decoration: none; padding: 12px 26px; border-radius: 9999px; font-weight: 700; font-size: 14px; }/* Redeem view */
.le-w-redeem { padding: 4px; }#loyalty-engine-root .le-w-redeem-back { background: none; border: none; color: #6b7280; font-size: 13px; cursor: pointer; padding: 4px 0; margin-bottom: 12px; font-weight: 600; }#loyalty-engine-root .le-w-redeem-row { display: flex; gap: 10px; align-items: center; margin: 14px 0; }#loyalty-engine-root .le-w-redeem-row input { flex: 1; border: 1px solid #e2e5ea; border-radius: 10px; padding: 11px 13px; font-size: 14px; font-family: inherit; }#loyalty-engine-root .le-w-redeem-row input:focus { outline: none; border-color: var(--le-w-bg); }#loyalty-engine-root .le-w-redeem-apply { background: var(--le-w-accent); color: var(--le-w-btn-text); border: none; padding: 11px 18px; border-radius: 10px; font-weight: 700; cursor: pointer; font-size: 13.5px; }#loyalty-engine-root .le-w-redeem-hint { font-size: 12px; color: #9aa3af; line-height: 1.5; }#loyalty-engine-root .le-w-msg { padding: 11px 14px; border-radius: 10px; font-size: 13px; font-weight: 600; margin-top: 12px; }#loyalty-engine-root .le-w-msg.is-ok { background: #e8f6ee; color: #0c6e40; }#loyalty-engine-root .le-w-msg.is-err { background: #fdeceb; color: #b3271e; }/* History */
.le-w-history-item { display: flex; justify-content: space-between; gap: 10px; padding: 11px 4px; border-bottom: 1px solid #f0f1f3; }#loyalty-engine-root .le-w-history-item:last-child { border-bottom: 0; }#loyalty-engine-root .le-w-history-note { font-size: 13px; }#loyalty-engine-root .le-w-history-date { font-size: 11.5px; color: #9aa3af; margin-top: 1px; }#loyalty-engine-root .le-w-history-pts { font-weight: 700; font-size: 13.5px; white-space: nowrap; }#loyalty-engine-root .le-w-history-pts.is-pos { color: #0f8a4f; }#loyalty-engine-root .le-w-history-pts.is-neg { color: #b3271e; }/* Footer tabs */
.le-w-tabs { display: flex; border-top: 1px solid #f0f1f3; }#loyalty-engine-root .le-w-tab { flex: 1; background: none; border: none; padding: 13px 8px; font-size: 12.5px; font-weight: 600; color: #9aa3af; cursor: pointer; font-family: inherit; transition: color .15s; }#loyalty-engine-root .le-w-tab.is-active { color: var(--le-w-bg); }#loyalty-engine-root .le-w-tab:hover { color: #1a1a1a; }/* Footer brand */
.le-w-foot { text-align: center; padding: 10px; font-size: 11px; color: #c2c7cf; border-top: 1px solid #f6f7f9; }/* Loading */
.le-w-loading { padding: 40px; text-align: center; color: #9aa3af; font-size: 13px; }#loyalty-engine-root .le-w-spinner { width: 26px; height: 26px; border: 3px solid #eceef1; border-top-color: var(--le-w-bg); border-radius: 50%; margin: 0 auto 12px; animation: le-spin .7s linear infinite; }
@keyframes le-spin {to { transform: rotate(360deg); } }/* Subview sheet */
.le-w-sheet { background: var(--le-w-card); border: 1px solid #eceef1; border-radius: 16px; padding: 8px 16px; box-shadow: 0 1px 2px rgba(16,19,23,.04); }#loyalty-engine-root .le-w-sheet.le-w-auth, #loyalty-engine-root .le-w-sheet.le-w-refer { padding: 18px; }/* Auth (login / register) */
.le-w-auth { }#loyalty-engine-root .le-w-auth-intro { font-size: 13px; color: #6b7280; margin: 0 0 14px; line-height: 1.5; text-align: center; }#loyalty-engine-root .le-w-auth-toggle { display: flex; background: #f3f4f6; border-radius: 10px; padding: 4px; margin-bottom: 14px; }#loyalty-engine-root .le-w-auth-tab { flex: 1; background: none; border: none; padding: 9px; border-radius: 8px; font-size: 13px; font-weight: 600; color: #6b7280; cursor: pointer; font-family: inherit; transition: background .15s, color .15s; }#loyalty-engine-root .le-w-auth-tab.is-active { background: #fff; color: #111; box-shadow: 0 1px 3px rgba(0,0,0,.08); }#loyalty-engine-root .le-w-auth-form { display: flex; flex-direction: column; gap: 10px; }#loyalty-engine-root .le-w-auth-form input { border: 1px solid #e2e5ea; border-radius: 11px; padding: 12px 14px; font-size: 14px; font-family: inherit; }#loyalty-engine-root .le-w-auth-form input:focus { outline: none; border-color: var(--le-w-bg); box-shadow: 0 0 0 3px rgba(0,0,0,.06); }#loyalty-engine-root .le-w-auth-submit { background: var(--le-w-bg); color: var(--le-w-text); border: none; border-radius: 11px; padding: 13px; font-weight: 700; font-size: 14px; cursor: pointer; transition: filter .15s; }#loyalty-engine-root .le-w-auth-submit:hover { filter: brightness(1.2); }#loyalty-engine-root .le-w-auth-submit:disabled { opacity: .6; cursor: default; }#loyalty-engine-root .le-w-msg-slot:empty { display: none; }/* Referral tab */
.le-w-refer { padding: 6px 2px; }#loyalty-engine-root .le-w-refer-hero { text-align: center; padding: 8px 8px 16px; }#loyalty-engine-root .le-w-refer-icon { width: 54px; height: 54px; border-radius: 16px; background: var(--le-w-accent); color: #fff; display: grid; place-items: center; margin: 0 auto 12px; }#loyalty-engine-root .le-w-refer-icon svg { width: 26px; height: 26px; }#loyalty-engine-root .le-w-refer-hero h4 { margin: 0 0 6px; font-size: 17px; font-weight: 700; }#loyalty-engine-root .le-w-refer-hero p { margin: 0; font-size: 13px; color: #6b7280; line-height: 1.5; }#loyalty-engine-root .le-w-refer-stats { display: flex; gap: 12px; margin: 6px 0 16px; }#loyalty-engine-root .le-w-refer-stats div { flex: 1; background: #f6f7f9; border-radius: 12px; padding: 14px; text-align: center; }#loyalty-engine-root .le-w-refer-stats span { display: block; font-size: 22px; font-weight: 800; }#loyalty-engine-root .le-w-refer-stats small { font-size: 11px; color: #9aa3af; text-transform: uppercase; letter-spacing: .04em; }#loyalty-engine-root .le-w-refer-link { display: flex; gap: 8px; margin-bottom: 14px; }#loyalty-engine-root .le-w-refer-link input { flex: 1; border: 1px solid #e2e5ea; border-radius: 10px; padding: 11px 13px; font-size: 12.5px; color: #374151; background: #fafbfc; }#loyalty-engine-root .le-w-refer-copy { background: var(--le-w-bg); color: var(--le-w-text); border: none; border-radius: 10px; padding: 0 16px; font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap; }#loyalty-engine-root .le-w-refer-share { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }#loyalty-engine-root .le-w-refer-share a { text-align: center; padding: 11px; border: 1px solid #e2e5ea; border-radius: 10px; text-decoration: none; color: #374151; font-size: 13px; font-weight: 600; transition: background .15s; }#loyalty-engine-root .le-w-refer-share a:hover { background: #fafbfc; }/* Scrollbar */
.le-w-body::-webkit-scrollbar { width: 8px; }#loyalty-engine-root .le-w-body::-webkit-scrollbar-thumb { background: #e2e5ea; border-radius: 8px; }

@media (max-width: 480px) {#loyalty-engine-root .le-w-panel { width: calc(100vw - 24px); bottom: 16px; }#loyalty-engine-root .le-w-panel.pos-right, #loyalty-engine-root .le-w-panel.pos-left { right: 12px; left: 12px; }#loyalty-engine-root .le-w-launcher { bottom: 16px; }#loyalty-engine-root .le-w-launcher.pos-right { right: 16px; }#loyalty-engine-root .le-w-launcher.pos-left { left: 16px; }
}
