/* RubyFlow CSS - Simplified version without Sass */

/* Variables as CSS custom properties */
:root {
  --theme-color: #c00;
  --text-color: #333;
  --background-color: #fff;
  --background-color-header: #c00;
  --error-background-color: #fee;
  --fonts-headers: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, serif, sans-serif;
  --fonts-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Ubuntu Mono", monospace;
  --fonts: var(--fonts-headers), var(--fonts-mono);
  --font-size: 16px;
  --line-height: 1.4em;
  --bold-weight: normal;
  --top-padding: 0px;
  --inner-width: 50em;
  --avatar-size: 48px;
}

BODY {
  font-family: var(--fonts);
  font-size: var(--font-size);
  line-height: var(--line-height);
  color: var(--text-color);
  background-color: var(--background-color);
  margin: 0;
  padding: 0;
}

BODY .admin { display: none }
BODY.admin .admin { display: inline; }

#mainarea {
  margin-top: var(--top-padding);
  overflow: auto;
}

H1, H2, H3 {
  font-weight: var(--bold-weight);
  font-family: var(--fonts-headers);
}

H3 { font-size: 1.3em; }
A { color: var(--theme-color); }
CITE { font-style: normal; }

PRE CODE {
  padding: 1em 2em;
  display: block;
  margin-right: 1em;
  font-family: var(--fonts-mono);
  font-size: 0.9em;
  line-height: 1.6em;
  background-color: #eff;
}

.inner {
  max-width: var(--inner-width);
  min-width: 300px;
  margin: 18px auto;
  padding: 0 12px;
}

.inner-raw {
  max-width: var(--inner-width);
  min-width: 300px;
  margin-left: auto;
  margin-right: auto;
}

HEADER.top {
  padding: 0;
  top: 0px;
  overflow: auto;
  z-index: 100;
  width: 100%;
  background-color: var(--background-color-header);
  border-bottom: 1px solid #a00;
}

HEADER.top .sedbar {
  background-color: #ffd;
  padding: 12px 0;
}

HEADER.top .sedbar .inner-raw {
  padding: 0 12px;
  text-align: center;
}

HEADER.top .sedbar .sed {
  text-align: left;
  font-size: 1em;
  margin-left: auto; 
  margin-right: auto; 
  width: auto;
  display: inline-block;
}

HEADER.top .sedbar .sed A {
  color: #c00 !important;
  text-decoration: underline;
}

HEADER.top .inner { 
  margin-top: 14px; 
  margin-bottom: 14px; 
  padding-right: 0; 
}

HEADER.top .menu {
  font-size: 1.2em;
}

HEADER.top .menu .optional { 
  margin-left: 0.4em; 
}

HEADER.top .menu UL { 
  list-style-type: none; 
  padding: 0; 
}

HEADER.top .menu LI { 
  float: right; 
  padding: 0; 
}

HEADER.top .menu A {
  color: #fff;
  padding: 0px 16px;
}

HEADER.top .menu .avatar {
  margin-right: 12px;
}

HEADER.top .menu A:hover {
  background-color: #fff;
  color: var(--background-color-header);
  padding: 12px 8px 8px;
  margin-left: 8px;
  margin-right: 8px;
}

HEADER.top A { 
  color: inherit; 
  text-decoration: none; 
}

HEADER.top H1 {
  margin: 0;
  font-size: 24px;
  line-height: 22px;
  color: #fff;
  font-weight: var(--bold-weight);
}

HEADER.top H1 SPAN { display: none; }

.avatar {
  float: left;
  width: var(--avatar-size);
  height: var(--avatar-size);
  border-radius: 50%;
  border: 0px solid transparent;
  margin-bottom: 8px;
  background-size: cover;
}

.avatar.small {
  width: 22px;
  height: 22px;
}

.avatar.sponsored {
  border-radius: 0;
}

