/* Multi-column table layout, same look as the section cards in section-items.css:
   gold top bar on the header, rounded top corners, light row dividers, hover highlight.
   Works for any number of columns; the columns are whatever the table defines.

       <table class="column-table">
         <thead><tr><th>Project #</th><th>Title</th><th class="col-num">Hours</th></tr></thead>
         <tbody><tr><td>1234</td><td>Library</td><td class="col-num">8</td></tr></tbody>
       </table>

   Modifiers (add to the table):
       column-table-striped   alternate row shading
       column-table-sticky    header stays visible while scrolling; set --column-table-sticky-top
                              to the height of any fixed navbar, e.g. style="--column-table-sticky-top: 90px"
       column-table-fixed     equal-width columns (table-layout: fixed); size one with a width on its th
   Cell helpers: col-num (right aligned numbers), col-center, col-nowrap.

   Wrap the table in <div class="column-table-wrap"> to scroll horizontally on small screens. */
.column-table-wrap {
    overflow-x: auto;
}

/* separate (not collapse) borders: border-radius is ignored on collapsed tables, and the
   header border stays with a sticky header */
.column-table {
    --column-table-sticky-top: 0px;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    color: #212529;
    font-size: 0.9rem;
    line-height: 1.35;
    /* the bars are borders of the table itself, so they run unbroken across all columns;
       light border on the other three sides, gold bar on top */
    border: 1px solid #e3e3e3;
    border-top: 4px solid var(--uiowa-gold);
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s ease;
}

.column-table:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.column-table-fixed {
    table-layout: fixed;
}

/* Brand: only primary gold and black, no gold tints (brand.uiowa.edu/color). */
.column-table thead th {
    padding: 0.5rem 0.85rem;
    background: #FFFFFF;
    color: var(--uiowa-black);
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-align: left;
    vertical-align: middle;
}

/* cell corners follow the table's inner curve so backgrounds don't poke past the border */
.column-table thead th:first-child {
    border-top-left-radius: 6px;
}

.column-table thead th:last-child {
    border-top-right-radius: 6px;
}

.column-table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 9px;
}

.column-table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 9px;
}

.column-table tbody td {
    padding: 0.4rem 0.85rem;
    border-bottom: 1px solid #ececec;
    vertical-align: middle;
}

.column-table tbody tr:last-child td {
    border-bottom: none;
}

.column-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.05);
}

.column-table-striped tbody tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.025);
}

.column-table-striped tbody tr:nth-child(even):hover {
    background: rgba(0, 0, 0, 0.05);
}

/* sticky: the gold bar is drawn on the header cells (below) instead of the table border,
   so it is not doubled at rest and stays with the header when stuck */
.column-table-sticky {
    border-top: none;
}

.column-table-sticky thead th {
    position: sticky;
    top: var(--column-table-sticky-top);
    z-index: 2;
    box-shadow: inset 0 4px 0 var(--uiowa-gold);
    padding-top: calc(0.5rem + 4px);
}

.column-table .col-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.column-table .col-center {
    text-align: center;
}

.column-table .col-nowrap {
    white-space: nowrap;
}

/* clickable rows, like bui-edit rows elsewhere */
.column-table tbody tr[role="button"],
.column-table tbody tr.column-row-link {
    cursor: pointer;
}
