html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, code,
del, dfn, em, img, q, dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
    margin: 0;
    padding: 0;
    border: 0;
    font-weight: inherit;
    font-style: inherit;
    font-size: 100%;
    font-family: inherit;
    vertical-align: baseline;
}

body { 
    line-height: 1.5;
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -o-text-size-adjust: 100%;
}

table { border-collapse: separate; border-spacing: 0; }
caption, th, td { text-align: left; font-weight: normal; }
table, td, th { vertical-align: middle; }

blockquote:before, blockquote:after, q:before, q:after { content: ""; }
blockquote, q { quotes: "" ""; }

a img { border: none; }


* {
    box-sizing: border-box
}

:root {
    --system-font: inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol"
}

html, body {
    width: 100%;
    height: 100%;
}

h1 {
    font-size: 32px;
    font-weight: bold;
    margin: 22px 0;
}

ul {
    margin: 16px 0;
    padding-left: 40px;
}

.main {
    font-family: var(--system-font);
    max-width: 800px;
    padding: 16px;
    margin: auto;
}

#file-input {
    display: none;
}

.dots {
    user-select: none;
    -webkit-user-select: none;
    transform: translateY(-50%);
    position: relative;
    top: 50%
}

@keyframes dot-falling {
    0% {
        transform: translateY(-15px);
        opacity: 0
    }

    25%,50%,75% {
        transform: translateY(0);
        opacity: 1
    }

    to {
        transform: translateY(15px);
        opacity: 0
    }
}

.dots .dot {
    width: 32px;
    height: 32px;
    background: #c7c7c7;
    margin-right: 16px;
    border-radius: 32px;
    display: inline-block;
    animation: dot-falling 1.25s infinite ease
}

.dots .dot:nth-child(2) {
    animation-delay: .1s
}

.dots .dot:nth-child(3) {
    animation-delay: .2s
}

.loading-dots {
    text-align: center;
    padding-top: 128px;
}

.screen {
    display: none;
}

.screen[data-is-visible] {
    display: block;
}

.upload-middle {
    text-align: center;
    padding: 24px 0;
}

.alt-button {
    user-select: none;
    background: #e4e4e4;
    color: #464646;
    box-shadow: rgba(0, 0, 0, 0.08) 0px 3px 6px, rgba(0, 0, 0, 0.12) 0px 3px 6px;
    cursor: pointer;
    outline: none;
    margin: 0 16px 16px 16px;
    border: 0;
    padding: 16px 18px;
    font-size: 18px;
    font-weight: 600;
    line-height: 16px;
    border-radius: 10px;
    font-family: var(--system-font);
    transition: background 0.1s ease;
}

.alt-button:hover {
    background: #ebebeb;
}

.big-button {
    user-select: none;
    background: #1f5eff;
    color: white;
    box-shadow: rgba(0, 0, 0, 0.16) 0px 3px 6px, rgba(0, 0, 0, 0.23) 0px 3px 6px;
    cursor: pointer;
    outline: none;
    margin: 0;
    border: 0;
    padding: 16px 18px;
    font-size: 18px;
    font-weight: 600;
    line-height: 16px;
    border-radius: 10px;
    font-family: var(--system-font);
    transition: background 0.1s ease;
}

.big-button:hover {
    background: #3d74ff;
}

.order-flags[data-no-flags] {
    display: none;
}

.order-flags .flag {
    background: #f5f5f5;
    margin: 16px 0;
    padding: 16px;
    border-radius: 12px;
    display: none;
}

.order-flags .flag[data-is-visible] {
    display: block;
}

.order-flags .flag .title {
    font-weight: 500;
    font-size: 18px;
    display: inline;
    vertical-align: middle;
    padding-left: 8px;
}

.order-flags .flag .description {
    padding-top: 12px;
}

.order-flags .flag .icon {
    width: 28px;
    height: 28px;
    display: inline-block;
    vertical-align: middle;
}

.order-flags .flag .icon svg {
    width: 100%;
    height: 100%;
}

.order-flags.no-icons .flag .icon {
    display: none;
}

.order-flags.no-icons .flag .title {
    padding-left: 0;
    display: block;
    vertical-align: initial;
}

