* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Space Grotesk', sans-serif;
}

/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
input[type=number] {
    -moz-appearance: textfield;
}

main {
    display: flex;
    font-size: 0.7rem;
}

.invisible {
    position: absolute;
    left: -9999px;    
}

.background-img {
    background-image: url("images/bg-main-desktop.png");
    background-size: cover;
    width: 30%;
    height: 100vh;
}

.background-white {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 70%;
    height: 100vh;
}

.details {
    display: flex;
    flex-direction: column;
    width: 35%;
}

.details__label {
    color: hsl(278, 68%, 11%);
    text-transform: uppercase;
    font-weight: bold;
    margin-bottom: 0.3rem;

}

.details__input {
    border: 1px solid hsl(270, 3%, 87%);
    border-radius: 5px;
    color: hsl(278, 68%, 11%);
    margin-bottom: 1rem;
    padding: 0.5rem;
}

.details__input:hover,
.details__input:focus {
    border: 1px solid hsl(278, 68%, 11%);
    outline: hsl(278, 68%, 11%);
}

.details__info {
    display: flex;
}

.details__dateexp {
    display: flex;
    flex-direction: column;
    width: 45%;
}

.details__dateexp-inputs {
    display: flex;
    flex-direction: row;
}

.details__dateexp-inputs input, span {
    width: 40%;
    margin-right: 0.8rem;
}

.details__cvc {
    display: flex;
    flex-direction: column;
    width: 55%;
}

.details__button {
    background-color: hsl(278, 68%, 11%);
    color: white;
    cursor: pointer;
    border: none;
    border-radius: 10px;
    height: 40px;
    width: 100%;
}

::placeholder {
    color: hsl(279, 6%, 55%);
    opacity: 0.5;
}

.cards {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.card-details {
    align-items: center;
    background-image: url("images/bg-card-front.png");
    background-size: cover;
    border-radius: 10px;
    color: #ffffff;
    display: flex;
    height: 150px;
    flex-direction: column;    
    margin-bottom: 1rem;
    margin-left: -18rem;
    justify-content: flex-end;
    padding: 1rem;
    text-transform: uppercase;
    width: 300px;
}

.card-details__logo {
    height: 50%;
    width: 100%;
}

.card-details__number {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.card-details__name-dateexp {
    display: flex;
    flex-direction: row;
    font-size: 0.8rem;
    justify-content: space-between;
    width: 100%;
}

.card-details-back {
    background-image: url("images/bg-card-back.png");
    background-size: cover;
    border-radius: 10px;
    height: 150px;
    margin-left: -9rem;
    width: 300px;    
    
}

.card-details-back__cvc {
    color: #ffffff;   
    position: relative;
    top: 49.5%;
    left: 80%;
    width: min-content;
}

.confirm {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 35%;    
    text-align: center;    
}

.confirm__icon {
    height: 80px;
    width: auto;
    margin-bottom: 1rem;
}

.confirm__title {
    font-size: 1.8rem;
    letter-spacing: 0.2rem;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.confirm__text {
    font-size: 1rem;
    color: hsl(279, 6%, 55%);
    margin-bottom: 2rem;
    
}

#details__input-cvc-error {
    width: auto;
}

.error-input {
    border: 1px solid #b1395f;
}

.error-msg { 
    color: #c12020;                 
    margin-bottom: 1rem;
    margin-top: -12px;
    font-size: 0.6rem;
    position: relative;
}

@media screen and (max-width: 480px) {       
    
    main {
        flex-direction: column;                        
    }

    .background-img {
        background-image: url("images/bg-main-mobile.png");
        background-size: cover;
        width: 100%;
        height: 200px;        
    }

    .background-white {
        width: 100%;  
        height: 50%; 
        padding: 1rem;     
    }    

    .cards {
        width: 100%;
        padding: 1rem;             
    }

    .card-details, .card-details-back {
        margin: 0;
    }    

    .card-details {         
        position: relative;    
        margin-top: -8rem;        
        margin-left: -2rem;         
        z-index: 1;        
    }    

    .card-details-back {                
        position: relative;
        margin-top: -15.1rem;
        margin-right: -2rem;                
        z-index: 0;        
      }

    .details {
        width: 100%;
        padding: 1rem;
        margin-top: 2rem;        
    }

    .confirm {
        margin-top: 3rem;        
        width: 100%;
    }


    
}