/* KAICE CSS 최고 우선순위 강제 적용 */

/* 모든 KAICE 스타일에 최고 우선순위 적용 */
html body .kaice-auth-container {
    min-height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: center !important;
    padding: 32px 16px !important;
    font-family: 'S-CoreDream-3', sans-serif !important;
    position: relative !important;
    z-index: 1 !important;
}

html body .kaice-auth-container > div {
    width: 100% !important;
    max-width: 448px !important;
}

/* 로고 영역은 사용하지 않음 - 템플릿에서 제거됨 */

/* 아코디언 시스템 강제 스타일 */
html body .kaice-terms-accordion {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    text-align: left !important;
    cursor: pointer !important;
    color: #408090 !important;
    text-decoration: none !important;
    font-family: 'S-CoreDream-3', sans-serif !important;
    font-size: 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    transition: color 0.2s ease !important;
    outline: none !important;
    box-shadow: none !important;
}

html body .kaice-terms-accordion:hover {
    text-decoration: underline !important;
    color: rgba(64, 128, 144, 0.8) !important;
}

html body .kaice-terms-accordion::after {
    content: '▼' !important;
    font-size: 12px !important;
    transition: transform 0.2s ease !important;
    color: #666 !important;
    margin-left: 8px !important;
}

html body .kaice-terms-accordion.active::after {
    transform: rotate(180deg) !important;
}

/* 아코디언 컨텐츠 강제 스타일 */
html body .kaice-terms-content {
    max-height: 0 !important;
    overflow: hidden !important;
    transition: max-height 0.3s ease !important;
    margin-top: 0 !important;
    padding: 0 !important;
    background: #f8f9fa !important;
    border-radius: 4px !important;
    border: 1px solid #e9ecef !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

html body .kaice-terms-content.active {
    max-height: 300px !important;
    padding: 16px !important;
    margin-top: 8px !important;
    overflow-y: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
}

html body .kaice-terms-content p {
    margin: 0 0 12px 0 !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    color: #333 !important;
    font-family: 'S-CoreDream-4', sans-serif !important;
}

html body .kaice-terms-content h4 {
    margin: 16px 0 8px 0 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #000 !important;
    font-family: 'S-CoreDream-5', sans-serif !important;
}

html body .kaice-terms-content h4:first-child {
    margin-top: 0 !important;
}

/* 탭 구조 강제 스타일 */
html body .kaice-auth-form {
    background: #ffffff !important;
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

html body .kaice-tab-trigger {
    background: none !important;
    border: none !important;
    padding: 16px 24px !important;
    font-size: 16px !important;
    font-family: 'S-CoreDream-5', sans-serif !important;
    color: #666 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    position: relative !important;
}

html body .kaice-tab-trigger.active {
    background: #ffffff !important;
    color: #000000 !important;
    border-bottom: 2px solid #408090 !important;
    font-weight: 500 !important;
}

/* 폼 입력 요소 강제 스타일 */
html body .kaice-form-group input[type="text"],
html body .kaice-form-group input[type="email"],
html body .kaice-form-group input[type="password"],
html body .kaice-form-group input[type="tel"],
html body .kaice-form-group input[type="date"],
html body .kaice-form-group select {
    width: 100% !important;
    padding: 12px !important;
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    font-size: 16px !important;
    font-family: 'S-CoreDream-4', sans-serif !important;
    background: #ffffff !important;
    color: #000000 !important;
    transition: border-color 0.2s ease !important;
    box-sizing: border-box !important;
}

/* 버튼 강제 스타일 */
html body .kaice-btn {
    padding: 12px 20px !important;
    border: none !important;
    border-radius: 4px !important;
    font-size: 16px !important;
    font-family: 'S-CoreDream-4', sans-serif !important;
    cursor: pointer !important;
    text-decoration: none !important;
    display: inline-block !important;
    text-align: center !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
}

html body .kaice-btn-primary {
    background: #408090 !important;
    color: white !important;
}

/* 체크박스 영역 강제 스타일 */
html body .kaice-checkbox-group {
    display: flex !important;
    align-items: flex-start !important;
    gap: 8px !important;
    margin-bottom: 8px !important;
}

html body .kaice-checkbox-group label {
    margin-bottom: 0 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 8px !important;
    font-size: 14px !important;
}

/* 전체 override */
html body .kaice-terms-group {
    margin-bottom: 12px !important;
}

html body .kaice-terms-group .kaice-checkbox-group {
    margin-bottom: 8px !important;
}

/* 성공 메시지 완전 숨김 - 최고 우선순위 */
html body .kaice-message.success {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 반응형 */
@media (max-width: 768px) {
    html body .kaice-auth-container {
        padding: 16px !important;
    }
    
    html body .kaice-logo h1 {
        font-size: 36px !important;
    }
}