/* Grid Select - Frontend Styles */

.cggf-grid {
    display: table;
    list-style: none;
    padding: 0;
    margin: 0;
    text-align:center;
}



/* Single column on small screens */
@media (max-width: 600px) {
    .cggf-grid[data-columns="3"],
    .cggf-grid[data-columns="4"] {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 400px) {
    .cggf-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Card style for each choice */
.cggf-grid-item {
    position: relative;
    padding: 12px;
    width: 184px;
    /* height: 240px; */
    vertical-align: top;
    display: inline-block;
}

span.cggf-image-cont {
    padding: 30px;
    border-radius: 100%;
    border: 2px solid grey;
    vertical-align: top;
}

span.cggf-image-cont img {
    margin-bottom:0;
    vertical-align: top;
}
.cggf-grid-item label div {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}
.cggf-grid-item label {
    display: flex;
    align-items: center;
    text-align: center;
    cursor: pointer;
    padding: 20px 10px;
    max-width: 100% !important;
    /* border: 2px solid #36454f; */
    border-radius: 5px;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    background: #fff;
    height: 100%;
}

.cggf-grid-item label:hover {
    box-shadow: rgba(0, 0, 0, 0.7) 0px 0px 10px 0px;
}

/* Hide the native input visually but keep accessible */
.cggf-grid-item input[type="radio"],
.cggf-grid-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* Selected state */
.cggf-grid-item input:checked + label {
    border-color: #1a73e8;
    background-color: #f0f6ff;
    box-shadow: 0 0 0 1px #1a73e8;
}

/* Focus state for accessibility */
.cggf-grid-item input:focus-visible + label {
    outline: 2px solid #1a73e8;
    outline-offset: 2px;
}

/* Image within the card */
.cggf-grid-item-image {
    width: 100%;
    max-width: 120px!important;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 12px;
}

/* Title text */
.cggf-grid-item-title {
    font-size: 16px;
    font-weight: 600;
    margin-top:8px;
    text-transform:uppercase;
    line-height: 1.3;
    font-family: 'Lato', sans-serif;
    color: rgb(54, 69, 79);
}

/* Custom check indicator */
.cggf-grid-item input:checked + label .cggf-grid-item-title {
    color: #1a73e8;
}
