/* 토글 스위치 컴포넌트 */

.toggle-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    user-select: none;
}

.toggle-switch__label {
    /* 라벨 텍스트 */
}

/* off-label을 받은 토글은 상태에 맞는 문구 하나만 보인다 */
.toggle-switch:has(input:checked) .toggle-switch__label--off,
.toggle-switch:not(:has(input:checked)) .toggle-switch__label--on {
    display: none;
}

/* 토글 트랙 */
.toggle-switch__track {
    position: relative;
    width: 40px;
    height: 22px;
    background: #ccc;
    border-radius: 11px;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

/* 토글 썸(원형 핸들) */
.toggle-switch__track::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

/* 숨겨진 체크박스 */
.toggle-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* 체크 시 트랙 색상 변경 */
.toggle-switch input:checked + .toggle-switch__track {
    background: #074491;
}

/* 체크 시 썸 이동 */
.toggle-switch input:checked + .toggle-switch__track::after {
    transform: translateX(18px);
}

/* 포커스 시 아웃라인 */
.toggle-switch input:focus-visible + .toggle-switch__track {
    outline: 2px solid #074491;
    outline-offset: 2px;
}
