/* ===========================================================================
   lab/list-view.css — the shared BCLListView engine skin (V2 primitive).
   ---------------------------------------------------------------------------
   BCLListView (/var/www/lib/js/bcl-list-view.js) renders a fixed DOM:
     .listview-container > .searchbar-container (toolbar) + .pagi_bulk_bar
       + .pagination-bar + table.list + .pagination-bar + per-page bar
   This file skins that DOM. Scope it by wrapping the engine's container in
   `<div class="listview light">` so it never bleeds into hand-authored tables
   or the older server-rendered list-views. Table body itself uses `.list.light`
   from tables.css (pass tableClass:'light' to the engine).

   LIGHT ONLY for now — list views render white even on a dark page (directive).
   Add a `.listview.dark` block later if a dark engine skin is ever needed.
   =========================================================================== */

.listview,
.listview .listview-container { display: block; }

/* ---- toolbar (filters / search / actions row) ---------------------------- */
.listview .searchbar-container {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin-bottom: 12px;
}
.listview .searchbar-container .left-group,
.listview .searchbar-container .right-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.listview .searchbar-container .right-group { margin-left: auto; }
.listview .searchbar-container .right-group + .right-group { margin-left: 0; }
.listview .label,
.listview .search-label { font-size: 13px; color: #666; }

/* filter selects + search box + per-page select */
.listview .custom-select { position: relative; display: inline-block; }
.listview .custom-select select,
.listview .field-md,
.listview .field-xxs {
    height: 32px; padding: 0 30px 0 10px; border-radius: 6px;
    font-family: inherit; font-size: 13px; font-weight: 500;
    appearance: none; -webkit-appearance: none; cursor: pointer;
    background-repeat: no-repeat; background-position: right 10px center;
}
.listview .field-xxs { padding-right: 26px; min-width: 64px; }
.listview .search-box,
.listview input.pagi_search {
    height: 32px; padding: 0 10px; border-radius: 6px;
    font-family: inherit; font-size: 14px; min-width: 200px; outline: none;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.10);
}

/* ---- pagination bar ------------------------------------------------------ */
.listview .pagination-bar { display: flex; align-items: center; margin: 10px 0; }
.listview .pagi_nav { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; width: 100%; }
.listview .pagi_page a,
.listview .pagi_direction a {
    display: inline-block; padding: 4px 9px; border-radius: 5px;
    text-decoration: none; font-size: 13px; line-height: 1.4; border: 1px solid transparent;
}
.listview .pagi_direction_disabled { padding: 4px 9px; font-size: 13px; opacity: .45; }
.listview .pagi_filler { padding: 0 4px; opacity: .5; }
.listview .pagi_bold_two,
.listview .pagi_bold_three,
.listview .pagi_bold_four { padding: 4px 9px; border-radius: 5px; font-size: 13px; font-weight: 700; }
.listview .pagi_details { margin-left: auto; font-size: 12px; }

/* ---- bulk bar (row selection actions) ------------------------------------ */
.listview .pagi_bulk_bar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin-bottom: 12px; padding: 8px 14px; border-radius: 8px;
}
.listview .pagi_bulk_count { font-size: 13px; }
.listview .bulk_check_col { width: 34px; text-align: center; }
.listview .bulk_check_col input[type="checkbox"] { width: 15px; height: 15px; cursor: pointer; accent-color: #3a85ff; }

/* ---- fixed layout: column widths stay put across sort/refetch ------------- */
/* table-layout:fixed means a column's width is set by its header, not its data,
   so sorting never shifts a column left/right. Apps set per-column widths via
   each column's cssClass (unspecified columns share the remainder). */
.listview table.list { table-layout: fixed; }
.listview table.list th,
.listview table.list td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- column dividers + sortable header affordance + empty state ----------- */
.listview table.list th { border-right: 1px solid transparent; }
.listview table.list th:last-child,
.listview table.list td:last-child { border-right: none; }
.listview table.list th a { text-decoration: none; }
.listview table.list th[data-sort] { cursor: pointer; }
.listview table.list td.no_results { text-align: center; padding: 26px 12px; font-style: italic; white-space: normal; }

/* engine buttons the V2 button set doesn't cover: btn-clear (neutral/outline) */
.listview .btn-clear { background: transparent; border: 1px solid #b7b7b7; color: #444; }
.listview .btn-clear:hover { background: #ececec; filter: none; }

/* ============================================================ LIGHT SKIN */
.listview.light { color: #2a2a2a; }
.listview.light .custom-select select,
.listview.light .field-md,
.listview.light .field-xxs {
    background-color: #ffffff; color: #1a1a1a; border: 1px solid #aaaaaa;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23555555' stroke-width='1.5'/%3E%3C/svg%3E");
}
.listview.light .search-box,
.listview.light input.pagi_search { background: #ffffff; color: #1a1a1a; border: 1px solid #999999; }
/* pager buttons: white with dark text (page numbers + Previous/Next) */
.listview.light .pagi_page a,
.listview.light .pagi_direction a { background: #ffffff; color: #333333; border-color: #bbbbbb; }
.listview.light .pagi_page a:hover,
.listview.light .pagi_direction a:hover { background: #f0f0f0; }
.listview.light .pagi_bold_two,
.listview.light .pagi_bold_three,
.listview.light .pagi_bold_four { background: #e6e6e6; color: #1a1a1a; border: 1px solid #8f8f8f; }
.listview.light .pagi_details { color: #777; }
.listview.light .pagi_bulk_bar { background: #eef4ff; border: 1px solid #3a85ff; }
.listview.light .pagi_bulk_count { color: #223; }
/* header bar: mild bevel (top highlight, bottom shade) + column dividers */
.listview.light table.list th {
    background: linear-gradient(180deg, #f4f4f4, #e2e2e2);
    box-shadow: inset 0 1px 0 #ffffff, inset 0 -1px 0 #c4c4c4;
    border-right-color: #cacaca;
}
.listview.light table.list td { border-right: 1px solid #ededed; }
.listview.light table.list th a { color: #444; }
.listview.light table.list th.current a { color: #2a2a2a; }
.listview.light table.list td.no_results { color: #777; }
.listview.light table.list tr.sortlist_even td { background: #f7f7f7; }