.order-flags.no-icons .flag .description {
    padding-top: 8px;
}

.order-summary .summary {
    padding: 12px;
    border-radius: 16px;
    margin: 16px 0;
    display: none;
}

.order-summary .summary[data-is-visible] {
    display: block;
}

.order-summary .summary .title {
    font-size: 24px;
    padding-left: 8px;
    font-weight: 500;
    display: inline;
    vertical-align: middle;
}

.order-summary .summary .icon {
    display: inline-block;
    vertical-align: middle;
    height: 36px;
    width: 36px;
}

.order-summary .summary .icon svg {
    width: 100%;
    height: 100%;
}

.order-summary .summary-error {
    background: #FEE2E2;
    color: #7F1D1D;
    fill: #7F1D1D;
}

.order-summary .summary-warning {
    background: #FEF3C7;
    color: #78350F;
    fill: #78350F;
}

.order-summary .summary-success {
    background: #DCFCE7;
    color: #14532D;
    fill: #14532D;
}

.order-summary .summary-loading {
    background: #E3F2FD;
    color: #08326d;
    fill: #08326d;
}

.previews {
    padding-top: 16px;
    font-size: 0;
}

.preview {
    width: 50%;
    display: inline-block;
    vertical-align: top;
}

.preview-a {
    padding-right: 6px;
}

.preview-b {
    padding-left: 6px;
}

.preview-size {
    margin: 0 auto;
    display: block;
}

.preview .name {
    font-weight: 500;
    font-size: 14px;
    text-align: center;
    padding-top: 8px;
}

.preview-wrap img {
    width: 100%;
    position: absolute;
}

.preview-wrap {
    position: relative;
}

.bounds {
    position: absolute;
}

.bound {
    background: rgba(255, 0, 0, 0.3);
    border: 1px red solid;
    position: absolute;
    z-index: 5;
}

.bound-r {
    top: 0;
    right: 0;
    border-bottom: none;
}

.bound-b {
    left: 0;
    bottom: 0;
    border-right: none;
}

.bound-br {
    bottom: 0;
    right: 0;
    border-top: none;
    border-left: none;
}

.bound-tl {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
}

.page-ar {
    background: white;
    width: 100%;
    height: 100%;
}

.header {
    font-weight: 500;
    font-size: 22px;
}

.order-review {
    margin-bottom: 40px;
}

.order-review .header {
    font-weight: 500;
    font-size: 22px;
    padding-bottom: 16px;
}

.order-review .page {
    width: 60%;
    margin: 0 auto;
    border: 1px black solid;
    box-shadow: 4px 4px 0 0 grey;
    padding: 2px;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: visibility .1s ease, opacity .1s ease;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.overlay[data-is-visible="true"] {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.overlay .popup {
    width: 450px;
    margin: 0 auto;
    background: white;
    color: #2b344a;
    border-radius: 5px;
    box-shadow: #32325d40 0 13px 27px -5px, #0000004d 0 8px 16px -8px;
    transform: scale(.9);
    transition: transform .1s ease;
}

.overlay[data-is-visible="true"] .popup {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transform: scale(1.0);
}

.popup .title {
    padding-bottom: 12px;
    font-weight: 700;
    font-size: 22px;
    line-height: 1.1;
}

.popup .text {
    padding-top: 8px;
}

.popup .content {
    padding: 24px;
}

.popup .bottom {
    text-align: right;
    padding: 16px;
    border-top: 1px #b3bdd9 solid;
    background: #f5f7fb;
    border-radius: 0 0 5px 5px;
}

.primary-button {
    user-select: none;
    font-weight: 600;
    background: #1f5eff;
    color: white;
    cursor: pointer;
    outline: none;
    margin: 0;
    border: 0;
    padding: 8px 10px;
    font-size: 14px;
    line-height: 16px;
    border-radius: 5px;
    box-shadow: rgb(60 64 67 / 30%) 0px 1px 2px 0px, rgb(60 64 67 / 15%) 0px 1px 3px 1px;
    font-family: var(--system-font);
}

.primary-button:hover {
    background: #3d74ff;
}

.final-buttons {
    text-align: center;
    padding-top: 32px;
}