.govbr-forms-componente {
    --cor-borda: var(--colors_gray05);
    --colunas-ocupadas: 1;
    --linhas-ocupadas: 1;

    grid-column: span var(--colunas-ocupadas);
    grid-row: span var(--linhas-ocupadas);

    position: relative;
    padding: 0;
    min-width: 200px;
    min-height: 45px;
    border: 1px solid var(--cor-borda);
    margin: 6px;
    border-radius: 4px;
}

.govbr-forms-edicao .govbr-forms-componente-oculto {
    opacity: 0.4;
}

.govbr-forms-edicao .govbr-forms-componente {
    cursor: move;
}

.govbr-forms-visualizacao .govbr-forms-componente-oculto {
    display: none;
}

.govbr-forms-visualizacao .govbr-forms-componente {
    min-height: initial;
}

.govbr-forms-componente.govbr-forms-componente-selecionado {
    --cor-borda: var(--colors_actionborder_and_focuscolor);
    box-shadow: 0 0 0 1px var(--colors_actionborder_and_focuscolor);
}

.govbr-forms-componente-input {
    display: flex;
    flex-direction: column;
    --cor-borda: transparent;
    margin: 4px 6px 2px 0;
}

.govbr-forms-edicao .govbr-forms-componente-input * {
    pointer-events: none;
}

.govbr-forms-componente-input-titulo {
    margin: 0 0 3px 0;
    padding-bottom: 6px;
    width: fit-content;
}

.govbr-forms-componente-input-titulo::after {
    content: ':';
}

.govbr-forms-componente-input-campo {
    border: 1px solid var(--colors_gray05);
    background: var(--colors_gray01);
    color: var(--colors_gray06);
    flex: 0 0 auto;
    height: 34px;
    min-width: 125px;
    padding: 6px 12px;
    margin-bottom: 5px;
    border-radius: 4px;
}

