/* Blog, styled as a Win32 newsreader rather than a web page: entry list on
   top, reading pane below, status bar at the foot. Lives in a tab of the
   POCOGuy.com window, so it fills the iframe and does its own scrolling. */

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background-color: transparent;
  color: #000;
  font-family: "Pixelated MS Sans Serif", sans-serif;
  font-size: 11px;
}

.blog-app {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  padding: 6px;
}

.blog-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.blog-head img.icon {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
}

.blog-head .mood {
  margin-left: auto;
  flex: 0 0 auto;
}

/* imood's gif is 48x15 pixel art, smoothed into a smear on a HiDPI screen */
.blog-head .mood img {
  image-rendering: pixelated;
}

/* entry list */
.blog-list {
  flex: 0 0 auto;
  height: 88px;
}

.blog-list table {
  width: 100%;
}

.blog-list th:last-child,
.blog-list td:last-child {
  width: 84px;
}

.blog-list td:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 0;
}

/* reading pane  the sunken border comes from .sunken-panel, but only the
   body inside it scrolls, so the message header stays put */
.blog-reader {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 120px;
  overflow: hidden;
}

.blog-msg-head {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0 8px;
  flex: 0 0 auto;
  padding: 4px 6px;
  background: silver;
  border-bottom: 1px solid grey;
}

.blog-msg-head .k {
  color: #3f3f3f;
}

.blog-msg-head b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.blog-msg-body {
  flex: 1 1 auto;
  overflow: auto;
  padding: 8px 10px;
  line-height: 1.5;
}

.blog-msg-body .post {
  display: none;
}

.blog-msg-body .post.selected {
  display: block;
}

/* photos in a post  float them out of the way of the prose, and let the
   thumbnail open the full-size viewer in a new tab rather than navigating the
   tab this blog is sitting in */
.post-images {
  float: right;
  clear: right;
  width: 124px;
  margin: 2px 0 6px 12px;
  text-align: center;
}

.post-images figure {
  margin: 0 0 8px;
}

.post-images img {
  display: block;
  width: 100%;
  background: #fff;
  border: 1px solid #808080;
  padding: 2px;
  box-sizing: border-box;
}

.post-images a:hover img {
  border-color: #000080;
}

.post-images figcaption {
  margin-top: 2px;
  color: #3f3f3f;
  /* whole pixels: 1.25 of 11px is 13.75, and every wrapped caption pushed the
     next picture in the column a quarter pixel further off the grid */
  line-height: 13px;
}

.blog-msg-body p {
  margin: 0 0 10px;
}

.blog-msg-body p:last-child {
  margin-bottom: 0;
}

/* topic break inside a longer post, drawn as the usual Win32 etched divider */
.blog-msg-body hr {
  height: 0;
  margin: 14px 0;
  border: 0;
  border-top: 1px solid #808080;
  border-bottom: 1px solid #fff;
}

.blog-app .status-bar {
  flex: 0 0 auto;
  margin: 0;
}
