/* Variables */
:root {
  --color: #222222;
  --color-muted: #3f3f3f;

  --color-code: #000000;

  --background-faint: #fafafa;

  --primary: #d40000; /* Remarkbox logo color */
  --primary-hover: #e4241a;
  --primary-inverse: #ffffff;

  --border: #bbbbbb;
  --border-faint: #e4e4e4;

  --color-mod: #aa0000; /* Consistency with Remarkbox style */

  --line-height: 1.6;
}

body {
  overflow-x: hidden;
  line-height: var(--line-height);
  font-weight: normal;
  font-family: "Raleway", "HelveticaNeue", "Helvetica Neue", Helvetica, Arial,
    sans-serif;
  color: var(--color);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  font-weight: lighter;
  line-height: 1.5;
}

/* Underlines for first two levels of headers */
h1,
h2 {
  padding-bottom: 0.3em;
  border-bottom: 1px solid var(--border);
}

h1 {
  font-size: 2rem;
}
h2 {
  font-size: 1.75rem;
}
h3 {
  font-size: 1.5rem;
}
h4 {
  font-size: 1.25rem;
}
h5 {
  font-size: 1.125rem;
}
h6 {
  font-size: 1rem;
}

:where(a),
:where(a):visited {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

a.anchor {
  display: block;
  position: relative;
  top: -150px;
  visibility: hidden;
}

a.mod::after {
  content: "mod";
  background-color: var(--color-mod);
  color: var(--primary-inverse);
  border-radius: 1em;
  padding-inline: 0.75ch;
  margin-left: 0.5ch;
}

pre {
  overflow: auto;
  margin-block: 1rem;
  padding: 1rem;
  color: var(--color-code);
  font-size: 12px;
  font-family: "PT Mono", monospace;
  line-height: 1.125em;
  overflow-x: auto;
  border-radius: 8px;
  background-color: var(--background-faint);
  border: 1px solid var(--border-faint);
}

pre code {
  all: unset;
  display: block;
}

label.close {
  margin-right: 16px;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

code {
  padding: 0.2em;
  margin: 0;
  background-color: var(--background-faint);
  border: 1px solid var(--border-faint);
  border-radius: 6px;
}

hr {
  margin-block: 1em;
  border: 0;
  border-top: 3px solid var(--border);
}

blockquote {
  font-style: italic;
  margin-top: 10px;
  margin-bottom: 10px;
  margin-left: 15px;
  padding-left: 15px;
  border-left: 3px solid #ccc;
}

button.link,
.button {
  color: var(--color-muted);
  text-align: left;
  padding: 0;
  opacity: 0.8;
}

button,
button.link,
.button {
  outline: none;
}

button.link {
  border: none;
  background: none;
}

button:hover,
button.link:hover,
.button:hover {
  opacity: 1;
}

span.avoidwrap {
  display: inline-block;
}

div.summary {
  margin-top: 25px;
  margin-bottom: 25px;
}

p.whats-next {
  margin-block: 16px;
}

.preview p,
.node p {
  margin-top: 0;
  margin-bottom: 0.5em;
}

form.node-action {
  display: inline-block;
}

.node-actions {
  margin-top: -0.3em;
}

.preview {
  border-top: 1px dotted var(--border);
  border-bottom: 1px dotted var(--border);
  padding-top: 16px;
  padding-bottom: 16px;
  margin-top: 0;
  margin-bottom: 16px;
  margin-right: 5px;
  margin-left: 5px;
  line-height: 1.6;
}

.preview-raw-markdown {
  display: block;
  white-space: pre-wrap;
  background-color: unset;
  border-radius: unset;
  border: unset;
  border-width: 0;

  margin-top: 19px;
  margin-bottom: 10px;
}

.powered-by {
  text-align: center;
  margin-bottom: 0;
  margin-top: 8px;
}

.nested-avatar {
  margin-top: 6px;
}

.avatar {
  border-radius: 50%;
  -moz-border-radius: 50%;
  -webkit-border-radius: 50%;
}

.user-settings-profile-pic {
}

.focused {
  animation: fade 4s forwards;
  background-color: rgba(237, 237, 237, 1);
}

@keyframes fade {
  from {
    background-color: rgba(237, 237, 237, 1);
  }
  to {
    background-color: rgba(237, 237, 237, 0);
  }
}

/* ALERT START */
#alerts {
  z-index: 98;
}

.alert {
  opacity: 0.25;
  display: grid;
  grid-template-columns: 1fr 50px;
  grid-gap: 10px;
}

.alert-message {
  text-align: center;
  margin-top: 10px;
  margin-bottom: 10px;
}

.alert .close {
  text-align: right;
  margin-top: 10px;
  margin-bottom: 10px;
  margin-right: 15px;
}

.alert-danger,
.alert-error {
  color: #721c24;
  background-color: #f8d7da;
  border-color: #f5c6cb;
}

.alert-warning {
  color: #856404;
  background-color: #fff3cd;
  border-color: #ffeeba;
}

.alert-info,
.alert-notice {
  color: #0c5460;
  background-color: #d1ecf1;
  border-color: #bee5eb;
}

.alert-success {
  color: #155724;
  background-color: #d4edda;
  border-color: #c3e6cb;
}

/* ALERT END */

.author-and-date a,
.status,
.whats-next,
.topic,
.remark-count {
  color: var(--color-muted);
  font-size: 0.8em;
  font-weight: bold;
}

.date:before {
  content: "\00b7";
}

.question-mark-circle:before {
  content: "?";
  display: inline-block;
  font-family: sans-serif;
  font-weight: bold;
  text-align: center;
  width: 1.8ex;
  height: 1.8ex;
  font-size: 1.4ex;
  line-height: 1.8ex;
  border-radius: 1.2ex;
  margin-right: 4px;
  padding: 1px;
  color: #cccccc;
  background: white;
  border: 1px solid #cccccc;
  text-decoration: none;
}

.question-mark-circle:hover:before {
  color: white;
  background: #cccccc;
  text-decoration: none;
}

.remark,
.load-more,
.action {
  color: var(--color-muted);
  font-size: 0.75em;
  margin-right: 8px;
  font-weight: bold;
  cursor: pointer;
}

.center {
  text-align: center;
}

.load-more,
.load-more:visited {
  color: #336699;
}

.button-right {
  float: right;
  margin-left: 8px;
}

.button-max-width {
  width: 100%;
}

.opacity-20 {
  opacity: 0.2 !important;
}
.opacity-40 {
  opacity: 0.4 !important;
}
.opacity-60 {
  opacity: 0.6 !important;
}
.opacity-80 {
  opacity: 0.8 !important;
}

.remark-box-div-main {
  margin-bottom: 35px;
}

.remark-box-div {
  display: none;
  /* this is needed to prevent "jumping" jquery bug. */
  overflow: hidden;
  margin-top: 10px;
}

.edit-box-div {
  display: none;
  /* this is needed to prevent "jumping" jquery bug. */
  overflow: hidden;
  margin-top: 15px;
}

.my-namespaces-div {
  display: none;
  position: absolute;
  background-color: #ffffff;
  z-index: 1;
  /* this is needed to prevent "jumping" jquery bug. */
  overflow: hidden;
  padding-top: 10px;
  padding-bottom: 10px;
}

#remarkbox-footer {
  font-size: 0.8em;
  font-weight: bold;
}

