body {
    background-color: #2a2a2a;
    color: grey;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 3.3vh;
    margin: 1%;
}

p {
    line-height: 0%; /* removes the large vertical borders around <p> elements*/
}

input {
    width: 25vw;
    background-color: #2a2a2a;
    color: inherit;
    text-align: center;
    border: 2px solid #3f3f3f;
    transition: ease-in-out 0.4s;
    font-size: inherit; /* somehow, this is not auto-inherited from body */
}

input:hover {
    background-color: #3f3f3f;
    color: whitesmoke;
}

#submit {
    margin: 0 auto; /* centres the submit button directly below the input field */
    display: none; /* hidden by default, will become 'block' upon JS validation */
}

#colourpicker:focus {
    background-color: #3f3f3f;
    color: whitesmoke;
}

a {
    text-decoration: none;
    transition: ease-in-out 0.4s;
}

a:link, a:visited {
    color: grey;
    text-decoration: none;
}

a:hover {
    color: whitesmoke;
}

a:active {
    background-color: yellow;
    color: black;
    font-weight: bolder;
}

red {
    color: red;
}

green {
    color: lime;
}

blue {
    color: blue;
}

custom {
    color: var(--custom-colour);
}

#colours-platform {
    margin: 2%;
    background-color: #303030;
    border: 2px solid #3f3f3f;
    box-shadow: 2vw 2vw 2vw #202020;
    text-align: center;
    height: 88vh;
    display: flex;
    flex-direction: column;
}

#colours-main {
    position: relative;
    flex: 1;
}

#link-doc {
    font-weight: bold;
    position: absolute;
    bottom: 0px;
    left: 0px;
}

#colours-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 2vw; 
    margin: 0% 5%;
}

#colours-footer {
    padding-right: 15px;
    background-color: #3f3f3f;
    text-align: right;
    font-weight: bold;
    font-size: 2vh;
}

.colour-cell {
    grid-row: 1;
}

.colour-cell a {
    display: block;
    height: 33vh; /* this specifies the height of the colour-cell */
}

#colours-grid div[id*='colour-cell-'] {
}

#colour-cell-red {
    background-color: #cc0000;
    grid-column: 1;
}

#colour-cell-red :hover {
    background-color: red;
}

#colour-cell-green {
    background-color: #00cc00;
    grid-column: 2;
}

#colour-cell-green :hover {
    background-color: lime;
}

#colour-cell-blue {
    background-color: #0000cc;
    grid-column: 3;
}

#colour-cell-blue :hover {
    background-color: blue;
}

.text-cell {
    grid-row: 2;
}

.text-cell :hover {
    background-color: #3f3f3f;
}

.text-cell a {
    display: block;
    height: 5vh; /* needs to be at least '.6' larger than the font size so the 'g' in 'green' isn't chopped */
    font-size: 4vh;
}

.text-cell a:active {
    background-color: yellow;
    color: black;
    text-decoration: underline;
}

#text-cell-red {
    grid-column: 1;
}

#text-cell-green {
    grid-column: 2;
}

#text-cell-blue {
    grid-column: 3;
}

#colours-grid div[id*='selected-colour-'] {
    grid-column: 2;
    grid-row: 1;
}

#selected-colour-red {
    background-color: red;
}

#selected-colour-green {
    background-color: lime;
}

#selected-colour-blue {
    background-color: blue;
}

#selected-colour-custom {
    background-color: var(--custom-colour);
}

#go-back {
    grid-column: 2;
    grid-row: 2;
}