/* 부모 컨테이너: 요소들을 가로로 정렬 */
.toggle-switch {
    display: flex;
    align-items: center;
    justify-content: space-between; /* 👈 양 끝으로 배치 */
    width: 100%;       /* 👈 부모 너비에 꽉 차게 설정 */
    max-width: 300px;  /* 👈 원하는 적당한 전체 너비 설정 */
    gap: 10px;
    white-space: nowrap;
}
/* 기존의 checkbox 버튼 숨기기 */
.toggle-input {
    display: none;
}

/* 토글 스타일 수정 */
.toggle-label {
    position: relative;
    display: inline-block; /* block에서 inline-block으로 변경 */
    width: 40px;
    height: 24px;
    background-color: #ccc;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    flex-shrink: 0; /* 스위치 모양이 찌그러지지 않게 고정 */
    right: 0;
}

.toggle-label::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.toggle-input:checked + .toggle-label {
    background-color: #4caf50;
}

.toggle-input:checked + .toggle-label::before {
    transform: translateX(16px);
}