form{
    width: 20em;
    height: 15em;
    display: grid;
    grid-template-areas: "overlap";
    margin: 5em auto;
    font-size: 1em;
}

form label{
    font-size: 1.07em;
}

form input{
    font-size: 1.1em;
}

fieldset{
    grid-area: overlap;
    
    background-color: lightgrey;
    box-shadow: 5px 5px 3px grey;
    border: none;
    border-radius: 4px;
}

#creditCardFront{
    width: 18.5em;
    height: 12em;
    padding: 1em;
}

p{
    display: grid;
    grid-template-columns: 4fr 1fr;
    justify-content: space-between;
    margin: 1em 0 0 0;
}

span{
    padding: 1.5em 0;
}

input{
    margin-top: 0.5em;
    border-radius: 3px;
    border: none;
}

#cardHolderAndExpiration{
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 1em;
    margin: 1em 0;
}

#expirationSubsection{
    display: grid;
    grid-template-rows: auto auto auto;
    justify-content: right;
}

#expirationSubsection label{
    grid-column: 1 / span 2;
}

#expirationSubsection input{
    width: 84%;
}

#creditCardFront{
    z-index: 1;
}

#creditCardBack{
    width: 20.5em;
    height: 13.5em;
    margin-top: 3.5em;
    margin-left: 6.5em;
    z-index: 0;
    display: grid;
    grid-template-rows: 10fr 1fr 1fr;
}

#creditCardBack label{
    justify-self: right;
}

#creditCardBack input{
    justify-self: right;
    margin-bottom: 2em;
}

#creditCardBack label,input{
    margin-right: 1em;
    width: 23%;
}

#cardNumber{
    width: 97%;
}

#cardHolder{
    width: 100%;
}


#magneticStripe{
    background-color: black;
    width: 100%;
    height: 30%;
    margin-top: 1em;
}

.hidden{
    display: none;
}

button{
    width: 7em;
    height: 3em;
    margin: 2em 0;
    justify-self: right;
    border-radius: 5px;
}