/*
 * Component — colour switcher
 *
 * Loads only on single transport and single product (trt_is_single_item in the
 * asset registry). The predecessor shipped this CSS inline on every request
 * site-wide, including pages with no product on them.
 */

.tr-colour {
    margin-block: 22px;
}

.tr-colour__head {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-block-end: 10px;
}

.tr-colour__label {
    font-size: 13px;
    color: var(--tr-text);
}

.tr-colour__name {
    font-size: 14px;
    font-weight: 600;
    color: var(--tr-text-strong);
}

.tr-colour__swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tr-colour__swatch {
    width: 52px;
    height: 52px;
    padding: 2px;
    border: 2px solid transparent;
    border-radius: 4px;
    background: var(--tr-white);
    overflow: hidden;
    transition: border-color 0.18s ease, transform 0.18s ease;
}

.tr-colour__swatch img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 2px;
}

.tr-colour__swatch:hover {
    border-color: rgba(0, 0, 0, 0.25);
    transform: translateY(-1px);
}

.tr-colour__swatch.is-active {
    border-color: var(--tr-brand);
}

.tr-colour__swatch:focus-visible {
    outline: 2px solid var(--tr-brand);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .tr-colour__swatch { transition: none; }
    .tr-colour__swatch:hover { transform: none; }
}
