/* Cadastro público do imóvel: utiliza os mesmos grupos de campos dos cadastros internos. */
html,
body.sistema-autenticado {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}

body.sistema-autenticado > main.lp-cadastro-imovel {
    display: block;
    width: 100%;
    height: auto;
    min-height: 100vh;
    overflow: visible;
    padding: 32px 16px 72px;
    background: #000;
    color: #fff;
}

.cabecalho-cadastro-imovel-lp,
.secao-tipo-cadastro-lp,
.secao-formulario-cadastro-lp {
    width: min(100%, 1180px);
    margin-right: auto;
    margin-left: auto;
}

.cabecalho-cadastro-imovel-lp {
    margin-bottom: 24px;
    text-align: center;
}

.cabecalho-cadastro-imovel-lp h1 {
    color: #f8bf03;
    font-size: clamp(1.55rem, 3vw, 2.2rem);
}

.cabecalho-cadastro-imovel-lp p {
    margin-top: 8px;
    color: #d8dee8;
    font-size: .92rem;
}

.secao-tipo-cadastro-lp,
.secao-formulario-cadastro-lp {
    margin-bottom: 20px;
    padding: 22px;
    border: 1px solid #3d3d3d;
    border-radius: 10px;
    background: #171717;
}

.secao-tipo-cadastro-lp h2,
.secao-formulario-cadastro-lp > h2 {
    margin-bottom: 16px;
    color: #f8bf03;
    font-size: 1.1rem;
}

