:root {
    --pico-spacing: 0.25rem;
    --pico-form-element-spacing-vertical: 0.5rem;
}

:root:root {
    --pico-primary: #1d4ed8;
    --pico-secondary: #9fc2fe;
    --pico-background-color: #f4f4f2;
    /* --plain-button-background-color: var(--pico-background-color); */
    /* --upload-file-button-background-color: var(--pico-background-color); */

    --pico-primary-hover-background: var(--pico-secondary);
    --pico-primary-hover-border: var(--pico-primary);
}

/* Immuno Diagnostics logo */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: #0f172a;
    font-size: 0.78rem;
    font-weight: 740;
    letter-spacing: 0.12em;
    text-decoration: none;
    text-transform: uppercase;
}

.brand-signet {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(235, 242, 246, 0.24);
    border-radius: 3px;
    background: linear-gradient(145deg, #fff1, #94a3b805);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    color: #1d4ed8;
    fill: currentColor;
}

.brand-wordmark {
    display: grid;
    gap: 2px;
    line-height: 1;
}

.brand-wordmark span:first-child {
    color: #111827;
    font-size: 0.78rem;
    font-weight: 780;
}

.brand-wordmark span:last-child {
    color: #334155;
    font-size: 0.68rem;
    font-weight: 560;
    letter-spacing: 0.16em;
}

.login-form .immunodiagnostics-logo {
    justify-self: center;
}

/* Upload Button Block */
label.UploadFileButton[role="button"] {
    --pico-background-color: var(--pico-background-color);
    --pico-color: black;
    display: block;
    width: 100%;
    margin: 0;
    text-align: center;
}

label.UploadFileButton[role="button"][data-uploaded] {
    --pico-background-color: var(--pico-primary);
    --pico-border-color: var(--pico-primary);
    --pico-color: var(--pico-primary-inverse);
}

fieldset[tags-picker] {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: calc(var(--pico-spacing) / 2);
}

fieldset[tags-picker] > label,
[tags-entry] {
    width: auto;
    margin: 0;
}

[tags-entry] {
    field-sizing: content;
}

[tags-list] {
    display: flex;
    flex-wrap: wrap;
    gap: calc(var(--pico-spacing) / 2);
}

.inline-spinner[static-spinner] {
    display: inline-block;
    width: 1em;
    height: 1em;
    border: var(--pico-border-width) solid currentColor;
    border-radius: 50%;
    vertical-align: -0.125em;
}

/* Overview Table Block */

table th {
    font-size: 0.75rem;
    --pico-line-height: 1.2;
    --pico-color: black;
}

button.PlainButton {
    --pico-background-color: var(--pico-background-color);
    --pico-border-color: var(--pico-background-color);
    --pico-color: black;
    display: block;
    width: 100%;
    margin: 0;
    padding: calc(var(--pico-spacing) / 2) var(--pico-spacing);
    font-size: inherit;
    text-align: inherit;
}

/* explanation override picos standard behavior */
button.PlainButton:hover {
    --pico-color: black;
}

button.PlainButton[data-selected] {
    --pico-background-color: var(--pico-secondary);
    opacity: 1;
}

/* explanation It selects every <th> whose direct child is a button.PlainButton and removes that header      */
 cell’s padding. 
th:has(> button.PlainButton) {
    padding: 0;
}

.sample-list-table tbody td {
    cursor: default;
}

.sample-list-table th:nth-child(-n + 4),
.sample-list-table td:nth-child(-n + 4) {
    position: sticky;
    z-index: 2;
    background: var(--pico-background-color);
}

.sample-list-table th:first-child,
.sample-list-table td:first-child {
    left: 0;
    width: 2.5rem;
    min-width: 2.5rem;
    padding: 0;
    text-align: center;
}

.sample-list-table th:nth-child(2),
.sample-list-table td:nth-child(2) {
    left: 2.5rem;
    min-width: 7.5rem;
    white-space: nowrap;
}

.sample-list-table th:nth-child(3),
.sample-list-table td:nth-child(3) {
    left: calc(2.5rem + var(--sample-name-column-width, 7.5rem));
    min-width: 11.25rem;
}

.sample-list-table th:nth-child(4),
.sample-list-table td:nth-child(4) {
    left: calc(
        2.5rem + var(--sample-name-column-width, 7.5rem) +
        var(--diagnosis-column-width, 11.25rem)
    );
    min-width: 12rem;
    box-shadow: 8px 0 10px -10px rgba(15, 23, 42, 0.5);
}

table.striped.sample-list-table tbody td:nth-child(-n + 4),
table.striped.sample-list-table tbody th:nth-child(-n + 4) {
    background-color: var(--pico-background-color);
}

.sample-list-table thead th:nth-child(-n + 4) {
    z-index: 3;
}

/* Reusable layout */
.vertical-offset {
    padding-block-start: min(20vh, 12rem);
}
