* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f4f4f4;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

@media (max-width: 768px) {
    body {
        background-color: white;
    }
}

.container {
    display: flex;
    min-width: 45%;
    min-height: 65%;
    justify-content: space-between;
    background-color: white;
    border-radius: 25px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Barra de progresso */
.progress-bar {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
}

.step-title {
    width: 50%;
    text-align: center;
    padding: 10px;
    font-weight: bold;
    border-bottom: 3px solid #ccc;
    color: #999;
    transition: color 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
}

.step-title-active {
    border-bottom: 3px solid #007bff;
    color: #007bff;
}

.checkout {
    flex: 0.6;
    display: flex;
    flex-direction: column;
    margin: 20px;
    margin-left:40px;
    margin-right: 40px;
}

.steps {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    margin-top: 10px;
}

.step {
    display: none;
    flex-direction: column;
}

.step-active {
    display: flex;
}

@media (max-width: 768px) {
    .container {
        min-width: 95%;
        padding: 10px;
        background-color: transparent;
        box-shadow: none;
    }
    .step-title {
        margin-bottom: 10px;
    }

    body {

        height: 100%;
    }
}

/* Estilizando os campos organizados */
.card-details, .address-details {
    display: flex;
    justify-content: space-between;
}

.card-details input, .address-details input {
    width: 48%;
}

/* Botão */
button {
    padding: 12px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
}

button:hover {
    background-color: #0056b3;
}

/* Resumo da Inscrição */
.summary {
    display: flex;
    flex-direction: column;
    flex: 0.4;
    margin: 10px;
}

h2 {
    margin-bottom: 10px;
    font-size: 1.5rem;
}

h3 {
    margin-bottom: 10px;
    font-size: 0.8rem;
    margin-left: 1%;
    color: #999;
}

p {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
        align-items: center;
    }

    .checkout, .summary {
        width: 100%;
    }

    .summary {
        margin-top: 20px;
    }

    .card-details, .address-details {
        flex-direction: column;
    }

    .card-details input, .address-details input {
        width: 100%;
        margin-bottom: 10px;
    }
}

.spinner {
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-left-color: #ffffff;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

#next-button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    min-height: 45px;
}

#finish-button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    min-height: 45px;
}

#loading-spinner {
    margin-left: 0px;
}

#finish-loading-spinner {
    margin-left: 0px;
}

@media (max-width: 768px) {
    #next-button {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 100%;
    }

    button {
        min-width: 100%;

    }
}


.summary-resume {
    flex: 1;
    overflow: hidden; /* Esconde as partes da imagem que ultrapassam a div */
    position: relative;
    background-color: #f1f1f1b1;
    padding-top: 40px;
    padding-left: 20px;
    border-radius: 20px;
}

@media (max-width: 768px) {
    .summary-resume {
        padding: 30px;
        
    }
}   

.summary-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ajusta a imagem para cobrir toda a área da div */
    position: absolute;
    top: 0;
    left: 0;
}

.logo {
    width: 70px;
    margin-bottom: 8px;
}

.button-container{
    display: flex;
    justify-content: end;
}

.error-popup {
    position: fixed;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #f44336;
    color: white;
    padding: 15px;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: top 1s ease-in-out;
    z-index: 1000;
}

@media (max-width: 768px) {
    .error-popup {
        width: 80%;
    }
}

.error-popup.show {
    top: 20px;
}


.form-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    max-width: 500px;
    width: 100%;
    box-sizing: border-box;
}

.input-container {
    position: relative;
    flex: 1 1 200px;
    margin-bottom: 15px;
}

#ddi {
    flex: 0.2; /* Ajusta a proporção do primeiro input */
}

#phone {
    flex: 0.9; /* Ajusta a proporção do segundo input */
}

#city {
    flex: 0.6; /* Ajusta a proporção do segundo input */
}

#state {
    flex: 0.4; /* Ajusta a proporção do segundo input */
}

#validade {
    flex: 0.3; /* Ajusta a proporção do segundo input */
}

#cvv {
    flex: 0.7; /* Ajusta a proporção do segundo input */
}

.input-field {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;

}

.input-label {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #999;
    pointer-events: none;
    transition: all 0.3s ease;
}

.input-field:focus {
    border-color: #4a90e2;
    outline: none;
}

.input-field:focus + .input-label,
.input-field:not(:placeholder-shown) + .input-label {
    top: 0;
    font-size: 12px;
    color: #4a90e2;
    background-color: #fff;
    padding: 0 5px;
    border-radius: 10px;
}