
/* Code blocks and highlighting */
code {
    font-family: Fira Code, monospace;
}   

pre.highlight {
    margin: 10px;
    padding: 10px;
    white-space: pre;
    word-wrap: normal;
}

/* for block of numbers */
.hljs-ln-numbers {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;

    text-align: center;
    color: #ccc;
    border-right: 1px solid #CCC;
    vertical-align: top;
    padding-right: 10px !important;
}

/* for block of code */
.hljs-ln-code {
    padding-left: 10px !important;
    white-space: pre;
}

/* break long word anywhere */
.dont-break-out {  /* from https://stackoverflow.com/a/50777367 */
    /* These are technically the same, but use both */
    overflow-wrap: break-word;
    word-wrap: break-word;

    -ms-word-break: break-all;
    /* This is the dangerous one in WebKit, as it breaks things wherever */
    word-break: break-all;
    /* Instead use this non-standard one: */
    word-break: break-word;
}

/* make tables and MathJax equations scrollable */
div:has(> table), code:has(> table), p:has(> mjx-container) {
    display: grid !important;
    grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
    overflow-x: auto !important;
}

table {
    overflow-x: scroll !important;
    width: 100% !important;
}

/* custom striped table */
.my-table-zebra-bg-200 tbody tr:nth-child(odd):not(.uncertain-vuln):not(.exploited-vuln) td {
    --tw-bg-opacity: 1;
    background-color: var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));
}

/* Rounded table */
.table-rounded thead tr th:first-child {
    border-radius: 0.8rem 0 0 0;
}

.table-rounded thead tr th:last-child {
    border-radius: 0 0.8rem 0 0;
}

.table-rounded thead tr th:first-child:last-child {
    border-radius: 0.8rem 0.8rem 0 0;
}

.table-rounded tr:last-child td:first-child {
    border-radius: 0 0 0 0.8rem;
}

.table-rounded tr:last-child td:last-child {
    border-radius: 0 0 0.8rem 0;
}

.table-rounded tr:last-child td:first-child:last-child {
    border-radius: 0 0 0.8rem 0.8rem;
}

/* distance between list point and item */
ul>li, ol>li {
    padding-left: 0.3rem;
}

/* center images */
img {
    margin-left: auto;
    margin-right: auto;
}

/* misc */
.text-smxs {
    font-size: 0.825rem;
}

.text-version-badge {
    font-size: 0.825rem;
    line-height: 1.5rem;
}
