/* self-hosted fonts -- no external request, served from Cloudflare CDN */
@font-face {
  font-family: "NerdSymbols";
  src: url("./fonts/NerdSymbols.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  /* only fetched when a page actually contains these glyphs */
  unicode-range: U+F07B, U+F254;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("./fonts/JetBrainsMono.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("./fonts/JetBrainsMono-Italic.woff2") format("woff2");
  font-weight: 100 800;
  font-style: italic;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html,
body {
  height: 100%;
}

body {
  background: var(--e-bg-dark);
  color: var(--text);
  font-family: "JetBrains Mono", "NerdSymbols", monospace;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 16px;
}

/* centered floating window -- body shows the "desktop" behind it */
.editor {
  width: 100%;
  max-width: 980px;
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border-radius: 10px;
  border: 1px solid var(--e-green);
  /* shadow matches hyprland: range=8 render_power=4 (tight, focused falloff) */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

/* prompt-chrome wraps all 3 OMP-style prompt lines */
.prompt-chrome {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

/* line 1: powerline nav (left) + status pills (right) */
.prompt-l1 {
  height: 36px;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
}

.powerline-nav {
  display: flex;
  align-items: stretch;
}

.nav-seg {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0 28px 0 16px;
  font-size: 0.78rem;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
  --seg-bg: var(--bg-elevated);
  background: var(--seg-bg);
  color: var(--text-muted);
  transition: color 0.15s;
}

/* ::after creates the right-pointing arrow in the segment's own color */
.nav-seg::after {
  content: "";
  position: absolute;
  right: -12px;
  top: 0;
  width: 0;
  height: 0;
  border-top: 18px solid transparent;
  border-bottom: 18px solid transparent;
  border-left: 12px solid var(--seg-bg);
}

/* extra left padding so text clears the previous segment's arrow */
.nav-seg + .nav-seg {
  padding-left: 24px;
}

/* decreasing z-index ensures each segment's arrow paints over the next segment's background */
.powerline-nav .nav-seg:nth-child(1) {
  z-index: 15;
}
.powerline-nav .nav-seg:nth-child(2) {
  z-index: 14;
}
.powerline-nav .nav-seg:nth-child(3) {
  z-index: 13;
}
.powerline-nav .nav-seg:nth-child(4) {
  z-index: 12;
}

.nav-seg-logo {
  --seg-bg: var(--bg-elevated);
  color: var(--e-cyan);
  font-weight: 700;
}

.nav-seg.active {
  --seg-bg: var(--e-green);
  background: var(--seg-bg);
  color: var(--bg-surface);
  font-weight: 500;
}

.nav-seg:not(.nav-seg-logo):not(.active):hover {
  color: var(--text);
}

.prompt-right {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-right: 14px;
}

.rpill {
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.rpill-green {
  background: var(--e-green);
  color: var(--e-bg-dark);
}
.rpill-cyan {
  background: var(--e-cyan);
  color: var(--e-bg-dark);
}

/* lines 2 & 3: ╭─ and ╰─ -- line-height: 1 so box-drawing chars touch across lines */
.prompt-l2,
.prompt-l3 {
  padding: 0 16px;
  font-size: 0.8rem;
  line-height: 1;
  white-space: nowrap;
}

.prompt-l2 {
  padding-top: 5px;
}
.prompt-l3 {
  padding-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.p-frame {
  color: var(--text-subtle);
}
.p-time {
  color: var(--e-yellow);
}
.p-sep {
  color: var(--text-subtle);
}
.p-date {
  color: var(--e-purple);
}
.p-icon {
  color: var(--e-cyan);
  font-size: 1rem;
  margin-right: 2px;
}
.p-cwd {
  color: var(--e-cyan);
}
/* larger font-weight so ❯ reads clearly at small size */
.p-arrow {
  color: var(--e-green);
  font-weight: 700;
  margin-left: 4px;
}

.content {
  flex: 1;
  padding: 40px;
}

.content-inner {
  max-width: 860px;
  margin: 0 auto;
}

.panel {
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 24px;
  margin-bottom: 24px;
  position: relative;
}

/* floated label sits in the border top, background must match content area */
.panel-label {
  position: absolute;
  top: -0.65em;
  left: 14px;
  padding: 0 8px;
  background: var(--bg);
  color: var(--e-cyan);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.page-header {
  margin-bottom: 32px;
}

.page-header h1 {
  font-size: 1.4rem;
  color: var(--e-green);
  margin-bottom: 6px;
}

.prompt {
  color: var(--text-subtle);
  font-size: 0.85rem;
}
.prompt .cmd {
  color: var(--e-cyan);
}

p {
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 0.9rem;
  margin-bottom: 12px;
}
p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--link);
  text-decoration: none;
}
a:hover {
  color: var(--link-hover);
}

.lf-icon {
  color: var(--e-cyan);
  font-size: 1rem;
}
.lf-time {
  color: var(--e-cyan);
  font-size: 0.72rem;
}
