:root {
  --background: #C3F1C5;
  --toolbar: #e8efeb;

  --tabBorder: #b9cfc1;
  --activeEntryBorder: #2a4634;

  --gray: gray;

  --starGold: #bfb016;
  --shareRed: #dc9765;
  --editGreen: #74d774;

  --toolbarWidth: 2rem;
  @media (width > 800px) {
    --toolbarWidth: 1.5rem;
  }
}

button {
  cursor: pointer;
}

button, input, textarea {
  font-size: inherit;
}

textarea, input {
  width: 95%;
  font-family: inherit;
}

html, body {
  margin: 0;
  padding: 0;
  font-size: 21px;
  font-family: 'PT Serif', serif;
  background-color: var(--background);
}

#app {
  block-size: 100dvh;
  inline-size: 100dvw;
  display: flex;
  flex-direction: column-reverse;

  @media (orientation: landscape) {
    flex-direction: row;
  }
  @media (width > 800px) {
    flex-direction: column;
  }
}

.ram-toolbar {
  flex: 0 0 var(--toolbarWidth);
  display: flex;
  background-color: var(--toolbar);
  font-size: 0.8em;

  @media (orientation: portrait) {
    padding-left: 0.3em;
    text-align: right;
  }

  @media (orientation: landscape) {
    padding-top: 0.3em;
    flex-direction: column;
  }

  @media (width > 800px) {
    padding-left: 0.1em;
    padding-top: 0;
    flex-direction: row;
  }
}

.ram-toolbar-button {
  font-size: 1.7em;
  font-weight: bold;
  text-align: center;
  @media (orientation: portrait) {
    margin-right: 0.3em;
  }
  @media (orientation: landscape) {
    margin-bottom: 0.1em;
  }
  @media (width <= 800px) {
    background: none;
    border: none;
  }
  @media (width > 800px) {
    font-size: inherit;
    font-weight: normal;
    width: auto;
    margin-right: 0.3em;
    margin-bottom: 0;
  }
  @media (width <= 800px) {
    width: 1.25em;
  }
}

.ram-toolbar__reload span:after {
  content: '↻';
  @media (width > 800px) {
    content: '⟳ Reload';
  }
}

.ram-toolbar__cleanup span:after {
  content: '⎚';
  @media (width > 800px) {
    content: '⎚ Clean';
  }
}

.ram-toolbar__unread {
  position: relative;
  font-size: 1em;
  @media (width <= 800px) {
    width: var(--toolbarWidth);
    height: var(--toolbarWidth);
  }

  &:before {
    content: ' ';
    border: 0.1em solid var(--gray);
    border-radius: calc(var(--toolbarWidth) * 0.4);
    position: absolute;
    top: 10%;
    right: 10%;
    width: 80%;
    height: 80%;
    box-sizing: border-box;
    @media (width > 800px) {
      display: none;
    }
  }

  &:after {
    content: none;
    @media (width > 800px) {
      content: ' Unread';
    }
  }
}

.ram-toolbar__starred span:after {
  content: '★';
  @media (width > 800px) {
    content: '☆ Starred';
  }
}

.ram-toolbar__prev span:after {
  content: '◂';
  @media (width > 800px) {
    content: '◃ Previous';
  }
}

.ram-toolbar__next span:after {
  content: '▸';
  @media (width > 800px) {
    content: '▹ Next';
  }
}

.ram-toolbar-tab {
  background: var(--toolbar);
  border: 2px solid var(--toolbar);

  @media (width > 800px) {
    margin-bottom: 0;
  }

  &[aria-current=page] {
    background-color: var(--background);
    font-weight: bold;

    border-radius: 0 0 0.4em 0.4em;
    border-color: var(--tabBorder);
    border-top-color: var(--background);
    @media (orientation: landscape) {
      border-radius: 0 0.4em 0.4em 0;
      border-color: var(--tabBorder);
      border-left-color: var(--background);
    }
    @media (width > 800px) {
      border-radius: 0.4em 0.4em 0 0;
      border-color: var(--tabBorder);
      border-bottom-color: var(--background);
    }
  }
}

.ram-toolbar-errors {
  .toggle {
    position: absolute;
    right: 0;
    width: var(--toolbarWidth);
    height: var(--toolbarWidth);
    color: var(--shareRed);
    display: none;
    @media (width > 800px) {
      display: block;
    }
  }

  .list {
    background: white;
    white-space: pre-line;
    position: absolute;
    top: 0;
    right: var(--toolbarWidth);
    left: var(--toolbarWidth);
    max-height: 10em;
    padding: 1em;
    overflow-y: scroll;
    display: none;
  }

  .toggle:hover + .list,
  .list:hover {
    display: block;
  }

  .delete {
    position: absolute;
    top: 0;
    right: var(--toolbarWidth);
  }
}

.ram-container {
  flex-grow: 1;
  display: flex;
  gap: 1em;
  flex-direction: row;
  align-items: start;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
}

