.spray-app-window {
  min-width: 420px;
  min-height: 360px;
}

.spray-app {
  height: calc(100% - 18px);
  margin: 0;
  padding: 8px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 8px;
  background: #c0c0c0;
  overflow: hidden;
}

.spray-app__toolbar,
.spray-app__controls {
  background: #c0c0c0;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #404040;
  border-bottom: 2px solid #404040;
}

.spray-app__toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
}

.spray-app__button {
  min-height: 24px;
  padding: 2px 10px;
  background: #c0c0c0;
  border: 0;
  color: #000000;
  font: inherit;
  box-shadow:
    inset 1px 1px #ffffff,
    inset 2px 2px #dfdfdf,
    inset -1px -1px #000000,
    inset -2px -2px #808080;
}

.spray-app__button:active:not(:disabled) {
  padding: 3px 9px 1px 11px;
  box-shadow:
    inset 1px 1px #000000,
    inset 2px 2px #808080,
    inset -1px -1px #ffffff,
    inset -2px -2px #dfdfdf;
}

.spray-app__button:disabled {
  color: #808080;
  text-shadow: 1px 1px #ffffff;
}

.spray-app__quality {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 4px;
  white-space: nowrap;
}

.spray-app__status {
  min-width: 150px;
  margin-left: auto;
  padding: 3px 6px;
  background: #ffffff;
  color: #000000;
  border-top: 2px solid #404040;
  border-left: 2px solid #404040;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  font-size: 12px;
}

.spray-app__canvas-shell {
  position: relative;
  min-height: 0;
  background: #808080;
  border-top: 2px solid #404040;
  border-left: 2px solid #404040;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  overflow: auto;
  display: grid;
  place-items: center;
  padding: 8px;
}

.spray-app__dropzone {
  width: calc(100% - 24px);
  height: calc(100% - 24px);
  min-height: 220px;
  display: grid;
  place-items: center;
  padding: 18px;
  background: #efefef;
  color: #000000;
  text-align: center;
  border: 1px dotted #000000;
}

.spray-app__dropzone[hidden] {
  display: none !important;
}

.spray-app__dropzone--active {
  background: #ffffff;
  outline: 2px dotted #000080;
  outline-offset: -8px;
}

.spray-app__canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  background: #000000;
}

.spray-app__controls {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
}

.spray-app__field {
  display: grid;
  gap: 3px;
}

.spray-app__label {
  font-size: 11px;
  line-height: 1.15;
}

.spray-app__input {
  width: 100%;
  min-height: 22px;
  padding: 2px 4px;
  border: 0;
  background: #ffffff;
  color: #000000;
  font: inherit;
  box-shadow:
    inset 1px 1px #000000,
    inset 2px 2px #808080,
    inset -1px -1px #ffffff,
    inset -2px -2px #dfdfdf;
}

.spray-app__hidden-file {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 768px) {
  .spray-app-window {
    width: calc(100vw - 16px) !important;
    height: calc(100dvh - var(--taskbar-height) - 16px) !important;
  }

  .spray-app {
    grid-template-rows: auto minmax(180px, 1fr) auto;
    overflow: auto;
  }

  .spray-app__toolbar {
    align-items: stretch;
  }

  .spray-app__button,
  .spray-app__quality,
  .spray-app__status {
    flex: 1 1 130px;
  }

  .spray-app__status {
    margin-left: 0;
  }

  .spray-app__controls {
    grid-template-columns: 1fr;
  }

  .spray-app__dropzone {
    min-height: 180px;
  }
}
