/* SF Pro for the status bar on every device (subset to digits, ".", ":",
   "%", 5G/4G/LTE; ~3KB each). Only SF Pro Display ships in the repo and it has
   no upright Semibold, so 600 maps to Medium. */
@font-face{font-family:"Yappy SF Status";src:url("/assets/fonts/sf-pro/yappy-status-regular.woff2") format("woff2");font-weight:400;font-style:normal;font-display:block}
@font-face{font-family:"Yappy SF Status";src:url("/assets/fonts/sf-pro/yappy-status-medium.woff2") format("woff2");font-weight:500 600;font-style:normal;font-display:block}
@font-face{font-family:"Yappy SF Status";src:url("/assets/fonts/sf-pro/yappy-status-bold.woff2") format("woff2");font-weight:700;font-style:normal;font-display:block}

/* Yappy canonical iOS status bar v89
   One live geometry for WhatsApp, iMessage, Instagram and X, reused by capture/export.
   The OS chrome does not inherit app typography. */
:root{
  --yappy-ios-status-h:50px;
  --yappy-ios-status-left:28px;
  --yappy-ios-status-right:26px;
  --yappy-ios-status-clock:17.6px;
  --yappy-ios-status-network:14.2px;
  --yappy-ios-status-battery:11px;
  --yappy-ios-status-gap:7px;
  --yappy-ios-status-axis:20px;
}

/* Canonical frame. App-specific styles may still choose the background/text color,
   but not the status-bar geometry or typography. */
#phone-screen>.statusbar,
.imx-root .imx-statusbar{
  height:var(--status-h,var(--yappy-ios-status-h))!important;
  min-height:var(--status-h,var(--yappy-ios-status-h))!important;
  /* 2px top padding puts the cluster on the native axis (~26pt). */
  padding:2px var(--yappy-ios-status-right) 0 var(--yappy-ios-status-left)!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  font-family:"Yappy SF Status",-apple-system,BlinkMacSystemFont,"SF Pro Text","SF Pro Display","Helvetica Neue",Arial,sans-serif!important;
  font-size:var(--yappy-ios-status-clock)!important;
  font-weight:600!important;
  line-height:1!important;
  letter-spacing:0!important;
}
.imx-root .imx-statusbar{
  height:var(--imx-status-h,var(--yappy-ios-status-h))!important;
  min-height:var(--imx-status-h,var(--yappy-ios-status-h))!important;
}

/* Editor preview uses the same optical metrics. */
.statusbar-editor-bar{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  font-family:"Yappy SF Status",-apple-system,BlinkMacSystemFont,"SF Pro Text","SF Pro Display","Helvetica Neue",Arial,sans-serif!important;
  font-size:var(--yappy-ios-status-clock)!important;
  font-weight:600!important;
  line-height:1!important;
}

/* Put the left and right clusters on one shared vertical axis. */
#phone-screen>.statusbar .sb-time,
#phone-screen>.statusbar .sb-icons,
.imx-root .imx-statusbar .sb-time,
.imx-root .imx-statusbar .sb-icons,
.statusbar-editor-bar .sb-time,
.statusbar-editor-bar .sb-icons{
  height:var(--yappy-ios-status-axis)!important;
  min-height:var(--yappy-ios-status-axis)!important;
  display:inline-flex!important;
  align-items:center!important;
  align-self:center!important;
  line-height:1!important;
  transform:none!important;
}
#phone-screen>.statusbar .sb-time,
.imx-root .imx-statusbar .sb-time,
.statusbar-editor-bar .sb-time{
  gap:5px!important;
}
#phone-screen>.statusbar .sb-icons,
.imx-root .imx-statusbar .sb-icons,
.statusbar-editor-bar .sb-icons{
  gap:var(--yappy-ios-status-gap)!important;
}

/* Clock is the primary text size in the bar. */
#phone-screen>.statusbar .sb-clock,
.imx-root .imx-statusbar .sb-clock,
.statusbar-editor-bar .sb-clock{
  font-family:inherit!important;
  font-size:var(--yappy-ios-status-clock)!important;
  line-height:var(--yappy-ios-status-axis)!important;
  font-weight:600!important;
  font-variant-numeric:tabular-nums!important;
  font-feature-settings:"tnum" 1!important;
  letter-spacing:-.2px!important;
  transform:none!important;
}

