.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-header {
    border-radius: 8px 8px 0 0;
    background-image: url(https://cesarini.studio/under/wp-content/plugins/budget-calculator/form-header.png);
    background-size: cover;
    padding: 30px 40px;
}

.modal-header h3 {
    font-weight: 500 !important;
    font-size: 24px !important;
    color: #fff !important;
}

.modal-header p {
    font-weight: 400 !important;
    font-size: 14px !important;
    color: #fff !important;
}

.modal-content {
    background-color: #fff;
    margin: 60px auto;
    width: 800px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

@media (max-width: 800px) {
  .modal-content {
      width: calc(100% - 40px);
  }
  
  .modal-content #contact-form div {
      display: flex;
      flex-direction: column;
  }
}

.modal-body form {
    padding: 24px 40px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-body label {
    color: #0D0D12 !important;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
}

.modal-body label span {
    color: #F12E2E !important;
}

.modal-body label.checkbox {
    display: flex;
    gap: 8px;
}   

.modal-body label.checkbox span {
    color: #6B7280 !important;
    font-size: 14px !important;
    font-weight: 400 !important;
}

.modal-body input, .modal-body textarea {
    font-size: 14px !important;
    border: 1px solid #DFE1E7 !important;
    border-radius: 0 !important;
}

.modal-footer {
    border-top: 1px solid #D1D5DB;
    margin: 0 -40px;
    padding: 0 40px;
    margin-top: 30px;
    display: flex;
    flex-direction: row !important;
    gap: 10px;
}

.modal #contact-form .row div {
    width: 100%;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    margin-left: 10px;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

#show-modal-btn {
    width: 100%;
    background-color: #8AE0FF;
    color: #000;
    font-size: 16px;
    font-weight: 600;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    transition: background-color 0.3s;
    box-shadow: 0px 1px 20px 4px rgba(138, 224, 255, 0.2);
}

#show-modal-btn:hover {
    background-color: #8AE0FF;
}

#contact-form button,  #contact-form .cancel {
    display: block;
    width: fit-content;
    background-color: #143B7B;
    color: white;
    border: none;
    padding: 10px 28px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 0;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top:16px;
}

#contact-form button:hover {
    background-color: #23519D;
}

.cancel {
    color: #04070D !important;
    border: 1px solid #D1D5DB !important;
    background-color: #fff !important;
}

#calculator-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.loader {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-right: 5px;
}

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


.calculator-container {
    display: flex;
    justify-content: space-between;
    margin: 48px auto 0;
    max-width: 1200px;
    color: #fff !important;
    gap: 16px;
}

.calculator-container .row {
    gap: 24px !important;
}

.calculator-left {
    width: 35%;
}

.calculator-summary {
    width: 100%;
    background-color: #2C2D2F;
    margin-top: 8px;
    padding: 20px;
    border: 1px solid #8AE0FF;
    /*box-shadow: 0px 1px 20px 4px rgba(138, 224, 255, 0.2);*/
}

.calculator-summary .row {
    align-items: center;
    gap: 8px;
}

.calculator-summary p {
    color: #fff !important;
    font-size: 14px !important;
    margin-top: 20px;
}

.calculator-container h2 {
    font-size: 28px !important;
    margin: 0px !important;
    margin-bottom: 12px !important;
    color: #fff !important;
}

.calculator-description {
    font-size: 14px !important;
    color: #fff;
}

.calculator-field {
    font-size: 14px;
}

.calculator-radio {
    display: flex;
    flex-direction: row;
    gap: 4px;
}

.calculator-radio .calculator-field h3 {
    color: #fff !important;
    font-weight: 500;
    font-size: 18px !important;
    display: block;
    background-color: #1A333C;
    padding: 12px;
    text-align: center;
    margin-bottom: 12px;
}

.calculator-radio .calculator-field > div {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 20px 12px;
    background-color: #252627;
    flex: 1 1 100%;
    align-content: flex-start;
}

.calculator-list .calculator-item {
    flex: 1 1 100%; /* Por padrão, ocupa 100% da largura (1 coluna) */
}

.calculator-item {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: flex-start;
}

.calculator-item label {
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 18px;
}

.calculator-item div {
    display: flex;
    flex-direction: column;
    margin-top: -2px;
}

/* Quando houver mais de 6 itens, mude para 2 colunas */
.calculator-list:has(.calculator-item:nth-child(n+7)) .calculator-item {
    flex: 1 1 calc(50% - 10px); /* 2 colunas */
}