.adbar {
  background-color: var(--background-color-header);
  border-radius: 4px;
  padding: 8px 24px;
  color: white;
  font-size: 1.0em;
  min-height: 88px;
  margin: 12px -12px 28px -12px;
}

.adbar .text {
  line-height: 1.5em;
  vertical-align: middle;
  padding: 8px 0;
  color: #000;
}

.adbar .button {
  height: 30px;
  background-color: white;
  padding: 4px 16px;
  margin: 4px 0px 4px 4px;
  float: right;
  line-height: 30px;
  border-radius: 20px;
  text-align: center;
}

.adbar .button A { 
  text-decoration: none; 
}

ARTICLE.post {
  margin: 2.4em auto;
  padding-left: 0;
}

ARTICLE.post .more {
  color: #999;
  display: inline;
  font-size: 0.8em;
  text-transform: uppercase;
}

ARTICLE.post .more.comment A {
  font-size: 0.9em;
}

ARTICLE.post:hover .metadata .report {
  float: right;
  text-transform: lowercase;
  font-size: 0.9em;
  display: none;
}

ARTICLE.post:hover .metadata .report A {
  text-decoration: none;
  border-bottom: 1px dotted #999;
  color: #ccc;
}

ARTICLE.post.sponsored {
  background-color: #fafadd;
  padding: 14px 14px;
  margin-left: -14px;
  margin-right: -14px;
}

ARTICLE.post.read {
  transition: opacity 0.3s ease-out;
  opacity: 0.5;
}

ARTICLE.post.read:hover { 
  opacity: 1.0; 
}

ARTICLE.post h1 {
  margin: 0;
  padding: 0;
  display: inline-block;
  vertical-align: baseline;
  font-family: var(--fonts-headers);
  font-weight: var(--bold-weight);
  color: #c00;
  padding-right: 7px;
  font-size: 1.4em;
  line-height: 1.2em;
  margin-bottom: 4px;
  color: var(--text-color);
  margin-right: 4px;
  orphans: 3;
}

ARTICLE.post h1 A {
  text-decoration: none;
  color: #222;
}

ARTICLE.post h1 A:visited {
  color: #999;
}

ARTICLE.post h1 A:hover {
  color: var(--theme-color) !important;
  text-decoration: underline;
}

ARTICLE.post P { margin: 0 }

ARTICLE.post .body, 
ARTICLE.post .comments { 
  margin-left: calc(var(--avatar-size) + 16px); 
}

ARTICLE.post .body A:visited {
  color: #999;
  font-weight: 300;
}

ARTICLE.post .metadata {
  color: #bbb;
  font-size: 0.9em;
  line-height: 1.5em;
  text-transform: uppercase;
  margin-top: 4px;
}

ARTICLE.post .metadata CITE {
  color: #666;
}

ARTICLE.post .metadata .report { 
  display: none; 
}

ARTICLE.post .comment.inline {
  font-size: 0.9em;
  color: #999;
  line-height: 1.3em;
  margin-left: 2em;
  margin-top: 8px;
}

ARTICLE.post .comment.inline .content, 
ARTICLE.post .comment.inline .metadata { 
  display: inline; 
}

SECTION.comments .comment {
  margin-bottom: 2em;
}

SECTION.comments .comment .content { 
  background-color: #fff; 
  padding: 0.2em 1em; 
}

BODY.post ARTICLE.post {
  margin-top: 24px;
}

BODY.post ARTICLE.post p {
  margin: 1em 0;
}

BODY.post ARTICLE.post h1 {
  background-color: inherit;
  display: block;
  font-size: 2.0em;
  line-height: 1.3em;
  margin-left: -1px;
  padding: 0;
  color: #222;
  font-weight: bold;
  margin-top: 0.2em;
}

BODY.post ARTICLE.post .body, 
BODY.post ARTICLE.post .comments { 
  margin-left: calc(var(--avatar-size) + 16px); 
}

