:root {
  --bar-bg-color: #2196f3;
  --bar-text-color: #fff;
}

html {
  font-family: "Roboto", sans-serif;
  font-size: 16px;
}

body {
  margin: 0;
  height: 100vh;
}

#app {
  height: 100%;
}

#app > div {
  height: 100%;
  display: flex;
}

/* Editor and Preview Layout and Style */

#editor.hidden,
#preview.hidden {
  display: none;
}

#editor,
#preview {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}

#editor {
  margin-left: 0.5rem;
}

#preview {
  margin-right: 0.5rem;
}

#editor textarea {
  resize: none;
  width: 100%;
  flex: 1;
  box-sizing: border-box;
  border: 1px solid #ddd;
  background: #fff;
}

#preview #output {
  flex: 1;
  overflow: auto;
  border: 1px solid #ddd;
}

#editor.maximized,
#preview.maximized {
  margin: 0 0.5rem;
}

/*
-----------------
  Headers Style 
-----------------
*/

header {
  padding: 0 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bar-bg-color);
  color: var(--bar-text-color);
  border: 1px solid #ddd;
}

header h1 {
  margin: 0;
  font-weight: 500;
  font-size: 1.25rem;
}

button.material-icons {
  /* font-size: 1.8rem;
  padding: 4px;
  border: 1px solid black;
  border-radius: 50%;
  cursor: pointer; */
  padding: 8px;
  color: inherit;
}

/*
----------------------
  Editor Style
----------------------
*/
#editor textarea {
  font-family: "Roboto Mono", monospace;
  font-size: 14px;
}

/*
----------------------
  Preview Style
----------------------
*/

#preview #output {
  padding: 0.9rem;
  font-family: inherit;
  font-weight: 300;
}

#preview h1 {
  font-weight: 400;
}

#preview h2,
#preview h3,
#preview h4,
#preview h5,
#preview h6 {
  font-weight: inherit;
}

#preview img {
  max-width: 100%;
  max-height: 100%;
}

#preview blockquote {
  margin: 0;
  padding: 0 8px;
  border-left: 8px solid #555;
}

#preview code {
  font-family: "Roboto Mono", monospace;
  font-size: 14px;
}

/* 
-------------------------
M E D I A   Q U E R I E S
-------------------------
*/

@media (max-width: 720px) {
  #app > div {
    flex-direction: column;
  }

  #editor,
  #preview {
    margin: 0;
    height: initial;
  }

  #editor textarea {
    padding: 0 0.5rem;
  }

  #editor.maximized,
  #preview.maximized {
    margin: 0;
  }

  #preview #output {
    flex: initial;
    box-sizing: border-box;
    height: calc((100vh / 2) - 42px);
  }

  #preview.maximized #output {
    height: calc(100vh - 42px);
  }
}
