/* Small additions to Satorii's stylesheet (static/theme/style.css, unchanged). */

/* Archived comments are shown flat, as Satorii did; replies indent a little. */
#comments li.comment { margin-left: calc(var(--depth, 0) * 2em); }

/* Captioned images (WordPress's [caption]). */
.entry-content figure { margin: 1em 0; text-align: center; }
.entry-content figcaption { font-size: 0.9em; }

/* Search (Pagefind): the overlay opened from the sidebar, and the /search/ page. Pagefind's UI is
   recoloured with Satorii's palette through its --pagefind-ui-* variables. */
#search-ui,
.search-dialog {
  --pagefind-ui-scale: 0.8;
  --pagefind-ui-primary: #06c;
  --pagefind-ui-text: #555;
  --pagefind-ui-background: #fff;
  --pagefind-ui-border: #e1e0d0;
  --pagefind-ui-tag: #eeeedc;
  --pagefind-ui-border-width: 1px;
  --pagefind-ui-border-radius: 3px;
  --pagefind-ui-font: 'Liberation Sans', FreeSans, Helvetica, Arial, sans-serif;
}
#search-ui { margin: 1em 0 2em; }

.search-dialog {
  width: min(42em, calc(100% - 2em));
  max-height: 80vh;
  margin: 8vh auto auto;
  padding: 0.5em 1.5em 1.5em;
  border: 1px solid #e1e0d0;
  border-top: 4px solid #e1e0d0;
  background: #fff;
  color: #555;
  box-shadow: 0 0.5em 2em rgba(51, 51, 0, 0.25);
}
.search-dialog::backdrop { background: rgba(238, 238, 220, 0.75); }
.search-head { display: flex; align-items: center; justify-content: space-between; }
.search-head h3 { margin: 0.5em 0; color: #330; font-size: 100%; font-weight: bold; }
.search-close { border: 0; background: none; color: #7a7a71; font-size: 1.5em; line-height: 1; cursor: pointer; }
.search-close:hover { color: #f30; }

/* Results read like Satorii's archive listings. */
#search-ui .pagefind-ui__result-link,
.search-dialog .pagefind-ui__result-link { color: #000; font-weight: normal; }
#search-ui .pagefind-ui__result-link:hover,
.search-dialog .pagefind-ui__result-link:hover { color: #f30; }
#search-ui .pagefind-ui__result-excerpt,
.search-dialog .pagefind-ui__result-excerpt { color: #555; }
#search-ui mark,
.search-dialog mark { background: #f7f4ee; color: #963; padding: 0 0.1em; }
/* Pagefind's stylesheet loads after this one, so these need the ids to win. */
#search-ui .pagefind-ui__search-input,
#search-dialog .pagefind-ui__search-input { font-weight: normal; color: #333; font-family: var(--pagefind-ui-font); }
#search-ui .pagefind-ui__search-clear,
#search-dialog .pagefind-ui__search-clear { border: 0; background: none; color: #7a7a71; font-family: var(--pagefind-ui-font); cursor: pointer; }
#search-ui .pagefind-ui__search-clear:hover,
#search-dialog .pagefind-ui__search-clear:hover { color: #f30; }

/* The archives page: months as headings, each poem with its day of the month. */
.archives h3 {
  margin: 1.6em 0 0.4em;
  padding-bottom: 0.2em;
  border-bottom: 1px solid #ebeade;
  color: #000;
  font-size: 116%;
  font-weight: normal;
}
.archives h3:first-child { margin-top: 0; }
.archives .archive-list { margin: 0; padding: 0; }
.archives .archive-list li { list-style: none; margin: 0.15em 0; }
.archives .archive-day {
  display: inline-block;
  width: 2em;
  color: #7a7a71;
  font-size: 85%;
  text-align: right;
  margin-right: 0.6em;
}
.archives .archive-list a { text-decoration: none; }
/* Arriving from a sidebar month link (/archives/#2011-03): show which month. */
.archives h3:target { color: #963; }