#search {
  display: inline;
}

#keywords {
  width: 100%;
  line-height: 12px;
  margin-bottom: 0;
  text-align: center;
}

.common-text-input,
.common-textarea {
  width: 100%;
  border-color: var(--border);
  border-style: solid;
  border-width: 1px;
  border-radius: 2px;

  margin-top: 7px;

  /* This allows padding on inputs without causing scrollbars */
  padding: 0.5em;
  box-sizing: border-box;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  -ms-box-sizing: border-box;
}

.common-textarea {
  min-height: calc(2rem * var(--line-height));
  height: calc(5rem * var(--line-height));
  resize: vertical;
}

.monospace {
  font-family: monospace;
}

#email_input {
}

#email2_input {
  display: none;
  margin-bottom: 0;
}

/* Stripe form */
.StripeElement {
  border-color: var(--border);
  border-style: solid;
  border-width: 1px;
  border-radius: 2px;
  background-color: white;

  width: 300px;
  padding-top: 12px;
  padding-bottom: 12px;
  padding-left: 3px;
  padding-right: 3px;
}

.StripeElement--focus {
  box-shadow: 0 1px 3px 0 #cfd7df;
}

.StripeElement--invalid {
  border-color: #fa755a;
}

.StripeElement--webkit-autofill {
  background-color: #fefde5 !important;
}

/* media viewports */

.shown-on-phone {
  display: none;
}

.shown-on-tablet {
  display: none;
}

.remarkbox-menu {
  font-size: 0.8em;

  z-index: 98;
  padding-top: 8px;
  padding-bottom: 8px;

  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 10px;
}

.remarkbox-menu .user {
  text-align: right;
  padding: 8px;
  padding-right: 48px;
}

.remarkbox-menu .home {
  padding: 8px;
  padding-left: 48px;
}

.remarkbox-sub-menu {
  font-size: 0.8em;
}

div.user-watching {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 10px;
}

.call-to-action {
  text-align: right;
}

