html, body {
margin: 0px;
height: 100%;
}
* {
box-sizing: border-box;
}
#container {
position: relative;
margin: auto;
text-align: center;
width: 100%;
max-width: 500px;
height: 100%;
}
#add {
padding-top: 12px;
}
#add .name,
#add .submit {
box-sizing: content-box;
-webkit-appearance: none;
font-size: 16px;
border: 1px solid #aaa;
border-radius: 5px;
background-color: #fff;
height: 20px;
padding: 6px;
line-height: 0px;
}
#add .name {
width: 78%;
border-top-right-radius: 0px;
border-bottom-right-radius: 0px;
}
#add .submit {
width: 8%;
background-color: #eee;
border-top-left-radius: 0px;
border-bottom-left-radius: 0px;
}
#add .submit:hover {
background-color: #ddd;
}
#add .suggestions {
transition: opacity 0.2s;
z-index: 2;
background: white;
box-shadow: 0px 0px 10px 1px #ccc;
position: absolute;
width: 90%;
margin: auto;
left: 0px;
right: 0px;
margin-top: 15px;
padding-top: 6px;
padding-bottom: 6px;
max-height: 70%;
overflow-y: auto;
overflow-x: hidden;
}
#add .suggestions.hidden {
opacity: 0;
}
#add .suggestions .suggestion:last-child {
border-bottom: none;
}
#add .suggestions .suggestion {
padding: 12px;
cursor: pointer;
border-bottom: 1px solid #ccc;
text-overflow: ellipsis;
max-width: 100%;
overflow: hidden;
}
#list {
margin-top: 24px;
overflow: hidden;
}
#list .elem {
transition: padding 0.3s, height 0.3s;
padding-left: 12px;
padding-top: 42px;
position: relative;
margin: auto;
text-align: left;
width: 100%;
height: 70px;
overflow: hidden;
border-bottom: 1px solid #ccc;
}
#list .elem.remove-pending {
transition: background-color 0.2s;
background-color: #eee;
}
#list .elem.hidden {
transition: transform 0.3s ease-in,
padding 0.2s 0.1s ease-in,
height 0.2s 0.1s ease-in,
border-width 0s 0.2s;
transform: translateX(-150%);
height: 0px;
padding: 0px;
border-width: 0px;
}
#list .elem .name {
position: relative;
display: inline-block;
max-width: calc(100% - 60px);
overflow: hidden;
text-overflow: ellipsis;
}
#list .elem .ok {
position: relative;
display: inline-block;
float: right;
margin-right: 6px;
height: 50px;
width: 50px;
bottom: 33px;
background-image: url(/icon-check.svg);
background-size: 24px 24px;
background-repeat: no-repeat;
background-position: center;
cursor: pointer;
border-radius: 100px;
background-color: #eee;
}
#list .elem.remove-pending .ok {
cursor: default;
}
#list .elem .ok:hover {
background-color: #ddd;
}
#list .elem.remove-pending .ok {
transition: opacity 0.2s;
opacity: 0;
}