/* Reusable UI checkbox – 24×24 box, design: default / hover / checked */

.ui-checkbox {
    box-sizing: border-box;
    position: relative;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 0;
    cursor: pointer;
    font: inherit;
    color: inherit;
    text-align: left;
}

.ui-checkbox--disabled {
    cursor: default;
    opacity: 0.6;
}

.ui-checkbox__input {
    position: absolute;
    left: 0;
    top: 0;
    width: 24px;
    height: 24px;
    margin: 0;
    padding: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
    box-sizing: border-box;
}

.ui-checkbox--disabled .ui-checkbox__input {
    cursor: default;
    pointer-events: none;
}

.ui-checkbox__box {
    box-sizing: border-box;
    flex: none;
    position: relative;
    width: 24px;
    height: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3px;
    background: #ffffff;
    border: 2px solid #475569;
    border-radius: 4px;
    pointer-events: none;
}

.ui-checkbox__icon-wrap {
    box-sizing: border-box;
    width: 18px;
    height: 18px;
    flex: none;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ui-checkbox__icon {
    display: block;
    width: 18px;
    height: 18px;
    opacity: 0;
    flex: none;
}

/* Hover – unchecked only */
.ui-checkbox:hover:not(.ui-checkbox--disabled) .ui-checkbox__input:not(:checked) + .ui-checkbox__box {
    background: #e8f5e9;
    border-color: #2e7d32;
}

.ui-checkbox__input:checked + .ui-checkbox__box {
    background: #2e7d32;
    border: 2px solid #2e7d32;
}

.ui-checkbox__input:checked + .ui-checkbox__box .ui-checkbox__icon {
    opacity: 1;
}

.ui-checkbox:hover:not(.ui-checkbox--disabled) .ui-checkbox__input:checked + .ui-checkbox__box {
    background: #256d2c;
    border-color: #256d2c;
}

.ui-checkbox__input:focus-visible + .ui-checkbox__box {
    outline: 2px solid #2e7d32;
    outline-offset: 2px;
}

.ui-checkbox__label {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 17px;
    color: #475569;
}

.ui-checkbox__label:empty {
    display: none;
}
