html {
  font-size: 14px;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

html, body {
  margin: 0;
  padding: 0;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  height: 100%;
}

/* Plain-CSS replacements for the two Bootstrap 5 utility classes the app used
   (fw-bold, text-danger) - Bootstrap itself was removed because its CSS relies
   on ~1,371 var(--bs-*) custom properties, unsupported on Chromium 39/40
   (Android 5.1.1). Colors/weights match Bootstrap 5's defaults exactly. */
.text-bold {
  font-weight: bold;
}

.text-error {
  color: #dc3545;
}

.app-banner {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  padding: 16px 20px;
  margin: 0;
  box-sizing: border-box;
  text-align: center;
}

.app-banner--success {
  background-color: #20C69D;
}

.app-banner--error {
  background-color: #FF5757;
}

.app-banner--info {
  background-color: #4E77E0;
}

.app-button {
  display: inline-block;
  font-weight: bold;
  padding: 10px 24px;
  border: none;
  color: #fff;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
  font-family: inherit;
  transition: filter 0.15s ease;
  /* Suppress Android/old-Chromium's default orange tap-highlight glow; the app already has its own
     intentional :hover brightness feedback below. */
  -webkit-tap-highlight-color: transparent;
}

.app-button:hover {
  -webkit-filter: brightness(1.08);
  filter: brightness(1.08);
}

.app-button:disabled {
  opacity: 0.6;
  cursor: default;
  filter: none;
}

.app-button--primary {
  background-color: #4E77E0;
}

.app-button--success {
  background-color: #20C69D;
}

.app-button--secondary {
  background-color: #AAB2BD;
}

.app-button--danger {
  background-color: #FF5757;
}

.app-nav-button {
  position: absolute;
  top: 20px;
  min-width: 200px;
}

.app-nav-button--left {
  left: 20px;
}

.app-nav-button--right {
  right: 20px;
}

.app-input {
  display: block;
  width: 100%;
  padding: 10px;
  border: 1px solid #ccd3db;
  border-radius: 4px;
  box-sizing: border-box;
  font-family: inherit;
  color: #1f1f1f;
}

.app-input:focus {
  outline: none;
  border-color: #4E77E0;
  box-shadow: 0 0 0 2px rgba(78, 119, 224, 0.25);
}

select.app-input,
select.app-input option {
  color: #000000;
}

@media (max-width: 480px) {
  .app-banner {
    min-height: 70px;
  }

  .app-button {
    padding: 8px 14px;
  }

  .app-nav-button {
    top: 10px;
    min-width: 90px;
    padding: 8px 14px;
  }
}

.app-loading-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
  background: rgba(0, 0, 0, 0.15);
  display: none;
  z-index: 9999;
}

.app-loading-overlay--visible {
  display: block;
}

.app-loading-overlay__spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
}

.app-dialog-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 10000;
  padding: 20px;
  box-sizing: border-box;
  text-align: center;
  overflow-y: auto;
}

.app-dialog-overlay::before {
  content: "";
  display: inline-block;
  height: 100%;
  vertical-align: middle;
}

.app-dialog {
  display: inline-block;
  vertical-align: middle;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  max-width: 700px;
  width: 100%;
  padding: 24px;
  box-sizing: border-box;
  text-align: right;
}

.app-dialog__title {
  font-weight: bold;
  color: #1f1f1f;
  margin-bottom: 12px;
  text-align: left;
}

.app-dialog__message {
  color: #333;
  margin-bottom: 20px;
  white-space: pre-line;
  margin-bottom: 30px;
  text-align: left;
}

.app-dialog__button {
  display: inline-block;
  font-weight: bold;
  padding: 10px 32px;
  border: none;
  border-radius: 6px;
  color: #fff;
  background-color: #4E77E0;
  cursor: pointer;
  font-family: inherit;
}

.app-dialog__button:hover {
  -webkit-filter: brightness(1.08);
  filter: brightness(1.08);
}

@media (max-width: 480px) {
  .app-dialog {
    padding: 18px;
  }

  .app-dialog__button {
    padding: 8px 24px;
  }
}
