/* /Features/Analytics/Components/AudienceToggle.razor.rz.scp.css */
.audience-toggle[b-qctzl87uz3] {
    display: flex;
    align-items: center;
    gap: var(--loyco-space-2);
}

.audience-toggle-label[b-qctzl87uz3] {
    font-size: 0.78rem;
    color: var(--loyco-text-secondary);
    white-space: nowrap;
}
/* /Features/Analytics/Pages/AnalyticsCampaignsPage.razor.rz.scp.css */
/* Campaign analytics table — scoped to AnalyticsCampaignsPage */

.campaigns-table[b-2qfg5eykbp] {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.campaigns-table th[b-2qfg5eykbp] {
  text-align: left;
  padding: 0.45rem 0.75rem;
  color: var(--loyco-text-secondary);
  font-weight: 580;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--loyco-border-soft);
  white-space: nowrap;
  user-select: none;
}

.campaigns-table th:hover[b-2qfg5eykbp] {
  color: var(--loyco-text-primary);
}

.campaigns-table th.sorted[b-2qfg5eykbp] {
  color: var(--loyco-accent);
}

.campaigns-table td[b-2qfg5eykbp] {
  padding: 0.55rem 0.75rem;
  color: var(--loyco-text-primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  white-space: nowrap;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.campaigns-table tbody tr:last-child td[b-2qfg5eykbp] {
  border-bottom: none;
}

.campaigns-table tbody tr:hover td[b-2qfg5eykbp] {
  background: var(--loyco-glass-2);
}

.campaigns-type-badge[b-2qfg5eykbp] {
  display: inline-block;
  padding: 0.18em 0.55em;
  border-radius: 99px;
  background: var(--loyco-glass-2);
  color: var(--loyco-text-secondary);
  font-size: 0.75rem;
  font-weight: 520;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}
/* /Features/Analytics/Pages/AnalyticsReportsPage.razor.rz.scp.css */
/* Preview table — scoped to AnalyticsReportsPage */

.reports-preview-table[b-1itkib9l9o] {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.reports-preview-table th[b-1itkib9l9o] {
  text-align: left;
  padding: 0.45rem 0.75rem;
  color: var(--loyco-text-secondary);
  font-weight: 580;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--loyco-border-soft);
  white-space: nowrap;
}

.reports-preview-table td[b-1itkib9l9o] {
  padding: 0.45rem 0.75rem;
  color: var(--loyco-text-primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  white-space: nowrap;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reports-preview-table tbody tr:last-child td[b-1itkib9l9o] {
  border-bottom: none;
}

.reports-preview-table tbody tr:hover td[b-1itkib9l9o] {
  background: var(--loyco-glass-2);
}
/* /Features/Engage/Pages/EngageTemplateEditorPage.razor.rz.scp.css */
/* Scoped styles for EngageTemplateEditorPage.
   Layout: top bar + BeeFree editor cell.
   The "Save as template" toggle lives in the top bar (from-campaign mode only).
   Editor takes maximum available space. */

.engage-template-editor[b-9l4chrzj1t] {
  display: flex;
  flex-direction: column;
  gap: 0;
  /* The parent .page-content is reset to display:block / no padding via the
     :has(.engage-template-editor) rule in global.css, and the AppShell sidebar
     + header are hidden via the same :has() trick, so we own the full viewport. */
  height: 100vh;
  position: relative;
  overflow: hidden;
}

/* ── Top bar ─────────────────────────────────────────────────────────── */

.engage-template-editor__topbar[b-9l4chrzj1t] {
  display: flex;
  align-items: center;
  gap: var(--loyco-space-3);
  padding: var(--loyco-space-2) var(--loyco-space-4);
  border-bottom: 1px solid var(--loyco-border-soft);
  background: var(--loyco-glass-1);
  flex-wrap: wrap;
  flex-shrink: 0;
}

.engage-template-editor__back[b-9l4chrzj1t] {
  display: inline-flex;
  align-items: center;
  gap: var(--loyco-space-1);
  color: var(--loyco-text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  padding: 0.3rem 0.7rem;
  border-radius: var(--loyco-radius-pill);
  border: 1px solid var(--loyco-border-soft);
  background: transparent;
  white-space: nowrap;
}

.engage-template-editor__back:hover[b-9l4chrzj1t] {
  background: var(--loyco-glass-2);
  color: var(--loyco-text-primary);
}

.engage-template-editor__name[b-9l4chrzj1t] {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.engage-template-editor__name input[b-9l4chrzj1t] {
  background: transparent;
  border: none;
  outline: none;
  font-size: 1rem;
  font-weight: 600;
  color: var(--loyco-text-primary);
  text-align: center;
  width: 100%;
  max-width: 380px;
  padding: 0;
}

.engage-template-editor__name input[b-9l4chrzj1t]::placeholder {
  color: var(--loyco-text-muted);
  font-weight: 500;
}

.engage-template-editor__topbar-actions[b-9l4chrzj1t] {
  display: flex;
  align-items: center;
  gap: var(--loyco-space-2);
  flex-shrink: 0;
}

.engage-template-editor__saved-at[b-9l4chrzj1t] {
  font-size: 0.8rem;
  color: var(--loyco-text-secondary);
  white-space: nowrap;
}

/* ── Editor frame — fills remaining vertical space ───────────────────── */

.engage-template-editor__editor-frame[b-9l4chrzj1t] {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  /* No padding: the BeeFree iframe should fill edge-to-edge for max canvas area. */
}

/* ::deep reaches across the BeefreeEditorHost child-component boundary
   so the iframe host actually fills our editor cell. Without this the
   primitive's default min-height stops it short and the canvas pokes
   above the fold. min-width:0 lets the host flex-shrink with the parent
   instead of pushing the page wider than viewport on narrow windows. */
.engage-template-editor__editor-frame[b-9l4chrzj1t]  .loyco-beefree-host {
  height: 100%;
  min-width: 0;
}

.engage-template-editor__loading-state[b-9l4chrzj1t] {
  height: 100%;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--loyco-text-secondary);
  border: 1px solid var(--loyco-border-soft);
  border-radius: var(--loyco-radius-md, 10px);
  background: var(--loyco-surface-1);
}

/* ── Save-as-template toggle (topbar, from-campaign mode only) ───────── */

.engage-template-editor__save-toggle[b-9l4chrzj1t] {
  display: inline-flex;
  align-items: center;
  gap: var(--loyco-space-2);
  padding: 0.28rem 0.7rem 0.28rem 0.6rem;
  border-radius: var(--loyco-radius-pill);
  border: 1px solid var(--loyco-border-soft);
  background: transparent;
  cursor: pointer;
  user-select: none;
  transition: background 0.12s;
}

.engage-template-editor__save-toggle:hover[b-9l4chrzj1t] {
  background: var(--loyco-glass-2);
}

.engage-template-editor__save-toggle-label[b-9l4chrzj1t] {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--loyco-text-secondary);
  white-space: nowrap;
}

/* ── iOS-style switch (no extra primitive needed) ────────────────────── */

.engage-template-editor__switch[b-9l4chrzj1t] {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

.engage-template-editor__switch input[b-9l4chrzj1t] {
  opacity: 0;
  width: 0;
  height: 0;
}

.engage-template-editor__switch-track[b-9l4chrzj1t] {
  position: absolute;
  inset: 0;
  background: var(--loyco-border-soft);
  border-radius: 999px;
  transition: background 0.15s ease-out;
}

.engage-template-editor__switch-track[b-9l4chrzj1t]::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.15s ease-out;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.engage-template-editor__switch input:checked + .engage-template-editor__switch-track[b-9l4chrzj1t] {
  background: var(--loyco-accent);
}

.engage-template-editor__switch input:checked + .engage-template-editor__switch-track[b-9l4chrzj1t]::before {
  transform: translateX(20px);
}

.engage-template-editor__switch input:focus-visible + .engage-template-editor__switch-track[b-9l4chrzj1t] {
  outline: 2px solid var(--loyco-accent);
  outline-offset: 2px;
}
/* /Features/Settings/Pages/SettingsLoyaltyPage.razor.rz.scp.css */
/* Scoped layout for /settings/loyalty tier cards.
   Container-query driven so each tier-card responds to its own width
   inside the page's Stack — narrow side-panels and full-width main
   columns both lay out cleanly without media queries. */

.tier-card-body[b-4ojt2ix1rj] {
    container-type: inline-size;
    container-name: tier-card;
    display: grid;
    gap: var(--loyco-space-5);
}

/* ── Row 1: color + name/meta ───────────────────────────────────── */

.tier-header[b-4ojt2ix1rj] {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--loyco-space-4);
    align-items: center;
}

.tier-name-block[b-4ojt2ix1rj] {
    display: flex;
    flex-direction: column;
    gap: var(--loyco-space-2);
    min-width: 0;
}

.tier-meta-row[b-4ojt2ix1rj] {
    display: flex;
    align-items: center;
    gap: var(--loyco-space-2);
    flex-wrap: wrap;
}

/* ── Color cell ─────────────────────────────────────────────────── */

/* The color input doubles as the visible swatch — clicking it opens
   the native picker. Reset the browser chrome so we can size and
   round it like any other surface in the card. */
.tier-color-input[b-4ojt2ix1rj] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 64px;
    height: 56px;
    padding: 0;
    border: 1px solid var(--loyco-border-strong);
    border-radius: 14px;
    background-color: var(--loyco-glass-3);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    cursor: pointer;
}

.tier-color-input[b-4ojt2ix1rj]::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 12px;
}

.tier-color-input[b-4ojt2ix1rj]::-webkit-color-swatch {
    border: none;
    border-radius: 12px;
}

.tier-color-input[b-4ojt2ix1rj]::-moz-color-swatch {
    border: none;
    border-radius: 12px;
}

/* ── Row 2: stats grid (earn rate + 3 thresholds) ──────────────── */

.tier-stats[b-4ojt2ix1rj] {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--loyco-space-4);
    align-items: end;
}

.tier-stat[b-4ojt2ix1rj] {
    display: flex;
    flex-direction: column;
    gap: var(--loyco-space-1);
    min-width: 0;
}

/* ── Responsive: collapse stats to 2×2 and stack header on narrow
       card widths ────────────────────────────────────────────────── */

@container tier-card (max-width: 720px) {
    .tier-stats[b-4ojt2ix1rj] {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@container tier-card (max-width: 480px) {
    .tier-header[b-4ojt2ix1rj] {
        grid-template-columns: 1fr;
    }
}

/* ── Mobile: color-hex row wraps and the hex input fills the row ──────── */

@container tier-card (max-width: 380px) {
    .tier-header[b-4ojt2ix1rj] {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .tier-stats[b-4ojt2ix1rj] {
        grid-template-columns: 1fr;
    }
}
