/* For checkbox section */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    margin-top: 8px;
}

.custom-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    font-size: 1rem;
    font-weight: 400 !important;
    font-family: 'Poppins', sans-serif;
    background: #ffffff;
    border: 1px solid rgba(224, 224, 224);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.15);
    border-radius: 8px;
    transition: background 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    margin: 5px;
}

.checkbox-text {
    display: inline-block;
    vertical-align: middle;
    line-height: 1;
}

.custom-checkbox-label:hover {
    border: 1px solid rgba(200, 200, 200, 0.6);
    background-color: rgba(52, 152, 219, 0.25);
}

.custom-checkbox-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
    pointer-events: none;
    user-select: none;
}

.icon-box {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    background-color: #f9f9f9;
    margin-right: 10px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.icon-box,
.checkbox-text {
    display: inline-flex;
    align-items: center;
}

.icon-box img.custom-icon,
.icon-box svg.checkmark-icon {
    width: 22px;
    height: 22px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

.icon-box img.custom-icon {
    opacity: 1;
    z-index: 1;
}

.icon-box svg.checkmark-icon {
    opacity: 0;
    z-index: 0;
}

.custom-checkbox-input:checked + .icon-box img.custom-icon {
    opacity: 0;
    z-index: 0;
}

.custom-checkbox-input:checked + .icon-box svg.checkmark-icon {
    stroke: #641b1b;
    opacity: 1;
    z-index: 1;
}

.custom-checkbox-input:checked + .icon-box {
    border: 1px solid rgba(200, 200, 200, 0.6);
    background-color: rgba(52, 152, 219, 0.3);
    cursor: pointer;
    flex-shrink: 0;
}

@media (max-width: 800px) {
    .custom-checkbox-label {
        text-align: left !important;
        justify-content: flex-start;
        margin: 0 0 8px 0;
        white-space: normal;
        min-height: 30px;
        padding: 5px 3px;
        font-size: 15px !important;
    }

    .checkbox-grid {
        gap: 8px;
        grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    }
}
