:root {
  --main-color: rgb(209, 80, 65);
  --accent-color: rgb(249, 212, 63);
}

html {
  height: auto;
}

body {
  margin: initial;
  overflow: visible;
  height: auto;

  font-family: initial;
  -webkit-font-smoothing: initial;
  -moz-osx-font-smoothing: initial;
}

.phonemos_root {
  height: auto;
  overflow-y: visible;
  overflow-x: visible;
  display: block;
  gap: initial;
  width: auto;
}

.phonemos_navigation {
  width: auto;
  min-width: auto;
  margin: initial;
  flex-grow: initial;
}

.phonemos_navigation .phonemos_search {
  margin-left: initial;
  margin-bottom: initial;
}

.phonemos_navigation .phonemos_powered {
  display: inline;
  font-size: initial;
  margin-top: initial;
  width: auto;
  text-align: initial;
}

.phonemos_navigation .phonemos_objectTree ul {
  position: static;
  padding-left: initial !important;
  list-style: initial;
}

.phonemos_navigation .phonemos_objectTree ul::before {
  content: none;
  position: static;
  background: none;
  width: auto;
}

.phonemos_navigation .phonemos_objectTree ul li::before {
  content: none;
  margin-left: initial;
  color: initial;
}

.phonemos_navigation .phonemos_objectTree ul li a {
  margin-left: initial;
  text-decoration: initial;
}

.phonemos_navigation .phonemos_objectTree ul li a:hover {
  text-decoration: initial;
}

.phonemos_navigation .phonemos_objectTree ul li svg {
  display: inline;
}

.phonemos_content {
  position: static;
  flex-grow: initial;
  flex-shrink: initial;
  margin: initial;
}

.phonemos_content article {
  width: auto;
  margin-right: initial;
}

.phonemos_root
  .phonemos_wikipage
  .fabric-editor-block-mark[data-mode="full-width"] {
  width: auto;
}

.phonemos_root
  .phonemos_wikipage
  .pm-table-container[data-layout="full-width"] {
  width: auto;
}

.phonemos_search {
  position: static;
}

.phonemos_search .phonemos_search_query input {
  width: auto;
  background: initial;
  background-size: initial;
  padding-left: initial;
}

.phonemos_search .phonemos_search_loading_spinner {
  position: static;
  z-index: initial;
  right: initial;
  top: initial;
  font-size: initial;
}

.phonemos_search .phonemos_search_result {
  display: initial;
  position: static;
  top: initial;
  left: initial;
  width: auto;
  max-width: initial;
  background-color: initial;
  border: initial;
  box-shadow: initial;
  z-index: initial;
  padding: initial;
}

.phonemos_search .phonemos_search_result ul {
  padding: initial;
  margin: initial;
  list-style-type: initial;
}

.phonemos_search .phonemos_search_result ul li {
  cursor: initial !important;
  padding: initial;
  border-bottom: initial;
}

.phonemos_search .phonemos_search_result ul li:hover {
  background-color: initial;
}

.phonemos_search .phonemos_search_result ul li:last-child {
  border-bottom: initial;
}

.phonemos_search .phonemos_search_result ul li p.phonemos_search_extract {
  margin: initial;
}

.phonemos_toc_section {
  position: static;
  right: initial;
  top: initial;
  width: auto;
  height: auto;
  border: initial;
  box-shadow: initial;
  z-index: initial;
  background-color: initial;
}

.phonemos_toc_trigger {
  position: static;
  display: inline;
  right: initial;
  top: initial;
  cursor: initial;
}

.phonemos_toc_trigger input {
  display: inline;
}

.phonemos_toc_trigger input + span::before {
  content: initial;
  display: inline;
  width: auto;
  text-align: initial;
}

.phonemos_toc_trigger input:checked + span::before {
  content: initial;
}

.phonemos_toc_trigger input ~ .phonemos_toc_section {
  display: block;
}

.phonemos_toc_trigger input:checked ~ .phonemos_toc_section {
  display: block;
}

html {
  height: -webkit-fill-available;
}

.phonemos_wikipage a {
  color: var(--main-color) !important;
  font-weight: 600;
}

html body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto",
    "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
    "Noto Color Emoji", sans-serif;
}

body {
  margin: 0;
  overflow: hidden;
  height: 100vh;

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  p {
    line-height: 27px;
  }
}

.phonemos_root {
  height: 100%;
  display: flex;
  flex-wrap: wrap;
  width: 100vw;
}

.phonemos_topbar {
  flex: 0 0 100%; /* full width */
  height: 56px;
  border-bottom: 1px solid #e5e7eb;
  box-sizing: border-box;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  box-shadow: 0 8px 6px -6px rgba(0, 0, 0, 0.2);
  position: relative;

  .phonemos_topbar_logo {
    font-weight: 600;
    font-size: 1.2rem;
    width: 50px;
  }
}

.phonemos_topbar_topic_name {
  color: var(--main-color);
  margin-left: 50px;
  font-size: 1.7rem;
}

.phonemos_search {
  width: 100%;
  max-width: 320px;
  position: relative;
}

