.titan-colour-selector {
    width: 100%;
    margin: 1.8em 0 2em;
    font-family: inherit;
}

.titan-colour-title {
    display: flex;
    align-items: baseline;
    gap: 0.35em;
    margin-bottom: 1.8em;
    font-size: 1.1em;
    line-height: 1.4;
}

.titan-colour-title strong {
    font-weight: 600;
    color: #172B35;
}

.titan-colour-title .titan-selected-colour {
    font-weight: 400;
    color: #5F644C;
}

/* Number of swatches per row is calculated automatically from the configured size. */
.titan-colour-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(var(--tcs-swatch-size, 75px), var(--tcs-swatch-size, 75px)));
    gap: 2em 1.5em;
    width: 100%;
    max-width: 100%;
    justify-content: start;
    align-items: start;
}

.titan-colour-item {
    width: var(--tcs-swatch-size, 75px);
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none !important;
    color: inherit;
    cursor: pointer;
}

.titan-swatch {
    width: var(--tcs-swatch-size, 75px);
    height: var(--tcs-swatch-size, 75px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
    transition: none;
}

.titan-swatch img {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    margin: 0 !important;
}

.titan-colour-item:hover .titan-swatch {
    transform: none;
}

.titan-colour-item.active .titan-swatch {
    box-shadow:
        0 0 0 1px #172B35,
        0 0 0 0.45em #fff,
        0 0 0 0.52em #172B35;
}

.titan-colour-name {
    width: 100%;
    margin-top: 1.45em;
    text-align: center;
    font-size: 1em;
    line-height: 1.45;
    font-weight: 400;
    color: #5F644C;
    transition: none;
}

.titan-colour-item:hover .titan-colour-name,
.titan-colour-item.active .titan-colour-name {
    color: #5F644C;
}

@media (max-width: 48em) {
    .titan-colour-grid {
        gap: 1.8em 1.25em;
    }
}

@media (max-width: 30em) {
    .titan-colour-grid {
        gap: 1.8em 0.9em;
    }

    .titan-colour-name {
        font-size: 0.9em;
    }
}
