/* =========================================================
   FUTUREBOUND UI — CORE LAYOUT + MOBILE NAV + MORE MENU
   Single source of truth (CSS)
   ========================================================= */

:root{
  /* layout */
  --fb-topbar-h: 64px;
  --fb-sidebar-w: 260px;

  /* theme */
  --fb-text: #231F20;
  --fb-border: #e6eaf2;
  --fb-hover: #f3f6ff;
  --fb-active-bg: #e9f0ff;
  --fb-blue: #006fff;

  /* mobile nav */
  --fb-mobile-nav-h: 64px;
  --fb-safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* Font + box sizing (scoped to our UI only) */
#fb-topbar, #fb-sidebar, #fb-topbar *, #fb-sidebar *{
  font-family: Roboto, Arial, sans-serif !important;
  color: var(--fb-text) !important;
  box-sizing: border-box;
}

/* =========================================================
   TOP BAR
   ========================================================= */

#fb-topbar{
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--fb-topbar-h);
  background: #fff !important;
  border-bottom: 1px solid var(--fb-border);
  z-index: 10000;

  display: flex;
  align-items: center;
}

#fb-topbar .fb-topbar-inner{
  padding: 0 22px;
  font-size: 18px;
  font-weight: 700;
}

/* Burger button */
#fb-burger.fb-burger{
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;

  width: 44px;
  height: 44px;
  margin-left: 10px;
  margin-right: 6px;

  font-size: 22px;
  line-height: 1;
  border-radius: 10px;
  transition: background-color 0.15s ease;
}

#fb-burger.fb-burger:hover{ background: var(--fb-hover); }

#fb-burger.fb-burger:focus,
#fb-burger.fb-burger:focus-visible{
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(0,111,255,0.20);
}

/* =========================================================
   SIDEBAR (fixed)
   ========================================================= */

#fb-sidebar{
  position: fixed;
  top: var(--fb-topbar-h);
  left: 0;
  bottom: 0;
  width: var(--fb-sidebar-w);

  background: #fff !important;
  border-right: 1px solid var(--fb-border);
  z-index: 9000;

  display: flex;
  flex-direction: column;
  overflow: hidden; /* nav scrolls, logout pinned */

  transition: transform 0.22s ease;
  will-change: transform;
}

#fb-sidebar .fb-side-inner{
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 18px 12px 16px;
  background: #fff !important;
}

/* Profile */
#fb-sidebar .fb-profile{
  padding: 4px 6px 10px;
  background: #fff !important;
}

#fb-sidebar .fb-avatar{
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: var(--fb-border) !important;

  margin: 6px auto 14px;
  overflow: hidden;

  display: flex;
  align-items: center;
  justify-content: center;
}

/* If you insert an <img>, it will crop nicely */
#fb-sidebar .fb-avatar img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#fb-sidebar .fb-user{
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 14px;
  line-height: 1.4;
}

#fb-sidebar .fb-divider{
  height: 1px;
  background: var(--fb-border) !important;
  margin: 6px 6px 18px;
}

/* Nav scroll area */
#fb-sidebar .fb-nav{
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;

  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 2px 8px;

  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  border-radius: 0 !important;
}

/* Link */
#fb-sidebar .fb-link{
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;

  padding: 10px 12px 10px 16px;
  border-radius: 14px;

  text-decoration: none !important;
  font-size: 14px;
  line-height: 1.2;

  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;

  transition: background 0.15s ease;
}

#fb-sidebar .fb-link span{
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#fb-sidebar .fb-link:hover{ background: var(--fb-hover) !important; }

#fb-sidebar .fb-link.is-active{
  background: var(--fb-active-bg) !important;
  font-weight: 600;
}

#fb-sidebar .fb-link.is-active::before{
  content:"";
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 4px;
  border-radius: 4px;
  background: var(--fb-blue) !important;
}

/* Bottom pinned section */
#fb-sidebar .fb-bottom{
  flex: 0 0 auto;
  padding-top: 12px;
  border-top: 1px solid var(--fb-border);
  padding-left: 2px;
  padding-right: 2px;
  background: #fff !important;
}

