/*
Filter property select
==============================================
Styling for property select filter item.
This filter item should only be used inside a filter panel.
*/

.filter-property-select-list-item {
    display: flex;
    align-items: center;
}

.filter-property-select-preview {
    width: 32px;
    height: 32px;
    display: inline-block;
    border-radius: 4px;
    border: 1px solid $border-color;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 90 90'%3E%3Cpath fill='%23cdd5db' d='M0 0h30v30H0zM30 30h30v30H30zM60 0h30v30H60zM60 60h30v30H60zM0 60h30v30H0z'/%3E%3C/svg%3E");
    background-position: center center;
    background-size: cover;
    position: relative;
    flex-shrink: 0;
}

.filter-property-select-preview-checkmark {
    width: 20px;
    height: 20px;
    background-color: $gray-600;
    position: absolute;
    border: 1px solid $white;
    border-radius: 50%;
    top: -4px;
    right: -4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease-in-out;
    opacity: 0;
    transform: translateY(-5px);

    .icon {
        width: 10px;
        height: 10px;
        color: $white;

        svg {
            top: 0;
        }
    }
}

.filter-property-select-checkbox {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    appearance: none;
    opacity: 0;

    &:checked ~ .filter-property-select-preview-checkmark {
        transform: translateY(0);
        opacity: 1;
    }
}
