:root {
    --ci-spacing: 24px;
}

section[id] {
    padding-top: 2em;
}

/*
 * Colour Swatch
 */

.colour-swatch {
    font-size: 0.75rem;
}

.colour-swatch.opaque {
    opacity: 0.5;
}

.colour-swatch.colour-10,
.colour-swatch.colour-20,
.colour-swatch.colour-30,
.colour-swatch.colour-40,
.colour-swatch.colour-50,
.colour-swatch.colour-black {
    color: var(--cd-white);
}

.colour-swatch.colour-60,
.colour-swatch.colour-70,
.colour-swatch.colour-80,
.colour-swatch.colour-90,
.colour-swatch.colour-100,
.colour-swatch.colour-white {
    color: var(--cd-black);
}

.colour-swatch:not(.colour-black, .colour-white) {
    cursor: pointer;
}

/*
 * Colour Palette
 */

#colour-palette-display {
    padding-top: 0;

    .colour-family {
        display: grid;
        grid-template-columns: repeat(12, 1fr);
        max-width: calc(100vh / 16 * 11);
    }

    .colour-swatch {
        padding-top: 100%;
        position: relative;
    }
}

/*
 * Colour Specification
 */

#colour-specifications-display {
    padding-top: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);

    .colour-family {
        margin: 5px;
    }

    .colour-swatch {
        --transform-scale: 1.125;

        display: grid;
        grid-template-columns: auto auto;
        padding: 10px;
    }

    .colour-hex {
        text-align: right;
    }
}

/*
 * Logo
 */

.logo-usage {
    --columns: 2; /* If you change this value, also change the xn value for the nth-child */

    display: grid;
    grid-template-columns: repeat(var(--columns), 1fr);
    margin-bottom: 4rem;

    /* stylelint-disable no-descending-specificity */
    > * {
        padding: var(--ci-spacing);
        display: flex;
        flex-flow: column;
        gap: 10px;
    }

    > *:nth-child(odd) {
        background: var(--cd-grey-90) !important;
        color: var(--cd-grey-20);
    }

    > *:nth-child(even) {
        background: var(--cd-grey-20) !important;
        color: var(--cd-grey-90);
    }

    > *:nth-child(3),
    > *:nth-child(4) {
        flex-flow: row;
    }

     img {
        height: 30px;
    }
}

.logo-versions a {
    font-size: 0.5em;
    flex-grow: 1;
    text-align: center;
    text-decoration: none;
}

.logo-versions a:hover .filetype {
    background-color: var(--link-color-hover);
    color: var(--cd-grey-20);
}

.filetype {
    display: block;
    color: var(--cd-grey-20);
    background-color: var(--cd-grey-60);
    font-weight: bold;
    border-radius: 20px;
    padding: 1px;
}

/* stylelint-enable no-descending-specificity */