#fb-sidebar .fb-logout-link{ opacity: 0.85; }
#fb-sidebar .fb-logout-link:hover{ opacity: 1; }

/* Ontraport injection safety (only inside sidebar) */
#fb-sidebar nav, #fb-sidebar nav *{
  background-color: transparent !important;
  background-image: none !important;
}

/* =========================================================
   PAGE LAYOUT PUSH
   Desktop + Tablet = push like desktop
   ========================================================= */

html, body{ height: 100%; }

body{
  padding-top: var(--fb-topbar-h) !important;
  padding-left: var(--fb-sidebar-w) !important;
  transition: padding-left 0.22s ease;
}

/* When user hides sidebar */
body.fb-sidebar-hidden{
  padding-left: 0 !important;
}
body.fb-sidebar-hidden #fb-sidebar{
  transform: translateX(calc(-1 * var(--fb-sidebar-w)));
}

/* Mobile: no sidebar push */
@media (max-width: 520px){
  #fb-sidebar{ display: none !important; }
  #fb-burger{ display: none !important; }
  body{ padding-left: 0 !important; }
}

/* =========================================================
   MOBILE BOTTOM NAV
   ========================================================= */

.fb-mobile-only{ display:none; }

@media (max-width: 520px){
  .fb-mobile-only{ display:block; }

  body.fb-has-mobile-nav{
    padding-bottom: calc(var(--fb-mobile-nav-h) + var(--fb-safe-bottom)) !important;
  }
}

.fb-bottom-nav{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--fb-mobile-nav-h) + var(--fb-safe-bottom));
  padding-bottom: var(--fb-safe-bottom);
  background: #fff;
  border-top: 1px solid var(--fb-border);
  z-index: 99990;
}

.fb-bottom-nav__inner{
  height: var(--fb-mobile-nav-h);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
}

