@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

/* Variáveis CSS para valores reutilizáveis */
:root {
    --header-height: 56px;
    --border-color: #e5e5e5;
    --success-color: #26b050;
    --error-color: red;
    --content-width: 31.25rem;
    --standard-gap: 0.625rem;
}

/* Fontes e estrutura base - CORRIGIDO */
html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    height: 100%;
    margin: 0;
    padding: 0;
    /* REMOVIDO: overflow: hidden - deixa o browser gerenciar */
    display: flex;
    flex-direction: column;
}
.page {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 30px);
}
/* Validação de formulários */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--success-color);
}

.invalid {
    outline: 1px solid var(--error-color);
}

.validation-message {
    color: var(--error-color);
}

/* Links usados como botão */
.button-link {
    text-decoration: none;
    margin-right: 0;
    padding-right: 0;
}

/* Blazor erro UI */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

/* Títulos */
.title {
    display: flex;
    flex-direction: column;
    gap: var(--standard-gap);
    padding-bottom: var(--standard-gap);
}

    .title.title-secondary {
        padding-top: 0.313rem;
        color: var(--bs-secondary-color);
    }

.title-header-text {
    font-size: 2.5rem;
    font-weight: 600;
    line-height: 3rem;
    padding: 0.3125rem 0;
}

.title-content-text {
    font-size: 1.75rem;
    font-weight: 400;
    line-height: 2.5rem;
}

/* Conteúdo principal - CORRIGIDO */
.main-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0; /* Importante para flex shrinking */
    overflow-y: auto; /* Mais específico que 'auto' */
    overflow-x: hidden;
}

/* Bloco de conteúdo */
.block-content {
    width: var(--content-width);
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--standard-gap);
}

/* Top bar - CORRIGIDO */
.top-bar {
    height: var(--header-height); /* Usando variável consistente */
}

.dxbl-drawer-content,
.dxbl-drawer-body {
    padding-top: 0;
    margin-top: 0;
}

/* CORRIGIDO - usando variável CSS */
.nav-buttons-container {
    display: flex;
    align-items: center;
    height: var(--header-height); /* Usando variável em vez de valor fixo */
    padding: 0;
    border-bottom: 1px solid var(--border-color);
}

.menu-button-nav {
    margin-right: 0;
    padding-right: 0;
}

/* Modificador para ajustar o padding padrão do Bootstrap */
.custom-p-4 {
    padding: 1.5rem;
    padding-top: 0.5rem;
}

/* Caixa de busca */
.sidebar-search-container {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-search {
    width: 100%;
    position: relative;
    padding: 0;
    margin-top: -20px;
}

    .sidebar-search > div {
        padding: 8px 16px;
        width: 100%;
    }

.sidebar-search-box {
    width: calc(100% - 20px);
    border-radius: 5px;
    background-color: white;
    border: none;
    height: 30px;
}

/* Estilo do input do DevExpress com penetração de Blazor */
::deep .sidebar-search-box .dx-texteditor-input {
    padding-left: 40px;
    text-indent: 0;
}

/* Ícone de busca - CORRIGIDO posicionamento */
.search-icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    position: absolute;
    right: 12px; /* MUDADO: de left 85% para right 12px */
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    pointer-events: none;
}

.search-icon {
    width: 24px;
    height: 24px;
}

/* Borda sutil */
.border-bottom-subtle {
    border-bottom: 1px solid var(--border-color);
}

/* Cabeçalho do Drawer */
.navigation-drawer-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    width: 100%;
    height: auto;
}

    .navigation-drawer-header:empty {
        display: none;
        height: 0;
    }

/* Container da aplicação - CORRIGIDO */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    min-height: 100vh; /* Mais consistente */
    overflow: hidden; /* Controla overflow no container pai */
}

.content-container {
    display: flex;
    flex: 1;
    min-height: 0; /* Importante para flex shrinking */
    overflow: hidden;
}

/* Rodapé fixo */
.app-footer {
    flex-shrink: 0;
    height: 40px;
    background-color: #f8f9fa;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
}