/* Focus glyph: icon geometry, not app typography. */
.sb-focus-indicator{
  width:18px!important;
  height:18px!important;
  flex:0 0 18px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  align-self:center!important;
  transform:none!important;
}
.sb-focus-svg,
.sb-focus-svg-v71{
  width:100%!important;
  height:100%!important;
  display:block!important;
  overflow:visible!important;
}
.sb-focus-indicator[title="Sleep"]{
  width:20px!important;
  flex-basis:20px!important;
}
.sb-focus-indicator[title="Work"]{
  width:15px!important;
  height:16.5px!important;
  flex-basis:15px!important;
}
.sb-focus-indicator[title="Reduce Interruptions"]{
  width:20px!important;
  height:20px!important;
  flex-basis:20px!important;
}

/* Cellular cluster. */
.sb-cellular{
  width:19.2px!important;
  height:12.5px!important;
  flex:0 0 19.2px!important;
  display:inline-flex!important;
  align-items:flex-end!important;
  align-self:center!important;
  justify-content:flex-start!important;
  gap:2px!important;
  transform:none!important;
}
.sb-cellular i{
  width:3.3px!important;
  border-radius:1.2px!important;
}
.sb-cellular i:nth-child(1){height:37.6%!important}
.sb-cellular i:nth-child(2){height:58.4%!important}
.sb-cellular i:nth-child(3){height:79.2%!important}
.sb-cellular i:nth-child(4){height:100%!important}

/* Airplane and Wi-Fi keep a fixed optical footprint across every app. */
.sb-airplane{
  width:22px!important;
  height:19px!important;
  flex:0 0 22px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  align-self:center!important;
  transform:none!important;
}
.sb-airplane svg{
  width:100%!important;
  height:100%!important;
  display:block!important;
  overflow:visible!important;
  transform:none!important;
}
.sb-wifi{
  width:21.5px!important;
  height:16.5px!important;
  flex:0 0 21.5px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  align-self:center!important;
  transform:none!important;
}
.sb-wifi svg{
  width:100%!important;
  height:100%!important;
  display:block!important;
  overflow:visible!important;
  transform:none!important;
}

/* 4G/5G is intentionally smaller than the clock, as in iOS. */
.sb-network-type{
  min-width:23px!important;
  height:16px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  align-self:center!important;
  font-family:inherit!important;
  font-size:var(--yappy-ios-status-network)!important;
  line-height:16px!important;
  font-weight:600!important;
  letter-spacing:-.2px!important;
  margin-left:0!important;
  transform:none!important;
}

/* Battery percentage is intentionally the smallest text because it sits inside
   the battery body. Its container, however, shares the same vertical axis. */
.sb-battery{
  height:16px!important;
  display:inline-flex!important;
  align-items:center!important;
  align-self:center!important;
  vertical-align:middle!important;
  flex:0 0 auto!important;
  transform:none!important;
}
.sb-battery-body{
  width:28px!important;
  height:14.5px!important;
  border-radius:4.2px!important;
  position:relative!important;
  display:block!important;
  align-self:center!important;
  transform:none!important;
}
.sb-battery-fill{
  border-radius:4.2px 2.2px 2.2px 4.2px!important;
}
.sb-battery-number{
  position:absolute!important;
  inset:0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  font-family:"Yappy SF Status",-apple-system,BlinkMacSystemFont,"SF Pro Text","Helvetica Neue",Arial,sans-serif!important;
  font-size:var(--yappy-ios-status-battery)!important;
  line-height:1!important;
  font-weight:700!important;
  font-variant-numeric:proportional-nums!important;
  font-feature-settings:"pnum" 1,"tnum" 0!important;
  letter-spacing:-.55px!important;
  text-align:center!important;
  transform:none!important;
}
.sb-battery-tip{
  width:1.6px!important;
  height:5.5px!important;
  margin-left:.8px!important;
  border-radius:0 1.7px 1.7px 0!important;
  align-self:center!important;
  transform:none!important;
}

/* Percentage-off mode keeps its classic battery proportions. */
html[data-yappy-battery-percent="off"] .sb-battery-body{
  width:25px!important;
  height:12.5px!important;
  border-radius:3.2px!important;
}
html[data-yappy-battery-percent="off"] .sb-battery-number{
  display:none!important;
}

