/**
 * 📊 AI 분석 결과 표시 영역 스타일
 * - 높이 제한 제거
 * - 전체 내용 표시
 * - 스크롤 가능
 */

/* 분석 결과 컨테이너 */
#analysisSummary,
.analysis-result-container {
    /* 높이 제한 제거 - 전체 내용 표시 */
    max-height: none !important;
    min-height: 200px;
    overflow-y: auto;
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    margin-bottom: 20px;
}

/* 스크롤바 스타일링 */
#analysisSummary::-webkit-scrollbar,
.analysis-result-container::-webkit-scrollbar {
    width: 10px;
}

#analysisSummary::-webkit-scrollbar-track,
.analysis-result-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
    margin: 4px 0;
}

#analysisSummary::-webkit-scrollbar-thumb,
.analysis-result-container::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    border: 2px solid #f1f5f9;
}

#analysisSummary::-webkit-scrollbar-thumb:hover,
.analysis-result-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #5568d3 0%, #6a3d8a 100%);
}

/* 상세 설명 영역 */
.detailed-explanation {
    height: auto !important;
    max-height: none !important;
    line-height: 2.0 !important;  /* 줄간격 넓게 */
    overflow: visible !important;
}

/* 문단 스타일 */
.detailed-explanation p {
    margin-bottom: 20px !important;  /* 문단 간격 */
    padding: 0;
    line-height: 2.0 !important;
    text-align: justify;  /* 양쪽 정렬 */
    word-break: keep-all;
    text-indent: 0;  /* 들여쓰기 제거 */
}

.detailed-explanation p:first-child {
    margin-top: 0;
}

.detailed-explanation p:last-child {
    margin-bottom: 0;
}

/* 의료 텍스트 포맷팅 */
.detailed-explanation h3,
.detailed-explanation h4 {
    margin-top: 1.5em;
    margin-bottom: 0.8em;
    color: #0f172a;
    font-weight: 700;
    line-height: 1.4;
}

.detailed-explanation h3 {
    font-size: 1.25rem;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.5em;
}

.detailed-explanation h4 {
    font-size: 1.125rem;
    color: #334155;
}

/* 리스트 스타일 */
.detailed-explanation ul,
.detailed-explanation ol {
    margin: 1em 0;
    padding-left: 2em;
    line-height: 1.9;
}

.detailed-explanation li {
    margin-bottom: 0.6em;
    color: #334155;
}

.detailed-explanation li::marker {
    color: #667eea;
    font-weight: 700;
}

/* 의료 용어 강조 스타일 (이미 main.js에서 처리) */
.detailed-explanation .medical-term {
    background: linear-gradient(120deg, #dbeafe 0%, #bfdbfe 100%);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    color: #1e40af;
}

/* 영어 약어 강조 */
.detailed-explanation .abbreviation {
    font-style: italic;
    color: #7c3aed;
    font-weight: 600;
}

/* 주의사항, 경고 등 */
.detailed-explanation .warning,
.detailed-explanation .notice {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 12px 16px;
    margin: 1.2em 0;
    border-radius: 6px;
}

.detailed-explanation .warning strong,
.detailed-explanation .notice strong {
    color: #b45309;
}

/* 숫자, 날짜 강조 */
.detailed-explanation .date,
.detailed-explanation .number {
    font-weight: 600;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
}

/* 반응형 */
@media (max-width: 768px) {
    #analysisSummary,
    .analysis-result-container {
        padding: 16px;
    }
    
    .detailed-explanation {
        padding: 18px 20px;
    }
    
    .detailed-explanation p {
        font-size: 0.875rem;
        line-height: 1.8;
    }
}

