/* 작업 범위: ../README.md 참고 */

.custom-chk-inp-wrap {
    display: inline-block;
    width: 100%;
    margin: 20px 0 24px;
}

.custom-chk-inp-wrap .chk {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.custom-chk-inp-wrap input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.custom-chk-inp-wrap .chkbox {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 1.5px solid #888;
    border-radius: 4px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 12px 12px;
    transition: all .2s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    opacity: .3;
}

.custom-chk-inp-wrap .txt,
.custom-chk-inp-wrap .chk-label {
    font-size: 14px;
    color: #111;
}

.custom-chk-inp-wrap .txt.all {
    font-size: 15px;
    font-weight: bold;
}

.custom-chk-inp-wrap .txt .privacy-link {
    text-decoration: underline;
    color: #111;
}

/* 약관 링크(.chk-link) 및 기존 커스텀 txt의 .btn-privacy-open */
.custom-chk-inp-wrap .txt .chk-link,
.custom-chk-inp-wrap .chk-label .chk-link,
.custom-chk-inp-wrap .txt .btn-privacy-open,
.custom-chk-inp-wrap .chk-label .btn-privacy-open {
    text-decoration: underline;
    color: #111;
    cursor: pointer;
}

.custom-chk-inp-wrap input:checked + .chkbox {
    background-color: var(--primary);
    border-color: var(--primary);
    opacity: 1;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}

/* -------------------------------------------------------------------------
   variant: chip (ui_checkbox(['variant' => 'chip', ...]))
   기본 .custom-chk-inp-wrap 스타일과 독립 — .ui-checkbox.chip 만 적용
   ------------------------------------------------------------------------- */

.ui-checkbox.chip {
    display: inline-block;
    cursor: pointer;
    user-select: none;
    vertical-align: middle;
}

.ui-checkbox.chip span {
    display: inline-block;
    padding: 0 20px;
    height: 36px;
    line-height: 36px;
    border-radius: 999px;
    border: 1px solid #ddd;
    cursor: pointer;
    font-size: 14px;
}

.ui-checkbox.chip input {
    display: none;
}

.ui-checkbox.chip input:checked + span {
    background: #000;
    color: #fff;
    border-color: #000;
}
