@font-face {
    font-family: Space Grotesk;
    src: url(./SpaceGrotesk-VariableFont_wght.ttf) format("truetype");
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Space Grotesk', sans-serif;
}

body {
    width: 100%;
    height: 100vh;
    /* overflow: hidden; */
}

.container {
    width: 100%;
    height: 100%;
    max-width: 1440px;
    display: flex;
}

.empty {
    width: 35%;
    height: 100vh;
    background: url(./images/bg-main-desktop.png);
    position: relative;
}

.filled {
    width: 65%;
    height: 100vh;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
}

.front-card {
    position: absolute;
    top: 100px;
    /* top: 15%; */
    left: 220px;
    width: 300px;
    height: 165px;
    background: url(./images/bg-card-front.png);
    background-size: cover;
    color: #fff;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 5px 40px 50px hsla(278, 68%, 11%, 0.2);
}

.inner {
    width: 85%;
    height: 85%;
}

.circle {
    position: relative;
    margin-bottom: 50px;
}

.circle span:nth-of-type(1) {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #fff;
    display: inline-block;
}

.circle span:nth-of-type(2) {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid hsl(270, 3%, 87%);
    display: inline-block;
    position: absolute;
    top: 7px;
    left: 35px;
}

.num {
    width: 100%;
    font-size: 1rem;
    letter-spacing: 2.8px;
    font-weight: 500;
    margin-bottom: 20px;
}

.below {
    display: flex;
    justify-content: space-between;
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 300;
}

.below h6 {
    font-size: 0.6rem;
    font-weight: 300;
}

.back-card {
    width: 300px;
    height: 165px;
    background: url(./images/bg-card-back.png);
    background-size: cover;
    border-radius: 5px;
    position: absolute;
    bottom: 130px;
    left: 280px;
    color: #fff;
    box-shadow: 5px 40px 50px hsla(278, 68%, 11%, 0.2);
}

.back-card p {
    position: absolute;
    top: 74px;
    right: 35px;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 1px;
}

.card {
    width: 300px;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 1px;
    color: hsl(278, 68%, 11%);
    z-index: 1000;
    /* margin-left: 20%; */
}

input {
    border: 2px solid hsla(270, 3%, 87%, 0.6);
    border-radius: 5px;
    height: 30px;
    padding-left: 10px;
    outline: none;
}

input:focus {
    border: 2px solid hsl(278, 94%, 30%);
    box-shadow: 0 0 0 2px linear-gradient(to right, hsl(249, 99%, 64%), hsl(278, 94%, 30%));
}

input::-webkit-inner-spin-button,
input::-webkit-outer-spin-button,
input[type=number] {
    -webkit-appearance: none;
    margin: 0;
    /* -moz-appearance: none; */
}

input::placeholder {
    color: hsl(279, 6%, 55%, 0.6);
    font-size: 0.7rem;
    font-weight: 500;
}

input:nth-of-type(1),
input:nth-of-type(2) {
    width: 100%;
}

.card-number {
    text-transform: uppercase;
}

input.card-number::placeholder {
    text-transform: lowercase;
}

.last {
    display: flex;
    justify-content: space-between;
}

.month-year .inputs {
    display: flex;
    justify-content: space-between;
}

.month-year .inputs input {
    width: 48%;
}

.month-year {
    width: 45%;
}

.cvc {
    width: 45%;
}

.form {
    margin-bottom: 20px;
}

.form h5 {
    margin-bottom: 5px;
}

button {
    width: 100%;
    background: hsl(278, 68%, 11%);
    border: none;
    height: 30px;
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
}

.errors {
    color: hsl(0, 100%, 66%);
    font-size: 0.5rem;
    font-weight: 500;
    text-transform: none;
    margin-top: 2px;
    letter-spacing: 0px;
    display: none;
}

.top-errors,
.middle-errors {
    position: absolute;
}

.submitted-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.submitted-card .tick {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: 10%;
}

.submitted-card .tick img {
    width: 100%;
    height: 100%;
}

.submitted-card h1 {
    letter-spacing: 2px;
    margin-bottom: 3%;
}

.submitted-card p {
    text-transform: none;
    font-weight: 500;
    opacity: 0.8;
    margin-bottom: 10%;
}

/* ACTIVE STYLE */
p.active {
    display: block;
}

input.active,
input.active:focus,
input.active:valid {
    border: 2px solid hsla(0, 100%, 66%, 0.7);
}

.dismiss {
    display: none;
}

/* MEDIA QUERY DESIGN  */
@media only screen and (max-width:800px) {
    .front-card {
        top: 100px;
        left: 5%;
        z-index: 10;
    }
    
    .back-card {
        top: 10px;
        left: 17%;
    }
}


@media only screen and (max-width:500px) {
    .container {
        display: block;
        width: 100%;
        height: 100%;
        /* overflow: hidden; */
    }

    .empty {
        height: 30%;
        width: 100%;
        background: url(./images/bg-main-mobile.png);
        /* background-size: cover; */
        position: relative;
    }

    .filled {
        height: 70%;
        width: 100%;
        background: #fff;
    }

    .front-card {
        top: 100px;
        left: 5%;
        z-index: 10;
    }

    .back-card {
        top: 10px;
        left: 17%;
    }
    
    .below {
        font-size: 0.65rem;
    }
    
    .below h6 {
        font-size: 0.7rem;
    }

    .card {
        width: 90%;
        margin-top: 10%;
        font-size: 1rem;
    }

    input {
        height: 50px;
    }

    input::placeholder {
        font-size: 1rem;
    }

    button {
        height: 50px;
        font-size: 1rem;
    }

    .errors {
        font-size: 0.7rem;
    }
}

@media only screen and (max-width:330px) {

    .front-card {
        left: 3%;
    }

    .back-card {
        left: 12%;
    }
}
