/* چک‌باکس سفارشی — همان زبان بصری pretty-select / creator-search */

:root {
    --pretty-check: var(--creator-search-primary, #0b285b);
    --pretty-check-soft: var(--creator-search-primary-soft, #e8eef6);
}

input[type="checkbox"].pretty-check-skip,
input[type="checkbox"].sr-only,
input[type="checkbox"][hidden],
input[type="checkbox"].creator-type-panel-chip__input,
input[type="checkbox"].creator-category-checkbox,
input[type="checkbox"].page-qa__anonymous-input {
    /* از قبل ظاهر سفارشی دارند یا برای ارسال مخفی‌اند */
}

input[type="checkbox"]:not([hidden]):not(.sr-only):not(.pretty-check-skip):not(.creator-type-panel-chip__input):not(.creator-category-checkbox):not(.page-qa__anonymous-input) {
    appearance: none;
    -webkit-appearance: none;
    width: 1.1rem !important;
    height: 1.1rem !important;
    min-width: 1.1rem;
    min-height: 1.1rem;
    margin: 0;
    padding: 0;
    flex: none;
    box-sizing: border-box;
    vertical-align: middle;
    cursor: pointer;
    border: 1.5px solid #cbd5e1;
    border-radius: 0.35rem;
    background-color: #fff;
    background-image: none;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 0.72rem;
    box-shadow: none;
    transition:
        border-color 0.16s ease,
        background-color 0.16s ease,
        box-shadow 0.16s ease;
}

input[type="checkbox"]:not([hidden]):not(.sr-only):not(.pretty-check-skip):not(.creator-type-panel-chip__input):not(.creator-category-checkbox):not(.page-qa__anonymous-input):hover {
    border-color: #94a3b8;
}

input[type="checkbox"]:not([hidden]):not(.sr-only):not(.pretty-check-skip):not(.creator-type-panel-chip__input):not(.creator-category-checkbox):not(.page-qa__anonymous-input):checked,
input[type="checkbox"]:not([hidden]):not(.sr-only):not(.pretty-check-skip):not(.creator-type-panel-chip__input):not(.creator-category-checkbox):not(.page-qa__anonymous-input):indeterminate {
    border-color: var(--pretty-check);
    background-color: var(--pretty-check);
    box-shadow: 0 0 0 3px var(--pretty-check-soft);
}

input[type="checkbox"]:not([hidden]):not(.sr-only):not(.pretty-check-skip):not(.creator-type-panel-chip__input):not(.creator-category-checkbox):not(.page-qa__anonymous-input):checked {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}

input[type="checkbox"]:not([hidden]):not(.sr-only):not(.pretty-check-skip):not(.creator-type-panel-chip__input):not(.creator-category-checkbox):not(.page-qa__anonymous-input):indeterminate {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3C/svg%3E");
}

input[type="checkbox"]:not([hidden]):not(.sr-only):not(.pretty-check-skip):not(.creator-type-panel-chip__input):not(.creator-category-checkbox):not(.page-qa__anonymous-input):focus-visible {
    outline: 2px solid var(--pretty-check);
    outline-offset: 2px;
}

input[type="checkbox"]:not([hidden]):not(.sr-only):not(.pretty-check-skip):not(.creator-type-panel-chip__input):not(.creator-category-checkbox):not(.page-qa__anonymous-input):disabled {
    cursor: not-allowed;
    opacity: 0.45;
    box-shadow: none;
}

.pretty-check-group {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.4rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.95rem;
    background: #fff;
}

.pretty-check-group > label {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0;
    padding: 0.5rem 0.7rem;
    border-radius: 0.6rem;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.7;
    color: #334155;
    cursor: pointer;
    transition: background 0.14s ease, color 0.14s ease;
}

.pretty-check-group > label:hover {
    background: var(--pretty-check-soft);
    color: var(--pretty-check);
}

.pretty-check-group > label:has(input:checked) {
    background: var(--pretty-check-soft);
    color: var(--pretty-check);
    font-weight: 700;
}
