/* Staff badge print queue. Tokens come from gvs-design-tokens.css, so this follows the theme. */
.sb-root {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sb-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 18px;
    border: none;
    border-radius: var(--gvs-radius-pill);
    background: var(--gvs-primary);
    color: var(--gvs-fg-on-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--gvs-dur-fast);
}

.sb-action:hover:not(:disabled) {
    background: var(--gvs-primary-hover);
}

.sb-action:disabled {
    opacity: 0.45;
    cursor: default;
}

.sb-action-ghost {
    background: none;
    border: 1px solid var(--gvs-border);
    color: var(--gvs-fg-2);
}

.sb-action-ghost:hover:not(:disabled) {
    background: var(--gvs-surface-alt);
    color: var(--gvs-fg-1);
}

/* auto-fill rather than a fixed column count, so the sheet reflows from a phone to a wide screen
   without a media query per breakpoint. */
.sb-sheet {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 14px;
}

.sb-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px 12px;
    border: 1px solid var(--gvs-border);
    border-radius: var(--gvs-radius-md);
    background: var(--gvs-surface);
    text-align: center;
}

.sb-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: none;
    border-radius: var(--gvs-radius-pill);
    background: none;
    color: var(--gvs-fg-3);
    cursor: pointer;
}

.sb-remove:hover {
    background: var(--gvs-surface-sunken);
    color: var(--gvs-danger-500);
}

/* The barcode is an inline SVG from bwip-js; it carries its own aspect ratio. */
.sb-code svg {
    width: 100%;
    max-width: 150px;
    height: auto;
    display: block;
}

.sb-problem {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-height: 150px;
    justify-content: center;
    color: var(--gvs-danger-500);
}

.sb-problem-label {
    font-size: 12.5px;
    font-weight: 700;
}

.sb-problem-why {
    font-size: 11.5px;
    color: var(--gvs-fg-3);
    line-height: 1.35;
}

.sb-name {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--gvs-fg-1);
}

.sb-number {
    font-family: var(--gvs-font-mono);
    font-size: 12px;
    color: var(--gvs-fg-3);
}

.sb-note {
    font-size: 12.5px;
    color: var(--gvs-fg-3);
}

/*
  Printing. A badge sheet goes to a card printer, so everything that is not a badge has to go:
  the shell, the page header, the remove buttons and the hint. Colours are forced to plain
  black-on-white because the theme's surfaces waste toner and a dark theme would print a black page.
*/
@media print {
    .gvs-ptb,
    .mh-sidebar,
    .mh-sidebar-foot,
    .gvs-page-head,
    .sb-action,
    .sb-remove,
    .sb-note {
        display: none !important;
    }

    .sb-sheet {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 8px;
    }

    .sb-card {
        border-color: #000;
        background: #fff;
        color: #000;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .sb-name,
    .sb-number {
        color: #000;
    }
}