.ram-entry {
  display: grid;
  grid-template-areas: 'title' 'source' 'article' 'comment' 'tags' 'buttons';
  grid-template-rows: min-content min-content 1fr min-content min-content min-content;

  @media (width > 800px) {
    grid-template-columns: min-content 1fr max-content;
    grid-template-rows: min-content 1fr min-content min-content min-content;
    grid-template-areas:
      'star  title   source'
      'empty article article'
      'empty comment comment'
      'empty tags    tags'
      'empty buttons buttons'
  }

  box-sizing: border-box;
  padding: 0.25rem;
  max-block-size: 100%;
  block-size: 100%;
  min-inline-size: min(100%, 32em);
  max-inline-size: 32rem;
  border: 0 solid var(--tabBorder);
  border-left-width: 2px;
  scroll-snap-align: start;

  &[aria-current=true] {
    border-color: var(--activeEntryBorder);
  }
}

.ram-entry__header {
  font-family: ubuntu, sans-serif;
  font-size: 1em;
  line-height: 1.3em;
  font-weight: normal;
  margin: 0;
  grid-area: title;
  @media (width > 800px) {
    font-size: 1.5em;
    line-height: 1.2em;
    font-weight: bold;
  }

  * {
    display: inline;
  }
}

.ram-entry__header-link {
  text-decoration: none;
}

.ram-entry__header-star {
  display: none;
  @media (width > 800px) {
    font-size: 1.5em;
    display: inline;
    grid-area: star;
    align-self: start;
    color: var(--starGold);
    border-width: 0;
    background: none;
    width: 1.2em;
    height: 1em;
  }

  span:after {
    content: '☆';
  }

  &[aria-pressed=true] {
    span:after {
      content: '★';
    }
  }

  &[aria-busy=true] {
    font-family: FreeSans, sans-serif;

    span:after {
      content: '⇅';
    }
  }
}

.ram-entry__content {
  display: block;
  overflow-y: auto;
  grid-area: article;
  clear: both;
  line-height: 1.3em;

  p {
    max-width: 30em;
  }

  p:first-child {
    margin-top: .5em;
  }

  p:last-child {
    margin-bottom: .5em;
  }

  img, picture, video {
    max-width: 100%;
  }

  svg {
    display: none;
  }

  h1, h2, h3, h4, h5, h6 {
    font-family: ubuntu, sans-serif;
    margin: 0.5em 0;
  }

  h1 {
    font-size: 1em;
    line-height: 1.3em;
    @media (width > 800px) {
      font-size: 1.4em;
      line-height: 1.2em;
    }
  }

  h2 {
    font-size: 0.95em;
    line-height: 1.3em;
    @media (width > 800px) {
      font-size: 1.3em;
      line-height: 1.15em;
    }
  }

  h3 {
    font-size: 0.9em;
    line-height: 1.3em;
    @media (width > 800px) {
      font-size: 1.2em;
      line-height: 1.15em;
    }
  }

  h4 {
    font-size: 0.85em;
    line-height: 1.15em;
    @media (width > 800px) {
      font-size: 1.15em;
    }
  }

  h5 {
    font-size: 0.8em;
    line-height: 1.1em;
    @media (width > 800px) {
      font-size: 1.1em;
    }
  }

  h6 {
    font-size: 0.75em;
    line-height: 1.3em;
    @media (width > 800px) {
      font-size: 1em;
    }
  }
}

.ram-entry__content-input {
  grid-area: article;
}

.ram-entry__comment-input {
  grid-area: comment;
}

.ram-entry__source {
  font-size: .5em;
  grid-area: source;
  text-align: right;
  margin-left: 0.5em;
  width: 100%;
  display: inline-block;
  @media (width > 800px) {
    max-width: 20em;
    font-size: 1em;
  }
}

.ram-entry__tags {
  grid-area: tags;
  font-size: 0.7em;
  margin: 0;
  text-align: right;
  color: var(--gray);
}

.ram-entry__toolbar {
  align-self: end;
  grid-area: buttons;
  display: block;
  text-align: right;
  background: var(--background);
  @media (orientation: portrait) {
    bottom: var(--toolbarWidth);
  }
  white-space: nowrap;
  font-size: 0.7em;
  @media (width <= 800px) {
    font-size: 0.85em;
  }
  @media (width > 800px) {
    text-align: left;
  }
}

.ram-entry__toolbar-button {
  background: none;
  border: none;
  height: 2em;
  @media (width <= 800px) {
    padding: 0.3em 0.5em;
  }
  @media (orientation: portrait) {
    padding: 0.3em;
  }
}

.ram-entry__toolbar-star {
  span:after {
    content: '☆ Star';
    color: var(--starGold);
  }

  &[aria-pressed=true] {
    span:after {
      content: '★ Star';
    }
  }

  &[aria-busy=true] {
    span:after {
      content: '⇅ Star';
    }
  }
}

.ram-entry__toolbar-share span:after {
  content: '⚐ Share';
  color: var(--shareRed);
}

.ram-entry__toolbar-webdev span:after {
  content: '⚐ Webdev';
  color: var(--shareRed);
}

.ram-entry__toolbar-edit span:after {
  content: '✍ Edit';
  color: var(--editGreen);
}

/*# sourceMappingURL=styles.css.map */