/* ========== XECUTE — css/01-base-header.css ========== */
/* CSS variables/reset + header bar */

/* ========== XECUTE IDE — STYLE.CSS ========== */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Core palette */
  --bg-primary: #0f1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #1c2128;
  --bg-elevated: #21262d;
  --bg-hover: #30363d;

  --accent: #58a6ff;
  --accent-hover: #79b8ff;
  --accent-green: #3fb950;
  --accent-red: #f85149;
  --accent-orange: #e3b341;
  --accent-purple: #d2a8ff;

  --border: #30363d;
  --border-subtle: #21262d;

  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #484f58;

  --header-h: 48px;
  --tabs-h: 36px;
  --toolbar-h: 34px;
  --footer-h: 44px;
  --statusbar-h: 26px;

  --radius: 6px;
  --shadow: 0 4px 16px rgba(0,0,0,0.4);
}

/* Light mode */
body.light-mode {
  --bg-primary: #f6f8fa;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f0f2f4;
  --bg-elevated: #ffffff;
  --bg-hover: #e8eaed;
  --border: #d0d7de;
  --border-subtle: #e8eaed;
  --text-primary: #1f2328;
  --text-secondary: #57606a;
  --text-muted: #9fa6b0;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  height: 100%;
  overflow: hidden;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 13px;
  background: var(--bg-primary);
  color: var(--text-primary);
}

/* ====== HEADER ====== */
#header {
  display: flex;
  align-items: center;
  height: var(--header-h);
  padding: 0 12px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  gap: 8px;
  flex-shrink: 0;
  position: relative;
  z-index: 50;
}

#header-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 120px;
  flex-shrink: 0; /* never compress the logo area */
}

.logo-mark {
  font-size: 22px;
  line-height: 1;
  filter: drop-shadow(0 0 6px rgba(88,166,255,0.5));
}

.logo-img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(88,166,255,0.45));
  flex-shrink: 0;
}

.logo-text {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
}

#header-center {
  flex: 1;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

#header-right {
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
  margin-left: auto; /* always push to far right regardless of how many buttons are visible */
  flex-shrink: 0;   /* never compress — three-dot must always be reachable */
}

/* Header buttons */
#header-right button,
#header-right .icon-btn {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: background 0.15s, color 0.15s;
}

#header-right button:hover { 
  background: var(--bg-hover); 
  color: var(--text-primary); 
}

#shareBtn { color: var(--accent-green); }
#shareBtn:hover { background: rgba(63,185,80,0.12); }
