* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    list-style: none;
}

html, body {
    height: 100%;
    min-height: 100vh;
}

body {
    font: 100%/1.5 system, -apple-system, ".SFNSText-Regular", "San Francisco", "Roboto", "Segoe UI", "Helvetica Neue", "Lucida Grande", sans-serif;
    background: #fff;
    color: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.upload-form {
    width: 100%;
}

@media screen and (min-width: 768px) {
    .upload-form {
        width: 400px;
    }
}

.upload-form > div {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-wrapper {
    padding: 0.5em 1em;
    background-color: #000;
    color: #fff;
    border-radius: 0.25em;
    position: relative;
    cursor: pointer;
    margin-left: 1em;
}

.input-wrapper:before {
    content: 'Choose image';
}

.input-wrapper input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

.image-preview {
    display: none;
    margin-top: 1em;
    padding: 1em;
    background-color: #fafafa;
    border-radius: 0.25em;
    justify-content: space-between;
    align-items: center;
}

.image-preview.visible {
    display: flex;
}

.image-thumb {
    padding: 0.35em;
    background-color: #fff;
    border-radius: 0.25em;
    width: 30%;
    display: block;
    height: auto;
}

.image-preview figcaption {
    margin-left: 1em;
}