/**
 * CSS overrides
 * @author: Dut A.
 */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  height: auto;
  background: rgba(104, 104, 104, 0.3);
  color: #140d0d;
}
.nodisplay {
  display: none;
}
.red {
  color: #811;
}
.bold {
  font-weight: bold;
}
.italic {
  font-style: italic;
}
.btn-gold {
  border: 1px solid rgba(204, 218, 78, 0.1);
  background-color: rgba(155, 140, 119, 0.5);
}
.logo {
  margin-right: -1.5%;
}
.top-nav {
  /* Keep navigation visible below MDL's desktop breakpoint. */
  display: flex;
  background: #2d3e2f;
}
#page-wrap {
  flex: 1 0 auto;
  height: auto;
  min-height: 0;
}
#page-wrap.usage {
  background: #fff;
  margin-top: 0;
}
#page-wrap.privacy {
  background: #fff;
  padding-right: 2%;
}
#page-wrap.release-notes {
  background: #fff;
}
#page-wrap .block {
  width: 75%;
}
#typing.block {
  margin-top: -1.5%;
}
#writing-pad {
  margin: 0 0 5px;
  padding: 5px;
  width: 100%;
  height: 200px;
  font:
    1em/1.5 Verdana,
    Sans-Serif;
  background: #fbfaf1;
  border: 1px solid #f9f9f9;
  -moz-border-radius: 5px;
  -webkit-border-radius: 5px;
  border-radius: 5px;
  color: #000;
  resize: none; /** TODO: Make resizable when keyboard hidden using jQuery */
}
span#help {
  float: right;
}
#help > #httN {
  /* color: rgba(255, 10, 10, .5); */
  color: transparent;
}
.dark-tip {
  background: rgb(35, 36, 35);
  font-size: 0.75em;
}
.mdl-navigation span {
  cursor: pointer;
}
.mdl-navigation span i#htt {
  cursor: pointer;
  font-size: 1.15em;
}
li#dev span {
  color: #f00;
  font-size: 1.3em;
}
/* main key-group (TODO: Fix; not sticking after 'shift/alt' pressed) */
/*
.ui-keyboard-keyset-normal {
	margin-top: -1.5%;
}
*/
/* regular button */
.ui-keyboard-button {
  -moz-border-radius: 5px;
  -webkit-border-radius: 5px;
  border-radius: 5px;
  float: left;
  font:
    1.2em Verdana,
    Sans-Serif;
  height: 55px;
  line-height: 40px;
  margin: 0 5px 5px 0;
  text-align: center;
  width: 55px;
}
.ui-keyboard-bksp,
.ui-keyboard-tab,
.ui-keyboard-alt,
.ui-keyboard-accept,
.ui-keyboard-lock,
.ui-keyboard-enter,
.ui-keyboard-shift,
.ui-keyboard-cancel {
  font:
    80%/1.5 Verdana,
    Sans-Serif;
}
.ui-keyboard-bksp {
  font:
    60%/1.6 Verdana,
    Sans-Serif;
}
.ui-keyboard-bksp,
.ui-keyboard-tab {
  width: 70px;
}
.ui-keyboard-accept,
.ui-keyboard-alt,
.ui-keyboard-cancel {
  width: 81px;
}
.ui-keyboard-lock {
  width: 80px;
}
.ui-keyboard-enter {
  width: 105px;
}
/* 'right shift' adjusted to 138px width via jQuery
 * (TODO: Fix; not sticking after 'shift/alt' pressed; width below becomes 105px)
 */
