/*
|--------------------------------------------------------------------------
| FORMULÁRIO DE ENVIO E EDIÇÃO
|--------------------------------------------------------------------------
*/

.formulario-cartao {
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
    padding: 25px;
    border: 1px solid #dddddd;
    background: #ffffff;
}

.formulario-cartao label.rotulo-campo {
    display: block;
    margin-bottom: 7px;
    font-size: 12px;
    font-weight: bold;
}

.formulario-cartao textarea {
    width: 100%;
    min-height: 120px;
    margin-bottom: 8px;
    padding: 12px;
    border: 1px solid #aaaaaa;
    background: #ffffff;
    font: inherit;
    resize: vertical;
}

/*
O campo fica fora da área visível, mas continua acessível pelo LABEL.
Não use display:none no input, pois isso pode causar comportamento irregular.
*/
.campo-arquivo-oculto {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

/* Elementos visuais construídos com PNG */
.botao-imagem {
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.botao-imagem img {
    display: block;
    width: 100%;
    height: auto;
    pointer-events: none;
    user-select: none;
}

.botao-escolher-foto {
    width: 320px;
    max-width: 100%;
    margin: 0 auto 10px;
}

.botao-enviar-imagem {
    width: 250px;
    max-width: 100%;
}

.botao-imagem:hover {
    opacity: 0.92;
}

.botao-imagem:focus,
.botao-escolher-foto:focus-within {
    outline: 2px solid #4b4b4d;
    outline-offset: 4px;
}

.nome-arquivo {
    margin: 0 0 8px;
    color: #777777;
    font-size: 12px;
    text-align: center;
    overflow-wrap: anywhere;
}

.mensagem-campo {
    min-height: 18px;
    margin-bottom: 10px;
    color: #a72d2d;
    font-size: 12px;
    text-align: center;
}

.preview-foto {
    display: none;
    width: 100%;
    height: auto;
    margin-bottom: 20px;
    background: #eeeeee;
    object-fit: contain;
}

.preview-foto.ativo {
    display: block;
}

.acoes-formulario {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
}

.acoes-formulario .botao {
    flex: 1;
    min-width: 170px;
}

@media (max-width: 560px) {
    .formulario-cartao {
        padding: 18px;
    }

    .acoes-formulario {
        display: block;
    }

    .botao-enviar-imagem,
    .acoes-formulario .botao {
        width: 100%;
        margin-bottom: 10px;
    }
}
