/* Custom Scrollbar for high contrast, wider, easier tap */
html,
body,
#programMenu,
#programList {
  scrollbar-width: 2em;
  scrollbar-color: #ffd600 #222;
}

/* Webkit browsers */

/* Styles for program list items generated by JS */
.program-list-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  background: #f7f7f7;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 0.7em 1em;
  font-size: 3em;
  cursor: pointer;
  margin-bottom: 0.5em;
}

.program-list-item strong {
  font-weight: bold;
}

.program-list-key {
  font-size: 0.85em;
  color: #666;
  margin-left: 0.5em;
}

.program-list-error {
  color: red;
}
/* Inline style replacements from index.html */
.top-left-fixed {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1000;
}

.refresh-btn {
  /* No extra styles, but class for future-proofing */
}

.top-right-fixed {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1001;
}

.menu-bar {
  display: block;
  width: 33px;
  height: 5px;
  margin: 4.5px 0;
  background: #111 !important;
  border-radius: 2px;
}

.menu-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1em;
}
#programMenu h2 {
  color: #ffd600;
  font-size: 8.2em;
  margin: 0 auto 0.5em auto;
  letter-spacing: 2px;

  font-family: "DS-Digital", monospace, Arial, sans-serif;
  font-weight: 900;
  text-align: center;
}

#programList .program-item {
  background: #222;
  color: #ffd600;
  border: 2px solid #ffd600;
  border-radius: 12px;
  font-size: 6em;
  padding: 1.2em 1.5em;
  font-weight: bold;
  letter-spacing: 2px;
  outline: none;
  text-align: center;
  font-family: "DS-Digital", monospace, Arial, sans-serif;
  margin-bottom: 0.2em;
}
#programList .program-item:focus,
#programList .program-item:hover {
  background: #ffd600;
  color: #111;
  border-color: #111;
}
/* Accessible Program Chooser Styles */
#programMenu {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  width: 90vw;
  max-width: none;
  height: 100vh;
  background: #111;

  z-index: 2000;
  overflow-y: auto;
  padding: 1.5em 1em 1em 1em;
  border-left: 6px solid #ffd600;
  outline: 4px solid #000;
}

#programMenu.active {
  display: block;
}

#programMenu h2 {
  color: #ffd600;
  font-size: 1.4em;
  margin: 0;
  letter-spacing: 1px;
}

#programMenu button.close {
  font-size: 2em;
  background: none;
  border: none;
  color: #ffd600;
  cursor: pointer;
  outline: 2px solid #ffd600;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
#programMenu button.close:focus,
#programMenu button.close:hover {
  background: #ffd600;
  color: #111;
}

#programList {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7em;
  /* max-height: 80vh; */
  /* overflow-y: auto; */
}

#programList .program-item {
  background: #222;
  color: #ffd600;
  border: 2px solid #ffd600;
  border-radius: 8px;
  font-size: 1.2em;
  padding: 1em 1.2em;
  font-weight: bold;
  letter-spacing: 1px;

  outline: none;
}
#programList .program-item:focus,
#programList .program-item:hover {
  background: #ffd600;
  color: #111;
  border-color: #111;
}

#menuBtn button {
  background: #ffd600 !important;
  border: 2px solid #111 !important;
  border-radius: 6px;
  width: 57px;
  height: 57px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0;
  cursor: pointer;
}
#menuBtn button span {
  background: #111 !important;
  border-radius: 2px;
}
.keyboard {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  padding: 5px 0;
  background: #004134;

  user-select: none;
}

.keyboard--hidden {
  bottom: -100%;
}

.keyboard__keys {
  text-align: center;
}

.keyboard__key {
  height: 45px;
  width: 6%;
  max-width: 90px;
  margin: 3px;
  border-radius: 4px;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 1.05rem;
  outline: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: top;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

.keyboard__key:active {
  background: rgba(255, 255, 255, 0.12);
}

.keyboard__key--wide {
  width: 12%;
}

.keyboard__key--extra-wide {
  width: 36%;
  max-width: 500px;
}

.keyboard__key--activatable::after {
  content: "";
  top: 10px;
  right: 10px;
  position: absolute;
  width: 8px;
  height: 8px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 50%;
}

.keyboard__key--active::after {
  background: #08ff00;
}

.keyboard__key--dark {
  background: rgba(0, 0, 0, 0.25);
}
.red {
  color: #fff;
  background-color: #dc4c64;
}
.blue {
  color: #fff;
  background-color: #3b71ca;
}
.green {
  color: #fff;
  background-color: #14a44d;
}
.btn {
  align-self: stretch;
  font-size: 25px;
  padding: 15px;
  border-radius: 5px;
  border: 0;
  margin: 0;
  width: 100%;
}

input {
  font-size: 25px;
}
textarea {
  width: 200px;
  height: 150px;
}
.containter {
}

.bigNumbers {
  width: 100vw;
  height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Scale with viewport but cap and avoid overflow */
  font-size: clamp(6rem, 24vw, 45rem);
  line-height: 0.9;
  overflow: hidden;
  text-overflow: ellipsis;
  background-color: #000000;
  color: #ffa500;
  font-family: "DS-Digital", monospace;
}

.units {
  width: 100vw;
  height: 40vh;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  font-size: clamp(2rem, 10vw, 20rem);
  line-height: 1;
  background-color: #000000;
  color: #ffa500;
  font-family: "DS-Digital", monospace;
  white-space: nowrap;
  overflow: hidden;
}
html,
body {
  margin: 0;
  padding: 0;
}

@font-face {
  font-family: "DS-Digital";
  src: url("clearsans-medium-webfont.woff2") format("woff2"),
    url("clearsans-medium-webfont.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