.ui-keyboard-shift {
  width: 101px;
}
.ui-keyboard-space {
  width: 505px;
}
.ui-keyboard-empty {
  width: 35px;
}
#version {
  font-style: bold;
}
#version-txt {
  color: #aaa;
}
.top-nav .site-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
#version-type {
  flex: 0 0 auto;
  font-size: 11px;
  line-height: 1;
  transform: translateY(-0.35em);
  color: #f00;
  font-weight: bold;
}
/* Social media icons (sharing) */
#social-sharing {
  float: right;
  display: inline;
  margin-left: -8%;
  margin-top: 1%;
}
.share-btns a:hover,
.share-btns a:focus {
  text-decoration: none;
}
.share-btns a span,
.post-btns li i {
  border: 0;
  box-shadow: 0;
  display: inline;
  font-size: 2.5em;
}
.share-btns a span:hover,
.share-btns a span:focus,
.post-btns a:hover,
.post-btns a:focus {
  color: rgba(0, 0, 75, 0.5);
}
.facebook {
  color: #3b579d;
}
.x-mark {
  color: #000;
  font-family: Arial, sans-serif;
  font-weight: 600;
}
.x-mark::before {
  content: 'X';
}
.google-plus {
  color: #dd4b39;
}
.pinterest {
  color: #cc2127;
}
.email {
  color: #669c41;
}
/* Social media icons (posting) */
#social-posting {
  float: left;
  margin-left: -4%;
  margin-right: -5%;
  margin-top: 1%;
}
#social-posting ul {
  text-align: left;
  list-style-type: none;
}
#social-posting ul li {
  margin-left: -15%;
  margin-bottom: 10%;
}
.post-btns ul li i {
  font-size: 2em;
}
.post-btns li a {
  color: rgba(0, 0, 0, 0.75);
}

/* experimental sharing buttons */
#post-share {
  margin-bottom: -0.5%;
  margin-top: -0.5%;
  color: whitesmoke;
}
#post-share i {
  color: rgba(255, 10, 10, 0.75);
}

/* back to top */
#return-to-top {
  position: fixed;
  bottom: 5px; /*	(original) bottom: 20px; */
  right: 10px; /* (ideal) right: 67px;  (original) right: 20px; */
  background: rgb(0, 0, 0);
  background: rgba(141, 129, 172, 0.95);
  width: 50px;
  height: 50px;
  display: block;
  text-decoration: none;
  -webkit-border-radius: 35px;
  -moz-border-radius: 35px;
  border-radius: 35px;
  display: none;
  -webkit-transition: all 0.3s linear;
  -moz-transition: all 0.3s ease;
  -ms-transition: all 0.3s ease;
  -o-transition: all 0.3s ease;
  transition: all 0.3s ease;
}

#return-to-top i {
  color: #fff;
  margin: 0;
  position: relative;
  left: 16px;
  top: 13px;
  font-size: 19px;
  -webkit-transition: all 0.3s ease;
  -moz-transition: all 0.3s ease;
  -ms-transition: all 0.3s ease;
  -o-transition: all 0.3s ease;
  transition: all 0.3s ease;
}

#return-to-top:hover {
  background: rgba(100, 10, 50, 0.9);
}
#return-to-top:hover i {
  color: #fff;
  top: 5px;
}

/* Usage page */
h1,
h2,
h3,
h4,
h5,
h6,
p {
  color: #000;
}
img {
  margin-bottom: 3%;
}
ol,
ul {
  text-align: left;
  margin-left: 11%;
}
p {
  text-align: left;
  margin-left: 13%;
}
.img-responsive {
  display: inline;
}
.darkgold {
  color: #b8860b;
}
.big-red {
  color: red;
  font-weight: bold;
  font-size: 1.5em;
}

/* Keep text actions in the existing sidebar without an expanding share menu. */
#social-posting .btn {
  font-size: 14px;
  white-space: nowrap;
}
#social-posting .btn:disabled {
  cursor: not-allowed;
}
#share-status {
  max-width: 150px;
  overflow-wrap: anywhere;
}