BODY.post ARTICLE.post > .body {
  margin: 1em 0 2em 0;
  font-size: 1.1em;
  line-height: var(--line-height);
}

BODY.post ARTICLE.post .metadata {
  font-size: 0.9em;
}

BODY.post ARTICLE.post.noavatar .body, 
BODY.post ARTICLE.post.noavatar .comments { 
  margin-left: 0; 
}

BODY.post ARTICLE.post.noavatar .comment .body { 
  margin-left: calc(var(--avatar-size) + 16px); 
}

BODY.post ARTICLE.post.noavatar .avatar { 
  display: none; 
}

BODY.post ARTICLE.post.noavatar .comment.withavatar .avatar { 
  display: block; 
}

#sitedescription {
  text-align: center;
  margin-bottom: 8px;
}

#sitedescription .inner {
  border: 1px solid #ddd;
  background-color: #fff;
  position: relative;
  margin-top: 12px;
  margin-bottom: 0px;
  padding-top: 16px;
  padding-bottom: 10px;
}

#sitedescription a.close {
  position: absolute;
  right: 8px;
  top: 0px;
  font-size: 1.4em;
  cursor: pointer;
}

#sitedescription h2 {
  margin: 0;
  font-weight: normal;
  font-size: 2.0em;
  line-height: var(--line-height);
  color: #666;
}

#sitedescription div.description {
  font-size: 1.2em;
  line-height: var(--line-height);
}

.postbox.noavatar .avatar { 
  border: 1px dashed #aaa; 
}

#submitform {
  display: none;
  margin-bottom: 20px;
}

#submitform .inner {
  background-color: #eee;
  padding-top: 1em;
  padding-bottom: 1em;
  border: 1px solid #ccc;
  padding-left: 1.2em;
  padding-right: 1.2em;
}

#submitform h2 {
  margin-top: 8px;
}

#loading {
  display: none;
  color: #bbb;
  margin-bottom: 30px;
  font-weight: bold;
  font-size: 24px;
  font-family: var(--fonts-headers);
  text-align: center;
}

#preview {
  display: none;
}

#preview ARTICLE.post {
  background: white; 
  padding: 1em 0; 
  margin: 0;
}

H3.divider {
  color: #999;
  font-size: 1.0em;
  padding: 9px 0 8px;
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  padding-left: 12px;
  font-weight: normal;
  background-color: #eee;
  text-align: left;
  text-transform: uppercase;
  margin-top: 12px;
  margin-left: -12px;
  margin-right: -12px;
  margin-bottom: -18px;
  font-weight: bold;
}

H3.divider + H3.divider {
  display: none;
}

