/* Modais do tema azul (components/modals/layout_modal.py): a regra global
   input { margin-bottom: 25px } de style.css desalinha os campos do Mantine */
.modal-tema-azul input {
    margin-bottom: 0;
}

:where([data-mantine-color-scheme="light"]) .modal-tema-azul {
    .mantine-Select-input, .mantine-MultiSelect-input,
    .mantine-TextInput-input, .mantine-Textarea-input,
    .mantine-DatePickerInput-input, .mantine-NumberInput-input,
    .mantine-ColorInput-input, .mantine-Table-thead {
        background-color: var(--bg-select) !important;
    }

    .mantine-Table-tbody {
        background-color: rgb(244 246 250 / 0.6) !important;
    }

    .mantine-Progress-root {
        background-color: #c1d0dd !important;
    }
}

:where([data-mantine-color-scheme="light"]) .btn-fechar-modal-padrao {
    --button-color: var(--mantine-color-dark-5) !important;
    --button-bg: color-mix(in srgb, var(--mantine-color-dark-5), transparent 85%) !important;
    --button-hover: color-mix(in srgb, var(--mantine-color-dark-5), transparent 75%) !important;
    --button-bd: solid 1px var(--mantine-color-dark-3) !important;
}

.labels-modal {
    color: #ececec;
    font-size: 17px;
    font-weight: 400;
    font-family: Ubuntu;
}

.input-textarea-criar-atividade {
    .mantine-Textarea-label, .mantine-TextInput-label {
        color: #ececec;
        font-size: 17px;
        font-weight: 400;
        font-family: Ubuntu;
    }

    .mantine-Textarea-input, .mantine-TextInput-input {
        background-color: rgb(28 28 28 / 0.6);
        border: none;
        color: #ececec;
        border-radius: 7px;
        font-family: Ubuntu;
        font-size: 16px;
    }

    .mantine-TextInput-input {
        min-height: 2.8rem;
    }
}

.dropdown-modal-atividade {
    .mantine-Select-label,
    .mantine-MultiSelect-label,
    .mantine-ColorInput-label {
        color: var(--text-padrao);
        font-size: 17px;
        font-weight: 400;
        font-family: Ubuntu;
    }

    .mantine-Select-input,
    .mantine-MultiSelect-input,
    .mantine-ColorInput-input {
        background-color: var(--bg-popover-dropdown) !important;
        border: none;
        height: 2.8rem;
        border-radius: 7px;
        color: var(--text-padrao);
        font-family: Ubuntu;
        font-size: 16px;
    }

    .mantine-ColorInput-input {
        width: 23rem;
    }

    .mantine-MultiSelect-input {
        overflow: auto;
    }
}

.mantine-ColorInput-dropdown {
    z-index: 9800 !important;
    background-color: var(--bg-cor-moldura);
    border: 1px solid var(--bg-cor-borda);
}

.datepicker-modal-atividade {
    .mantine-DatePickerInput-label {
        color: #ececec;
        font-family: Ubuntu;
        font-weight: 400;
        font-size: 17px;
    }

    .mantine-DatePickerInput-input {
        font-family: Ubuntu;
        color: #ececec;
        height: 2.8rem;
        background-color: rgb(28 28 28 / 0.6);
        border: none;
        border-radius: 7px;
        font-size: 15px;
    }
}

.table-modal-editar-atividade {
    font-family: Ubuntu;
    color: #ececec;
    background-color: rgb(28 28 28 / 0.6);
    margin-bottom: 12px;
    font-size: 16px;

    --table-border-color: #353535;
    --table-highlight-on-hover-color: #272727;
    --table-striped-color: rgb(28 28 28 / 0.3);

    .mantine-Table-thead {
        font-weight: 350;
        font-size: 17px;
    }

    /* O desabilitado padrão do Mantine (tema claro) fica um quadrado branco no fundo escuro */
    .mantine-ActionIcon-root:disabled,
    .mantine-ActionIcon-root[data-disabled] {
        background-color: transparent;
        opacity: 0.35;
    }
}

.popover-dropdown-tags {
    overflow-y: scroll !important;
    z-index: 2000 !important;
    background-color: var(--bg-dropdown) !important;
    border-color: var(--bg-border) !important;
}

.btn-modal-card-atividade {
    background-color: #1c1c1c;
}

.btn-modal-card-atividade:hover {
    background-color: #272727;
}

.modal-confirmar-reprovacao-pre-andamento {
    padding: 15px;

    .mantine-Modal-content, .mantine-Modal-header {
        background-color: #272727;
    }
}

.checkbox-card-colaboradores-pre-andamento {
    background-color: color-mix(in srgb, var(--bg-checkbox-card), transparent 85%);
    border-color: var(--bg-botoes-border);
    padding: 8px;
    position: relative;
    transition: border-color 150ms ease;
    margin-bottom: 8px;

    &[data-checked] {
        border-color: var(--mantine-color-blue-5);
    }
}

.checkbox-card-colaboradores-pre-andamento:hover {
    background-color: color-mix(in srgb, var(--bg-checkbox-card), transparent 80%);
}

.checkbox-add-tags {
    color: var(--text-padrao);
    font-family: Ubuntu;
    margin-bottom: 5px;
}

.slider-modal-pre-andamento{
    .mantine-Slider-bar:where([data-disabled]:not(data-inverted)) {
        background-color: rgb(102, 200, 126) !important;
    }

    .mantine-Slider-markLabel {
        color: var(--text-suave);
        font-family: Ubuntu;
    }
}

/* Modal Analisar sub-atividade: o foco é o slider do progresso */
.destaque-slider-progresso {
    border: 1px solid rgb(102 200 126 / 0.45);
    background-color: rgb(102 200 126 / 0.08);
    border-radius: 10px;
    /* espaço para o rótulo sempre visível em cima e as marcas embaixo */
    padding: 2.6rem 1.5rem 2.2rem 1.5rem;
}

.titulo-destaque-slider {
    color: var(--text-padrao);
    font-family: Montserrat;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 1.6rem;
    margin-top: -1.4rem;
}

/* Os percentuais só acompanham o slider */
.percentuais-esmaecidos {
    opacity: 0.6;

    .mantine-TextInput-label {
        font-size: 14px !important;
    }

    .mantine-TextInput-input {
        min-height: 2.2rem !important;
        font-size: 14px !important;
    }
}

/* Alça de arrastar das etapas da sub-atividade (assets/etapas_subatividade.js) */
.etapa-arrastar {
    display: inline-flex;
    color: var(--mantine-color-dimmed);
    cursor: grab;
    /* No toque, arrasta em vez de rolar a modal */
    touch-action: none;
}

.etapa-arrastar:hover {
    color: var(--text-padrao);
}

.etapas-arrastando {
    user-select: none;

    .etapa-arrastar {
        cursor: grabbing;
    }

    .etapa-linha {
        transition: transform 150ms ease;
    }

    .etapa-linha.arrastada {
        transition: none;
        z-index: 1;
        box-shadow: 0 4px 12px rgb(0 0 0 / 0.45);
    }
}

.abas-modal {
    gap: 5px;
    padding: 5px;
    background-color: var(--bg-abas);
    border-radius: 6px;
}

.abas-modal .mantine-Tabs-tab {
    padding: 12px 23px;
    font-family: Montserrat;
    font-weight: 600;
    border-radius: 6px;
}

.abas-modal .mantine-Tabs-tab:not([data-active]):hover {
    background-color: var(--bg-abas-hover);
}

.msg-tab-atividade-sem-atv {
    font-family: Montserrat;
    font-weight: 600;

}