/* ==== CSS Variables ==== */
:root {
  --bg-color: #a3c2db;
  --bg-color-alt: #91b6d4;
  --bg-color-block: white;
  --text-color: black;
  --text-color-alt: white;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  --box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  --text-shadow: 2px 2px 4px black;
  --font-family: Arial, sans-serif;
}

/* ==== Global Reset ==== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  /* outline: 1px red dashed; */
}

html, body {
  overflow: hidden;
}

/* ==== App Layout ==== */
body {
  background-color: var(--bg-color);
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.app {
  width: 370px;
  max-width: 370px;
  height: 640px;
  max-height: 640px;
  position: relative;
  background-color: var(--bg-color-alt);
  box-shadow: var(--shadow);
  border-radius: 12px;
  color: var(--text-color);
  font-family: var(--font-family);
  margin: 10px;
  font-size: 16px;
  color: var(--text-color);
  line-height: 1.0;
}

/* ==== Header ==== */
.header {
  width: 100%;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  padding: 0 10px;
}

.header-title {
  font-size: 32px;
  font-weight: bold;
  text-transform: uppercase;
  color: var(--text-color-alt);
  text-shadow: var(--text-shadow);
}

.header-image {
  width: 72px;
  height: 40px;
}

/* ==== Main ==== */
.main {
  width: 100%;
  height: 530px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0 10px;
}

.block {
  width: 100%;
  background-color: var(--bg-color-block);;
  border: 1px solid black;
  padding: 10px;
  margin-bottom: 10px;
  box-shadow: var(--box-shadow);
}

.block h2 {
  font-size: 18px;
  font-weight: bold;
}

.block label {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.block label span {
  font-size: 16px;
}

.block input,
.block select {
  font-family: Arial, sans-serif;
  font-size: 16px;
  padding: 2px 5px;
  box-sizing: border-box;
  border: 1px solid #777 !important;
  border-radius: 2px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.2);
  background-color: white;
  margin: 3px 0;
  color: black !important;
  appearance: none;
  outline: none; 
}

.block select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12'><polygon points='0,0 12,0 6,6' fill='%23000'/></svg>");
  background-repeat: no-repeat;
  background-position: right 6px top 6px;
  background-size: 12px;
  padding-right: 20px;
}

.block.drone select {
  width: 220px;
}

.block.parameters input,
.block.stats input {
  width: 120px;
}

.block.stats input {
  background-color: #eee;
}

.block input::placeholder {
  color: #777 !important;
  opacity: 1;
}

.block input::-webkit-input-placeholder {
  color: #777 !important;
}

.block input::-moz-placeholder {
  color: #777 !important;
  opacity: 1;
}

.block input:-ms-input-placeholder {
  color: #777 !important;
}

.block.stats input[disabled]:not(:placeholder-shown) {
  color: black !important;
  -webkit-text-fill-color: black !important;
  border: 1px solid #777 !important;
  opacity: 1 !important;
  -webkit-opacity: 1 !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

.block.stats input[disabled] {
  opacity: 1 !important;
  -webkit-opacity: 1 !important;
}

small {
  font-size: 10px;
}

label {
  position: relative;
  display: block;
}

.input-unit,
.output-unit {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #777;
  font-size: 16px;
  pointer-events: none;
  user-select: none;
  z-index: 2;
}

.input-unit {
  right: 25px;
}

@media (pointer: coarse) {
  .input-unit {
    right: 8px;
  }
}

.output-unit {
  right: 8px;
}

/* ==== Footer ==== */
.footer {
  width: 100%;
  height: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--text-color);
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.footer-content {
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 10px;
}

.footer a {
  color: var(--text-color);
  text-decoration: none;
}
