@import url("../src/css/FocusEditor.css?7f09daa95a636fd638fdebd591799fbf16d4570f");
@import url("../src/css/themes/plex-mono/plex-mono.css?7f09daa95a636fd638fdebd591799fbf16d4570f");

:root {
  --nav-height: 3rem;
  --font-family:
    "IBM Plex Mono", ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas,
    Liberation Mono, monospace;
  color-scheme: light dark;
  --color-white: light-dark(#fff, #202020);
  --color-grey: light-dark(#ddd, #333);
  --color-almost-white: light-dark(#eee, #666);
}

body,
html {
  height: 100%;
  padding: 0;
  margin: 0;
}

body {
  font-family: var(--font-family);
  background: var(--color-white);
}

nav {
  display: none;
  position: fixed;
  top: 0.5rem;
  right: 0.5rem;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica,
    Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  font-size: 0.7rem;

  ul {
    margin-top: 2rem;
    padding: 0;
    background: var(--color-white);
    border-radius: 4px;
    overflow: hidden;
    box-shadow:
      rgba(0, 0, 0, 0.2) 0px 12px 28px 0px,
      rgba(0, 0, 0, 0.1) 0px 2px 4px 0px,
      rgba(255, 255, 255, 0.05) 0px 0px 0px 1px inset;
    font-size: 0.9rem;
    li {
      list-style: none;
      display: flex;
      justify-content: space-between;
      gap: 1rem;
    }
    button,
    label {
      font-size: 0.9rem;
      background: none;
      border: none;
      padding: 0.75em 1em;
      font-family: var(--font-family);
      display: block;
      width: 100%;
      text-align: left;
      color: currentColor;
      &:hover {
        background: var(--color-almost-white);

        cursor: pointer;
      }
    }
    input[type="checkbox"] {
      display: none;
    }
    label:has(+ input[type="checkbox"]:checked) {
      font-weight: bold;
    }
    hr {
      display: block;
      width: 100%;
      height: 3px;
      border: none;
      background: var(--color-grey);
      margin: 0;
    }
  }
}
nav:has(+ #toggle-menu-button #toggle-menu:checked) {
  display: block;
}

#filename-holder {
  opacity: 0.2;
  padding: 0.5rem 1rem;
  text-align: center;
  transition: opacity 0.2s ease-in-out;
  display: none;
  @media only screen and (max-width: 768px) {
    display: none;
  }
  &:hover,
  &:focus-within {
    opacity: 1;
  }
  input {
    font-size: 1rem;
    font-family: var(--font-family);
    border: 0;
    padding: 0;
    width: 100%;
    text-align: center;
    background: none;
    &&:focus {
      outline: none;
    }
  }
}

.show-filename #filename-holder {
  display: block !important;
}

#toggle-menu-button {
  position: fixed;
  top: 0.25rem;
  right: 0.75rem;
  label {
    padding: 4px 6px;
    position: absolute;
    top: 0;
    left: 0;
    width: 1rem;
    height: 1.25rem;
    z-index: 10;
    padding-top: 0.5rem;
    border-radius: 4px;
    @media (hover: hover) {
      &:hover {
        background: var(--color-almost-white);
        cursor: pointer;
      }
    }
  }
  input {
    opacity: 0;
  }
  @media (prefers-color-scheme: dark) {
    label img {
      filter: invert(1);
    }
  }
}

focus-editor {
  padding: 1rem;
  height: calc(100% - 3rem);
  width: calc(100% - 2rem);
  max-width: 60rem;
  margin: 0 auto;
  .block:last-child {
    margin-bottom: calc(50vh - var(--nav-height));
  }
}
.focus-editor {
}

@media (pointer: coarse) {
  html {
    font-size: 22px;
  }
}

@media (pointer: coarse) {
  html {
    font-size: 22px;
  }
}

@media (pointer: coarse) and (max-width: 768px) {
  html {
    font-size: 18px;
  }
}