@keyframes pulsing {
  from { background-color: #c00; }
  50% { background-color: #f60; }
  to { background-color: #c00; }
}

@keyframes flashcomment {
  from { background-color: #fff; }
  50% { background-color: #ff9; }
  to { background-color: #fff; }
}

.postbox .help {
  float: left;
}

.postbox .help, 
.postbox .right, 
.postbox .error {
  font-size: 0.9em;
  color: #999;
  line-height: 1.2em;
  margin-bottom: 8px;
}

.postbox .error { color: #900; }

.postbox FORM {
  margin-left: calc(var(--avatar-size) + 16px);
}

.postbox FORM TEXTAREA {
  min-height: 160px;
}

.postbox FORM .errored { 
  background-color: var(--error-background-color); 
}

.postbox FORM TEXTAREA, 
.postbox FORM INPUT[type='text'] {
  font-size: 1.1em;
  max-width: 100%;
  box-sizing: border-box;
  padding: 8px;
  margin-bottom: 8px;
  font-family: var(--fonts);
  display: block;
  border: 1px solid #bbb;
}

.postbox FORM INPUT.title {
  font-weight: var(--bold-weight);
  font-size: 1.2em;
}

.postbox FORM BUTTON {
  cursor: pointer;
  padding: 2px 24px;
  font-size: 1.3em;
  font-family: var(--fonts);
  line-height: var(--line-height);
  font-weight: normal;
  background-color: var(--theme-color);
  color: #fff;
  border: 0;
  border-radius: 12px;
  margin-bottom: 8px;
}

.postbox FORM BUTTON.preview {
  background-color: #aaa;
}

BODY.oauth-successful .postbox FORM BUTTON {
  animation-name: pulsing;
  animation-duration: 1s;
  animation-iteration-count: infinite;
}

.comment .flashing {
  animation-name: flashcomment;
  animation-duration: 1s;
  animation-iteration-count: 4;
}

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

/* Mobile and small desktop screen scenarios */
@media screen and (max-width: 620px) {
  .menu .optional { display: none; }

  #submitform .inner { 
    border-radius: 0; 
    border-top: 1px solid #ccc; 
    border-bottom: 1px solid #ccc; 
  }

  BODY.post ARTICLE.post, article.post {
    padding-left: 0;
  }
  
  BODY.post ARTICLE.post h1 { margin-left: 0px; }
  BODY.post ARTICLE.post .avatar { float: right; margin-left: 12px; }
  BODY.post ARTICLE.post .body, 
  BODY.post ARTICLE.post .comments { margin-left: 0px; }
  BODY.post ARTICLE.post .comments .body { margin-left: calc(var(--avatar-size) + 16px); }

  SECTION.comments .avatar { 
    float: left !important; 
    margin-left: 0 !important; 
  }
  
  .postbox FORM { margin-left: 0; }
  .postbox .avatar { display: none !important; }
  
  BODY.index ARTICLE.post h1 {
    display: block;
    background-color: inherit;
  }
  
  BODY.index ARTICLE.post h1 A { 
    color: #222; 
    font-weight: bold; 
  }
}

/* Very small screens */
@media screen and (max-width: 420px) {
  HEADER.top .avatar { display: none }
  HEADER.top .menu A {
    padding: 0px 10px;
  }
}

BODY.expert HEADER.top .menu .optional { 
  display: none; 
}

/* jQuery Growl notifications */
#growls {
  z-index: 50000;
  position: fixed;
}

#growls.default {
  top: 10px;
  right: 10px;
}

#growls.tl {
  top: 10px;
  left: 10px;
}

#growls.tr {
  top: 10px;
  right: 10px;
}

#growls.bl {
  bottom: 10px;
  left: 10px;
}

#growls.br {
  bottom: 10px;
  right: 10px;
}

#growls.tc {
  top: 10px;
  right: 10px;
  left: 10px;
}

#growls.bc {
  bottom: 10px;
  right: 10px;
  left: 10px;
}

#growls.tc .growl, 
#growls.bc .growl {
  margin-left: auto;
  margin-right: auto;
}

.growl {
  position: relative;
  border-radius: 4px;
  transition: all 0.4s ease-in-out;
}

.growl.growl-incoming {
  opacity: 0;
}

.growl.growl-outgoing {
  opacity: 0;
}

.growl.growl-small {
  width: 200px;
  padding: 5px;
  margin: 5px;
}

.growl.growl-medium {
  width: 250px;
  padding: 10px;
  margin: 10px;
}

.growl.growl-large {
  width: 300px;
  padding: 15px;
  margin: 15px;
}

.growl.growl-default {
  color: #FFF;
  background: #7f8c8d;
}

.growl.growl-error {
  color: #FFF;
  background: #C0392B;
}

.growl.growl-notice {
  color: #FFF;
  background: #2ECC71;
}

.growl.growl-warning {
  color: #FFF;
  background: #F39C12;
}

.growl .growl-close {
  cursor: pointer;
  float: right;
  font-size: 14px;
  line-height: 18px;
  font-weight: normal;
  font-family: helvetica, verdana, sans-serif;
}

.growl .growl-title {
  font-size: 18px;
  line-height: 24px;
}

.growl .growl-message {
  font-size: 14px;
  line-height: 18px;
}