$primary: var(--primary-color);
$border: #E5E5E5;
$text: #4F5A66;
$grey: #9e9e9e;
$orange: #fb923c;
$blue: #1270BA;
@import "reset";

.changelog {
  font-family: inherit;
  min-height: 100vh;
  display: flex;

  img {
    max-width: 100%;
  }

  h1,h2,h3,h4,h5,h6 {
    color:var(--title-color, #000)
  }

  &.stand-alone {
    height: 100vh;
    overflow: hidden;
    font-family: "Barlow", sans-serif;
  }

  &-auth-warning {
    background: $orange;
    position:fixed;
    bottom:0;
    right:0;
    left:250px;
    height:42px;
    color:white;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  &-user {
    position: fixed;
    right:1rem;
    top:1rem;
  }

  &-sidebar {
    flex:0 0 250px;
    border-right:1px solid $border;
    position:relative;

    &__inner {
      padding:1rem .2rem;
      display: flex;
      flex-direction: column;
      gap:.3rem;
      height: 100%;
      overflow-y: auto;
      box-sizing: border-box;
      .stand-alone & {
        height:calc(100% - 42px);
      }
    }

    &__actions {
      background:white;
      border-top:1px solid $border;
      position:absolute;
      bottom:0;
      left:0;
      right: 0;
      padding:5px 10px;


      button {
        box-sizing: border-box;
        border:1px solid transparent;
        font-weight: 500;
        border-radius:3px;
        background:transparent;
        padding:5px 15px;
        width:100%;
        display: flex;
        align-items: center;
        justify-content: center;
        text-transform: uppercase;
        gap:4px;

        &:hover {
          cursor:pointer;
          border: 1px solid $border;
        }
      }

    }

    &-title {
      padding: .12rem 1rem;
      font-size:.8rem;
      color: $text;
    }

    &-item {
      padding: .20rem 1rem;
      font-size: .9rem;
      display: flex;
      align-items: center;
      gap:5px;
      span {
        background: $blue;
        color:white;
        border-radius:10px;
        font-size:.7rem;
        padding:1px 5px;
      }

      &:hover,
      &.is-active {
        background: #f2f2f2;
        border-radius:.2rem;
        cursor:pointer;
      }
    }
  }

  &-items {
    width: 100%;
    position: relative;
    &:before {
      content:'';
      left:200px;
      border-right:1px solid $border;
      top:15px;
      bottom:15px;
      position:absolute;

      @media only screen and (max-width: 768px) {
        display: none;
      }

      .stand-alone & {
        display:none;
      }
    }
    &-loadmore {
      display: flex;
      justify-content: center;
    }

    &-pagination {
      display: flex;
      justify-content: space-between;
      padding:4rem 10% 0 10%;

      button {
        border:0;
        padding:0;
        margin:0;
        background: transparent;

        &:hover {
          cursor:pointer;
        }
      }
    }
  }

  &-item {
    display: flex;
    margin:1rem 0 4rem 0;

    @media only screen and (max-width: 768px) {
      flex-wrap: wrap;
    }

    .stand-alone & {
      margin:0;
      height: 100%;
      overflow-y: auto;
      width: 100%;
    }

    > :first-child {
      margin-top: 0;
    }

    &-sidebar {
      flex:0 0 200px;

      @media only screen and (max-width: 768px) {
        flex: 100%;
        padding:0 1.5rem .5rem 1.5rem;
      }

      span {
        position: sticky;
        top:1.875rem;
        font-size:.875rem;
        color:$grey;
        font-weight: 600;
        width: 100%;
        display: block;

        &:after {
          content:'';
          width: 10px;
          height:10px;
          border: 2px solid $border;
          border-radius:50%;
          display: block;
          position: absolute;
          right:0;
          background: white;
          top:50%;
          transform:translate(50%, -50%);

          .stand-alone & {
            display:none;
          }
        }


        @media only screen and (max-width: 768px) {
          position: static;
        }

      }
    }
    &-body {
      padding:0 1.5rem;
      line-height: 1.7;
      font-size:.875rem;
      width:100%;
      max-width: 800px;
      margin:0 auto;

      .stand-alone & {
        padding:1rem 1.5rem 3rem 1.5rem;
      }

      .responsive-video {
        width: 100%;
        aspect-ratio: 16 / 9;
        overflow: hidden;

        iframe {
          width:100%;
          height: 100%;
        }
      }

      hr {
        display: none;
      }

      img {
        display: block;
        margin: 2em auto;
        max-width:100%;
      }

      a {
        color:$primary;
        text-decoration: none;

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

      pre {
        code {
          line-height: inherit;
          margin: 0;
          word-wrap: normal;
          display: block;
          overflow: auto;
          padding: 1em;
          max-height: 90vh;

          font-family: var(--md-code-font, SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace);
          border-radius: 3px;
          color: var(--md-code-text);
          white-space: pre;
          word-break: normal;
          background: #F6F8FA;
          border:1px solid $border;
          font-size:12px;
        }
      }

      h1 {
        font-size:1.875rem;
        line-height: 2.25rem;
        display: block;
        padding-bottom: .2em;
        margin-bottom: 10px;
        margin-top:0;
      }

      h2 {
        margin-top: 1em;
      }

      > * {
        margin-top:15px;
        margin-bottom: 15px !important;
      }

      code {
        background-color: #f6f8fa;
        border-radius: 3px;
        font-size: 85%;
        margin: 0;
        padding: 0.2em 0.4em;
      }

      ul li p {
        margin:0;
      }
    }
  }

  &-create {
    position: fixed;
    left:0;
    top:0;
    width:100%;
    height: 100%;
    background:rgba(0,0,0,.4);
    z-index: 9;
    display: flex;
    align-items: center;
    justify-content: center;


    &__inner {
      background:white;
      width: 500px;
      max-height: 90vh;
      overflow: auto;
      padding:1.5rem;
      position: relative;

      .close {
        position: absolute;
        right:1.5rem;

        svg {
          width: 1rem;
        }
      }


      h1 {
        margin-top: 0;
        font-weight: 500;
        font-size: 1.5rem;
      }

      .submit {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap:.5rem;


        &__btn {
          background: $blue;
          display: flex;
          align-items: center;
          justify-content: space-between;
          gap:.5rem;
          color:white;
          padding:.5rem 2rem;
          font-weight: bold;
          border-radius:.2em;

          &.square {
            aspect-ratio: 1/1;
            width: 35px;
            padding:0;
            justify-content: center;
            svg {
              width: 20px;
              height: auto;
            }
          }
        }

        svg {
          width:20px;
          height: auto;
          * {
            fill: white;
          }
        }
      }

      .success {
        background:#A9D9A9;
        padding:1rem;
        color:white;
        margin-bottom:1rem;
      }

      .delete {
        display: flex;
        justify-content: end;
        &__btn {
          font-size:.8rem;
          color:red
        }

      }
      .item {
        border:1px solid #e6e6e6;
        padding:1rem;
        margin-bottom:1rem;
        position: relative;

        &-toggle {
          color:#1270BA;
          font-size:.8rem;
          position: absolute;
          right:1rem;
          top:.5rem;
          &:hover {
            cursor:pointer;
          }
        }

        .meta {
          display: flex;
          justify-content: space-between;

          h4 {
            cursor:pointer;
          }

          button {
            flex-shrink:0;
            svg {
              width:1rem;
              height: auto;
            }
          }
          h4 {
            margin:0;
          }
        }
      }
      form {
        display: flex;
        flex-direction: column;
        gap:.6rem;


        input {
          border:1px solid #e6e6e6;
          height: 30px;
          padding:0 10px;
          width: 100%;
          box-sizing: border-box;
        }

        label {
          font-weight: bold;
          font-size:.9em;
          display: block;
          margin-bottom:.2em;
          color:#3f4a54;
        }

        .md-editor {
          height: 200px;
        }

      }
    }
  }

  .spinner_P7sC{transform-origin:center;animation:spinner_svv2 .75s infinite linear}@keyframes spinner_svv2{100%{transform:rotate(360deg)}}
}
