@import url("https://fonts.googleapis.com/css?family=Dosis:400,600");

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translate3d(0, -100px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translate3d(-100px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes dimming {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.85;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

html, body {
    font-family: 'Dosis', Helvetica, Tahoma, sans-serif;
    font-weight: 400;
    font-size: 14px;
    letter-spacing: 0.25px;
    background: #FFFFFF;
}

* {
    margin: 0;
    padding: 0;
    outline: 0;
}

ul {
    margin: 0;
    padding: 10px 10px;
}

ul li {
    list-style: none;
    margin: 0;
    padding: 0 0 10px 0;
}

input[type=checkbox] {
    width: 15px;
    height: 15px;
    cursor: pointer;
}

label, button {
    cursor: pointer;
}

a {
    outline: none;
    text-decoration: none;
    transition: all .3s ease-out;
    color: green;
}

a:visited {
    color: green;
}

a:hover {
    color: #1aff1a;
}

#options {
    padding: 10px 0px;
}

.popup-body {
    background-color: #EEE;
}

.up-popup {
    width: 300px;
    padding: 15px 25px 15px 15px;
    border-radius: 3px;
    margin: 5px;
    box-shadow: #EEE 0px 0px 0px 5px;
    background-color: white;
    animation: fadeInDown 1s both cubic-bezier(0.1, 0.71, 0.28, 1.14) 0s 1;
}

.up-popup .heading {
    padding: 10px 0;
    animation: fadeInDown 0.75s both cubic-bezier(0.1, 0.71, 0.28, 1.14) 0s 1;
    position: relative;
}

.up-popup .heading::after {
    width: 100%;
    height: 2px;
    background-color: #EEE;
    position: absolute;
    content: '';
    bottom: 0;
    left: 0;
    animation: fadeInDown 0.5s both cubic-bezier(0.1, 0.71, 0.28, 1.14) 0.1s 1;
}

.up-popup a {
    animation: fadeInLeft 0.75s both cubic-bezier(0.1, 0.71, 0.28, 1.14) 0.2s 1;
}

.up-popup ul li:nth-child(1) {
    animation: fadeInDown 0.75s both cubic-bezier(0.1, 0.71, 0.28, 1.14);
    animation-delay: 0.2s;
}

.up-popup ul li:nth-child(2) {
    animation: fadeInDown 0.75s both cubic-bezier(0.1, 0.71, 0.28, 1.14);
    animation-delay: 0.3s;
}

.up-popup ul li:nth-child(3) {
    animation: fadeInDown 0.75s both cubic-bezier(0.1, 0.71, 0.28, 1.14);
    animation-delay: 0.4s;
}

.up-popup ul li:nth-child(4) {
    animation: fadeInDown 0.75s both cubic-bezier(0.1, 0.71, 0.28, 1.14);
    animation-delay: 0.5s;
}

.up-popup ul li:nth-child(5) {
    animation: fadeInDown 0.75s both cubic-bezier(0.1, 0.71, 0.28, 1.14);
    animation-delay: 0.6s;
}

.up-popup ul li:nth-child(6) {
    animation: fadeInDown 0.75s both cubic-bezier(0.1, 0.71, 0.28, 1.14);
    animation-delay: 0.7s;
}

.up-popup ul li:nth-child(7) {
    animation: fadeInDown 0.75s both cubic-bezier(0.1, 0.71, 0.28, 1.14);
    animation-delay: 0.8s;
}

.up-popup ul li:nth-child(8) {
    animation: fadeInDown 0.75s both cubic-bezier(0.1, 0.71, 0.28, 1.14);
    animation-delay: 0.9s;
}

.up-popup ul li:nth-child(9) {
    animation: fadeInDown 0.75s both cubic-bezier(0.1, 0.71, 0.28, 1.14);
    animation-delay: 1s;
}

.up-popup ul li:nth-child(10) {
    animation: fadeInDown 0.75s both cubic-bezier(0.1, 0.71, 0.28, 1.14);
    animation-delay: 1.1s;
}

.sub-title {
    color: #999;
    font-size: 12px;
    font-weight: 600;
    display: block;
    text-align: right;
}

.up-content {
    padding: 30px;
    text-align: left;
    min-width: 380px;
}

.up-content h1 {
    padding: 10px 0;
    border-bottom: 1px solid #EEE;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.up-content h1 button {
    margin-left: 10px;
    padding: 5px 30px;
    height: 30px;
    background-color: cornflowerblue;
    vertical-align: text-bottom;
}

.up-content button {
    display: inline-block;
    vertical-align: text-top;
    border: 0;
    background-color: #2aa32a;
    color: white;
    padding: 5px 10px;
    transition: all .3s ease-out;
    animation: fadeInLeft 1s both cubic-bezier(0.1, 0.71, 0.28, 1.14) 0s 1;
}

.up-content button:hover {
    background-color: #185bd3;
}

.up-content button[disabled] {
    animation: dimming 2s both ease-in-out 0s infinite;
    background-color: #222222;
}

.up-content #debug p {
    background-color: #EEE;
    padding: 15px;
    transition: all 0.5s cubic-bezier(0.1, 0.71, 0.28, 1.14);
    border-bottom: 2px solid #FFF;
    animation: fadeInDown 1s both cubic-bezier(0.1, 0.71, 0.28, 1.14) 0s 1;
}

.up-content #debug p.all-done {
    background-color: #e0f2de;
}

