/**
 * KAICE Checkbox Field Styles
 * 체크박스 필드 스타일 (약관 동의 등)
 */

/* =================================
   체크박스 그룹
   ================================= */

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-group.vertical {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

.checkbox-group input[type="checkbox"] {
    margin-top: 2px;
    transform: scale(1.1);
    accent-color: var(--theme-main-color);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.checkbox-group label {
    margin-bottom: 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: normal;
    font-family: var(--theme-font-normal);
}

/* =================================
   체크박스 라벨 (개별 옵션)
   ================================= */

.kaice-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: normal;
    font-family: var(--theme-font-normal);
}

.kaice-checkbox-label input[type="checkbox"] {
    margin: 0;
    transform: scale(1.1);
    accent-color: var(--theme-main-color);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.kaice-checkbox-text {
    cursor: pointer;
}

/* =================================
   전체 동의
   ================================= */

.form-group.terms.all-agree {
    margin-bottom: 8px;
}

.form-group.terms.all-agree input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.form-group.terms.all-agree label {
    font-family: var(--theme-font-bold);
}

.form-group.terms {
    margin-bottom: 0px;
}

/* =================================
   약관 그룹
   ================================= */

/* 약관 아코디언 버튼 */
.terms-accordion {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    color: var(--theme-main-color);
    text-decoration: none;
    font-family: var(--theme-font-bold);
    font-size: var(--theme-font-size-input);
    cursor: pointer;
    transition: color 0.2s ease;
}

.terms-accordion:hover {
    text-decoration: underline;
    color: var(--theme-button-hover-bg);
    background: transparent;
}

.terms-accordion::after {
    display: none;
}

/* 약관 컨텐츠 */
.terms-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
    margin: 0;
    padding: 0;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    opacity: 0;
    visibility: hidden;
}

.terms-content.active {
    max-height: 400px;
    padding: 16px;
    margin-bottom: 15px;
    overflow-y: auto;
    opacity: 1;
    visibility: visible;
}

/* 약관 내용 텍스트 스타일 */
.terms-content * {
    font-size: 14px;
    color: #000000;
    font-family: var(--theme-font-normal);
    line-height: 1.5;
}

.terms-content p {
    margin: 0 0 12px 0;
}

.terms-content p:last-child {
    margin-bottom: 0;
}

.terms-content h4 {
    margin: 16px 0 8px 0;
    font-weight: 500;
    font-family: var(--theme-font-bold);
}

.terms-content h4:first-child {
    margin-top: 0;
}

.terms-content ol,
.terms-content ul {
    margin: 8px 0 12px 20px;
    padding: 0;
}

.terms-content li {
    margin-bottom: 4px;
}