/* Old inline fallback SVGs shown before the statusbar runtime hydrates remain centered. */
#phone-screen>.statusbar .sb-icons>svg,
.imx-root .imx-statusbar .sb-icons>svg,
.statusbar-editor-bar .sb-icons>svg{
  display:block!important;
  align-self:center!important;
  transform:none!important;
}

/* Very narrow phones only tighten the edge insets. Text/icon sizes stay fixed,
   preventing the same scene from looking like a different status bar. */
@media(max-width:350px){
  :root{
    --yappy-ios-status-left:25px;
    --yappy-ios-status-right:18px;
    --yappy-ios-status-gap:5.5px;
  }
}


/* v98 — fixed battery optical cell.
   Keep body, percentage and cap in one deterministic 20px status-axis cell so
   live UI and html2canvas use the same baseline with no export-only nudges. */
#phone-screen>.statusbar .sb-battery,
.imx-root .imx-statusbar .sb-battery,
.statusbar-editor-bar .sb-battery{
  width:30.4px!important;
  min-width:30.4px!important;
  height:20px!important;
  min-height:20px!important;
  display:grid!important;
  grid-template-columns:28px 1.6px!important;
  column-gap:.8px!important;
  align-items:center!important;
  justify-items:start!important;
  align-self:center!important;
  margin:0!important;
  padding:0!important;
  position:relative!important;
  top:0!important;
  bottom:auto!important;
  vertical-align:middle!important;
  transform:none!important;
}
#phone-screen>.statusbar .sb-battery-body,
.imx-root .imx-statusbar .sb-battery-body,
.statusbar-editor-bar .sb-battery-body{
  grid-column:1!important;
  width:28px!important;
  min-width:28px!important;
  max-width:28px!important;
  height:14px!important;
  min-height:14px!important;
  max-height:14px!important;
  margin:0!important;
  padding:0!important;
  align-self:center!important;
  border-radius:4px!important;
  transform:none!important;
}
#phone-screen>.statusbar .sb-battery-number,
.imx-root .imx-statusbar .sb-battery-number,
.statusbar-editor-bar .sb-battery-number{
  inset:0!important;
  width:28px!important;
  height:14px!important;
  display:block!important;
  margin:0!important;
  padding:0!important;
  font-size:11px!important;
  line-height:14px!important;
  font-weight:700!important;
  letter-spacing:-.5px!important;
  text-align:center!important;
  white-space:nowrap!important;
  transform:none!important;
}
#phone-screen>.statusbar .sb-battery-tip,
.imx-root .imx-statusbar .sb-battery-tip,
.statusbar-editor-bar .sb-battery-tip{
  grid-column:2!important;
  width:1.6px!important;
  min-width:1.6px!important;
  max-width:1.6px!important;
  height:5.5px!important;
  margin:0!important;
  padding:0!important;
  align-self:center!important;
  justify-self:start!important;
  position:static!important;
  transform:none!important;
}


/* v100 — vector battery: one SVG owns body, percentage and cap.
   This removes HTML text-baseline drift between the live browser and html2canvas. */
#phone-screen>.statusbar .sb-battery,
.imx-root .imx-statusbar .sb-battery,
.statusbar-editor-bar .sb-battery{
  width:29px!important;
  min-width:29px!important;
  max-width:29px!important;
  height:20px!important;
  min-height:20px!important;
  max-height:20px!important;
  display:grid!important;
  place-items:center!important;
  margin:0!important;
  padding:0!important;
  overflow:visible!important;
  transform:none!important;
}
.sb-battery-vector{
  width:29px!important;
  height:16px!important;
  display:block!important;
  overflow:visible!important;
  color:inherit!important;
}
.sb-battery-track{
  fill:rgba(127,127,127,.38);
  stroke:none;
}
.sb-battery-charge{
  fill:currentColor;
}
.sb-battery-cap{
  fill:currentColor;
  opacity:.38;
}
.sb-battery-vector-number{
  font-family:"Yappy SF Status",-apple-system,BlinkMacSystemFont,"SF Pro Text","Helvetica Neue",Arial,sans-serif!important;
  font-size:13.2px!important;
  font-weight:700!important;
  letter-spacing:-.55px!important;
  font-variant-numeric:proportional-nums!important;
  font-feature-settings:"pnum" 1,"tnum" 0!important;
  paint-order:normal;
  pointer-events:none;
}

