body {
  margin: 0px;
  font-family: Roboto;
}

html, body, #react-mount {
  height: 100%;
}

.app-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
}

header {
  background-color: aliceblue;
  box-shadow: 0px -5px 10px black;
}

.header-content {
  padding-left: 10%;
  padding-right: 20px;
  display: flex;
  align-items: center;
}

.header-settings {
  margin-left: auto;
  position: relative;
}

footer {
  padding-top: 20px;
  padding-bottom: 20px;
  padding-left: 10%;
  background-color: aliceblue;
  font-size: 12px;
  color: darkslateblue;
  box-shadow: 0px 5px 10px black;
}

footer > a {
  margin-right: 20px;
  color: inherit;
}

h1 {
  margin: 10px 0;
  font-weight: 400;
}

.app-content {
  width: 90vw;
  margin-left: auto;
  display: flex;
  font-weight: 300;
  overflow: hidden;
  flex-grow: 1;
}

.highlighted {
  font-weight: bold;
}

article {
  flex-grow: 1;
  position: relative;
}

aside {
  width: calc(300px + 10vw);
  min-width: 300px;
  border-left: 3px dashed #f0f0f0;
  margin-left: 5px;
  padding: 10px 27px 15px 27px;
  overflow: auto;
}

aside p,
aside h3 {
  max-width: 300px;
}



table {
  width: 100%;
  margin-left: -8px;
  padding-left: 4px;
  border-collapse: collapse;
}

td, th {
  padding: 5px;
}

td {
  border-top: 1px solid lightgray;
  border-bottom: 1px solid lightgray;
}

.repl {
  font-size: 15pt;
  font-weight: 300;
  padding-left: 5px;
  height: 100%;
  width: 100%;
  overflow: auto;
  position: absolute;
  cursor: default;
  border-left: 1px solid lightgray;
}

.repl .info {
  color: #bbbbbb;
  padding-top: 7px;
}

.repl .result {
  color: black;
}

.repl .command {
  color: #777777;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.repl .error {
  color: #ff3333;
}

.repl .caret {
  color: #dddddd;
}

.repl .prompt-caret {
  color: #777777;
  padding: 2px 4px 2px 0;
}

.repl .prompt.error .prompt-caret {
  color: #ff1111;
}

.prompt {
  padding-bottom: 7px;
  display: flex;
}

.output > div {
  padding: 2px 0px;
}

.lambda-input {
  flex-grow: 1;
  border: 0px;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  background-color: transparent;
}

.lambda-input:focus {
  outline: none;
}

.settings-gear {
  cursor: pointer;
  font-size: 28px;
  padding: 2px 6px;
  color: #aaaaaa;
  user-select: none;
}

.settings-gear:hover {
  color: #555555;
}

.settings-popover {
  position: absolute;
  right: 0;
  top: 100%;
  background: white;
  border: 1px solid #cccccc;
  padding: 10px 14px;
  font-size: 10pt;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  z-index: 10;
  white-space: nowrap;
}

.settings-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.settings-label:last-child {
  margin-bottom: 0px;
}

.settings-input {
  width: 70px;
  font-family: inherit;
  font-size: inherit;
  padding: 2px 4px;
  border: 1px solid #cccccc;
}

.expand-collapse-button {
  visibility: hidden;
  font-size: 10px;
  vertical-align: middle;
  line-height: 24px;
  cursor: pointer;
  margin-left: 5px;
  width: 7px;
  display: inline-block;
}

.result:hover .expand-collapse-button, .error:hover .expand-collapse-button {
  visibility: visible;
}


.result-inner {
  display: flex;
  max-width: calc(100% - 10px);
  white-space: nowrap;
}

.result-inner > span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-inner > div {
  flex-grow: 1;
  padding-left: 3px;
}

.metadata {
  color: black;
  margin-left: -5px;
  padding: 10px;
  font-size: 10pt;
  border-left: 5px solid lightgrey;
  overflow: auto;
  white-space: nowrap;
}

.error-metadata-header {
  margin-top: 0px;
}

.result i {
  color: #777777;
}

aside button {
  vertical-align: bottom;
}

.secret.secret {
  color: transparent;
  background: #555555;
}

.secret.secret:hover {
  background-color: aliceblue;
  color: black;
}

.code, .secret {
  font-family: 'Roboto Mono';
  font-size: 11pt;
  padding: 0px 4px;
  background: aliceblue;
  white-space: nowrap;
}

.problem-text {
  padding-bottom: 10px;
}

.solved-badge {
  margin-top: -14px;
  font-size: 10pt;
  color: #888888;
}