.govbr-forms-edicao .govbr-forms-componente-input-campo {
    font-style: italic;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.govbr-forms-edicao .govbr-forms-componente-input-booleano .govbr-forms-componente-input-campo {
    border: none;
    font-style: initial;
    font-size: 20px;
}

.govbr-forms-componente-input-editor-valor {
    border: 1px solid var(--colors_gray05);
    border-radius: 4px;
    padding: 6px 12px;
    user-select: text;
}

.govbr-forms-edicao .govbr-forms-componente-input-lista .govbr-forms-componente-input-campo-inline {
    border: none;
}

.govbr-forms-edicao .govbr-forms-componente-input-lista .govbr-forms-componente-input-campo-inline .govbr-forms-componente-input-campo-icone {
    font-size: 20px;
    margin-right: 5px;
    vertical-align: middle;
}

.govbr-forms-input-lista-dropdown {
    color: var(--colors_gray08);
    border: 1px solid var(--colors_gray05);
    padding: 6px 12px;
    border-radius: 4px;
    height: 34px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.govbr-forms-input-lista-dropdown.govbr-forms-input-lista-dropdown-leitura {
    cursor: initial;
    background: var(--colors_gray03);
}

.govbr-forms-input-lista-dropdown.govbr-forms-input-lista-dropdown-leitura > .fa-solid {
    display: none;
}

.govbr-forms-visualizacao .govbr-forms-input-lista-dropdown {
    width: fit-content;
    min-width: 125px;
    transition:
        color 0.5s,
        border 0.5s,
        background 0.5s;
}

.govbr-forms-input-lista-dropdown > * {
    flex: 0 0 auto;
}

.govbr-forms-input-lista-dropdown > .govbr-forms-input-lista-dropdown-titulo {
    flex: 1 0 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.govbr-forms-input-lista-dropdown.govbr-forms-input-lista-dropdown-leitura:focus {
    outline-style: auto;
}

.govbr-forms-input-lista-dropdown.govbr-forms-input-lista-dropdown-leitura > .govbr-forms-input-lista-dropdown-titulo {
    user-select: text;
}

.govbr-forms-input-lista-container-itens {
    list-style: none;
    border: 1px solid var(--colors_gray05);
    border-radius: 4px;
    padding: 6px 12px;
    margin: 4px;
    color: var(--colors_gray08);
    background: var(--colors_databackgroundcolor);
}

.govbr-forms-input-lista-container-item {
    cursor: pointer;
    display: flex;
    align-items: center;
    height: 30px;
    padding: 6px 12px;
    gap: 6px;
    user-select: none;
}

.govbr-forms-input-lista-dropdown-titulo.govbr-forms-input-lista-dropdown-titulo-vazio,
.govbr-forms-input-lista-container-simples .govbr-forms-input-lista-container-item[data-valor=''] {
    font-style: italic;
    opacity: 0.6;
}

.govbr-forms-input-lista-container-simples:not(.govbr-forms-input-lista-container-radio) .govbr-forms-input-lista-container-item[data-valor=''] {
    font-weight: bold;
}

.govbr-forms-input-lista-container-item:hover,
.govbr-forms-input-lista-container-item:focus-visible {
    background: var(--colors_gray02);
}

.govbr-forms-input-lista-container-simples:not(.govbr-forms-input-lista-container-radio) .govbr-forms-input-lista-container-item-selecionado {
    background: var(--colors_gray02);
}

.govbr-forms-visualizacao .govbr-forms-componente-input-lista .govbr-forms-componente-input-campo {
    flex: 0 0 auto;
    height: 1px !important;
    width: 1px !important;
    min-width: 1px;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    outline: none !important;
    margin-top: -1px !important;
    margin-left: -1px !important;
    z-index: -1;
}

.govbr-forms-input-lista-container-icone-selecionado,
.govbr-forms-input-lista-container-icone-deselecionado {
    font-size: 18px;
}

.govbr-forms-input-lista-container-item > .govbr-forms-input-lista-container-icone-deselecionado {
    display: initial;
}

.govbr-forms-input-lista-container-item > .govbr-forms-input-lista-container-icone-selecionado {
    display: none;
}

.govbr-forms-input-lista-container-item-selecionado > .govbr-forms-input-lista-container-icone-deselecionado {
    display: none;
}

.govbr-forms-input-lista-container-item-selecionado > .govbr-forms-input-lista-container-icone-selecionado {
    display: initial;
}

.govbr-forms-input-lista-container-simples:not(.govbr-forms-input-lista-container-radio) .govbr-forms-input-lista-container-icone-deselecionado,
.govbr-forms-input-lista-container-simples:not(.govbr-forms-input-lista-container-radio) .govbr-forms-input-lista-container-icone-selecionado {
    display: none;
}

.govbr-forms-visualizacao .govbr-forms-componente-input-data-hora .govbr-forms-componente-input-campo {
    width: fit-content;
}

.govbr-plataforma-suggest.govbr-forms-suggest-lista-dropdown {
    margin-top: 4px;
}

.govbr-plataforma-suggest .govbr-forms-input-lista-container-itens {
    padding: 0;
    margin: 0;
    border: 0;
}

.govbr-plataforma-suggest .govbr-forms-input-lista-container-item {
    min-width: 200px;
    height: 40px;
    padding: 12px 16px;
}

.govbr-forms-componente-input-textarea .govbr-forms-componente-input-campo,
.govbr-forms-componente-input-editor .govbr-forms-componente-input-campo,
.govbr-forms-componente-input-editor .ck-editor {
    --numero-linhas: 4;
    min-height: 40px;
    height: calc(var(--numero-linhas) * 20px + 14px);
    resize: vertical;
}

.govbr-forms-componente-input-editor .govbr-forms-componente-input-campo,
.govbr-forms-componente-input-editor .ck-editor {
    font-family: Arial;
    font-weight: 400;
    font-size: 14px;
    white-space: initial;

    --numero-linhas: 10;
}

.govbr-forms-componente-input-editor .ck-rounded-corners {
    --ck-border-radius: 4px;
}

.govbr-forms-componente-input-editor .ck-editor__editable {
    min-height: 200px;
    max-height: 400px;
}

.govbr-forms-visualizacao .govbr-forms-componente-input-campo:invalid,
.govbr-forms-visualizacao .govbr-forms-input-lista-dropdown:has(+ .govbr-forms-componente-input-campo:invalid) {
    border-color: color-mix(in oklab, var(--colors_danger_condform), var(--colors_gray05) 90%);
    box-shadow: 0 0 0 1px color-mix(in oklab, var(--colors_danger_condform), var(--colors_gray05) 90%);
}

.govbr-forms-validado.govbr-forms-visualizacao .govbr-forms-componente-input-campo:invalid,
.govbr-forms-edicao .govbr-forms-componente-input-obrigatorio .govbr-forms-componente-input-campo,
.govbr-forms-validado.govbr-forms-visualizacao .govbr-forms-input-lista-dropdown:has(+ .govbr-forms-componente-input-campo:invalid),
.govbr-forms-edicao .govbr-forms-componente-input-obrigatorio .govbr-forms-input-lista-dropdown:has(+ .govbr-forms-componente-input-campo) {
    border-color: var(--colors_danger_condform);
}

.govbr-forms-validado.govbr-forms-visualizacao .govbr-forms-componente-input-campo:invalid,
.govbr-forms-validado.govbr-forms-visualizacao .govbr-forms-input-lista-dropdown:has(+ .govbr-forms-componente-input-campo:invalid) {
    background: var(--colors_danger_condform_action);
    transition: none;
}

@supports (background: color-mix(in oklab, red, green)) {
    .govbr-forms-validado.govbr-forms-visualizacao .govbr-forms-componente-input-campo:invalid,
    .govbr-forms-validado.govbr-forms-visualizacao .govbr-forms-componente-input-campo:invalid::placeholder,
    .govbr-forms-validado.govbr-forms-visualizacao .govbr-forms-input-lista-dropdown:has(+ .govbr-forms-componente-input-campo:invalid) {
        color: color-mix(in oklab, var(--colors_danger_condform), #000000 25%);
    }
}

.govbr-forms-edicao .govbr-forms-componente-input-readonly .govbr-forms-componente-input-campo {
    background: var(--colors_gray04);
}

.govbr-forms-visualizacao .govbr-forms-componente-input-campo {
    color: var(--colors_gray08);
    background: var(--colors_databackgroundcolor);
    border: 1px solid var(--colors_gray05);
    font-family: inherit;
    font-size: inherit;
    transition:
        color 0.5s,
        border 0.5s,
        background 0.5s;
}

.govbr-forms-visualizacao .govbr-forms-componente-input-campo[type='checkbox'] {
    position: relative;
    flex: 0 0 auto;
    height: auto;
    width: fit-content;
    appearance: none;
    border: none;
    padding: 0;
    margin: 0;
    margin-bottom: 5px;
    min-width: initial;
}

.govbr-forms-visualizacao .govbr-forms-componente-input-campo[type='checkbox']::before {
    display: block;
    content: '';
    border: 2px solid var(--colors_gray08);
    border-radius: 4px;
    margin: 6px;
    padding: 0;
    height: 17px;
    width: 17px;
    line-height: 1;
    pointer-events: none;
    box-sizing: border-box;
}

.govbr-forms-visualizacao .govbr-forms-componente-input-campo[type='checkbox']:checked::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 14px;
    width: 14px;
    border: 2px solid var(--colors_gray08);
    border-radius: 2px;
    transform: translate(6px, 2px) rotate(45deg);
    clip-path: polygon(60% 30%, 60% 100%, 100% 100%, 100% 30%);
    pointer-events: none;
    box-sizing: border-box;
}

.govbr-forms-visualizacao .govbr-forms-componente-input-campo[readonly]:not([type='checkbox']) {
    background: var(--colors_gray03);
}

.govbr-forms-visualizacao .govbr-forms-componente-input-campo::placeholder,
.govbr-forms-visualizacao .govbr-forms-componente-input-campo > option[value=''] {
    color: var(--colors_gray06);
    font-style: italic;
}

.govbr-forms-componente-input-container-campo {
    display: flex;
    align-items: flex-start;
}

.govbr-forms-componente-input-container-campo > .govbr-forms-componente-input-campo {
    flex: 1 1 auto;
}

.govbr-forms-componente-input-hint {
    height: 34px;
    width: 34px;
    border: none;
    color: var(--colors_basecolor);
    background: var(--colors_databackgroundcolor);
    border: 1px solid var(--colors_gray05);
    font-size: 17px;
    border-radius: 0 4px 4px 0;
    margin-left: -2px;
    cursor: pointer;
}

.govbr-forms-componente-input-hint:hover {
    background: var(--colors_gray02);
}

.govbr-forms-componente-fieldset {
    margin: 1rem 0.5rem;
    padding-left: 0.5rem;
    background: var(--colors_gray01);
    height: fit-content;
}

.govbr-forms-visualizacao .govbr-forms-componente-fieldset-multilinha {
    display: block;
}

.govbr-forms-visualizacao .govbr-forms-componente-fieldset {
    background: var(--colors_databackgroundcolor);
}

.govbr-forms-componente-fieldset-linha {
    position: relative;
    display: grid;
    grid-template-columns: repeat(var(--numero-colunas), 1fr);
    grid-auto-rows: min-content;
    padding-bottom: 2rem;
    padding-right: 0.5rem;
}

.govbr-forms-componente-fieldset-linha:not(:last-child) {
    border-bottom: 1px solid var(--colors_gray05);
    margin-left: -0.5rem;
    padding-left: 0.5rem;
    margin-bottom: 1rem;
}

.govbr-forms-componente-fieldset-linha.govbr-forms-componente-fieldset-linha-fantasma > *:not(.govbr-forms-componente-fieldset-linha-botao) {
    opacity: 0.25;
    pointer-events: none;
}

.govbr-forms-componente-fieldset-linha-botao {
    position: absolute;
    right: 1rem;
    bottom: -1px;
    height: 2.5rem;
    width: 4rem;
    border: 1px solid var(--colors_gray05);
    background: var(--colors_databackgroundcolor);
    border-radius: 0.5rem;
    z-index: 1;
    padding: 0;
    margin: 0;
}

.govbr-forms-componente-fieldset-linha-botao:hover {
    background: var(--colors_gray04);
}

.govbr-forms-componente-fieldset-linha-add:has(+ .govbr-forms-componente-fieldset-linha-remove) {
    right: calc(5rem - 1px);
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.govbr-forms-componente-fieldset-linha-add + .govbr-forms-componente-fieldset-linha-remove {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.govbr-forms-componente-fieldset-titulo {
    grid-column: 1 / -1;
    margin-top: -10px;
    margin-left: 5px;
    padding: 0 8px;
    width: fit-content;
    color: var(--colors_gray07);
    background: var(--colors_gray01);
    border-radius: 4px;
    font-weight: bold;
    pointer-events: none;
}

.govbr-forms-visualizacao .govbr-forms-componente-fieldset .govbr-forms-componente-fieldset-titulo {
    background: var(--colors_databackgroundcolor);
}

.govbr-forms-visualizacao .govbr-forms-componente-titulo {
    color: var(--colors_gray08);
    background: var(--colors_databackgroundcolor);
}

.govbr-forms-componente-tabs-container {
    display: grid;
    grid-template-columns: repeat(99, auto) 1fr;
    background: var(--colors_gray03);
    padding: 6px;
    --cor-borda: transparent;
}

.govbr-forms-visualizacao .govbr-forms-componente-tabs-container {
    background: var(--colors_gray01);
}

.govbr-forms-componente-tabs {
    display: contents;
}

.govbr-forms-componente-tabs::before {
    display: none;
}

.govbr-forms-componente-tabs-container > .govbr-form-adicionar-novo {
    grid-row: 1;
    grid-column: 99;
    width: 50px;
    padding: 0px 5px;
}

.govbr-forms-componente-tabs-titulo {
    grid-row: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    max-width: 200px;
    height: 43px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 15px;
    margin-right: 2px;
    margin-bottom: -1px;
    border-radius: 4px 4px 0 0;
    border: 1px solid transparent;
    z-index: 1;
    cursor: pointer;
    color: var(--colors_basecolorforecolor);
}

.govbr-forms-edicao .govbr-forms-componente-oculto > .govbr-forms-componente-tabs-titulo {
    opacity: 0.4;
}

.govbr-forms-visualizacao .govbr-forms-componente-oculto > .govbr-forms-componente-tabs-titulo {
    display: none;
}

.govbr-forms-componente-selecionado > .govbr-forms-componente-tabs-titulo {
    box-shadow:
        -1px 0 0 var(--colors_actionhoverborder),
        1px 0 0 var(--colors_actionhoverborder),
        0 -1px 0 var(--colors_actionhoverborder);
}

.govbr-forms-componente-tabs-ativa > .govbr-forms-componente-tabs-titulo {
    background: var(--colors_gray01);
    border: 1px solid var(--cor-borda);
    border-bottom: 1px solid transparent;
    cursor: default;
    color: inherit;
}

.govbr-forms-visualizacao .govbr-forms-componente-tabs-ativa > .govbr-forms-componente-tabs-titulo {
    background: var(--colors_databackgroundcolor);
}

.govbr-forms-componente-tabs-titulo:hover {
    border: 1px solid var(--cor-borda);
    border-bottom: 1px solid transparent;
    background: var(--colors_gray01);
    text-decoration: underline;
}

.govbr-forms-visualizacao .govbr-forms-componente-tabs-titulo:hover {
    background: var(--colors_databackgroundcolor);
}

.govbr-forms-componente-tabs-itens {
    --numero-colunas: inherit;

    grid-row: 2;
    grid-column: 1 / span 100;

    border: 1px solid var(--cor-borda);
    padding: 4px 8px;

    cursor: initial;
}

.govbr-forms-componente-selecionado > .govbr-forms-componente-tabs-itens {
    box-shadow:
        -1px 0 0 var(--colors_actionhoverborder),
        1px 0 0 var(--colors_actionhoverborder),
        0 1px 0 var(--colors_actionhoverborder);
}

.govbr-forms-componente-tabs:not(.govbr-forms-componente-tabs-ativa) > .govbr-forms-componente-tabs-itens {
    display: none;
}

.govbr-forms-componente-drag {
    z-index: var(--z-index-flutuantes);
    --translate-x: 0px;
    --translate-y: 0px;

    opacity: 0.5;
    transition: opacity 0.5s;

    transform: translate(var(--translate-x), var(--translate-y));

    pointer-events: none;
}

.govbr-forms-arrastando-componente .govbr-forms-componente {
    cursor: not-allowed;
}

.govbr-forms-container-alvo {
    background: var(--colors_gray04);
    cursor: grabbing;
}

.govbr-forms-container-alvo.govbr-forms-componente-tabs-titulo {
    background: var(--colors_gray04);
}

.govbr-componente-alvo > .govbr-form-adicionar-novo,
.govbr-form-adicionar-novo-visivel {
    opacity: 0.75;
}

.govbr-forms-arrastando-componente .govbr-form-adicionar-novo {
    opacity: 0 !important;
    pointer-events: none;
}
