:root {
  --header-height: 10%;
  --main-height: calc(100% - var(--header-height));
  --lightest-bg-color: #f0f9ff;
  --lighter-bg-color: #e0f2fe;
  --darkest-text-color: #0c4a6e;
}

@media screen and (max-width: 736px) {
  :root {
    --header-height: 15%;
    --main-height: calc(100% - var(--header-height));
  }
}

/* General styling */
body {
  margin: 0;
  height: 100vh;
  background-color: var(--lightest-bg-color);
  color: var(--darkest-text-color);
  font-family: "Nunito", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

@media screen and (min-width: 737px) {
  body,
  input,
  select {
    font-size: 11pt;
  }
}
@media screen and (max-width: 736px) {
  body,
  input,
  select {
    font-size: 10pt;
  }
}

select,
option {
  color: var(--darkest-text-color);
  font-family: "Nunito", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

textarea {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;

  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  resize: none;
  background-color: var(--lighter-bg-color);
  color: var(--darkest-text-color);
}

#wrapper {
  height: 95%;
  width: 90%;
  max-width: 60em;
  margin: 0 auto;
}

/* Header */
.header-grid {
  height: var(--header-height);

  display: grid;
  gap: 1rem;

  /* Explicit grid */
  grid-template-areas: "exit header export";
  grid-template-columns: 1fr 5fr 1fr;
  align-items: center;
  row-gap: 0;
}

.exit {
  grid-area: exit;
}

.radius-button {
  background: #075985;
  white-space: nowrap;
  text-decoration: none;
  color: #fff;
  cursor: pointer;
  display: inline-block;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.8px;
  margin-bottom: 0;
  padding: 10px 14px;
  border-radius: 10px;
  position: relative;
  z-index: 1;
  border: 0;
}

.header {
  grid-area: header;
  text-align: center;
}
.export {
  grid-area: export;
  text-align: right;
}

/* Main UI */
.main-grid {
  height: var(--main-height);

  display: grid;
  gap: 1rem;

  /* Explicit grid */
  grid-template-areas:
    "examples tabOutput"
    "pitches tabOutput"
    "options tabOutput";

  grid-template-rows: min-content auto min-content;
  grid-template-columns: 150px auto;
  min-height: 0; /* NEW */
  min-width: 0; /* NEW; needed for Firefox */
}

.examples {
  grid-area: examples;
  overflow: hidden;
  min-width: 0; /* for Firefox */
}
.pitches {
  grid-area: pitches;
  overflow: hidden;
  min-width: 0; /* for Firefox */
}
.options {
  grid-area: options;
  overflow: hidden;
  min-width: 0; /* for Firefox */
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  align-self: flex-end;
  gap: 10px;
}
.tab_output {
  grid-area: tabOutput;
  overflow: hidden;
  min-width: 0; /* for Firefox */
}
#pitchInput {
  font-family: "Roboto Mono", monospace;
}
#tabOutput {
  /* font-family: "Courier New", Courier, monospace; */
  font-family: "Roboto Mono", monospace;
}

@media screen and (max-width: 736px) {
  .header-grid {
    margin-top: 2vh;
    margin-bottom: 5vh;
    grid-template-areas:
      "exit exit exit"
      "_blank header export";
  }
  .radius-button {
    padding: 5px 10px;
  }

  .main-grid {
    grid-template-areas:
      "examples examples"
      "pitches options"
      "tabOutput tabOutput";

    grid-template-rows: min-content min-content auto;
    grid-template-columns: fit-content fit-content;
  }

  .examples {
    display: flex;
    justify-content: flex-end;
  }

  #wrapper {
    height: auto;
  }

  .pitches {
    height: 50vh;
  }

  .tab_output {
    height: 90vh;
  }
}
