@import "reset.css";

@font-face {
  font-family: "substitut";
  src: url("../fonts/substitut.ttf");
}

@font-face{
  font-family: 'notCourierReg';
  src: url('../fonts/notCourierSans/NotCourierSans.woff');
}

@font-face{
  font-family: 'notCourierReg-Bold';
  src: url('../fonts/notCourierSans/NotCourierSans-Bold.woff');
}

:root {
  --main-color: rgb(42, 201, 194);
  --bg-color: rgb(240, 240, 240);
  --nav-color: rgb(42, 201, 194);
}

/* global */

html {
  font-size: 14px;
}

body {
  color: var(--main-color);
  background: var(--bg-color);
  line-height: 1.5rem;
  font-family: 'notCourierReg', monospace;
  overflow-x: hidden;
}

a {
  color: inherit;
}

a:hover {
  text-decoration: underline wavy;
}

h1,
h2 {
  font-family: 'notCourierReg-Bold';
}

em {
  font-style: italic;
}

.hidden {
  display: none;
}

/*  nav */

nav {
  display: flex;
  padding: .5em;
  position: fixed;
  background: var(--bg-color);
  border-bottom: 1px solid;
  left: 0;
  right: 0;
}

nav .title,
nav .filters div {
  flex: 1;
}

nav .title {
  width: 25%;
  cursor: help;
}

nav .title h1 {
  font-family: 'notCourierReg';
}


#about {
  position: absolute;
  left: 0;
  right: 0;
  height: auto;
  padding: 1em;
  background-color: var(--bg-color);
  border-bottom: 1px solid;
  z-index: 10;
  max-height: 50vh;
  overflow-y: auto;
  margin-top: calc(.5em + 1px);
}

#about .close {
  position: absolute;
  right: 0.5em;
  font-size: 2em;
  cursor: pointer;
}

#about > * {
  max-width: 800px;
}

#about h2 {
  padding: 1em 0;
}

#about p:nth-of-type(1) {
  font-size: 1.5em;
}

#about ul {
  margin-left: 1em;
}

nav .filters {
  display: flex;
  width: 75%;
}

nav .filters div {
  flex: 1;
  position: relative;
}

nav .filters div summary {
  padding: 0 0.5rem 0 0.5rem;
}

nav .filters div summary:hover {
  cursor: s-resize;
}

nav .filters div ul {
  display: none;
  position: absolute;
  background: var(--bg-color);
  width: 100%;
  max-height: 50vh;
  overflow-y: auto;
}

nav .filters div:hover ul {
  display: block;
}

nav .filters div ul li {
  border-bottom: 1px solid;
  padding: 0 0.5rem 0 0.5rem;
  border-left: 1px solid;
  border-right: 1px solid;
}

nav .filters div ul li:nth-of-type(1) {
  margin-top: .5em;
}

nav .filters div ul li:hover {
  cursor: pointer;
}

nav .filters div ul li:before {
  content: "◯ ";
  font-size: 0.8rem;
  padding: 0 1rem 0 0;
}

nav .filters div ul li:hover:before,
nav .filters div ul li.selected:before {
  content: "◉ ";
}

nav #try-fonts {
  margin: -.5em;
  margin-left: 0;
  top: 0;
  right: 0;
  /* background: var(--main-color); */
  /* color: var(--bg-color); */
  cursor: pointer;
  border-left: 1px solid;
}

nav #try-fonts summary {
  padding: .5em;
}

nav #try-fonts:hover {
  background: var(--bg-color);
  color: var(--main-color);
}

/* font view */

#main-fonts {
  padding-top: 2.5em;
  column-gap: 1em;
  column-width: 30vw;
}

.font {
  border-bottom: 1px solid;
  display: inline-block;
  hyphens: auto;
  margin-bottom: 1em;
  padding: 1em;
  width: calc(100% - 2em);
}

.font.hidden {
  display: none;
}

.font h2 {
  font-size: 1.5em;
  padding-bottom: .5em;
}

.head-font {
  display: flex;
  width: 100%;
}

.head-font > div {
  flex: 1;
}

.head-font div span {
  display: block;
}

.head-font div .title {
  text-decoration: underline;
}

.sample-text {
  font-size: 5rem;
  line-height: 5.5rem;
  padding: 0.25em 0em 0.25em 0em;
}

.sample-text.try {
  display: none;
}

.sample-text.letter {
  line-height: 27rem;
  font-size: 30rem;
  word-break: break-all;
  padding: 0.25em 0em 0em 0em;
}

.sample-text.sentence {
  font-size: 5rem;
  line-height: 5.5rem;
}

#main-fonts.try-mode {
  column-width: 100vw;
}

#main-fonts.try-mode .sample-text.preview {
  display: none;
}

#main-fonts.try-mode .sample-text.try {
  display: block;
  color: inherit;
  background: inherit;
  border: none;
  width: 100%;
  font-size: 10rem;
}

/*

#main-fonts.try-mode .sample-text.letter,
#main-fonts.try-mode .sample-text.sentence,
#main-fonts.try-mode .sample-text {
  font-size: 5rem;
  line-height: 5.5rem;
}

#main-fonts.try-mode .sample-text {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  width: calc(100% - 1em);
}

*/

/* tools */

#tester {
  position: fixed;
  display: flex;
  bottom: 0.5rem;
  right: 10px;
  padding: 0.5rem 0 0.5rem 0.5rem;
  width: auto;
  text-align: right;
  align-items: end;
}

#tester input {
  padding: 0;
  margin: 0;
  width: 100%;
  border: none;
}

#tester > div {
  width: 100px;
}

#tester > div h5 {
  width: 100%;
}

#tester .size {
  padding: 0 0.5rem 0 0;
  display: none;
}

#tester .size.visible {
  display:  block;
}

#tester .colors {
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  width: 65px;
}

#tester .colors .color {
  width: 100%;
}

#tester .colors .color input {
  cursor: pointer;
}

#tester .colors .color:hover:before {
  position: absolute;
  right: 102%;
  width: 25vw;
}

#tester .colors .color:nth-of-type(1):hover:before {
  content: "Change text color ";
}

#tester .colors .color:nth-of-type(2):hover:before {
  content: "Change background color ";
}

@media screen and (max-width: 1500px) {

  #main-fonts {
    column-gap: 1em;
    column-width: 49vw;
  }

}

@media screen and (max-width: 1000px) {

  #main-fonts {
    column-gap: 1em;
    column-width: 100vw;
  }

}

@media screen and (max-width: 600px) {
  nav .filters {
    display: none;
  }

  #try-fonts {
    display: none;
  }

/*
  nav h1 {
    width: 100%;
    border-left: 0px solid;
    padding: .2em 0;
    margin-right: 0;
  }

  #main-fonts {
    padding-top: 3em;
  }

  .head-font {
    flex-direction: column;
  }
  .head-font > * {
    border-left: none;
    border-bottom: 1px dotted;
    padding-bottom: .25em;
  }

  .head-font > div {
    flex-direction: row;
  }

  .sample-text {
    font-size: 2.5rem;
    line-height: 2.5rem;
  } */

}
