/* Helpdesk — botões e layout (cores alinhadas ao contabsoft.css) */

.helpdesk-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    height: 30px;
    padding: 0 0.65rem;
    border: 1px solid transparent;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
    color: #212529;
    font-family: 'Roboto', sans-serif;
}

.helpdesk-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* button-consulta */
.helpdesk-btn--primario {
    background-color: #a5d6a7;
    border-color: #a5d6a7;
    color: #212529;
}

.helpdesk-btn--primario:hover:not(:disabled) {
    background-color: #81c784;
    border-color: #81c784;
    color: #212529;
}

/* button-editar / button-servicos */
.helpdesk-btn--secundario {
    background-color: #bbdefb;
    border-color: #bbdefb;
    color: #212529;
}

.helpdesk-btn--secundario:hover:not(:disabled) {
    background-color: #90caf9;
    border-color: #90caf9;
    color: #212529;
}

/* button-novo */
.helpdesk-btn--novo {
    background-color: #a9cce8;
    border-color: #a9cce8;
    color: #212529;
}

.helpdesk-btn--novo:hover:not(:disabled) {
    background-color: #90caf9;
    border-color: #90caf9;
    color: #212529;
}

/* button-atualizar */
.helpdesk-btn--aviso {
    background-color: #cec02c;
    border-color: #cec02c;
    color: #212529;
}

.helpdesk-btn--aviso:hover:not(:disabled) {
    background-color: #b8aa24;
    border-color: #b8aa24;
    color: #212529;
}

/* button-remover / button-remover-medio */
.helpdesk-btn--perigo {
    background-color: #ef9a9a;
    border-color: #ef9a9a;
    color: #212529;
}

.helpdesk-btn--perigo:hover:not(:disabled) {
    background-color: #e57373;
    border-color: #e57373;
    color: #212529;
}

.helpdesk-card {
    border: 1px solid #e3f2fd;
    border-radius: 8px;
    padding: 1rem;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    height: 100%;
}

.helpdesk-card__titulo {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    font-weight: 600;
}

.helpdesk-card__subtitulo {
    margin: 0 0 0.75rem;
    font-size: 0.8rem;
    color: #6c757d;
}

.helpdesk-voltar {
    display: inline-flex;
    margin-bottom: 0.5rem;
}

.helpdesk-lista-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.helpdesk-lista-busca {
    display: flex;
    flex: 1 1 280px;
    min-width: 0;
    max-width: 480px;
    gap: 0.5rem;
    align-items: stretch;
}

.helpdesk-lista-busca .form-control {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 30px;
    height: 30px;
    font-size: 0.82rem;
}

.helpdesk-lista-acoes {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.helpdesk-paginacao {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.helpdesk-paginacao__info {
    font-size: 0.8rem;
    color: #6c757d;
}

.helpdesk-status-linha {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.helpdesk-status-linha .form-select {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 200px;
    min-height: 30px;
    height: 30px;
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
    font-size: 0.8rem;
}

.helpdesk-chat-acoes {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.helpdesk-excluir-total__aviso {
    margin: 0.35rem 0 0;
    font-size: 0.75rem;
    color: #6c757d;
}

/* Viewport — corpo rolável (detalhe, etc.) */
.helpdesk-viewport-corpo {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 12px 16px;
}

/* Viewport — lista com toolbar, tabela e paginação fixos */
.helpdesk-lista-corpo {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.helpdesk-lista-root {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.helpdesk-lista-root > .helpdesk-lista-toolbar {
    flex-shrink: 0;
    margin: 0;
    padding: 10px 16px;
    border-bottom: 1px solid #dee2e6;
}

.helpdesk-lista-tabela {
    flex: 1;
    min-height: 0;
    overflow: auto;
    margin: 0 12px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06);
}

.helpdesk-lista-tabela table {
    margin-bottom: 0;
}

.helpdesk-lista-tabela thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background-color: rgb(200, 227, 252);
}

.helpdesk-lista-rodape {
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding: 8px 16px;
    border-top: 1px solid #dee2e6;
    background-color: #fff;
}

.helpdesk-lista-carregando {
    flex: 1;
    padding: 16px;
}

/* Detalhe — card de chat com timeline rolável e composer fixo */
.helpdesk-card--chat {
    display: flex;
    flex-direction: column;
    min-height: 320px;
    max-height: calc(100vh - 200px);
}

.helpdesk-card--chat .helpdesk-card__titulo {
    flex-shrink: 0;
}

.helpdesk-card--chat .helpdesk-chat-composer {
    flex-shrink: 0;
}