/* Quando houver mais de 12 itens, mude para 3 colunas */
.calculator-list:has(.calculator-item:nth-child(n+13)) .calculator-item {
    flex: 1 1 calc(33.33% - 10px); /* 3 colunas */
}

.calculator-radio .calculator-field {
    display: flex;
    flex-direction: column;
}

.calculator-slider {
    padding: 20px 12px;
    background-color: #252627;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    row-gap: 50px;
    column-gap: 100px;
}

.calculator-slider .calculator-field label {
    color: #C1C7D0 !important;
    font-size: 16px;
    font-weight: 500;
}

.value-description {
    display: block;
    font-size: 13px;
    color: #A4ACB9;
}

.calculator-summary h3 {
    color: #fff !important;
    font-size: 18px !important;
    margin: 0px !important;
}

.calculator-summary .resumo {
    display: flex;
    width: 75%;
    font-size: 14px;
    line-height: 1.6;
    padding: 24px;
    background-color: #363739;
    flex-direction: column;
    justify-content: center;
}

.calculator-summary #summary {
    display: flex;
    gap: 4px;
    justify-content: space-between;
}

.calculator-summary #summary .campo {
    display: block;
}

.calculator-summary #summary .label {
    color: #C1C7D0 !important;
    font-size: 14px !important;
    font-weight: 400;
}

.calculator-summary #summary .valor {
    color: #fff !important;
    font-size: 16px !important;
    font-weight: 400;
}

.calculator-summary .termo {
    color: #C1C7D0 !important;
    font-size: 12px !important;
    line-height: 18px;
}

.budget-container {
    gap: 24px;
    display: flex;
}

.termos-container {
    width: 25%;
}

.calculator-icon {
    width: 46px;
    height: 46px !important;
}

.disclaimer {
    padding: 20px 12px;
    background-color: #2E393D;
    margin-top: 8px;
    margin-bottom: 48px;
    text-align: center;
}

.disclaimer h4 {
    color: #8AE0FF !important;
    margin: 0px !important;
    font-size: 18px !important;
    font-weight: 500;
}

.disclaimer p {
    color: #fff;
    margin: 0px !important;
    margin-top: 4px !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    
}

.row {
    display: flex;
    flex-direction: row;
    gap: 24px;
}

.slider {
    position: relative;
    width: 200px;
    margin-top: 8px;
}

.slider-input {
    -webkit-appearance: none; /* Remove o estilo padrão do navegador */
    width: 100%; /* Ocupar toda a largura do contêiner */
    height: 4px; /* Altura da trilha do slider */
    border-radius: 5px; /* Bordas arredondadas na trilha */
    background: linear-gradient(to right, #4FC3F7 0%, #4FC3F7 50%, #000 50%, #000 100%); /* Gradiente inicial */
    outline: none; /* Remove a borda de foco */
    transition: background 0.3s; /* Animação de transição na cor */
}

.slider-input::-webkit-slider-thumb {
    -webkit-appearance: none; /* Remove o estilo padrão do botão */
    appearance: none;
    width: 20px; /* Largura do botão */
    height: 20px; /* Altura do botão */
    border-radius: 50%; /* Bordas arredondadas */
    background: white; /* Cor do botão */
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5); /* Sombra do botão */
    cursor: pointer; /* Muda o cursor ao passar o mouse */
}

.slider-input::-moz-range-thumb {
    width: 20px; /* Largura do botão */
    height: 20px; /* Altura do botão */
    border-radius: 50%; /* Bordas arredondadas */
    background: white; /* Cor do botão */
    border: 2px solid #4FC3F7; /* Borda do botão */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); /* Sombra do botão */
    cursor: pointer; /* Muda o cursor ao passar o mouse */
}

.slider-value {
    position: absolute;
    top: 0;
    left: 105%;
    font-weight: 500;
    color: #fff;
}


@media (max-width: 1024px) {
    .calculator-list .calculator-item {
        flex: 1 1 calc(50% - 10px) !important;
    }
    
    #budget-calculator {
        padding: 0 16px;
    }
    
    .calculator-radio .calculator-field {
        flex: 1;
        width: fit-content;
        min-width: 160px;
    }
    
    .calculator-radio, .budget-container, #summary {
        flex-wrap: wrap;
    }
    
    .calculator-slider {
        grid-template-columns: repeat(1, 1fr);
    }
    
    .slider {
        width: calc(100% - 60px);
    }
    
    .resumo, .termos-container {
        width: 100% !important;
    }
}