:root[data-theme="light"] .sb-battery:not(.is-low-power):not(.is-critical) .sb-battery-track{fill:rgba(0,0,0,.25)!important}
:root[data-theme="light"] .sb-battery:not(.is-low-power):not(.is-critical) .sb-battery-charge{fill:#111!important}
:root[data-theme="light"] .sb-battery:not(.is-low-power):not(.is-critical) .sb-battery-vector-number{fill:#fff!important}
:root[data-theme="light"] .sb-battery:not(.is-low-power):not(.is-critical) .sb-battery-cap{fill:#111!important}

:root[data-theme="dark"] .sb-battery:not(.is-low-power):not(.is-critical) .sb-battery-track{fill:rgba(255,255,255,.58)!important}
:root[data-theme="dark"] .sb-battery:not(.is-low-power):not(.is-critical) .sb-battery-charge{fill:#f7f7f7!important}
:root[data-theme="dark"] .sb-battery:not(.is-low-power):not(.is-critical) .sb-battery-vector-number{fill:#151515!important}
:root[data-theme="dark"] .sb-battery:not(.is-low-power):not(.is-critical) .sb-battery-cap{fill:#f7f7f7!important}

.sb-battery.is-low-power .sb-battery-track{fill:rgba(0,0,0,.22)!important}
:root[data-theme="dark"] .sb-battery.is-low-power .sb-battery-track{fill:rgba(255,255,255,.62)!important}
.sb-battery.is-low-power .sb-battery-charge{fill:#ffd60a!important}
.sb-battery.is-low-power .sb-battery-vector-number{fill:#000!important}
.sb-battery.is-low-power .sb-battery-cap{fill:#8e8e93!important;opacity:.65!important}

.sb-battery.is-critical .sb-battery-track{fill:rgba(127,127,127,.34)!important}
.sb-battery.is-critical .sb-battery-charge{fill:#ff453a!important}
.sb-battery.is-critical .sb-battery-vector-number{fill:#fff!important}
.sb-battery.is-critical .sb-battery-cap{fill:#8e8e93!important;opacity:.65!important}

/* Percentage-off mode remains a classic outlined battery using the same vector box. */
html[data-yappy-battery-percent="off"] .sb-battery-vector-number{display:none!important}
html[data-yappy-battery-percent="off"] .sb-battery-track{
  fill:transparent!important;
  stroke:currentColor!important;
  stroke-width:1.25!important;
}
html[data-yappy-battery-percent="off"] .sb-battery-charge{
  fill:currentColor!important;
  transform:translate(.5px,.5px) scale(.93,.92);
  transform-origin:1px 2px;
}
html[data-yappy-battery-percent="off"] .sb-battery-cap{
  fill:currentColor!important;
  opacity:.42!important;
}


/* v101 — visibility wins over canonical geometry.
   This file owns the strongest live status-bar geometry, so it must also honor
   the user's off state with equally explicit selectors. */
html.no-statusbar #phone-screen>#statusbar.statusbar,
html[data-yappy-statusbar="off"] #phone-screen>#statusbar.statusbar{
  display:none!important;
  height:0!important;
  min-height:0!important;
  padding:0!important;
  pointer-events:none!important;
}

@media(display-mode:standalone),(display-mode:fullscreen){
  html.no-statusbar #phone-screen>#statusbar.statusbar,
  html[data-yappy-statusbar="off"] #phone-screen>#statusbar.statusbar{
    display:none!important;
    height:0!important;
    min-height:0!important;
    padding:0!important;
    pointer-events:none!important;
  }
}

/* v89.1 — measured against native iOS captures: the clock is centred in the
   left "ear" beside the Dynamic Island (centre ≈64.5pt on a 393pt screen). */
#phone-screen>.statusbar .sb-time,
.imx-root .imx-statusbar .sb-time{
  min-width:73px!important;
  justify-content:center!important;
}

/* v89.2 — native clock digits are ~11% taller than 16px SF at the same
   overall width: larger size with tighter tracking (measured 12.6pt digits). */
#phone-screen>.statusbar .sb-clock,
.imx-root .imx-statusbar .sb-clock,
.statusbar-editor-bar .sb-clock{
  letter-spacing:-.45px!important;
}
