#modals {
  z-index: 500;
  cursor: auto;
}
.modal {
  position: absolute;
  top: calc(var(--menubar-height));
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.8);
  padding: 20px;
  user-select: none;
}

.modal-frame {
  padding: 20px;
  background: #fff;
  width: 400px;
  text-align: left;
  background-color: var(--modal-bg-color);
  color: var(--modal-text-color);
  /* border: 1px solid var(--modal-text-color); */
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.modal-frame-show {
  animation: bounce 0.25s ease-out;
}
@keyframes bounce {
  0% {
    transform: scale(85%);
  }
  50% {
    transform: scale(105%);
  }
  100% {
    transform: scale(100%);
  }
}

.modal-topbar {
  height: 30px;
  font-size: 20px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: end;
}

.modal-close-button {
  padding: 10px;
  border: 0px;
  color: var(--modal-button-normal-bg-color);
}
.modal-close-button:hover {
  color: var(--modal-button-normal-bg-hover-color);
  filter: brightness(1.2);
  transform: scale(1.1);
  cursor: pointer;
}
.modal-close-button:active {
  transform: scale(0.95);
}

.modal-title {
  font-size: 120%;
  font-weight: bold;
  overflow-wrap: break-word;
  text-align: start;
}

.modal-message {
  margin-top: 10px;
  line-height: 130%;
  overflow-wrap: break-word;
  user-select: text;
  text-align: start;
}

.modal-input {
  margin-top: 10px;
  padding: 5px;
  border: 2px solid var(--modal-button-normal-bg-color);
  font-family: inherit;
  font-size: inherit;
  width: 100%;
  height: 30px;
  color: var(--modal-input-text-color);
  background-color: var(--modal-input-bg-color);
  text-align: start;
}

.modal-log {
  margin-top: 10px;
  width: 100%;
  height: 150px;
  color: var(--modal-input-text-color);
  background-color: var(--modal-input-bg-color);
  padding: 5px;
  border: 2px solid var(--modal-input-text-color);
  resize: none;
  /* pointer-events: none; */
  word-break: break-all;
  cursor: auto;
  text-align: start;
}

.modal-log-noscrollbar {
  overflow-y: hidden;
}

.modal-log-div {
  margin-top: 10px;
  width: 100%;
  height: 150px;
  color: var(--modal-input-text-color);
  background-color: var(--modal-input-bg-color);
  /* padding: 5px; */
  border: 2px solid var(--modal-input-text-color);
  resize: none;
  word-break: break-all;
  cursor: auto;
  text-align: start;

  overflow-y: auto;
  font-size: 16px;
  line-height: 20px;
}

.modal-log-div-0 p {
  margin: 5px;
}
/*
.modal-log-div-1 {
  display: block;
  border-inline-start: 3px solid
    color-mix(in srgb, var(--modal-input-text-color) 30%, transparent);
  padding-inline-start: 10px;
}

.modal-log-div-1 p {
  margin: 5px 0px;
} */

.modal-log-div table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}

.modal-log-div tr {
  border-top: 1px solid var(--modal-input-text-color);
  border-bottom: 1px solid var(--modal-input-text-color);
  padding: 8px;
}

.modal-log-div tr:nth-child(even) {
  background-color: color-mix(in srgb, var(--modal-input-bg-color), #000 10%);
}

.modal-log-div td {
  border-inline-end: 1px solid var(--modal-input-text-color);
  padding: 5px 10px;
  min-width: 70%;
  width: 30%;
  word-break: break-all;
}

.modal-log-div td:last-child {
  border-inline-end: 0px;
  max-width: 70%;
  width: 70%;
}

/* ///////////////////////////////// */

.modal-buttons {
  margin-top: 20px;
  display: flex;
  justify-content: end;
  gap: 7px;
}

.modal-buttons button {
  padding: 10px;
  background-color: var(--modal-button-normal-bg-color);
  color: var(--modal-button-normal-text-color);
  border: 0px;
  min-width: 100px;
  font-weight: bold;
  border-radius: 3px;
}
.modal-buttons button:hover {
  background-color: var(--modal-button-normal-bg-hover-color);
  transform: scale(1.01);
  cursor: pointer;
}
.modal-buttons button:active {
  transform: scale(0.98);
}

.modal-button-danger-color {
  background-color: var(--modal-button-danger-bg-color) !important;
  color: var(--modal-button-danger-text-color) !important;
}
.modal-button-success-color {
  background-color: var(--modal-button-success-bg-color) !important;
  color: var(--modal-button-success-text-color) !important;
}

/* ///////////////////////////////// */

.modal-progress-bar {
  margin-top: 10px;
  background-color: var(--modal-progress-bar-bg-color);
  border-radius: 9999px;
  width: 100%;
  height: 10px;
  position: relative;
  overflow: hidden;
}

.modal-progress-bar-animation {
  bottom: 0;
  top: 0;
  width: 45%;
  background-color: var(--modal-progress-bar-fg-color);
  border-radius: 1000px;
  position: absolute;
  animation: progress-bar-animation 2.5s linear infinite;
}

@keyframes progress-bar-animation {
  from {
    left: -50%;
  }
  to {
    left: 100%;
  }
}
