@import "core/static/core/colors";

#content {
  padding: 10px !important;
}

.title {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.container {
  display: flex;
  flex-direction: row;
  gap: 10px;

  @media (max-width: 1000px) {
    flex-direction: column;
  }
}

.main {
  display: flex;
  flex-direction: column;
  width: calc(75% - 5px);
  gap: 10px;

  @media (max-width: 1000px) {
    width: 100%;
  }

  >.photo {
    box-sizing: border-box;
    height: 500px;
    display: flex;
    justify-content: center;
    background-color: #333333;
    padding: 5px;

    @media (max-width: 1000px) {
      width: 100%;
      height: auto;
    }

    >img {
      height: 100%;
      max-width: 100%;
      object-fit: contain;
      // Prevent ugly selection when
      // clicking to change the image
      user-select: none;
    }
  }
}

.subsection {
  width: calc(25% - 5px);

  @media (max-width: 1000px) {
    width: 100%;
  }

  >.navigation {
    display: flex;
    flex-direction: row;
    gap: 10px;

    @media (max-width: 1000px) {
      width: 100%;
    }

    >#prev,
    >#next {
      width: calc(50% - 5px);
      aspect-ratio: 16/9;
      background: #333333;

      position: relative;

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

      .overlay {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        color: white;
        font-size: 40px;
      }

      >div {
        display: flex;
        position: relative;
        width: 100%;
        height: 100%;
      }
    }
  }

  >.tags {
    @media (min-width: 1001px) {
      margin-right: 5px;
    }

    >ul {
      list-style-type: none;
      margin: 0;
      display: flex;
      flex-direction: column;
      gap: 5px;

      @media (max-width: 1000px) {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        margin-right: 5px;
      }

      >li {
        box-sizing: border-box;
        display: flex;
        flex-direction: row;
        align-items: center;
        width: 100%;
        justify-content: space-between;

        &.loader {
          margin-top: 10px;
          --loading-size: 20px
        }

        @media (min-width: 700px) and (max-width: 1000px) {
          max-width: calc(50% - 5px);
        }

        >a {
          box-sizing: border-box;
          display: flex;
          flex-direction: row;
          align-items: center;
          gap: 10px;

          &.user {
            width: 100%;
            background-color: #eee;
            padding: 5px 10px 5px 5px;
            border-radius: 5px;
            color: black;
            max-width: calc(100% - 40px);
            min-height: 30px;

            &:hover {
              background-color: #aaa;
            }

            >span {
              width: 100%;
              text-overflow: ellipsis;
              white-space: nowrap;
              overflow: hidden;
            }
          }

          &.delete {
            margin-left: 10px;
          }

          >img {
            width: 25px;
            max-height: 25px;
            object-fit: contain;
            border-radius: 50%;
          }

          >.profile-pic {
            background-position: center center;
            background-size: cover;
            background-repeat: no-repeat;
            min-width: 25px;
            height: 25px;
            border-radius: 50%;
            display: block;
          }
        }
      }
    }

    >form {
      input, .ts-wrapper {
        min-width: 100%;
        max-width: 100%;
        margin: 5px;
        box-sizing: border-box;
      }
    }
  }
}

#pict .general {
  display: flex;
  flex-direction: row;
  gap: 3em;
  justify-content: space-evenly;

  @media (max-width: 1000px) {
    gap: 1em;
    flex-direction: column;
  }

  .infos, .tools {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .5em;
    @media (min-width: 700px) {
      max-width: 350px;
    }
  }
  .infos > div, .tools > div > div {
    display: flex;
    flex-direction: column;
    gap: .35em;
  }

  .tools > div, >.infos >div>div {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
  }

  >.tools {
    flex: 1;
    .btn {
      background-color: $primary-neutral-light-color;
      display: flex;
      justify-content: center;
      align-items: center;
      padding: 0;
      color: black;
      width: 40px;
      height: 40px;
      font-size: 20px;

      &:hover {
        background-color: #aaa;
      }
    }

    a.text.danger {
      color: red;

      &:hover {
        color: darkred;
      }
    }

    .buttons {
      display: flex;
      flex-direction: row;
      gap: 5px;
    }
  }
}