.button-grid {
    grid-column: 2 / span 2;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
    height: 100%;
    gap: 10px;
}

.layer-2-container {
    grid-area: vpanel;
    background-color: var(--bg-color1);
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(4, 1fr);

    padding: 10px;
    gap: 10px;
    /* border: 1px solid red; */
}

.generic-variant-info {
    grid-column: 1/2;
}

/* Preventing first column from hover changes  */

.generic-variant-info:hover {
    background-color: var(--vpanel-button);
    color: #999;
    transform: scale(1);
    cursor: default;
}

/* Controls the container div of the first column (title, img, p, go back btn) */

.layer-two-category-info {
    /* border: 1px solid blue; */
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10px 5px;
}

/* Image in the first column in Layer 2  */

.generic-image-container {
    display: flex;
    /* border: 1px solid gold; */
    justify-content: center;
    align-items: center;
    padding: 10px;
}

.generic img {
    /* border: 1px solid purple; */
    margin: 0 auto;
    height: 100%;
    width: 100%;
}

/* First Column Title  */

.generic h4, .fairy-grid h4 {
    /* border: 1px solid yellow; */  
    font-size: 1.2rem;
    padding:10px 5px;
    color: rgb(160, 160, 160);
}

/* Paragraph(s) in the first column describing the variant category  */

.variant-category-description {
    /* border: 1px solid green; */
    font-size: 0.80rem;
    padding: 5px;
    color: rgb(152, 151, 151);
    text-transform: none;
}

/* Go back button  */

.generic h5, .fairy-grid h5 {
    /* border: 1px solid red; */
    padding: 5px;
    margin: 0;
}

.generic h5:hover, .fairy-grid h5:hover {
    color: var(--panel-link-hover);
    cursor: pointer;
}

/* Icons next to Variant Category Title  */

.icon-container {
    /* border: 1px solid red; */
    display: flex;
    height: 25px;
    width: 25px;
    margin-right: 5px;
}

/* Desktop  */

/* Prevents Info Panel stretching too much on big screens  */

@media only screen and (min-width: 1100px) {
.layer-2-container {
    margin: 0 auto;
}
}

/* Tablet and makes the Chess Layer 2 Grid change to two columns */

@media only screen and (max-width:1100px) {
    .button-grid {
        grid-column: 1/3;
        grid-row: 1/1;
    }
    .layer-2-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        padding: 10px;
        gap: 10px;
    }

    .generic-variant-info {
        grid-column: 1/2;
    }
}

/* Mobile and makes it one column  */

@media only screen and (max-width:799px) {
    .button-grid {
        grid-column: 1/3;
        grid-row: 1/1;
    }

    .layer-2-container {
        display: grid;
    }

    .generic-variant-info {
        grid-column: 1/3;
    }

    #layer2chesscont #mainboard {
        display: none; 
    }

    .variant-title-l2 {
        padding: 15px 50px;
        margin: 0 auto;
        justify-content: center;
    }

    layer-two-category-info {
        padding-top: 0px; 
    }

    .generic h4, .fairy-grid h4 {
        display: none; 
    }

    .variant-category-description {
        display: none; 
    }

    .generic h5, .fairy-grid h5 {
        font-size: 1rem;
    }

    #layer2chesscont .generic-variant-info {
        background: none;
    }
}
