@import "src/styles/variables";
@import "src/styles/grid";

$background: var(--gray-100);
$infoFontSize: 13px;

.ArtworkUploadV2 {
    background-color: var(--white);
    height: 344px;
    line-height: 2;
    padding: 30px 30px;
    position: relative;
    width: 344px;
    text-align: center;

    &-footer {
        display: flex;

        &-filler {
            width: 100%;
        }
    }

    &-footer > * {
        padding: 0.5rem;
        margin: 0.5rem;
    }

    &-border {
        border: 2px dashed var(--gray-400);
        border-radius: 3px;
    }

    &-columns {
        display: flex;
        margin-bottom: 50px;
        margin-top: 25px;
    }

    &-info-column {
        padding: 2rem;
        background-color: $background;
        margin-left: $grid_gutter_width;
        width: 100%;
        font-size: $infoFontSize;
        color: var(--gray-800);
        border-radius: 3px;

        &-text {
            font-weight: 100;
            width: 75%;

            ul {
                margin-top: 1rem;
                margin-left: 2rem;
                padding: 0;
                line-height: 2;
            }
        }
    }

    &-upload-glyph {
        margin-right: 5px;
    }

    &-stay-on-page-alert {

        div {
            background: white;
            color: #0B599D;
            border: none;
            font-size: 12px;
            border-radius: 3px;
        }

        .Glyph {
            fill: #0B599D;
        }
    }

    &-spec-heading {
        font-weight: 500;
        margin: 30px 0 7px 0;
    }

    &-spec--error {
        color: $red_200;
        font-weight: 500;
        font-size: 14px;
    }

    &-dropzone {
        height: 100%;
        width: 100%;
        padding: 30px 30px;
        display: flex;
        flex-flow: row wrap;
        justify-content: center;
        align-items: center;

        #browser-upload {
            display: none;
        }
    }

    &-loading-container {
        align-items: center;
        background-color: $background;
        bottom: 0;
        display: flex;
        flex-flow: row wrap;
        justify-content: center;
        left: 0;
        opacity: .9;
        position: absolute;
        right: 0;
        top: 0;
        border-radius: 3px;
    }

    &-replace-button {
        bottom: -40px;
        left: 0;
        position: absolute !important;
    }

    &-choose-file {
        bottom: -40px;
        right: 0;
        position: absolute;
        padding-top: 5px;
        padding-bottom: 5px;
        padding-left: 10px;
        padding-right: 10px;
    }

    &-success {
        $position: -2px;
        align-items: center;
        background-color: var(--white);
        background-size: cover;
        bottom: $position;
        display: flex;
        flex-flow: row nowrap;
        justify-content: center;
        left: $position;
        perspective: 100px;
        position: absolute;
        right: $position;
        top: $position;
        border-radius: 3px;

        .Icons-success-checkmark {
            animation-duration: 3s;
            animation-fill-mode: forwards;
            animation-iteration-count: 1;
            animation-name: fadeout;
            animation-timing-function: linear;
        }
    }

    &-header-text {
        margin-top: 33px;
        line-height: 1.5;
        white-space: nowrap;
    }

    &-browse-text,
    &-invalid-image-text {
        color: var(--gray-800);
        font-size: $infoFontSize;
        line-height: 1;
    }

    &-invalid-image-header {
        margin-top: 33px;
        white-space: nowrap;
        font-weight: 500;
        font-size: 18px;
        line-height: 2;
    }

    &-browse-link {
        color: var(--bluejay);
        cursor: pointer;
        font-weight: 500;
        text-transform: none;
    }

    &[data-dragged=true] {
        border-color: var(--bluejay);
        box-shadow: inset 0 0 50px 0 rgba(2, 110, 173, .1);
    }

    &-status-bar {
        position: absolute;
        color: white;
        bottom: 0;
        left: 0;
        padding-left: 1rem;
        background: $blue-medium;
        border-radius: 0 0 3px 3px;
        width: 100%;

        text-align: left;
        text-transform: uppercase;
        font-weight: 500;

        svg {
            fill: white;
            position: absolute;
            margin: auto;
            right: 1rem;
            top: 0;
            bottom: 0;
        }
    }

    &-status-bar-invalid-image {
        position: absolute;
        color: white;

        bottom: -2px;
        right: -2px;
        padding-left: 1rem;
        background: $red_200;
        border-radius: 0 0 3px 3px;
        width: 344px;

        text-align: left;
        text-transform: uppercase;
        font-weight: 500;
    }
}

@keyframes fadeout {
    0% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
    80% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
    89% {
        opacity: 1;
        transform: translate3d(0, 0, 10px);
    }
    90% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
    100% {
        opacity: 0;
        transform: translate3d(0, 0, -1000px);
    }
}
