/* Focused UI fixes for shared header, language picker and form alignment. */
.field-grid {
  align-items: start;
}

.preset-input-row {
  grid-template-columns: minmax(0, 1fr) 74px;
}

.preset-restore-button {
  width: 74px;
}

.route-file-storage {
  grid-template-columns: minmax(360px, 0.58fr) minmax(0, 1fr);
  align-items: start;
}

.route-file-storage .route-name-control {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
}

.route-file-storage .backup-group {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  margin-top: 28px;
  transform: none;
}

.route-file-storage .storage-status {
  grid-column: 1 / -1;
  grid-row: 2;
}

@media (max-width: 820px) {
  .route-file-storage {
    grid-template-columns: 1fr;
  }

  .route-file-storage .backup-group {
    grid-column: 1;
    grid-row: auto;
    margin-top: 4px;
  }
}

select {
  appearance: none;
  line-height: normal;
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.language-picker select option {
  color: var(--text);
  background: #ffffff;
}

@media (max-width: 820px) {
  .language-picker {
    grid-template-columns: minmax(0, 1fr);
  }

  .language-picker .language-flag {
    display: none;
  }
}
