/* General Styling Rules */

body {
  font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Helvetica",
    "Droid Sans", "Arial", sans-serif;
}

a {
  color: #000;
  cursor: pointer;
}

select {
  font-size: 14px;
  outline: none;
  box-shadow: none;
  border: none;
  padding: 4px 2px;
  border-bottom: 2px solid rgb(34, 188, 172);
}

.btn {
  background-color: rgba(34, 188, 172);
  padding: 6px 8px;
  color: #fff;
  text-decoration: none;
  margin: 2px 5px;
  border-radius: 4px;
}

.inline > * {
  display: inline-block;
}

.noopacity {
  opacity: 0;
}

.subicon > svg + svg {
  position: relative;
  left: -14px;
  top: -5px;
  margin-right: 0px;
}

.octicon {
  position: relative;
  top: -2px;
}

.key {
  border: 1px solid #777;
  border-radius: 1px;
  text-align: center;
  vertical-align: middle;
  margin: 1px;
  padding-top: 6px;
}

/* end General Styling */

/* Tooltips  */

.pbtip {
  display: none;
}

*:hover > .pbtip {
  display: inline-block;
  position: absolute;
  top: 39px;
  border: 4px solid rgb(34, 188, 172);
  padding: 6px 8px 8px 8px;
  background-color: rgba(255, 255, 255, 0.95);
  z-index: 101;
  color: #000;
  min-width: 30px;
  width: auto;
  max-width: 250px;
  font-size: 14px;
  letter-spacing: 0;
  font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Helvetica",
    "Droid Sans", "Arial", sans-serif;
}

*:hover > .pbtip:not(.pbr) {
  right: 0;
  margin-left: -250px;
}

*:hover > .pbtip.pbr {
  left: 0;
  margin-right: -250px;
}

.subicon:hover > .pbtip {
  right: 8px;
}

*:hover > .pbtip.stip {
  width: 40px;
  right: -14px;
  text-align: center;
}

*:hover > .pbtip.stip {
  width: 40px;
  right: -14px;
  text-align: center;
}

*:hover > .pbtip:after,
*:hover > .pbtip:before {
  bottom: 100%;
  border: solid transparent;
  content: "";
  height: 0;
  width: 0;
  position: absolute;
  pointer-events: none;
}

*:hover > .pbtip:not(.pbr):after,
*:hover > .pbtip:not(.pbr):before {
  right: 14px;
}

*:hover > .pbtip.pbr:after,
*:hover > .pbtip.pbr:before {
  left: 14px;
}

*:hover > .pbtip.stip:after,
*:hover > .pbtip.stip:before {
  right: 50%;
}

*:hover > .pbtip:after {
  border-color: rgba(255, 255, 255, 0);
  border-bottom-color: #fff;
  border-width: 10px;
}
*:hover > .pbtip:before {
  border-color: rgba(221, 221, 221, 0);
  border-bottom-color: rgb(34, 188, 172);
  border-width: 16px;
}

*:hover > .pbtip:not(.pbr):after {
  margin-right: -10px;
}
*:hover > .pbtip:not(.pbr):before {
  margin-right: -16px;
}

*:hover > .pbtip.pbr:after {
  margin-left: -14px;
}
*:hover > .pbtip.pbr:before {
  margin-left: -20px;
}

/* end Tooltips */

/* Front page */

ul.saved-puzzle-list {
  padding-inline-start: 0;
  margin-block-start: 0;
}

.saved-puzzle-list li {
  list-style: none;
  margin-bottom: 5px;
}

.saved-puzzle-list li a {
  text-decoration: none;
}

li > a:hover {
  color: rgb(34, 188, 172);
}

/* end Front Page */

/* Containers */

.container {
  display: inline-block;
  position: relative;
  width: 100%;
}

.puzzle-container {
  position: relative;
  clear: both;
  display: flex;
  align-items: start;
  width: 100%;
}

/* end Containers */

/* Title, Info, Menu */

.title {
  font-family: "Laila", serif;
  margin: 0px 0px 10px 0px;
}

.title a {
  text-decoration: none;
}

.accent-text {
  color: rgb(34, 188, 172);
}

.accent-text-alt {
  color: #6a59b9;
}

.infoblock {
  margin-top: -5px;
}

input.inline-content-editable,
.fakeinput {
  font-size: 18px;
  font-weight: bold;
  font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Helvetica",
    "Droid Sans", "Arial", sans-serif;
  padding: 1px 2px;
  min-width: 30px;
  border: 0px;
  border-bottom: 4px solid transparent;
}