/* Works for both <a> and <button> */
.fb-nav-item{
  position: relative;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  text-decoration: none;
  display:flex;
  align-items:center;
  justify-content:center;
  height: 100%;
  cursor: pointer;
  color: var(--fb-text);
  font-family: Roboto, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.fb-nav-item .fb-chip{
  display:flex;
  flex-direction: column;
  align-items:center;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 14px;
  background: transparent;
  transition: background 0.15s ease;
  line-height: 1;
}

.fb-nav-item svg{
  width: 20px;
  height: 20px;
  fill: currentColor;
  display:block;
}

.fb-nav-item .fb-label{
  font-size: 11px;
  line-height: 1;
  color: var(--fb-text);
}

.fb-nav-item:hover .fb-chip{
  background: var(--fb-hover);
}

.fb-nav-item.is-active .fb-chip{
  background: var(--fb-active-bg);
  font-weight: 600;
}

.fb-nav-item.is-active::after{
  content:"";
  position:absolute;
  left: 22%;
  right: 22%;
  bottom: 6px;
  height: 4px;
  border-radius: 4px;
  background: var(--fb-blue);
}

.fb-nav-item:focus,
.fb-nav-item:focus-visible,
.fb-nav-item:active{
  outline: none;
  background: transparent;
}

/* =========================================================
   MORE OVERLAY
   ========================================================= */

.fb-more-overlay{
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
}

.fb-more-overlay.is-open{ display:block; }

.fb-more-overlay__backdrop{
  position:absolute;
  inset:0;
  background: rgba(15,23,42,0.55);
}

.fb-more-overlay__sheet{
  position:absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  border-top: 1px solid var(--fb-border);
  padding: 14px 14px calc(14px + var(--fb-safe-bottom));
  max-height: 86vh;
  overflow:auto;
}

.fb-sheet-header{
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding-bottom: 10px;
}

.fb-sheet-title{
  font-size: 14px;
  font-weight: 700;
  color: var(--fb-text);
  font-family: Roboto, Arial, sans-serif;
}

.fb-close-btn {
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  color: var(--fb-text);
  font-family: Roboto, Arial, sans-serif;
}
.fb-close-btn:active,
.fb-close-btn:focus {
  outline: none;
  box-shadow: none;
  background: none;
  -webkit-tap-highlight-color: transparent;
}
.fb-close-btn:hover {
  opacity: 0.7;
}

/* =========================================================
   MORE MENU LIST
   ========================================================= */

.fb-more-list{
  list-style:none;
  margin:0;
  padding: 8px 0 0;
}

.fb-more-list li + li{
  margin-top: 2px;
}

.fb-more-list a{
  position: relative;
  display:flex;
  align-items:center;
  gap: 12px;
  padding: 14px 14px;
  min-height: 52px;
  border-radius: 14px;
  color: var(--fb-text);
  text-decoration:none;
  font-family: Roboto, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.fb-more-list a:hover{
  background: var(--fb-hover);
}

.fb-more-list a:active{
  background: var(--fb-active-bg);
}

.fb-more-list a.is-active{
  background: var(--fb-active-bg);
  font-weight: 600;
}

.fb-more-list a.is-active::before{
  content:"";
  position:absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 4px;
  border-radius: 4px;
  background: var(--fb-blue);
}

.fb-more-list .fb-mi{
  width: 22px;
  display:inline-flex;
  justify-content:center;
  flex: 0 0 22px;
}

.fb-more-list .fb-ml{
  display:inline-block;
}

/* Utility: lock scroll */
.fb-lock-scroll{
  overflow:hidden;
  touch-action:none;
}
/* =========================================================
   MODULE HEADER + INFO TOGGLE PANEL
   ========================================================= */

/* This class is added to the Ontraport row using "Custom block classes (advanced)" */
/* Keep the row normal. Do not flex the Ontraport row itself. */
.fb-module-header-row{
  display:block;
}

/* Helps avoid weird overflow when headline text is long */
.fb-module-header-row > *{
  min-width:0;
}
.fb-header-actions{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:10px;
}

/* Info button (sits far right in the module header row) */
.fb-info-toggle{
  appearance:none;
  -webkit-appearance:none;
  border: 1px solid var(--fb-border, #e6eaf2);
  background:#fff;
  border-radius: 999px;
  padding: 10px 14px;
  cursor:pointer;
  font-size: 14px;
  line-height: 1;
  color: var(--fb-text, #111827);
  font-family: Roboto, Arial, sans-serif;
  white-space: nowrap;
}

.fb-info-toggle:hover{
  opacity:0.85;
}

.fb-info-toggle:active,
.fb-info-toggle:focus{
  outline:none;
  box-shadow:none;
  -webkit-tap-highlight-color: transparent;
}

/* =========================================================
   INFO ROW – SMOOTH SLIDE (no white flash)
   ========================================================= */

.fb-info-row{
  background: transparent;
  overflow: hidden;

  transition:
    transform 220ms ease,
    opacity 180ms ease;

  transform: translateX(0);
  opacity: 1;
  will-change: transform, opacity;
}

/* Hide: slide LEFT + fade out */
.fb-info-row.is-collapsed{
  transform: translateX(-16px);
  opacity: 0;

  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  border: 0 !important;

  pointer-events: none;
}

/* When hidden, set starting position to the RIGHT so it slides in from right */
.fb-info-row.fb-hidden{
  transform: translateX(16px);
  opacity: 0;
}

/* After animation, fully remove from layout (no gap) */
.fb-info-row.is-collapsed.fb-hidden{
  display: none !important;
}
/* Header actions: keep items on one line and push them to the far right */
.fb-header-actions{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:10px;
  flex-wrap:nowrap;
}

/* Prevent the Coming Soon pill from getting squeezed into vertical letters */
.fb-header-actions *{
  white-space: nowrap;
}
/* Info toggle: force consistent styling even when focused/active */
.fb-info-toggle,
.fb-info-toggle:hover,
.fb-info-toggle:active,
.fb-info-toggle:focus,
.fb-info-toggle:focus-visible{
  background:#fff !important;
  border:1px solid var(--fb-border, #e6eaf2) !important;
  color: var(--fb-text, #111827) !important;
  box-shadow:none !important;
  outline:none !important;
  -webkit-tap-highlight-color: transparent;
}
/* =========================================================
   INFO TOGGLE BUTTON – QUIET / NON-INTRUSIVE
   ========================================================= */

.fb-info-toggle{
  /* Accent colour is for ICON ONLY */
  --btn-accent: var(--fb-text, #111827);

  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 14px;
  border-radius:999px;

  background:#fff !important;
  border:1px solid #E3E6EA !important; /* always neutral */
  color: var(--fb-text, #111827) !important;

  font-size:14px;
  line-height:1;
  font-family: Roboto, Arial, sans-serif;
  cursor:pointer;
  white-space: nowrap;
}

/* No attention-grabbing hover/focus states */
.fb-info-toggle:hover,
.fb-info-toggle:active,
.fb-info-toggle:focus,
.fb-info-toggle:focus-visible{
  background:#fff !important;
  border-color:#E3E6EA !important;
  color: var(--fb-text, #111827) !important;
  box-shadow:none !important;
  outline:none !important;
  -webkit-tap-highlight-color: transparent;
}

/* Icon container */
.fb-info-toggle__icon{
  width:16px;
  height:16px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

/* SVG sizing */
.fb-info-toggle__icon svg{
  width:16px;
  height:16px;
  display:block;
}

/* SVG colour driven ONLY by accent */
.fb-info-toggle__icon svg path,
.fb-info-toggle__icon svg rect,
.fb-info-toggle__icon svg circle,
.fb-info-toggle__icon svg line{
  stroke: var(--btn-accent) !important;
}

/* ---------------------------------------------------------
   Variants – icon colour only
   --------------------------------------------------------- */

.fb-info-toggle[data-variant="coming-soon"]{
  --btn-accent:#FDD835; /* yellow */
}

.fb-info-toggle[data-variant="locked"]{
  --btn-accent:#EF4444; /* red */
}

.fb-info-toggle[data-variant="instructions"]{
  --btn-accent:#3B82F6; /* blue */
}
/* Rotate icon when panel is open */
.fb-info-toggle[aria-expanded="true"] .fb-info-toggle__icon{
  transform: rotate(0deg);
}

.fb-info-toggle[aria-expanded="false"] .fb-info-toggle__icon{
  transform: rotate(-20deg);
}

.fb-info-toggle__icon{
  transition: transform 180ms ease;
}
/* =========================================================
   TOP BAR BADGE — EARLY ACCESS
   ========================================================= */

.fb-top-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding: 6px 10px;
  border-radius: 999px;

  background:#fff;
  border:1px solid #E3E6EA;
  color: var(--fb-text, #111827);

  font-family: Roboto, Arial, sans-serif;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.fb-top-badge__dot{
  width:8px;
  height:8px;
  border-radius:999px;
  background:#FDD835; /* matches your coming soon yellow */
}

/* Slot on the right side of the top bar */
.fb-topbar-right{
  margin-left:auto;
  margin-right: 14px;
  padding-left: 12px;
  display:flex;
  align-items:center;
  gap:10px;
}

/* If the top bar container is flex, this helps the badge align nicely */
.fb-topbar{
  display:flex;
  align-items:center;
}
#fb-topbar .fb-top-badge{
  align-self: center;
  margin-top: 0;
}
/* Ensure the title row is vertically centered */
#fb-topbar .fb-topbar-inner{
  display: flex;
  align-items: center;
  gap: 12px;
}
/* ---------------------------------------------------------
   Early Access tooltip
   --------------------------------------------------------- */

.fb-top-badge{
  position: relative;
}

/* Tooltip */
.fb-top-badge__tooltip{
  position: absolute;
  top: calc(100% + 8px);
  right: 0;

  min-width: 220px;
  max-width: 240px;
  padding: 10px 12px;

  background: #fff;
  border: 1px solid var(--fb-border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);

  font-size: 12px;
  line-height: 1.4;
  color: var(--fb-text);

  box-sizing: border-box;
  white-space: normal;
  overflow-wrap: break-word;
  word-wrap: break-word;

  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;

  transition: opacity 140ms ease, transform 140ms ease;
  z-index: 10001;
}

/* Tooltip title */
.fb-top-badge__tooltip strong{
  display:block;
  margin-bottom: 4px;
  font-weight: 600;
}

/* Show on hover or focus */
.fb-top-badge:hover .fb-top-badge__tooltip,
.fb-top-badge:focus-within .fb-top-badge__tooltip{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
/* Hide empty dynamic values */
.cf-value:empty {
  display: none;
}
/* =========================================================
   Toast (premium, subtle)
   ========================================================= */
.fb-toast{
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  pointer-events: none;

  background: #111;
  color: #fff;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.3;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);

  transition: opacity .18s ease, transform .18s ease;
  z-index: 9999;
}

.fb-toast.is-showing{
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* =========================================================
   Sparkle burst (anchors to .fb-card when .is-celebrating added)
   ========================================================= */
@keyframes fbSparklePop{
  0%   { transform: scale(.7); opacity: 0; filter: blur(1px); }
  25%  { opacity: 1; filter: blur(0); }
  100% { transform: scale(1.2); opacity: 0; }
}

.fb-card{
  position: relative;
}

.fb-card.is-celebrating::after{
  content: "";
  position: absolute;
  top: 14px;
  right: 14px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  box-shadow:
    0 -14px 0 0 rgba(255,255,255,.95),
    10px -10px 0 0 rgba(255,255,255,.75),
    14px 0 0 0 rgba(255,255,255,.85),
    10px 10px 0 0 rgba(255,255,255,.65),
    0 14px 0 0 rgba(255,255,255,.75),
    -10px 10px 0 0 rgba(255,255,255,.6),
    -14px 0 0 0 rgba(255,255,255,.8),
    -10px -10px 0 0 rgba(255,255,255,.7);
  animation: fbSparklePop .65s ease-out 1;
  pointer-events: none;
}
body.fb-update-modal{
  background: rgba(0,0,0,.35);
}

body.fb-update-modal #fb-content{
  animation: fbSlideUp .22s ease both;
}

@keyframes fbSlideUp{
  from { transform: translateY(18px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
/* ======================================
   Metric Component – Layout & Typography
   ====================================== */

.fb-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.fb-metric-value {
  display: block;
  width: 100%;
  font-size: 41px;
  line-height: 45px;
  font-weight: 700;
  margin: 0;
}

/* ======================================
   Metric Colour States (force override)
   ====================================== */

.fb-metric .fb-metric-value.is-green { color: #4caf50 !important; }
.fb-metric .fb-metric-value.is-amber { color: #fbc02d !important; }
.fb-metric .fb-metric-value.is-red   { color: #d50000 !important; }

/* ======================================
   Message text
   ====================================== */

.fb-metric-message {
  margin-top: 4px;
  font-size: 0.85rem;
  color: #666;
  text-align: center;
}

.cf-divider {
  width: 100%;
  height: 1px;
  background: #e6eaf2;
  margin: 2px 0;
}
.cf-action {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
@media (max-width: 767px) {
  .cf-action a {
    padding: 10px 14px;
    border-radius: 12px;
    text-align: center;
  }
}
.cf-remove {
  color: #b42318;
}
.fb-chart-card{
  border: 1px solid #eef1f6;
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
  margin: 8px 0 18px;
}
.fb-chart-head{
  display:flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 10px;
}
.fb-chart-title{ margin:0; font-size: 15px; line-height: 1.2; }
.fb-chart-sub{ font-size: 12px; color: #6b7280; white-space: nowrap; }
.fb-chart-wrap{ position: relative; height: 240px; }
.fb-chart-empty{ font-size: 13px; color: #6b7280; padding-top: 8px; }