.phonemos_navigation {
  flex: 0 0 250px;
  width: 200px;
  min-width: 200px;
  padding: 30px 30px 20px;
  flex-grow: 0;
  height: calc(100vh - 56px);
  overflow: auto;
  background-color: #f6f6f6;

  .phonemos_search {
    margin-left: -5px;
    margin-bottom: 8px;
  }

  & .phonemos_powered {
    display: block;
    font-size: 0.5em;
    margin-top: 20px;
    width: 100%;
    text-align: left;
  }

  .phonemos_objectTree {
    font-size: 15px;
    letter-spacing: 0.24px;
    line-height: 22px;
  }

  .phonemos_objectTree ul {
    position: relative;
    list-style: none;
    &:first-child {
      padding-left: 0px;
    }

    & li {
      & a {
        margin-left: 1px;

        &:hover {
          text-decoration: underline;
        }
      }

      & svg {
        display: none;
      }
    }
  }

  &::-webkit-scrollbar {
    width: 8px;
  }

  &::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
    &:hover {
      background-color: rgba(0, 0, 0, 0.2);
    }
  }
}

.phonemos_objectTree > ul > li > a {
  color: #0d1629;
  font-weight: 600;
  margin: 10px 0px;
  display: block;
  margin: 25px 0px 10px 0px;
}
.phonemos_objectTree > ul:first-child > li:first-child > a:first-child {
  margin: 10px 0px;
}

.phonemos_objectTree > ul:last-child > li:last-child > a:last-child {
  margin: 25px 0px 25px 0px;
}

.phonemos_content {
  flex: 1;
  min-width: 0;
  position: relative;
  flex-grow: 1;
  flex-shrink: 1;
  margin: 0;
  padding: 30px 50px 20px;
  overflow-y: auto;
  overflow-x: auto;
  height: calc(100vh - 100px);

  & article {
    width: 100%;
  }

  &::-webkit-scrollbar {
    width: 8px;
  }

  &::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
    &:hover {
      background-color: rgba(0, 0, 0, 0.2);
    }
  }
}

.phonemos_titleImage {
  img {
    width: 100%;
  }
}

.phonemos_root .phonemos_wikipage {
  .fabric-editor-block-mark[data-mode="full-width"] {
    /* adjust for other layouts */
    width: calc(100vw - 280px);
  }

  .pm-table-container[data-layout="full-width"] {
    /* adjust in your layouts */
    width: calc(100vw - 280px);
  }
}

.phonemos_root .phonemos_announcements_channel {
  width: 100%;
  ul {
    list-style: none;
    padding-left: 0;

    article {
      margin: 5px 0;
      padding: 1px 0;

      .phonemos_announcement_image {
        float: left;
        margin-right: 16px;
        margin-bottom: 8px;
        width: 120px;
        height: 120px;
        overflow: hidden;
        border-radius: 4px;

        img {
          width: 100%;
          height: 100%;
          object-fit: cover;
        }
      }
    }
  }

  .phonemos_announcements_channel_feeds {
    display: flex;
    gap: 8px;
    margin: 8px 0;
    flex-wrap: wrap;

    .phonemos_announcements_channel_feed {
      display: inline-flex;
      align-items: center;
      gap: 4px;

      color: inherit;
      text-decoration: none;

      padding: 4px 8px;
      border: 1px solid #ccc;
      font-size: 0.85em;

      .phonemos_announcements_channel_feed_icon {
        font-size: 0.8em;
      }
      .phonemos_announcements_channel_feed_label {
        font-size: 0.85em;
      }
    }
  }
}

.phonemos_search {
  position: relative;

  .phonemos_search_query {
    & input {
      padding-left: 30px;
      background-color: var(--accent-color);
      border-radius: 10px;
      border: 1px solid var(--accent-color);
      height: 25px;
      width: 200px;
    }
  }

  .phonemos_search_query::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    pointer-events: none;
    background-color: var(--main-color);
    mask: url("./search_icon.svg") center/contain no-repeat;
    -webkit-mask: url("./search_icon.svg") center/contain no-repeat;
  }

  .phonemos_search_loading_spinner {
    position: absolute;
    z-index: 6001;
    right: 5px;
    top: 3px;
    font-size: 0.8rem;
  }
  .phonemos_search_result {
    display: none;
  }
  .phonemos_search_result.phonemos_search_result_active {
    /* popover style */
    display: block;
    position: absolute;
    top: 100%;
    right: 0;
    width: 95vw;
    max-width: 600px;
    background-color: white;
    border: 1px solid #ccc;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 6000;

    padding: 0 7px;

    & ul {
      padding: 0;
      margin: 0;
      list-style-type: none;
      & li {
        cursor: pointer !important;
        padding: 10px 0;
        border-bottom: 1px solid #eee;
        &:hover {
          background-color: #eee;
        }
        &:last-child {
          border-bottom: none;
        }

        & p.phonemos_search_extract {
          margin: 3px 0;
        }
      }
    }
  }
}

.phonemos_toc_section {
  position: absolute;
  right: 30px;
  top: 0;
  width: 350px;
  height: fit-content;
  border: 1px solid #ccc;
  box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.2);
  z-index: 5000;
  background-color: white;
}

.phonemos_toc_trigger {
  position: absolute;
  display: block;
  right: 8px;
  top: 35px;
  cursor: pointer;

  & input {
    display: none;
  }

  & input + span::before {
    display: inline-block;
    text-align: center;
    content: "📖";
    width: 20px;
  }
  & input:checked + span::before {
    content: "↑";
  }
  & input ~ .phonemos_toc_section {
    display: none;
  }
  & input:checked ~ .phonemos_toc_section {
    display: block;
  }
}

.phonemos_content_title {
  margin-top: 0px;
  position: relative;
  display: inline-block;
  padding-bottom: 12px;
}

.phonemos_content_title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 10%;
  height: 5px;
  background-color: var(--main-color);
  border-radius: 3px;
}

.phonemos_toc_contentsWrapper {
  padding: 20px 20px 10px 30px !important;
}
