/* Bootstrap is loaded through the importmap (bootstrap/dist/css/bootstrap.min.css); app styles go below. */

/* Colour sample of a product or spool (templates/_swatch.html.twig). */
.swatch {
    display: inline-block;
    width: var(--swatch-size, 1.5rem);
    height: var(--swatch-size, 1.5rem);
    border-radius: 50%;
    border: 1px solid rgba(128, 128, 128, 0.5);
    vertical-align: middle;
    flex: none;
}
.swatch-empty {
    background: repeating-linear-gradient(45deg, #ccc 0 4px, #eee 4px 8px);
}
.swatch-lg {
    --swatch-size: 2.5rem;
}

/* Filter chips of colour families: the chip is the sample itself. */
.family-chip {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    border: 2px solid transparent;
    padding: 0;
    opacity: 0.6;
}
.family-chip.active,
.family-chip:hover {
    opacity: 1;
    border-color: var(--bs-body-color);
}

/* Catalog search results in the product editor. */
.catalog-results {
    max-height: 22rem;
    overflow-y: auto;
}

/* PWA bottom bar on phones (M6). */
.bottom-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1030;
    display: flex;
    background: var(--bs-body-bg);
    border-top: 1px solid var(--bs-border-color);
    padding-bottom: env(safe-area-inset-bottom);
}
.bottom-bar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 2px 8px;
    font-size: 0.7rem;
    color: var(--bs-secondary-color);
    text-decoration: none;
}
.bottom-bar-item.active {
    color: var(--bs-primary);
    font-weight: 600;
}
.bottom-bar-icon {
    font-size: 1.25rem;
    line-height: 1;
}
@media (max-width: 767.98px) {
    body.has-bottom-bar {
        padding-bottom: calc(64px + env(safe-area-inset-bottom));
    }
}
/* Big numeric field of the weighing screen. */
.input-group-lg > .form-control {
    font-variant-numeric: tabular-nums;
}

/* Lets long names truncate inside flex rows instead of pushing the weight off the screen (not in Bootstrap). */
.min-w-0 {
    min-width: 0;
}
