
* {
  box-sizing: border-box;
}

body,
html {
  background: #557;
  color: black;
  margin: 0;
}

.pure-g [class*=pure-u],
body {
  font-family: 'Sarabun', sans-serif;
  font-weight: 200;
}


/* tag defaults */

a {
  color: var(--main-dark);
  text-decoration: none;
  font-weight: 400;
}

a:hover {
  text-decoration: underline;
}

b,
optgroup,
strong {
  font-weight: 500;
}

/* common layout */

.flex-spacer {
  flex-grow: 1;
}

.grid-center>div {
  margin: auto;
}

.left {
  text-align: left;
}

.right {
  text-align: right;
}

.icon-text {
  display: inline-block;
  vertical-align: bottom;
  padding-left: 0.5em;
}

.light {
  font-weight: 300;
  font-size: 0.8em;
  margin: 0.5em 0;
}

.full-width {
  width: 100%;
}


.pure-form select {
  /* text looks cropped here for some reason with .5em .6em */
  padding: .3em .6em;
}

.content-wrapper>div.pure-g {
  width: 100%;
}

.clear {
  clear: both;
}



h2 {
  font-size: 2em;
  text-align: center;
  font-weight: normal;
}

h3 {
  padding-left: 2em;
  font-weight: 300;
  font-size: 1.6em;
  margin: 0.5em 0;
}

.block h1 {
  margin: 0.25em 0 0.5em 0;
  padding: .5em 1em .5em;
  margin: 0;
  font-size: 1.2em;
  font-weight: 500;
  border-bottom: 1px solid #888;
}

.block h2 {
  margin: 0.25em 0 0.5em 0;
  padding: .5em 1em .5em;
  margin: 0;
  font-size: 1.3em;
  font-weight: 500;
  border-bottom: 1px solid #888;
}

.block h3 {
  margin: 0.25em 0 0.5em 0;
  padding: .5em 1em .5em;
  margin: 0;
  font-size: 1.4em;
  font-weight: 500;
  border-bottom: 1px solid #888;
}

.block h4 {
  padding: .5em 1em .5em;
  border-bottom: 1px solid #888;
  margin: 0;
  font-weight: 500;
}

.block h5 {
  padding: .5em 0 .15em;
  border-bottom: 1px solid #888;
  margin: 0.5em 0 0 0;
  font-size: 1.1em;
  font-weight: 500;
  display: inline-block;
}

.code-editor {
  font-family: 'Nanum Gothic Coding', monospace;
  font-size: 0.8em;
}

.task-id,
pre,
.pgp-key-id,
.backup-token,
.code,
code,
.compact-monospace {
  font-family: 'Nanum Gothic Coding', monospace;
  /*padding: 0.1em 0.25em;*/
}

.host-id {
  font-size: 0.9em;
}

pre {
  font-size: 0.9em;
  overflow: auto;
  word-break: normal !important;
  word-wrap: normal !important;
  white-space: pre !important;
  display: inline-grid;
  margin: 0.5em 0;
}

.code-block {
  display: inline-block;
  font-size: 1em;
  border: 1px dotted #999;
  padding: .5em;
}

.task-id,
.pgp-key-id,
.backup-token,
.server-version {
  padding: 0.23em 0.33em 0.2em;
  border: 1px dotted rgba(0, 0, 0, 0.75);
  background-color: rgba(0, 0, 0, 0.025);
  white-space: pre;
  display: inline-block;

  /* when embedded in a <p> */
  vertical-align: text-top;
}

.compact-monospace {
  padding: 0.03em 0.33em 0em;
  border: 1px dotted rgba(0, 0, 0, 0.75);
  background-color: rgba(0, 0, 0, 0.025);
  white-space: pre;
  display: inline-block;

  /* when embedded in a <p> */
  vertical-align: text-top;
}

.backup-token {
  margin: 0 1.5em;
  font-size: 1.1em;
}

.code-scrolly {
  display: inline-block;
  width: 30em;
  overflow: scroll;
  height: 3em;
  border: 2px dotted #ccc;
  padding: .5em;
  margin: .5em;
}

td>code.large {
  display: grid;
}

.password-display {
  padding: 0.2em 0.33em 0.2em;
  border: 1px dotted rgba(0, 0, 0, 0.75);
  background-color: rgba(127, 0, 0, 0.07);
  white-space: pre;
  display: inline-block;
  font-weight: 600;
  letter-spacing: 0.05ch;
  line-height: 1.3;
}

img.qrcode {
  background: white;
}



/* generic blocks */


.block {
  background: #fff;
  border: 1px solid #ccc;
  margin: 0.5em;
}

.rounded-block {
  border-radius: 3px;
}

.padded-block {
  padding: .75em 1em;
}

.block input[type=submit],
.pure-button {
  margin: 1em 0 0;
}


.block-title {
  display: flex;
  flex-direction: row;
  border-bottom: 1px solid #888;
}
.block-title h3 {
  flex-grow: 1;
  border: 0;
}
.block .pure-button.title-button {
  margin: 0;
  font-size: 0.95em;
  align-self: center;
  margin-right: 1.5em;
}

.block p,
.block ul,
.block form {
  margin: .5em 0;
}

.block ul {
  padding-left: 2em;
  margin: .75em 0;
}

.block ul li,
.block ol li {
  margin: .5em 0;
}

.block .actions {
  text-align: right;
}

.block.text-heavy h5,
.block.text-heavy h6 {
  margin: 0.25em 0;
}

.block.text-heavy p,
.block.text-heavy ul {
  margin-top: 0;
}

.page-block>p,
.page-block>ul,
.page-block>ol,
.page-block>h5,
.page-block>pre,
.page-block>table,
.page-block form {
  margin: .75em 1em;
}

.page-block>ul,
.page-block>ol {
  padding-left: 1.5em;
}

.page-block>table {
  /* tinymce puts a width:100% on every table - but it overflows with the margin */
  width: auto !important;
}

.block-note {
  background: #f8f8f8;
  border: 1px solid #ddd;
  padding: .5em;
}

@media (prefers-color-scheme: dark) {
  .block {
    background: #333;
    border-color: #444;
  }

  .block-note {
    background: #444;
  }
}

.block-note ul {
  margin-top: 0;
  margin-bottom: 0;
}

.block-note li i {
  font-size: 1.1em;
}

.block a {
  text-decoration: underline dotted var(--main);
}

.block a:hover {
  text-decoration: underline solid var(--main);
}


.message {
  width: 100%;
  margin: 0;
  padding: 1em;
  border-bottom: 1px solid #444;
  text-align: center;
}

.message.success {
  background: #276D00;
  color: #fff;
}

.message.error {
  background: #B62316;
  color: #fff;
}

.message.info {
  background: #2351D8;
  color: #fff;
}

.message a {
  color: #fff;
}
