/* NOVARE universal table filter/sort styling.
   Kept global because some tables are produced via RenderTreeBuilder and do not receive
   Blazor CSS-isolation scope attributes. */

.gmd-sort-button,
.admin-sort-button {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: inherit;
    font: inherit;
    font-weight: 800;
    line-height: 1.2;
    text-align: left;
    text-transform: inherit;
    white-space: nowrap;
    cursor: pointer;
}

.gmd-sort-button:hover,
.admin-sort-button:hover {
    color: #1A4A60;
    background: transparent;
}

.gmd-sort-button:focus-visible,
.admin-sort-button:focus-visible {
    outline: 2px solid rgba(31,90,115,.28);
    outline-offset: 2px;
}

.gmd-filter-row th,
.admin-filter-row th {
    padding: 5px 7px !important;
    background: #f7f9fb !important;
    border-top: 1px solid #e4eaf0;
    border-bottom: 1px solid #dce4eb;
    vertical-align: middle;
}

.gmd-column-filter,
.admin-column-filter {
    box-sizing: border-box;
    display: block;
    width: 100% !important;
    min-width: 92px;
    height: 28px;
    margin: 0;
    padding: 4px 7px;
    border: 1px solid #cbd6e2 !important;
    border-radius: 4px !important;
    background: #fff !important;
    color: #2d4357 !important;
    font-size: 10px !important;
    font-weight: 400 !important;
    line-height: 18px;
    box-shadow: none !important;
}

.gmd-column-filter::placeholder,
.admin-column-filter::placeholder {
    color: #98a6b2;
    opacity: 1;
}

.gmd-column-filter:hover,
.admin-column-filter:hover {
    border-color: #aebfcd !important;
}

.gmd-column-filter:focus,
.admin-column-filter:focus {
    outline: none !important;
    border-color: #1F5A73 !important;
    box-shadow: 0 0 0 2px rgba(31,90,115,.10) !important;
}

.gmd-clear-filters,
.admin-clear-filters {
    appearance: none;
    -webkit-appearance: none;
    min-height: 29px;
    padding: 5px 10px !important;
    border: 1px solid #cfd9e1 !important;
    border-radius: 5px !important;
    background: #fff !important;
    color: #3d566b !important;
    font-size: 9.5px !important;
    font-weight: 650 !important;
    line-height: 1.2;
    white-space: nowrap;
    box-shadow: none !important;
    cursor: pointer;
}

.gmd-clear-filters:hover:not(:disabled),
.admin-clear-filters:hover:not(:disabled) {
    background: #f4f8fb !important;
    border-color: #afc2d0 !important;
}

.gmd-clear-filters:disabled,
.admin-clear-filters:disabled {
    opacity: .45;
    cursor: default;
}

/* Let each filter occupy its column instead of looking like a small detached field. */
.gmd-master-content table th,
.admin-page table th {
    box-sizing: border-box;
}

.gmd-master-content table thead tr:first-child th,
.admin-page table thead tr:first-child th {
    vertical-align: middle;
}
