/*
	TABLES.CSS - CSS Styles for tables (used commonly, but not on every page)

    Created on : 2013-12-02, 11:46
    Author     : David O'Donnell <dodonnell@pesgce.com>

    Updates    : 2025-07-16 DBO Remove unusued and bad styles, shift tafel colors
                 to use global_defaults.
*/

table.shade_rows tr:nth-of-type(even), table.shade-rows tr:nth-of-type(even), .oddrow, .odd-row, .row-odd {
    background-color: var(---tafel-band);
}

table.shade_rows tr:hover, .oddrow:hover, table.shade-rows tr:hover, .odd-row:hover, .row-odd:hover {
    background-color: var(---tafel-row-hover-bg); /*rgba(255, 255, 255, 0.01) !important;*/
}

table.shade_rows tr:hover .subtle_inline_grey_dark, .oddrow:hover .subtle_inline_grey_dark, table.shade_rows tr:hover a, table.shade-rows tr:hover .subtle-inline-grey-dark, .oddrow:hover .subtle_inline_grey_dark, .row-odd:hover .subtle_inline_grey_dark, .odd-row:hover .subtle_inline_grey_dark, table.shade-rows tr:hover a {
    color: #fff;
}


/* table shading effects--note that oddrow, shade_rows, delrow, and selrow are defined PER CLIENT INSTANCE */
/* 2025-07-16 DBO These should probably be removed. */
.completed {
    background-color: #e9d2eb;
}

.oddrow2 {
    background-color: #aec1d8;
}

.badrow {
    background-color: #ff0;
}

.deleted_row {
    background-color: rgba(181, 207, 176, 1);
    color: #555;
    font-weight: bolder;
}

.reqrow {
    background-color: #f9d5d5 !important;
}

/*

	TAFEL styles: div-based "table" with scrollable body

	2018-08-08 DBO
	There are an awful lot of styles here, just to replicate the scrollable table, but it should be worth it.

 */

.tafel {
    /* MT on purpose */
    display: table;
}

.tafel-width-50, .tafel-width-half {
    width: 50%;
}

.tafel-width-55 {
    width: 55%;
}

.tafel-width-60, .tafel-width-medium {
    width: 60%;
}

.tafel-width-65 {
    width: 65%;
}

.tafel-width-70 {
    width: 70%;
}

.tafel-width-75, .tafel-width-3q {
    width: 75%;
}

.tafel-width-80, .tafel-width-wide {
    width: 80%;
}

.tafel-width-85 {
    width: 85%;
}

.tafel-width-90, .tafel-width-xwide {
    width: 90%;
}

.tafel-width-95 {
    width: 95%;
}

.tafel-width-100, .tafel-width-full {
    width: 100%;
}

.tafel-outer-border-4 {
    border-width: 0.25rem;
    border-radius: 0.25rem;
}

.tafel-outer-border-5 {
    border-width: 0.3125rem;
    border-radius: 0.3125rem;
}

.tafel-outer-border-6, .tafel-border-medium {
    border-width: 0.375rem;
    border-radius: 0.375rem;
}

.tafel-outer-border-8, .tafel-border-wide {
    border-width: 0.5rem;
    border-radius: 0.5rem;
}

.head-padding-4 .tafel-cell, .content-padding-4 .tafel-cell {
    padding: 0.4rem;
}

.head-padding-5 .tafel-cell, .content-padding-5 .tafel-cell {
    padding: 0.5rem;
}

.head-padding-6 .tafel-cell, .content-padding-6 .tafel-cell {
    padding: 0.6rem;
}

.head-padding-8 .tafel-cell, .content-padding-8 .tafel-cell {
    padding: 0.8rem;
}

.head-padding-1 .tafel-cell, .content-padding-1 .tafel-cell {
    padding: 1.0rem;
}

.tafel-head-container, .tafel-content-area, .tafel-foot-container {
    border-style: solid;
}

.tafel-content-container {
    overflow-y: scroll;
    resize: vertical;
    border-radius: 0 !important;
    border-style: hidden;
    width: 100%;
}

.tafel-head-container {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom-style: hidden;
    width: calc(100% - 1em);
}

.tafel-content-area {
    border-top-style: hidden;
    border-bottom-style: hidden;
    border-left-style: solid;
    border-right-style: solid;
    border-radius: 0;
    width: 100%;
}

.tafel-foot-container {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-top-style: hidden;
    width: calc(100% - 1em);
}

.tafel-head-content {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
}

.tafel-cell-container {
    display: flex;
    align-items: flex-end;
}

.head-border-right .tafel-cell-container:last-of-type, .content-border-right .tafel-cell:last-of-type {
    border-right: none;
}

.tafel-row {
    display: flex;
    justify-content: space-between;
}

.tafel-head-content .tafel-cell-container, .tafel-head-content .tafel-cell-container .tafel-cell, .tafel-row .tafel-cell {
    flex: 1 1 auto;
}

.fixed-cell {
    flex: 0 1 auto !important;
}

.tafel-border-color {
    border-color: var(---tafel-border);
}

.tafel-head-color {
    background-color: var(---tafel-head-bg);
    color: var(---tafel-head-fg);
}

.head-border-right .tafel-cell-container, .content-border-right .tafel-cell {
    border-right: 0.0625rem solid var(---tafel-border);
}

.tafel-content-area .tafel-row:nth-of-type(even) {
    background-color: var(---tafel-band);
}

.tafel-content-area .tafel-row:nth-of-type(even) .text-muted {
    color: #333 !important;
}

.tafel-row:hover {
    background-color: var(---tafel-row-hover-bg) !important;
    box-shadow: inset 0 0 0.4rem hsl(var(---tafel-border) / 60%) !important;
}