input.inline-content-editable:focus {
  border-bottom-color: rgb(34, 188, 172);
  -webkit-appearance: none;
  -moz-appearance: none;
  -ms-appearance: none;
  -o-appearance: none;
  appearance: none;
  box-shadow: none;
  outline: none;
}

.puzzle-info {
  margin: 10px 0 5px 0;
}

.puzzle-info > * {
  float: left;
  margin-top: 3px;
}

.puzzle-info > span {
  padding-top: 3px;
  margin-bottom: 5px;
  padding-right: 3px;
}

.menu {
  float: right;
  width: auto;
  margin: 5px -10px 0 5px;
}

.menu a {
  padding: 8.5px;
  text-decoration: none;
  position: relative;
}

.menu a:hover {
  color: rgb(34, 188, 172);
}

/* end Title, Info, Menu */

/* Grid */

.puzzle-grid {
  border: 1px solid black;
  margin-bottom: 2px;
  flex: 0 0 auto;
}

.puzzle-row {
  margin-bottom: -1px;
  line-height: 0;
  width: 100%;
  align-items: stretch;
}

.puzzle-row:last-child {
  margin-bottom: 0px;
}

.puzzle-cell {
  font-size: 20px;
  border: 1px solid #777;
  width: 40px;
  height: 40px;
  line-height: 1;
  text-align: center;
  display: inline-block;
  margin-left: -1px;
  position: relative;
  z-index: 50;
  cursor: pointer;
}

.puzzle-cell:focus {
  outline: none;
}

.puzzle-cell:first-child {
  margin-left: 0;
}

.puzzle-cell-x {
  background-color: black;
}

.puzzle-cell.highlighted {
  border-color: rgb(34, 188, 172);
  background-color: #c7f1ec;
  z-index: 99;
}

.puzzle-cell.active {
  border-color: rgb(64, 224, 208);
  box-shadow: 0 0 4px 3px rgb(64, 224, 208);
  z-index: 100;
}

.puzzle-cell.highlighted .circle + .label {
  background-color: #c7f1ec;
}

.puzzle-cell.marked, .puzzle-cell.marked .circle + .label {
  background-color: #bbb;
}

.puzzle-cell.highlighted.marked, .puzzle-cell.highlighted.marked .circle + .label {
  background-color: #c1d6d4;
}

.puzzle-cell.active.highlighted, .puzzle-cell.active.highlighted .circle + .label {
  background-color: white;
}

.puzzle-cell.active.highlighted.marked, .puzzle-cell.active.highlighted.marked .circle + .label {
  background-color: #ddd;
}

.puzzlefocus {
  opacity: 0;
  width: 0px;
  height: 1px;
  position: absolute;
  font-size: 30px;
  pointer-events: none;
}

.circle {
  border: 1px solid black;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  line-height: 1;
  text-align: center;
  display: inline-block;
  position: absolute;
  left: 0px;
  top: 0px;
}

.puzzle-cell .label {
  font-size: 10px;
  border: 0;
  position: absolute;
  top: 1px;
  left: 2px;
  padding: 1px;
  opacity: 0.9;
}

.circle + .label {
  background-color: #fff;
}

.puzzle-cell .input {
  width: 100%;
  text-align: center;
  margin-top: calc(60% - 0.5em);
  margin-bottom: calc(40% - 0.5em);
  position: absolute;
  font-size: 20px;
}

.pencil {
  opacity: 0.5;
}


.puzzle-cell .input.rebus {
  font-size: 12px;
  word-break: break-all;
  display: inline-block;
  margin: auto;
  top: 60%;
  left: 2px;
  right: 2px;
  width: calc(100% - 4px);
  transform: translateY(-60%);
}

.puzzle-cell.active .input.rebus:empty:after {
  content: '( )';
  opacity: 0.5;
}

.disable-select {
  user-select: none; /* supported by Chrome and Opera */
  -webkit-user-select: none; /* Safari */
  -khtml-user-select: none; /* Konqueror HTML */
  -moz-user-select: none; /* Firefox */
  -ms-user-select: none; /* Internet Explorer/Edge */
}

/* end Grid */

/* Current Clues and Suggestions */

.sb {
  width: 100%;
  min-width: 370px;
}

.sb-menu {
  display: flex;
  flex-direction: row;
  margin: -32px 0 10px 5px;
  border-bottom: 1px solid #ccc;
}

.sb-menu > .sb-menu-item {
  padding: 6px 12px;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
  background-color: #ccc;
  border: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  color: #777;
  margin: 0 3px -1px 3px;
  cursor: pointer;
}

.sb-menu > .sb-menu-item:first-child {
  margin-left: 15px;
}

.sb-menu > .sb-menu-item:hover {
  background-color: #ddd;
  border: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  cursor: pointer;
}

