:root {
  font-family: 'Circular Std', 'Roboto', sans-serif;
  font-weight: 300;
  font-size: 10px;
  --font-circular: 'Circular Std', 'Roboto', sans-serif;
  --font-mono: 'Vremena Grotesk', 'Roboto Mono', monospace;
  --header-height: 4rem;
  --pad-sm: 0.8rem;
  --pad-md: 1.5rem;
  --pad-lg: 2.4rem;
  --font-sm: 1.2rem;
  --font-md: 1.4rem;
  --font-lg: 2.4rem;
  --light-bg: #f6f6f7;
  --white: #f9f9f9;
  --lightest: #ebf0fa;
  --lighter: #eaeaea;
  --light: #e5e5e5;
  --medium: #c3c3c4;
  --dark: #818284;
  --darker: #545454;
  --darkest: #292a2e;
  --error: #b82121;
}

#app {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  font-size: var(--font-md);
}

#container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--header-height));
}

#main-content {
  flex: 1;
  overflow: auto;
}

#header {
  height: var(--header-height);
  width: 100%;
  text-align: center;
  font-size: var(--font-md);
  color: var(--darkest);
  border-bottom: 1px solid var(--dark);

  display: flex;
  justify-content: space-between;
  align-items: center;
}

#title-card {
  padding: 3.2rem 1.8rem 0;
  font-size: 1.6rem;
}

#title {
  font-size: 3.4rem;
  letter-spacing: 0.1rem;
}

#methods {
  font-family: 'Vremena Grotesk', 'Roboto Mono', monospace;
  padding: 0;
  margin: 0;
}

#methods li {
  display: flex;
  flex-direction: column;
  list-style: none;
  padding: var(--pad-md);
  margin-top: var(--pad-lg);
  border: 1px solid var(--dark);
}

.signature {
  font-weight: lighter;
  margin-bottom: var(--pad-md);
}
.signature b {
  font-weight: bold;
}

.composite {
  margin-bottom: var(--pad-md);
}

input,
select {
  font-size: var(--font-md);
  font-family: 'Circular Std', 'Roboto', sans-serif;
  margin-bottom: var(--pad-lg);
}
input:not([type='checkbox']),
select {
  width: 100%;
  height: 4.8rem;
  padding: 1.5rem;
  border: 1px solid var(--dark);
}
input[type='number']::-webkit-inner-spin-button {
  width: 3rem;
  height: 3rem;
}
label {
  font-family: 'Circular Std', 'Roboto', sans-serif;
  margin-right: var(--pad-sm);
}
label.small {
  font-size: 1rem;
}
.popup-form {
  padding-left: var(--pad-md);
  width: 100%;
}
input[type='checkbox'] ~ .popup-form {
  padding-left: var(--pad-md);
}
.checkbox-label {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  margin-bottom: 0;
}
.checkbox-label input[type='checkbox'] {
  margin-bottom: 0;
}
.input-container > span > .popup-form,
.ui-result > span > .popup-form {
  padding-left: 0;
}
.input-container span:not(.status),
.ui-result span:not(.status) {
  position: relative;
  overflow-clip: none;
  overflow-y: visible;
}

.reject {
  border-color: var(--error) !important;
  box-shadow: 0 0 1px var(--error);
}
.result {
  display: none;
  position: relative;
  width: 100%;
  margin-top: var(--pad-lg);
  padding-top: 1.5rem;
  font-size: 1.4rem;
  border-top: 1px solid var(--light);
}
.error {
  color: var(--error);
}
.status {
  display: none;
  position: absolute;
  top: 3.1rem;
  left: 0.2rem;
  font-size: 1.2rem;
  color: var(--error);
  white-space: pre;
}
.left {
  flex: 1;
  overflow-wrap: anywhere;
}
.right {
  color: var(--dark);
  align-self: stretch;
  margin-left: var(--pad-md);
}
.clear {
  clear: both;
}

.button-container {
  display: flex;
  margin-top: 0.8rem;
}

.btn {
  font-family: 'Roboto', sans-serif;
  letter-spacing: 0.05rem;
  background-color: var(--darkest);
  color: var(--lightest);
  font-size: 1.4rem;
  padding: 1.5rem;
  border: none;
  text-transform: uppercase;
  flex: 1;
  cursor: pointer;
}
.btn:not(:last-child) {
  margin-right: var(--pad-md);
}
.btn-auth {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
}
.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-auth svg {
  transition: transform ease-out .05s;
  transform: scale(.8);
}
.btn-auth:hover:not(.disabled) svg {
  transition: transform ease-out .1s;
  transform: scale(.9);
}
button {
  padding: 0;
  border: none;
  background-color: inherit;
  color: inherit;
}
button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: none;
}
.random {
  background-color: var(--lighter);
  color: var(--darkest);
}