.up-content #debug ul {
    transition: all 0.5s cubic-bezier(0.1, 0.71, 0.28, 1.14);
    display: flex;
    flex-flow: row nowrap;
    padding: 0;
    animation: fadeInLeft 1s both cubic-bezier(0.1, 0.71, 0.28, 1.14) 0s 1;
}

.up-content #debug ul.each-done {
    border-bottom: 1px solid rgba(0, 128, 0, 0.5);
}

.up-content #debug ul.each-failed {
    border-bottom: 1px solid rgba(255, 0, 0, 0.5);
}

.up-content #debug ul li {
    padding: 15px;
    animation: fadeInLeft 1s both cubic-bezier(0.1, 0.71, 0.28, 1.14) 0.05s 1;
}

.up-content #debug ul li:nth-child(1) {
    flex: 0 0 50px;
    background-color: rgba(255, 236, 186, 0.5);
    text-align: right;
    animation: fadeInLeft 1s both cubic-bezier(0.1, 0.71, 0.28, 1.14) 0.1s 1;
}

.up-content #debug ul li:nth-child(2) {
    flex: 0 0 70px;
    background-color: rgba(255, 243, 214, 0.5);
    animation: fadeInLeft 1s both cubic-bezier(0.1, 0.71, 0.28, 1.14) 0.15s 1;
}

.up-content #debug ul li:nth-child(3) {
    flex: 1;
    word-break: break-all;
    background-color: rgba(255, 251, 242, 0.5);
    animation: fadeInLeft 1s both cubic-bezier(0.1, 0.71, 0.28, 1.14) 0.2s 1;
}

#refresh {
    position: absolute;
    top: 45px;
    left: 218px;
    padding: 5px;
    border-radius: 50%;
    cursor: pointer;
    transition: all .3s ease-out;
}

#refresh #refresh-tip {
    display: block;
    position: absolute;
    font-size: 11px;
    width: 200px;
    left: -90px;
    top: -20px;
    padding: 5px 5px 5px 10px;
    background-color: indianred;
    color: white;
    opacity: 0;
    transition: all .5s cubic-bezier(0.1, 0.71, 0.28, 1.14);
}

#refresh img {
    transition: all .3s cubic-bezier(0.1, 0.71, 0.28, 1.14);
}

#refresh:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

#refresh:hover #refresh-tip {
    top: -32px;
    opacity: 1;
}

#refresh:hover img {
    transform: rotate(180deg);
}


#up-save {

}

#list-sites {
    padding: 10px 0;
    list-style: none;
}

#list-sites > li {
    padding: 10px 10px 10px 40px;
    margin-bottom: 5px;
    background-color: #EFEFEF;
    position: relative;
    line-break: anywhere;
}

#list-sites > li::before {
    content: "W";
    display: flex;
    font-weight: bold;
    flex-flow: row nowrap;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    position: absolute;
    top: calc(50% - 16px);
    left: 4px;
}

#list-sites > li.is-downloading {
    background: #f2f0de;
}

#list-sites > li.is-downloading::before {
    content: "";
    background: url("./loading.svg") center center no-repeat;
    background-size: cover;
}

#list-sites > li.is-downloaded {
    background: #e0f2de;
}

#list-sites > li.is-downloaded::before {
    content: "D";
    background: none;
}

#list-sites > li.is-failed {
    background: #f2dede;
}

#list-sites > li.is-failed::before {
    content: "F";
    background: none;
}

#list-input-modal {
    width: 100vw;
    height: 100vh;
    position: fixed;
    display: flex;
    flex-flow: row nowrap;
    justify-content: center;
    align-items: center;
    z-index: -1;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.15);
    pointer-events: none;
    opacity: 0;
    transition: opacity .15s ease-out;
}

#list-input-modal.showed {
    z-index: 999;
    pointer-events: all;
    opacity: 1;
}

#list-input-modal-container {
    position: relative;
    padding: 20px;
    border-radius: 3px;
    background: #FFFFFF;
    box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.25);
    transform: translate(0, -30px);
    transition: transform 0.3s cubic-bezier(0.1, 0.71, 0.28, 1.14);
}

#list-input-modal.showed #list-input-modal-container {
    transform: translate(0, 0);
}

#list-input-modal-container > div.button-group {
    position: absolute;
    z-index: 1;
    top: 20px;
    right: 20px;
    background: white;
    padding: 0;
}

#list-input-modal-container button {
    background-color: #2aa32a;
    border: none;
    color: white;
    padding: 5px 10px;
    border-radius: 1px;
    transition: background-color .15s ease-out;
}

#list-input-modal-container button.modal-okay:hover {
    background-color: #185bd3;
}

#list-input-modal-container button.modal-close {
    background-color: rgba(0, 0, 0, 0.05);
    color: black;
}

#list-input-area {
    width: 80vw;
    height: 500px;
    margin-top: 10px;
    background-color: rgba(0, 0, 0, 0.05);
    border: none;
    border-radius: 3px;
    box-sizing: border-box;
    padding: 20px;
}

#status {
    margin-bottom: 10px;
    background-color: #EFEFEF;
    padding: 10px 10px 10px 15px;
    word-break: break-all;
    word-wrap: break-word;
}

#open-folder {
    margin: 10px 0 0 0;
    padding: 20px 0;
    border-top: 1px dashed #EFEFEF;
}

#version {
    font-size: 9px;
    position: absolute;
    top: 30px;
    left: 30px;
    color: green;
    pointer-events: none;
}

.success {
    color: green;
}

.failed {
    color: red;
}
