/*
 * Ajustes funcionais compartilhados entre os produtos.
 * A aparência dos componentes permanece sob responsabilidade do Frest.
 */

.form-control.documento-invalido {
    color: var(--bs-danger, #ff5b5c) !important;
}

/* Mantém as ações do rodapé do datepicker nas extremidades. */
.datepicker .datepicker-days tfoot tr th.clear {
    text-align: left;
}

.datepicker .datepicker-days tfoot tr th.today {
    text-align: right;
}

.datepicker .datepicker-days tfoot tr th.datepicker-footer-spacer {
    cursor: default;
}

/* Identificador semântico usado em formulários de mais de um produto. */
.section-label {
    display: flex;
    align-items: center;
    gap: .65rem;
    color: var(--bs-primary);
    font-size: .875rem;
}

.section-label::before {
    width: 1rem;
    height: 1px;
    content: "";
    background: currentColor;
}

/* Padroes funcionais recorrentes nas telas de cadastro e consulta. */
.validation-summary-errors ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.select2-container {
    width: 100% !important;
}

.was-validated select:invalid + .select2 .select2-selection {
    border-color: var(--bs-danger);
}

.app-summary-total {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    line-height: 1;
}

.table .valor {
    text-align: right;
    white-space: nowrap;
}

.app-advanced-filters {
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px solid var(--bs-border-color);
}

@media (max-width: 575.98px) {
    .app-form-actions .btn {
        width: 100%;
        min-width: 0;
    }
}

/*
 * Noty ainda é utilizado por Site.avisar.
 * Estas regras fornecem apenas a estrutura que a biblioteca não recebe do Frest.
 */
.noty_layout {
    --noty-width: 20rem;
    --noty-bg: #263c55;
    --noty-color: #fff;
    --noty-radius: var(--bs-border-radius, .375rem);
    --noty-shadow: 0 .5rem 1rem rgba(38, 60, 85, .22);
}

#noty_layout__topRight {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 1090;
    width: var(--noty-width);
    max-width: calc(100% - 2.5rem);
    margin: 0;
    padding: 0;
    list-style: none;
}

.noty_bar {
    position: relative;
    margin: .25rem 0;
    overflow: hidden;
    color: var(--noty-color);
    background: var(--noty-bg);
    border-radius: var(--noty-radius);
    box-shadow: var(--noty-shadow);
    -webkit-font-smoothing: antialiased;
}

.noty_body {
    padding: .8rem 2.5rem .8rem 1rem;
}

.noty_theme__limitless.noty_type__success { --noty-bg: var(--bs-success, #39da8a); }
.noty_theme__limitless.noty_type__error { --noty-bg: var(--bs-danger, #ff5b5c); }
.noty_theme__limitless.noty_type__warning { --noty-bg: var(--bs-warning, #fdac41); color: #263c55; }
.noty_theme__limitless.noty_type__info { --noty-bg: var(--bs-primary, #5a8dee); }

.noty_close_button {
    position: absolute;
    top: .65rem;
    right: .75rem;
    width: 1rem;
    height: 1rem;
    padding: 0;
    color: inherit;
    font-size: 0;
    line-height: 1;
    background: transparent;
    border: 0;
    cursor: pointer;
    opacity: .75;
}

.noty_close_button::before,
.noty_close_button::after {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    content: "";
    background: currentColor;
    border-radius: 1px;
}

.noty_close_button::before { transform: translateY(-50%) rotate(45deg); }
.noty_close_button::after { transform: translateY(-50%) rotate(-45deg); }
.noty_close_button:hover { opacity: 1; }

.noty_progressbar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(0, 0, 0, .2);
}

.noty_effects_open {
    opacity: 0;
    transform: translateX(50%);
    animation: noty-in .35s ease forwards;
}

.noty_effects_close { animation: noty-out .3s ease forwards; }
.noty_fix_effects_height { animation: noty-height 75ms ease-out forwards; }
.noty_close_with_click { cursor: pointer; }

@keyframes noty-in { to { opacity: 1; transform: translateX(0); } }
@keyframes noty-out { to { opacity: 0; transform: translateX(50%); } }
@keyframes noty-height { to { height: 0; } }