.result-buttons {
  display: none;
  position: absolute;
  top: -0.1rem;
  right: 0;
}
.result:not(.error):hover .result-buttons {
  display: block;
}
.result-buttons .btn {
  color: var(--darkest);
  background-color: var(--white);
  border: 1px solid var(--darkest);
  font-size: 1.1rem;
  padding: 0.2rem 0.8rem;
}
.result-buttons .btn:not(:last-child) {
  margin-right: 0.5rem;
}
.result-buttons .btn:focus,
.result-buttons .btn:hover {
  background-color: var(--light);
}
.result-buttons .btn:active {
  background-color: var(--lightest);
}
.result-buttons .btn.active {
  color: var(--white);
  background-color: var(--darkest);
}

#console {
  overflow: hidden;
  height: var(--header-height);
  background-color: var(--light-bg);
  color: var(--darkest);
  transition: height 0.2s ease-in-out;
}
#console.open {
  height: 40vh;
}

#console-bar {
  display: flex;
  height: var(--header-height);
  background-color: var(--white);
  padding: 0;
  border-bottom: 1px solid var(--light);
}
.console-header {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: var(--header-height);
  background-color: var(--light-bg);
  font-size: 2rem;
  font-family: var(--font-circular);
  text-align: center;
  text-transform: uppercase;
}
#output-button,
#methods-button {
  flex: 1;
  cursor: pointer;
  font-size: var(--font-lg);
  border-bottom: 1px solid var(--medium);
}
#output-button:hover,
#methods-button:hover,
#output-button:focus,
#methods-button:focus {
  background-color: var(--light);
}
.active-tab {
  background-color: var(--lighter);
}

#output-pane,
#methods-pane {
  font-family: var(--font-mono);
  height: 0;
  padding: 0 0 3rem;
  margin-right: calc(-1 * var(--pad-md));
}

#output-list,
#methods-list {
  list-style: none;
  padding: 0 0 var(--pad-lg);
  height: calc(40vh - (var(--header-height) * 2));
  overflow-y: auto;
}

.output-line {
  width: 100%;
  padding: 0.4rem 0.8rem;
  overflow-wrap: break-word;
}
.output-line:nth-child(2n-1) {
  background-color: var(--lighter);
}

#methods-list {
  padding-top: 0.2rem;
}
#methods-list a {
  display: block;
  padding: 0.7rem 1.5rem;
  color: var(--darkest);
}
#methods-list a:focus,
#methods-list a:hover {
  background-color: var(--darker);
  color: var(--white);
  text-decoration: none;
}
#methods-list a:active {
  background-color: var(--darkest);
}

@media not screen and (min-width: 600px) {
  :root {
    --header-height: initial;
  }

  #header {
    flex-direction: column;
    padding: 1rem 0;
    gap: 1rem;
  }
}

@media only screen and (min-width: 800px) {
  :root {
    --header-height: 5.6rem;
    --console-width: clamp(28rem, 30vw, 40rem);
  }

  #header {
    text-align: left;
    padding-left: 3rem;
    padding-right: 1rem;
  }

  #container {
    flex-direction: row;
    overflow: auto;
  }

  #title-card {
    padding-left: 0;
  }

  #main-content {
    flex: 1;
    padding: 0 3rem 5rem;
  }

  .btn {
    width: auto;
    flex: 0;
    padding: var(--pad-sm) var(--pad-md);
  }

  .input-container span:not(:first-child):not(.status),
  .ui-result span:not(:first-child):not(.status) {
    margin-left: var(--pad-md);
  }
  input:not([type='checkbox']),
  select {
    width: 23.2rem;
    height: 4rem;
    padding: 1rem var(--pad-md);
  }

  #console {
    display: flex;
    flex-direction: row-reverse;
    width: var(--header-height);
    height: calc(100vh - var(--header-height));
    padding: 0;
    transition: width 0.2s ease-in-out;
  }
  #console.open {
    width: calc(var(--header-height) + var(--console-width));
    height: calc(100vh - var(--header-height));
  }

  #console-bar {
    display: flex;
    flex-direction: column;
    justify-self: end;
    width: var(--header-height);
    height: 100%;
    padding: 0;
    border-bottom: none;
    border-left: 1px solid var(--light);
  }
  #console-bar button {
    flex: 0;
    font-size: 4rem;
    padding: 0.8rem;
  }

  .console-header {
    display: none;
    width: 0;
    border-bottom: none;
    transition: width 0.2s ease-in-out;
  }
  #console.open .console-header {
    display: flex;
    width: 100%;
  }

  #output-pane,
  #methods-pane {
    width: 100%;
    margin: 0;
  }

  #methods-pane,
  #output-pane {
    height: 100% !important;
    width: 0;
    transition: width 0.2s ease-in-out;
  }
  #console.open #methods-pane,
  #console.open #output-pane {
    width: var(--console-width);
  }

  #output-list,
  #methods-list {
    height: calc(100vh - (var(--header-height) * 2));
  }
}