.opcoes-tipo-cadastro-lp {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.opcao-tipo-cadastro-lp {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 18px;
    border: 1px solid #606060;
    border-radius: 8px;
    background: #242424;
    color: #fff;
    cursor: pointer;
    font-size: .95rem;
    font-weight: 800;
    transition: border-color .2s ease, background-color .2s ease;
}

.opcao-tipo-cadastro-lp:hover {
    border-color: #f8bf03;
}

.opcao-tipo-cadastro-lp input {
    width: 18px;
    height: 18px;
    accent-color: #f8bf03;
}

.estado-inicial-cadastro-lp {
    margin: 0;
    padding: 30px 18px;
    border: 1px dashed #666;
    border-radius: 8px;
    color: #c8c8c8;
    text-align: center;
}

.form-autocad-lp {
    display: none;
}

.form-autocad-proprietario,
.form-autocad-inquilino {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.lp-cadastro-imovel:has(#tipo-cadastro-proprietario:checked) #form-autocad-pp,
.lp-cadastro-imovel:has(#tipo-cadastro-corretor:checked) #form-autocad-inq {
    display: block;
}

.lp-cadastro-imovel:has(#tipo-cadastro-proprietario:checked) .estado-inicial-cadastro-lp,
.lp-cadastro-imovel:has(#tipo-cadastro-corretor:checked) .estado-inicial-cadastro-lp {
    display: none;
}

/* Os estilos internos usam fundo claro para facilitar o preenchimento dos campos. */
.secao-formulario-cadastro-lp .cadastro-proprietario-painel {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.secao-formulario-cadastro-lp .grupo-form-proprietario {
    border-color: #414141;
    background: #1b1b1b;
}

.secao-formulario-cadastro-lp .grupo-form-proprietario legend,
.secao-formulario-cadastro-lp .campo-form-proprietario label {
    color: #fff;
}

.secao-formulario-cadastro-lp .campo-form-proprietario input,
.secao-formulario-cadastro-lp .campo-form-proprietario select,
.secao-formulario-cadastro-lp .campo-form-proprietario textarea {
    border-color: #555;
    background: #131313;
    color: #fff;
}

.secao-formulario-cadastro-lp .campo-form-proprietario input::placeholder,
.secao-formulario-cadastro-lp .campo-form-proprietario textarea::placeholder {
    color: #a7a7a7;
}

.secao-formulario-cadastro-lp .campo-form-proprietario select option {
    background: #131313;
    color: #fff;
}

.secao-formulario-cadastro-lp .required {
    color: #f8bf03;
}

.erros-form-imovel-publico {
    margin-bottom: 2px;
    padding: 12px 14px;
    border: 1px solid #ef4444;
    border-left: 3px solid #ef4444;
    border-radius: 7px;
    background: #351616;
    color: #fecaca;
    font-size: .84rem;
}

.erros-form-imovel-publico ul {
    margin: 7px 0 0;
    padding-left: 19px;
}

.secao-formulario-cadastro-lp .acoes-cadastro-proprietario {
    justify-content: flex-end;
}

.secao-formulario-cadastro-lp .btn-voltar-proprietarios,
.secao-formulario-cadastro-lp .btn-cancelar,
.secao-formulario-cadastro-lp .btn-salvar {
    cursor: default;
}

.secao-formulario-cadastro-lp .btn-salvar {
    cursor: pointer;
}

.form-autocad-imovel {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-autocad-imovel [hidden] {
    display: none !important;
}

.grupo-form-imovel-publico {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
    border: 1px solid #414141;
    border-radius: 8px;
    background: #1b1b1b;
}

.grupo-form-imovel-publico legend {
    padding: 0 8px;
    color: #fff;
    font-size: .95rem;
    font-weight: 700;
}

.linha-form-imovel-publico {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 13px;
}

.linha-form-imovel-publico:has(.campo-largo) {
    grid-template-columns: 2fr repeat(2, minmax(0, 1fr));
}

.campo-form-imovel-publico {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.campo-form-imovel-publico label {
    color: #fff;
    font-size: .8rem;
    font-weight: 700;
}

.campo-form-imovel-publico input,
.campo-form-imovel-publico select {
    width: 100%;
    min-height: 39px;
    box-sizing: border-box;
    padding: 7px 10px;
    border: 1px solid #555;
    border-radius: 6px;
    background: #131313;
    color: #fff;
    font: inherit;
    font-size: .88rem;
}

.campo-form-imovel-publico select option {
    background: #131313;
    color: #fff;
}

#autocad-imovel-condominio + .select2-container {
    width: 100% !important;
}

#autocad-imovel-condominio + .select2-container .select2-selection--single {
    min-height: 39px;
    border-color: #555;
    background: #131313;
}

#autocad-imovel-condominio + .select2-container .select2-selection__rendered {
    padding-left: 10px;
    background: transparent;
    color: #fff;
    font-size: .88rem;
    font-weight: 400;
    line-height: 37px;
}

#autocad-imovel-condominio + .select2-container .select2-selection__arrow {
    height: 37px;
}

body:has(#autocad-imovel-condominio) .select2-container--default .select2-dropdown {
    border-color: #555;
    background: #131313;
    color: #fff;
}

body:has(#autocad-imovel-condominio) .select2-container--default .select2-results__option {
    color: #fff;
}

body:has(#autocad-imovel-condominio) .select2-container--default .select2-search--dropdown .select2-search__field {
    background: #1b1b1b;
    color: #fff;
}

.acoes-form-imovel-publico {
    display: flex;
    justify-content: flex-end;
}

.acoes-form-imovel-publico .btn-salvar {
    min-height: 40px;
    padding: 8px 18px;
    border: 1px solid #f8bf03;
    border-radius: 6px;
    background: #f8bf03;
    color: #111;
    cursor: pointer;
    font-weight: 800;
}

@media (max-width: 620px) {
    body.sistema-autenticado > main.lp-cadastro-imovel {
        padding-right: 10px;
        padding-left: 10px;
    }

    .secao-tipo-cadastro-lp,
    .secao-formulario-cadastro-lp {
        padding: 14px;
    }

    .opcoes-tipo-cadastro-lp {
        grid-template-columns: 1fr;
    }

    .linha-form-imovel-publico,
    .linha-form-imovel-publico:has(.campo-largo) {
        grid-template-columns: 1fr;
    }
}