.sb-menu > .sb-menu-item.active-tab {
  border: 1px solid #ccc;
  background-color: #fff;
  border-bottom: 2px solid #fff ;
  color: #333 !important;
}

.sb-menu-item svg {
  margin-bottom: -3px;
}

.info-tab {
  line-height: 2;
}

.info-tab .key {
  width: 30px;
  height: 28px;
  padding-top: 4px;
  display: inline-block;
  margin-right: 4px;
}

.info-tab .shadekey svg {
  opacity: 0.5;
}

.rebustext {
  font-size: 8px;
  top: -6px;
  position: relative;
}

.current-clues {
  min-width: 240px;
  margin-left: 20px;
  margin-right: 30px;
  flex: 0 0 auto;
}

.current-clues h3 {
  margin: 5px 0.3em 5px 0;;
}

.current-clues img {
  filter: grayscale(1);
  opacity: 0.5;
}

.current-clues img:hover {
  filter: grayscale(0);
  opacity: 1;
}

.current-clues .current {
  font-size: 20px;
  letter-spacing: 1px;
  height: 21px;
  margin-bottom: 5px;
  font-family: "Roboto Mono", monospace;
}

.current-clues .current a {
  margin-left: 4px;
}

.current-clues .current svg {
  margin-bottom: 2px;
}

.current-clues a {
  position: relative;
}

.current-clues .suggestions {
  overflow-y: scroll;
  height: 242px;
  border: 1px solid #777;
  border-width: 1px 0;
  overflow-x: visible;
}

.current-clues .suggestions .suggestion {
  font-size: 16px;
  color: #777;
  cursor: pointer;
  font-family: "Roboto Mono", monospace;
}

.current-clues .suggestions .suggestion.highlighted {
  color: rgb(34, 188, 172);
}

.current-clues .suggestions .suggestion.unmatched {
  color: rgb(183, 164, 164);
}

.current-clues .suggestions .suggestion.hidden {
  display: none;
}

.current-clues .suggestions .suggestion:hover {
  color: #000;
}

.current-clues .suggestions > div > a {
  display: none;
  padding-left: 4px;
}

.current-clues .suggestions > div:hover > a {
  display: inline-block;
}

.current-clues .suggestions > div > a > svg {
  margin-bottom: 3px;
}


.current-clues .current *:hover > .pbtip {
  right: -12px;
  top: 35px;
}

.current-clues .suggestions *:hover > .pbtip {
  top: 30px;
  left: 2px
}

.current-clues .suggestions *:hover > .pbtip:after {
  border-width: 4px;
}
.current-clues .suggestions *:hover > .pbtip:before {
  border-width: 10px;
}

#all-clues.current-clues input {
  font-size: 16px;
}

#all-clues.current-clues .suggestions .suggestion {
  font-family: 'Roboto';
}

#all-clues.current-clues .suggestions {
  height: 270px;
}

/* Hide mobile stuff on non-mobile */

#keyboard,
#mobilemenu,
.cluenav {
  display: none;
}

/* end non-mobile */

/* Mobile only */