@media screen and (max-width: 568px) {
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    font-size: 1.5em !important;
  }
  .hidden-on-phone {
    display: none;
  }
  .shown-on-phone {
    display: inline;
  }
  .remarkbox-menu {
    padding-top: 0;
  }
  .remarkbox-menu .search {
    display: none;
  }
  .remarkbox-menu .home {
    padding: 0;
    text-align: center;
  }
  .remarkbox-menu .user {
    padding: 0;
    text-align: center;
  }
  .call-to-action {
    padding: 0;
  }
  .thread {
    padding-left: 40px;
  }
}

@media screen and (min-width: 568px) {
  .navbar.hidden-on-tablet {
    display: none;
  }
  .hidden-on-tablet {
    display: none;
  }
  .shown-on-tablet {
    display: inline;
  }
  .remarkbox-menu {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .remarkbox-menu .home {
    padding: 8px;
    padding-left: 24px;
  }
  .remarkbox-menu .user {
    padding: 8px;
    padding-right: 24px;
  }

  .call-to-action {
    grid-column: 1 / span 3;
  }
}

@media screen and (min-width: 750px) {
  .remarkbox-menu {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .remarkbox-menu .home {
    padding: 8px;
    padding-left: 48px;
  }
  .remarkbox-menu .user {
    padding: 8px;
    padding-right: 48px;
  }

  .call-to-action {
    grid-column: 1 / span 3;
  }
}

/*
 *
 * burger phone menu
 *
 */

.burger-checkbox {
  position: fixed;
  bottom: 20px;
  right: 20px;
  height: 20px;
  opacity: 0;
}
.burger-label {
  border-radius: 50%;
  position: fixed;
  bottom: 15px;
  right: 20px;
  height: 55px;
  width: 55px;
  z-index: 99;
}
.burger-label span {
  position: absolute;
  margin-left: 14px;
  width: 26px;
  height: 2px;
  top: 50%;
  margin-top: -1px;
  left: 0;
  display: block;
  background: #020304;
  transition: 0.5s;
}
.burger-label span:first-child {
  top: 18px;
}
.burger-label span:last-child {
  top: 38px;
}
.burger-label:hover {
  cursor: pointer;
}
.burger-checkbox:checked + .burger-label span {
  opacity: 0;
  top: 50%;
}
.burger-checkbox:checked + .burger-label span:first-child {
  opacity: 1;
  transform: rotate(405deg);
}
.burger-checkbox:checked + .burger-label span:last-child {
  opacity: 1;
  transform: rotate(-405deg);
}
.burger-checkbox ~ .phone-menu {
  background: white;
  position: fixed;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 0;
  z-index: 98;
  transition: 0.25s;
  transition-delay: 0.25s;
  /*overflow-y: scroll;*/
}
.burger-checkbox ~ .phone-menu > h5 {
  margin-top: 15px;
  margin-bottom: 15px;
}
.burger-checkbox ~ .phone-menu > ul,
.burger-checkbox ~ .phone-menu > h5 {
  text-align: center;
  left: 10%;
  right: 10%;
  margin-bottom: 0;
  margin-top: 20px;
  padding-top: 0;
}
.burger-checkbox ~ .phone-menu > ul {
  margin: 0;
  padding: 0;
}
.burger-checkbox ~ .phone-menu > ul > li,
.burger-checkbox ~ .phone-menu > h5 {
  opacity: 0;
  transition: 0.25s;
  transition-delay: 0s;
}
.burger-checkbox ~ .phone-menu > ul > li > a {
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  font-family: sans-serif;
  display: block;
  padding: 0;
}
.burger-checkbox:checked ~ .phone-menu {
  height: 100%;
  transition-delay: 0s;
}
.burger-checkbox:checked ~ .phone-menu > ul > li,
.burger-checkbox:checked ~ .phone-menu > h5 {
  opacity: 1;
  transition-delay: 0.25s;
}
.phone-menu ul {
  list-style-type: none;
  padding-left: 0;
}

section.join-or-log-in {
  margin-left: auto;
  margin-right: auto;
  max-width: 340px;
}

/*
 *
 * funnel pages style
 *
 */

.funnel {
  margin-top: 60px;
  margin-left: auto;
  margin-right: auto;
  max-width: 340px;
}

section.step-1,
section.step-2,
section.step-3,
section.step-4,
section.active-card,
section.new-card,
section.payment-card,
section.join-or-log-in,
section.well {
  background-color: white;
  padding: 10px 12px;
  border-radius: 4px;
  border: 1px solid transparent;
  box-shadow: 0 1px 3px 0 #e6ebf1;
  -webkit-transition: box-shadow 150ms ease;
  transition: box-shadow 150ms ease;
  text-align: center;
}

section.step-4 {
  text-align: left;
}

input#namespace-domain {
  margin-bottom: 10px;
  text-align: center;
}