/* Bound the three home-page regions; the keyboard scrolls inside its own region. */
#page-wrap.keyboard-page {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(0, 960px) minmax(150px, 1fr);
  align-items: start;
  gap: 24px;
  width: calc(100% - 32px);
  max-width: 1440px;
  height: auto;
  min-height: 0;
  margin: 24px auto;
}
.keyboard-page #social-posting,
.keyboard-page #social-sharing,
.keyboard-page #typing.block {
  float: none;
  width: auto;
  min-width: 0;
  margin: 0;
}
.keyboard-page #social-posting ul {
  margin: 0;
  padding: 0;
}
.keyboard-page #social-posting li {
  margin: 0 0 10px;
}
.keyboard-page #social-posting p,
.keyboard-page #social-sharing p {
  margin: 0 0 12px;
}
.keyboard-page #writing-pad {
  float: none;
  display: block;
  width: 100%;
  box-sizing: border-box;
}
#keyboard-scroll {
  display: flex;
  justify-content: center;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding-bottom: 8px;
}
#keyboard-scroll:focus-visible {
  outline: 2px solid #2d3e2f;
  outline-offset: 2px;
}
#keyboard-scroll #writing-pad_keyboard {
  flex: 0 0 910px;
  position: relative;
  top: auto;
  left: auto;
  width: 910px;
  max-width: none;
  height: auto;
  margin: 0;
}
@media (max-width: 900px) {
  #page-wrap.keyboard-page {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    gap: 16px;
  }
  .keyboard-page #social-posting ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  #keyboard-scroll {
    justify-content: flex-start;
  }
  .keyboard-page #social-posting li {
    margin: 0;
  }
  .keyboard-page #share-status {
    max-width: 100%;
    margin-top: 8px;
  }
  .mdl-layout__header-row {
    height: auto;
    min-height: 64px;
    padding: 12px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .mdl-layout__header-row > .mdl-layout-spacer {
    display: none;
  }
  .mdl-layout__header-row .mdl-navigation {
    height: auto;
    flex-wrap: wrap;
  }
  .mdl-layout__header-row .mdl-navigation__link {
    padding: 0 10px;
    line-height: 40px;
  }
  .mdl-layout-title {
    font-size: 18px;
    white-space: normal;
  }
}

/* A footer in normal flow stays below content and fills short viewports. */
.site-footer {
  flex: 0 0 auto;
  margin-top: auto;
  padding: 24px clamp(16px, 4vw, 48px);
}
.site-footer__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}
.site-footer .mdl-logo {
  margin: 0;
  line-height: 1.5;
}
.site-footer .mdl-mini-footer__link-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  margin: 0;
}
.site-footer .mdl-mini-footer__link-list li {
  float: none;
  margin: 0;
  line-height: 1.5;
}
.site-footer a {
  display: inline-block;
  padding: 8px 0;
}
.site-footer a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

#page-wrap.license-page {
  max-width: 960px;
  margin: 32px auto;
  text-align: left;
}
.license-document {
  padding: clamp(24px, 5vw, 56px);
  background: #fff;
  border: 1px solid #d8ddd5;
  border-radius: 12px;
  box-shadow: 0 4px 18px rgb(0 0 0 / 5%);
}
.license-heading {
  padding-bottom: 24px;
  border-bottom: 1px solid #d8ddd5;
}
.license-kicker {
  margin: 0 0 12px;
  color: #53634f;
  font-size: 14px;
  font-weight: 600;
}
.license-heading h1 {
  margin: 0;
  color: #2d3e2f;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.2;
  text-align: left;
}
.license-text {
  max-width: 72ch;
  overflow-wrap: anywhere;
  font-size: 16px;
  line-height: 1.75;
  color: #30382f;
}
.license-text p {
  margin: 0 0 18px;
  font: inherit;
}
.license-text .license-copyright {
  margin: 24px 0;
  padding: 16px 20px;
  border-left: 3px solid #657d58;
  background: #f3f6ef;
  font-size: 14px;
}
.license-text h2 {
  margin: 36px 0 16px;
  color: #2d3e2f;
  font-size: 22px;
  line-height: 1.4;
  text-align: left;
}
.license-text a {
  color: #315d38;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.license-text a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}
.license-text > :last-child {
  margin-bottom: 0;
}
