/* ===============================================
   Qlabbir Tables - Bootstrap 5 Table Styles
   =============================================== */

/* -----------------------------------------------
   Checkbox Column - Minimal Width (for selectOptions)
   ----------------------------------------------- */
.qlabbir-table td.col-checkbox,
.qlabbir-table th.col-checkbox {
    width: 50px;
    min-width: 50px;
    max-width: 50px;
    text-align: center;
    padding: 0.5rem 0.25rem;
    vertical-align: middle;
}

/* Ensure checkbox is visible and properly sized */
/* Override Bootstrap 5 form-check-input styles for table context */
.qlabbir-table td.col-checkbox input[type="checkbox"],
.qlabbir-table th.col-checkbox input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
    padding: 0 !important;
    cursor: pointer !important;
    display: inline-block !important;
    opacity: 1 !important;
    position: static !important;
    -webkit-appearance: checkbox !important;
    -moz-appearance: checkbox !important;
    appearance: checkbox !important;
    vertical-align: middle !important;
}

/* Remove any transforms or positioning that might hide the checkbox */
.qlabbir-table td.col-checkbox .form-check-input,
.qlabbir-table th.col-checkbox .form-check-input {
    margin-left: 0 !important;
    float: none !important;
}

/* Checkbox column icons should not have margin */
.qlabbir-table td.col-checkbox i,
.qlabbir-table th.col-checkbox i {
    margin: 0 !important;
}

/* -----------------------------------------------
   Check/Icon Boolean Columns
   ----------------------------------------------- */
.qlabbir-table .col-check,
.qlabbir-table .col-icon-boolean {
    width: 80px;
    min-width: 80px;
    text-align: center;
}

/* -----------------------------------------------
   Actions Column
   ----------------------------------------------- */
.qlabbir-table .col-actions {
    width: auto;
    white-space: nowrap;
}

.qlabbir-table .col-actions a {
    margin-right: 0.5rem;
}

.qlabbir-table .col-actions a:last-child {
    margin-right: 0;
}

/* -----------------------------------------------
   ID Column - Minimal Width
   ----------------------------------------------- */
.qlabbir-table .col-id {
    width: 80px;
    min-width: 80px;
    text-align: right;
}

/* -----------------------------------------------
   Table Row Hover Effect
   ----------------------------------------------- */
.qlabbir-table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Make checkbox rows clickable looking */
.qlabbir-table tbody tr {
    cursor: default;
}

/* -----------------------------------------------
   Clickable Cells
   ----------------------------------------------- */
.qlabbir-table td.clickable {
    cursor: pointer;
}

.qlabbir-table td.clickable:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

/* -----------------------------------------------
   Table Responsiveness
   ----------------------------------------------- */
@media (max-width: 768px) {
    .qlabbir-table .col-checkbox {
        width: 40px;
        min-width: 40px;
        max-width: 40px;
    }
    
    .qlabbir-table .col-check,
    .qlabbir-table .col-icon-boolean {
        width: 60px;
        min-width: 60px;
    }
}