@media only screen and (max-width: 636px) {

  /* General mobile */

  html, body {
    width: auto !important;
    overflow-x: hidden !important;
  }

  body.zoomed {
    overflow-y: hidden !important;
  }

  pre {
    display: none;
  }

  /* end General Mobile */

  /* Mobile Containers */

  .container {
    width: 100%;
    margin-bottom: 180px;
  }

  .puzzle-container {
    display: block;
  }

  /* end Mobile Containers */

  /* Mobile Title, Menu, Info */

  .title {
    font-size: 1.5em;
    margin-bottom: 5px;
  }
  body.zoomed .title {
    display: none;
  }
  .menu {
    margin-right: -5px;
  }

  .menu a {
    padding: 6.5px;
  }

  .menu a.subicon {
    margin-right: 0px;
  }

  .infomenublock {
    max-width: 100% !important;
  }

  input.inline-content-editable,
  .fakeinput {
    font-size: 16px;
  }

  /* end Mobile Title, Info, Menu */

  /* Mobile grid */

  .puzzle-grid {
    margin: 0 0px 0 0px;
    border: 0;
  }

  .puzzle-grid.zoomed {
    overflow: scroll;
    max-width: 100%;
    border-top: 1px solid #ooo;
    height: auto;
    padding-bottom: 100%;
  }

  .puzzle-grid.zoomed .puzzle-row {
    width: 200%;
  }

  .puzzle-grid.zoomed .puzzle-row:last-child {
    margin-bottom: -350px;
  }

  .puzzle-grid .puzzle-cell {
    font-size: 16px;
  }

  .puzzle-grid.zoomed .puzzle-cell {
    font-size: 32px;
  }

  .puzzle-row {
    margin-top: 0px;
    display: flex;
  }

  .puzzle-cell {
    width: auto;
    height: auto;
    flex: 1;
  }

  .puzzle-cell .label {
    font-size: 0.44em;
    border: 0;
    position: absolute;
    top: 1px;
    left: 1px;
  }

  .puzzle-cell .input {
    width: 100%;
    position: absolute;
    margin-top: calc(60% - 0.5em);
    margin-bottom: calc(40% - 0.5em);
    font-size: inherit;
  }
  .puzzle-cell .input {
    font-size: inherit;
  }

  .puzzle-cell:before {
    content: "";
    float: left;
    padding-top: 100%;
  }

  .puzzle-cell .label {
    font-size: 0.5em;
    border: 0;
    position: absolute;
    top: 1px;
    left: 1px;
  }

  .puzzle-cell .input.rebus {
    font-size: 0.6em;
  }

  .largegrid .puzzle-cell .input {
    font-size: 0.77em;
  }

  .largegrid .puzzle-cell .input.rebus {
    font-size: 0.39em;
  }

  .smallgrid .puzzle-cell .input {
    font-size: 1.33em;
  }

  .smallgrid .puzzle-cell .input.rebus {
    font-size: .68em;
  }

  .xsgrid .puzzle-cell .input {
    font-size: 1.5em;
  }
  .xsgrid .puzzle-cell .input.rebus {
    font-size: .75em;
  }

  .largegrid .puzzle-cell .label {
    font-size: 0.38em;
    top: 1px;
    left: 0px;
  }

  .smallgrid .puzzle-cell .label {
    font-size: 0.67em;
    top: 2px;
    left: 2px;
  }

  .xsgrid .puzzle-cell .label {
    font-size: 1em;
    top: 2px;
    left: 3px;
  }

  .puzzle-cell:before {
    content: "";
    float: left;
    padding-top: 100%;
  }

  .circle {
    width: calc(100% - 2px);
    height: calc(100% - 2px);
  }

  /* end Mobile Grid */

  /* Mobile Current Clues */

  .current-clues > div:not(.activemobile), .sb-menu {
    display: none;
  }

  .current-clues h3 {
    margin: 0;
    font-size: 16px;
  }

  .current-clues {
    position: fixed;
    top: inherit;
    right: inherit;
    left: 0px;
    z-index: 101;
    bottom: 0px;
    background-color: #fff;
    transform-origin: bottom left;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .current-clues .current {
    font-size: 18px;
    margin: -4px 0 3px 0;
  }

  .current-clues > div {
    height: 150px;
  }

  .current-clues #mobilemenu {
    display: flex;
    margin: 0px 0px 14px 0px;
    border-bottom: 1px solid #777;
    height: 24px;
  }

  #mobilemenu a:nth-child(2) {
    flex-grow: 1 !important;
    text-align: center;
    min-width: 20px;
  }

  #mobilemenu a {
    margin: 0 1px -1px 1px;
    overflow: hidden;
    white-space: nowrap;
    display: block;
    text-overflow: ellipsis;
  }

  #mobilemenu a:not(:first-child):not(:last-child) {
    flex-grow: 4;
    border: 1px solid #333;
    padding: 3px 8px;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    background-color: #ddd;
    border-bottom: 1px solid #777;
    color: #777;
  }

  #mobilemenu > a.activemobile {
    border-bottom: 2px solid #fff !important;
    background-color: #fff !important;
    color: #000 !important;
  }

  #mobilemenu a.cluenav {
    display: flex;
    padding: 4px 6px;
    text-align: center;
    border-radius: 2px;
  }

  #keyboard.activemobile {
    display: block;
  }

  #keyboard {
    position: relative;
    margin: 0px 0px 10px 0px;
    padding: 0px 2px 0px 2px;
  }

  #across,
  #down {
    margin: 0px 10px 10px 10px;
  }

  #across > div,
  #down > div {
    padding: 0px 30px;
  }

  #keyboard > .keyrow {
    display: flex;
  }

  #keyboard > .keyrow > .key {
    flex-grow: 1;
    display: table-cell;
    height: 25px;
  }

  .shadekey > svg {
    opacity: 0.4;
  }

  #keyboard .row2 {
    margin-left: 10px;
    margin-right: 10px;
  }

  #keyboard .toolkey {
    background-color: #ddd;
  }

  .current-clues .suggestions {
    height: 100px;
    margin-bottom: 5px;
  }

  .current-clues .suggestions > div > a {
    display: inline-block;
    margin-left: 8px;
  }

  /* end Mobile Current Clues */
}

/* end Mobile */
