
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  z-index: 2999;
  font-size: 1.0em;
}

.modal-layer {
  display: flex;
  min-height: 0;
  min-width: 200px;
  max-height: 90vh;
  max-width: 90vw;
  width: fit-content;
  height: fit-content;
  position: fixed;
  background: #121212;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #444;
  flex-direction: column;
  align-items: stretch;
  z-index: 3999;
  top: 30%;
  left: 50%;
  transform: translateX(-50%);
}

.modal-layer form {
  flex: 1;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  min-height: 0;
  min-width: 0;
  gap: 8px;
  justify-content: center;
  align-items: center;
}

.modal-layer-text, .modal-layer-body-text {
  flex: 1;
  margin: 0 auto;
  width: fit-content;
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.modal-layer-body-text, .modal-layer-body-text p {
  gap: 0;
  margin: 0;
}

.modal-layer-btns {
  flex: 1;
  height: 28px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  gap: 8px;
  margin-top: 4px;
}

#input-textbox-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  min-height: 0;
  min-width: 0;
  width: 100%;
  height: 100%;
  gap: 6px;
}

.modal-layer-input {
  flex: 1;
  min-width: 0;
  display: flex;
  padding: 8px 5px;
  background-color: #202020;
  border: 1px solid #444;
  border-radius: 4px;
  color: #eee;
  font-size: 0.9em;
  font-family: monospace;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.modal-error-text {
  display: none;
  color: #ff6b6b;
  font-size: 0.8em;
  text-align: center;
  margin-top: 3px;
  white-space: nowrap;
}

.btn-modal {
  min-width: 50px;
  padding: 6px 12px;
  font-family: monospace;
  font-size: 0.9em;
  background-color: #2a2a2a;
  color: #f0f0f0;
  border: 1px solid #444;
  border-radius: 4px;
  cursor: pointer;
  width: 80px;
}

.btn-modal:hover {
  background-color: #303030;
  /*transform: scale(1.03);*/
}

.btn-modal:active {
  background-color: #202020;
  /*transform: scale(0.98);*/
}

#login-layer {
  width: 210px;
  top: 2%;
  left: 98%;
  transform: translate(-100%, 0%);
}

#btn-login-submit, #btn-login-cancel,
#btn-input-submit, #btn-input-cancel {
  flex: 1;
}

#tooltip-layer {
  display: none;
  position: fixed;
  background: #202020;
  border-radius: 8px;
  border: 1px solid #444;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 1999;
  font-size: 0.8em;
  padding: 8px 12px;
  white-space: pre;
  overflow-wrap: normal;
}

button:focus, input:focus {
  outline: none;
  border-color: #505050;
}

button:focus-visible, input:focus-visible {
  outline: none;
  border-color: #505050;
}

/*
* {
  border: 1px solid red;
}
*/