/* Sticky footer styles
-------------------------------------------------- */
html {
  position: relative;
  min-height: 100%;
}
body {
  /* Margin bottom by footer height */
  margin-bottom: 60px;
}
.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  /* Set the fixed height of the footer here */
  height: 60px;
  background-color: #f5f5f5;
}


/* Custom page CSS
-------------------------------------------------- */
/* Not required for template or sticky footer method. */

body > .container {
  padding: 60px 15px 0;
}
.container .text-muted {
  margin: 20px 0;
}

.footer > .container {
  padding-right: 15px;
  padding-left: 15px;
}

code {
  font-size: 80%;
}

/* comments fixup */
.comment {
    border: none;
    padding: 1em;
    margin: 1em;
    background: #f3f3f3;
}
.actions ul {
    margin: inherit;
    padding: inherit;
    height: inherit;
    /* list-style-type: none; */
}

/* limit main content to ~90 chars per line */
#content {
  max-width: 45em;
}

/* limit header as well otherwise logo is out of whack without sidebar */
.navbar-fixed-top .container {
  max-width: 55em;
}

/* try Fira Font, fallback on bootstrap fonts */
body {
    /* https://www.smashingmagazine.com/2015/11/using-system-ui-fonts-practical-guide/ */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
    /* -apple-system, BlinkMacSystemFont = San Fran on Mac
     * Segoe UI = Windows
     * Roboto = Android, Chrome OS
     * Oxygen, Ubuntu, Cantarell = KDE, Ubuntu, Gnome
     * Fira Sans = Firefox OS
     * Droid Sans = Older Android
     * Helvetica Neue = Old mac
     */
}
pre, code {
    font-family: "Fira Mono", Menlo, Monaco, Consolas, "Courier New", "Liberation mono", monospace;
}

/* don't word-wrap PRE blocks so they are scrolled*/
pre {
    -ms-word-wrap: normal;
    word-wrap: normal;
}
pre code {
      white-space: pre;
}
/* no idea why bootstrap makes quotes bigger, not what i want */
blockquote {
    font-size: 14px;
    /* make blockquotes interesting */
    font-style: italic;
}

/* workaround multimarkdown bug:
 * https://github.com/bobtfish/text-multimarkdown/issues/30 */
a.footnote { vertical-align: super; font-size: xx-small; }
div.footnotes { font-size: small; }

/* scale down images so they are centered like the rest of the text */
#content img { max-width: 100%; }

/* format HTML5 captions like ikiwiki's table-based captions
 *
 * those work, but basically need to be entered by hand.
 *
 * https://ikiwiki.info/todo/html5_image_captions/
 */
figure {
    text-align: center;
}
figcaption {
    text-align: center;
    font-size: smaller;
    color: #777;
}

/* right-aligned figures
 *
 * those need a "table" display so that the caption shows up alongside the
 * figured. we also limit the size of the image so that it does not squeeze the
 * text too mucha nd had judicious padding.
 */
figure.align-right {
  float: right;
  padding: 0em 1em;
  display: table;
  max-width: 60%;
}
figure.align-right figcaption {
  display: table-caption;
  caption-side: bottom;
  padding: 0.5em 1em;
}

/* wrap long URLs so that we don't overflow layout
 * this could apply to any element, but we often have to deal with long
 * links so limit to that to avoid unexpected damage */
#content a {
    word-wrap: break-word;
}

/* transparent on top because links disappear behind otherwise */
.navbar-fixed-top { background: none; }
/* .in gets added by bootstrap on pop-up */
.navbar-fixed-top .in { background-color: #f8f8f8; }
/* align drop-down menus to the right */
.navbar-right { text-align: right; }

/* make table scale out to avoid ugly word-wrapping
 * bootstrap should deal with this, but ikiwiki doesn't assign the
 * right style and anyways our width is smaller than necessary
 *
 * pages with tables that should be checked when this is changed:
 *
 * https://anarc.at/blog/2017-10-26-comparison-cryptographic-keycards/
 * https://anarc.at/blog/2018-01-28-large-disk-price-review/
 * https://anarc.at/services/backup/
 * https://anarc.at/services/
 * https://anarc.at/services/dns/registrars/
 * https://anarc.at/services/welcome/
 */
table, table.table { width: 100%; }
table { font-size: inherit; } /* why the heck does chrome override font-size for tables?! */

/* this belongs in ikiwiki's style.css, but that needs the admonition
 * patch to be merged: https://ikiwiki.info/todo/admonitions/ */

/* admonition start */
#content div.caution,
#content div.important,
#content div.note,
#content div.tip,
#content div.warning {
    border: 1pt solid #aaa;
    margin: 1em 3em 1em 3em;
    background-repeat: no-repeat;
    background-position: 8px 8px;
    min-height: 48px; /*48=32+8+8 but doesn't work with IE*/
    padding: 1em 1em 1em 48px;
}
#content div.tip { background-image: url("smileys/admon-tip.png"); }
#content div.note { background-image: url("smileys/admon-note.png"); }
#content div.important { background-image: url("smileys/admon-important.png"); }
#content div.caution { background-image: url("smileys/admon-caution.png"); }
#content div.warning { background-image: url("smileys/admon-warning.png"); }
/* admonition end */
