/*
 * bioshare.css
 *
 * App-specific styling beyond what Bootstrap 5 provides. Cross-cutting
 * accessibility CSS (focus rings, skip-link, announce region, toast host)
 * lives in components.css. Legacy famfamfam/glyphicon class aliases live in
 * legacy-icon-shim.css.
 */

/* ---------------------------------------------------------------- File browser */
#file-table tr td:first-child {
    width: 10px;
}

/* Bootstrap 5 already supplies .table-sm; this is only for DataTables, which is
 * still in use during the transition and uses .table-condensed. Remove once
 * DataTables is replaced by the <DataTable> Vue component. */
table.dataTable.table-condensed tbody th,
table.dataTable.table-condensed tbody td {
    padding: 4px 5px !important;
}

/* ---------------------------------------------------------------- Tag chip */
/* Temporary styling for handlebars-rendered tag spans. The <TagChip> Vue
 * component will define its own styling once it lands. */
span.tag {
    display: inline-block;
    border-radius: 2px;
    font-size: 0.875rem;
    padding: 4px 6px;
    margin: 1px;
    background-color: #A2E7E5;
    border: thin solid #70CCC9;
    line-height: 1;
}

/* ---------------------------------------------------------------- Preview file modal */
#preview-file {
    width: 90%;
    max-height: 90%;
    margin-left: auto;
    margin-right: auto;
}
#preview-file textarea {
    width: 95%;
    height: 400px;
}
.modal-body {
    max-height: 600px;
}

/* ---------------------------------------------------------------- Sidebar (legacy) */
/* Targets the current Bootstrap 2 sidebar-nav markup. Will be replaced by the
 * <SidebarShares> Vue component on a Bootstrap 5 grid in Phase B. */
.sidebar-nav {
    padding-left: 5px;
    padding-right: 5px;
}
.sidebar-nav input {
    width: calc(100% - 15px);
}

/* ---------------------------------------------------------------- Content spacing */
#content {
    margin-top: 10px;
}

/* ---------------------------------------------------------------- Inline error text */
.error {
    color: #b30000;
    font-weight: bold;
}

/* ---------------------------------------------------------------- Footer credit */
.credit {
    padding-top: 20px;
    padding-left: 10px;
}

/* ---------------------------------------------------------------- Table utilities */
.table-break-word tr td {
    word-wrap: break-word;
}
.limit-col-width td p {
    text-overflow: ellipsis !important;
    overflow: hidden;
    white-space: nowrap;
    max-width: 400px;
}

/* ---------------------------------------------------------------- Misc utilities */
.pointer {
    cursor: pointer;
}

/* Bootstrap 5 ships .visually-hidden but some templates and JS still use the
 * older .sr-only name. Alias it. Remove once every reference is migrated. */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Remove extra padding from btn-link inside table cells (a11y readability). */
td .btn-link {
    padding: 0;
    margin: 0;
    vertical-align: baseline;
}
