:root {
  --md-dialog-container-color: white;
}

body {
  margin: 0;
  font-family: 'Open Sans', sans-serif;
}

h2 {
  font-weight: 600;
  font-size: 18px;
  margin: 0 8px;
}

.page-container {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

#block-factory-container {
  display: flex;
  box-sizing: border-box;
  height: 80%;
  flex-grow: 1;
}

#main-workspace {
  flex-basis: 60%;
  flex-grow: 1;
  flex-shrink: 1;
  margin: 8px;
  min-width: 500px;
}

.panel-container {
  display: flex;
  flex-basis: 40%;
  flex-direction: column;
  flex-grow: 1;
  flex-shrink: 2;
  min-width: 0;
}

.panel-container > * {
  margin: 8px;
  display: flex;
  flex-direction: column;
}

.fit-to-size {
  flex-basis: auto;
  min-height: auto;
}

.code-container {
  min-height: 0;
  flex-grow: 1;
}

.code-container > div {
  display: flex;
  flex-direction: column;
  min-height: 85px;
}

#block-preview-container {
  min-height: 200px;
}

#block-preview {
  height: 100%;
}

pre {
  overflow: scroll;
}

.toolbar {
  width: 100%;
  height: 64px;
  padding: 16px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  background: #2bb4ca;
  font-family: 'Google Sans', Roboto, Arial, sans-serif;
}

.logo {
  height: 36px;
  border: 0;
  box-shadow: none;
  margin: 0 16px 0 0;
}

.btn {
  background-color: #fff;
  border: 2px solid transparent;
  border-radius: 3px;
  color: #3c4043;
  font-family: 'Open Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  margin: 0 8px;
}

md-menu {
  max-height: 430px;
}

#file-upload-drop-zone {
  background-color: white;
  outline: 2px dashed #2bb4ca;
  outline-offset: -10px;
  border-radius: 8px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#file-upload-drop-zone > * {
  flex-grow: 0;
  margin: 12px 24px;
  text-align: center;
}
#file-upload-drop-zone > md-icon {
  --md-icon-size: 48px;
}

#file-upload-drop-zone.isDragging {
  background-color: rgba(0, 0, 0, 0.1);
}

#file-label {
  font-weight: 700;
  cursor: pointer;
}

.warning-message {
  color: #b00020;
}

.hidden {
  visibility: hidden;
}

.action-button {
  --md-icon-button-icon-size: 18px;
  --md-icon-button-state-layer-height: 24px;
  --md-icon-button-state-layer-width: 24px;
}

/* Hides an element visually but not from screen readers */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media screen and (max-width: 900px) {
  #block-factory-container {
    flex-direction: column;
    overflow-y: scroll;
  }

  #main-workspace {
    flex-grow: 2;
    min-height: 40vh;
  }

  #outputDiv {
    height: fit-content;
  }

  .panel-container > * {
    min-height: auto;
    flex-basis: auto;
  }

  .code-container > div {
    max-height: 300px;
  }
}