.problem-navigator {
  position: absolute;
  bottom: 50px;
  width: 120px;
  padding: 4px;
  display: flex;
  background: aliceblue;
  align-items: center;
  justify-content: space-between;
}

.problem-navigator > button {
  font-size: 10pt;
  margin: 4px;
}

.problem-navigator > button.hidden {
  visibility: hidden;
}

.problem-navigator > .next-problem {
  float: right; /* don't hate me- this is like one line */
}

.repl::-webkit-scrollbar {
  width: 0px;  /* remove scrollbar space */
  background: transparent;  /* optional: just make scrollbar invisible */
}

.inline-definition {
  border-bottom: 1px dotted #888888;
}

/* Definitions Explorer */

.definitions-explorer {
  border-top: 1px solid #e0e0e0;
  margin-top: 15px;
  padding-top: 5px;
}

.definitions-header {
  cursor: pointer;
  user-select: none;
  font-weight: 400;
  font-size: 12pt;
  margin: 5px 0;
}

.definitions-toggle {
  font-size: 10px;
  display: inline-block;
  width: 12px;
}

.definitions-list {
  overflow-y: auto;
  font-size: 10pt;
}

.definitions-empty {
  color: #999999;
  font-size: 10pt;
}

.definitions-copy {
  background: none;
  border: 1px solid #cccccc;
  color: #666666;
  cursor: pointer;
  font-size: 9pt;
  padding: 1px 6px;
  margin-bottom: 4px;
}

.definitions-copy:hover {
  border-color: #999999;
  color: #333333;
}

.definition-entry {
  font-family: 'Roboto Mono';
  padding: 2px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.definition-delete {
  color: #cccccc;
  cursor: pointer;
  margin-right: 6px;
  font-size: 9pt;
}

.definition-delete:hover {
  color: #ff3333;
}

.definition-name {
  font-weight: 500;
  cursor: pointer;
}

.definition-name:hover {
  text-decoration: underline;
}

.definition-annotation {
  color: #888888;
  font-size: 9pt;
}

/* Dark Mode */

.dark-mode.app-wrapper {
  color: #eeeeee;
  background-color: #12141c;
}

.dark-mode header {
  background-color: #333344;
}

.dark-mode .code {
  background: #333333;
}

.dark-mode .lambda-input {
  color: whitesmoke;
}

/* Dark mode REPL stuff */
.dark-mode .repl .info {
  color: whitesmoke;
}

.dark-mode .repl .result {
  color: whitesmoke;
}

.dark-mode .repl .command {
  color: #999999;
}

.dark-mode .repl .error {
  color: #ff3333;
}

.dark-mode .repl .caret {
  color: #676767;
}

.dark-mode .repl .prompt-caret {
  color: #eeeeee;
}

.dark-mode .result i {
  color: #aaaadd;
}

.dark-mode .repl {
  border-left: 1px solid #33333a;
}

.dark-mode aside {
  border-left: 3px dashed #33333a;
}

.dark-mode footer {
  background-color: #333344;
  color: #eeeeee;
}

.dark-mode .metadata {
  color: whitesmoke;
  border-left: 5px solid #33333a;
}


.dark-mode .secret.secret {
  background: whitesmoke;
  color: transparent;
}

.dark-mode .secret.secret:hover {
  color: whitesmoke;
  background-color: #333333;
}

.dark-mode h1 {
  font-weight: 300;
}

.dark-mode aside a {
  color: whitesmoke;
}

.dark-mode .problem-navigator {
  background: #333344;
}

.dark-mode .definitions-explorer {
  border-top: 1px solid #33333a;
}

.dark-mode .definitions-copy {
  border-color: #555555;
  color: #aaaaaa;
}

.dark-mode .definitions-copy:hover {
  border-color: #888888;
  color: #dddddd;
}

.dark-mode .definitions-empty {
  color: #777777;
}

.dark-mode .definition-delete {
  color: #555555;
}

.dark-mode .definition-delete:hover {
  color: #ff3333;
}

.dark-mode .definition-annotation {
  color: #7777aa;
}

.dark-mode .settings-gear {
  color: #777777;
}

.dark-mode .settings-gear:hover {
  color: #cccccc;
}

.dark-mode .settings-popover {
  background: #222233;
  border-color: #444455;
  color: #eeeeee;
}

.dark-mode .settings-input {
  background: #333344;
  border-color: #555566;
  color: #eeeeee;
}


.inline-definitions-popup {
  max-width: 400px;
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  padding: 4px 12px;
  color: black;
}

.dark-mode .inline-definitions-popup {
  border-color: #555566;
  color: #eeeeee;
}