/* Consulta Grid Styles */

.consulta-container {
    padding: 0.5rem 0;
}

/* Grid Table */
#consultaGrid {
    font-size: 0.875rem;
}

#consultaGrid thead th {
    position: sticky;
    top: 0;
    background-color: #212529;
    font-weight: 600;
    white-space: nowrap;
    user-select: none;
}

#consultaGrid thead th:hover {
    background-color: #2c3136;
}

#consultaGrid tbody tr {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

#consultaGrid tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.1) !important;
}

#consultaGrid tbody tr.table-primary {
    background-color: rgba(13, 110, 253, 0.25) !important;
}

#consultaGrid td {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Filter Tags */
.filter-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.5rem;
    font-size: 0.75rem;
}

.filter-tag .btn-close {
    padding: 0;
    margin-left: 0.25rem;
    opacity: 0.8;
}

.filter-tag .btn-close:hover {
    opacity: 1;
}

/* Pagination */
.pagination .page-link {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .consulta-container .row > div {
        margin-bottom: 0.5rem;
    }

    #consultaGrid {
        font-size: 0.8rem;
    }

    #consultaGrid td,
    #consultaGrid th {
        padding: 0.25rem 0.5rem;
    }

    .btn-group-sm > .btn,
    .btn-sm {
        padding: 0.2rem 0.4rem;
        font-size: 0.75rem;
    }
}

/* Tab content padding */
.tab-content > .tab-pane > .p-3 {
    padding: 1rem !important;
}

/* Card filter */
.card .card-body.py-2 {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

/* Grid info text */
#gridInfo {
    font-size: 0.875rem;
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* CRUD Buttons */
#btnIncluir,
#btnAlterar,
#btnExcluir {
    min-width: 100px;
}

/* Bevel groups inside form */
.bevel-group {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.bevel-group legend {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0 0.5rem;
    width: auto;
    float: none;
    margin-bottom: 0.5rem;
}

.bevel-content {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Form container layout */
.form-container {
    max-width: 100%;
}

.orphan-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
