﻿/* mobile .fluent-data-grid */
.fluent-data-grid tr:nth-child(odd) td{
    background-color: #f5f5f5;
}

/* Fluent DataGrid default 2 row height */
@media only screen and (min-width: 600px) {
    .two-row tbody tr td {
        display: -webkit-box;
        -webkit-line-clamp: 2; /* Limit to 2 lines */
        -webkit-box-orient: vertical;
        overflow: hidden !important;
        text-overflow: ellipsis;
        white-space: normal;
        height: 3rem !important;
        max-height: 4rem; /* Adjust according to your line-height */
    }

    .two-row thead tr th {
        height: inherit !important;
    }

    .two-row .col-title-text {
        white-space: normal;
    }
}

@media only screen and (max-width: 600px) {
    .fluent-data-grid {
        display: initial !important;
    }

    .fluent-data-grid thead, .fluent-data-grid tr[row-type="header"] {
        display: none !important;
    }

    .fluent-data-grid td {
        display: flex;
        border: none;
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 0;
        min-height: 100%;
        height: initial !important;
        padding-top: 0;
        padding-bottom: 0;
        padding-inline-start: calc(var(--design-unit) * 7px) !important;
    }

    .fluent-data-grid .pdf-row {
        display: block !important;
    }

    .fluent-data-grid td:not(:only-child)::before {
        content: attr(label);
        font-weight: bold;
        min-width: 140px;
        text-align: left;
        margin-right: 5px;
    }

    .fluent-data-grid tr {
        border: 1px solid #e1e1e1;
        display: block !important;
    }

    .fluent-data-grid tbody tr:nth-of-type(odd) {
        background-color: #f5f5f5;
    }

    .fluent-data-grid tbody tr:nth-of-type(even) {
        background-color: #ffffff;
    }

    .fluent-data-grid tr td:first-child {
        margin-top: 15px;
    }

    .fluent-data-grid tr td:last-child {
        margin-bottom: 15px;
    }

    .fluent-data-grid .btn-sm {
        font-size: 0.75rem !important;
        height: 1.45rem !important;
    }

    .fluent-data-grid > tbody > tr > td > div.position-relative {
        margin-left: auto;
        margin-right: auto;
        justify-self: center;
        align-self: center;
    }

    /*pagination*/
    .pagination .page-link {
        padding: 0;
    }

    .pagination .page-link, .pagination .custom-select, div.form-group.my-auto.ml-2.d-inline-block.d-md-none {
        font-size: .75rem;
    }
}
