/* BMI Calculator Specific Styles */

/* ========================================
   RESULT HIGHLIGHT SUB
   ======================================== */
.calc-result-highlight {
    margin-bottom: 24px;
}

.calc-result-highlight-sub {
    margin-top: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #319C80;
}

/* ========================================
   RESULT SUB TABS
   ======================================== */
.result-sub-tabs-wrapper {
    max-width: 900px;
    margin: 0 auto 24px;
    padding: 0 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.result-sub-tabs {
    display: flex;
    justify-content: center;
    background-color: #F5F5F5;
    border-radius: 8px;
    padding: 4px;
    min-width: max-content;
}

.result-sub-tab {
    flex-shrink: 0;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.result-sub-tab:hover {
    color: #319C80;
}

.result-sub-tab.active {
    background-color: #319C80;
    color: #fff;
    font-weight: 600;
}

.result-sub-content {
    display: none;
}

.result-sub-content.active {
    display: block;
}

/* ========================================
   BMI CATEGORY LIST
   ======================================== */
.bmi-category-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bmi-category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: #FAFAFA;
    border: 1px solid #E8E8E8;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.bmi-category-item.active {
    background: #319C80;
    border-color: #319C80;
}

.bmi-category-item.active .bmi-category-name,
.bmi-category-item.active .bmi-category-range {
    color: #fff;
}

.bmi-category-name {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.bmi-category-range {
    font-size: 14px;
    color: #666;
}

/* ========================================
   GUIDE ITEMS (BMI 가이드)
   ======================================== */
.guide-item {
    padding: 12px 0;
    border-bottom: 1px solid #F0F0F0;
}

.guide-item:last-child {
    border-bottom: none;
}

.guide-item-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.guide-item-title::before {
    content: '';
    width: 6px;
    height: 6px;
    background-color: #319C80;
    border-radius: 50%;
    flex-shrink: 0;
}

.guide-item-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    padding-left: 14px;
}

/* ========================================
   BODY FAT (체지방률)
   ======================================== */
.body-fat-result {
    text-align: center;
    margin-bottom: 20px;
}

.body-fat-value {
    font-size: 48px;
    font-weight: 700;
    color: #319C80;
}

.body-fat-status {
    font-size: 18px;
    font-weight: 600;
    margin-top: 8px;
}

.body-fat-bar-container {
    margin-top: 20px;
}

.body-fat-bar {
    height: 12px;
    background: linear-gradient(to right, #3498db 0%, #27ae60 25%, #f39c12 60%, #e74c3c 100%);
    border-radius: 6px;
    position: relative;
}

.body-fat-indicator {
    position: absolute;
    top: -6px;
    width: 24px;
    height: 24px;
    background: #fff;
    border: 3px solid #333;
    border-radius: 50%;
    transform: translateX(-50%);
    transition: left 0.3s ease;
}

.body-fat-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: #888;
}

/* 체지방률 기준표 */
.fat-table-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #F0F0F0;
    font-size: 14px;
}

.fat-table-row.header {
    background: #F8F9FA;
    font-weight: 600;
    color: #333;
}

.fat-table-row.active {
    background: #E8F5E9;
    color: #2E7D32;
    font-weight: 600;
}

.fat-table-row:last-child {
    border-bottom: none;
}

/* 체성분 분석 */
.composition-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #F0F0F0;
}

.composition-label {
    font-size: 14px;
    color: #666;
}

.composition-value {
    font-size: 16px;
    font-weight: 600;
}

.composition-value.fat {
    color: #E74C3C;
}

.composition-value.lean {
    color: #319C80;
}

.composition-bar {
    display: flex;
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 16px;
}

.composition-fat {
    background: #E74C3C;
}

.composition-lean {
    background: #319C80;
}

.composition-legend {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 12px;
    font-size: 13px;
    color: #666;
}

.composition-legend span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-fat,
.legend-lean {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.legend-fat {
    background: #E74C3C;
}

.legend-lean {
    background: #319C80;
}

/* ========================================
   GOAL PLAN (목표 계획)
   ======================================== */
.weight-range-display {
    display: flex;
    justify-content: space-around;
    text-align: center;
    margin-bottom: 24px;
}

.weight-range-item {
    padding: 16px;
    border-radius: 12px;
    background: #F8F9FA;
    min-width: 80px;
}

.weight-range-item.highlight {
    background: #E8F5E9;
}

.range-label {
    font-size: 13px;
    color: #888;
    display: block;
    margin-bottom: 4px;
}

.range-value {
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

.weight-range-item.highlight .range-value {
    color: #319C80;
}

.current-vs-ideal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 20px;
    background: #FAFAFA;
    border-radius: 12px;
}

.current-weight,
.ideal-weight {
    text-align: center;
}

.current-weight span,
.ideal-weight span {
    font-size: 13px;
    color: #888;
    display: block;
    margin-bottom: 4px;
}

.current-weight strong,
.ideal-weight strong {
    font-size: 18px;
    color: #333;
}

.weight-diff {
    font-size: 20px;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 20px;
}

.weight-diff.over {
    background: #FFEBEE;
    color: #E74C3C;
}

.weight-diff.under {
    background: #E3F2FD;
    color: #1976D2;
}

.weight-diff.normal {
    background: #E8F5E9;
    color: #2E7D32;
}

/* 목표 타임라인 */
.timeline-goal {
    text-align: center;
    margin-bottom: 20px;
}

.goal-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.goal-badge.loss {
    background: #FFEBEE;
    color: #E74C3C;
}

.goal-badge.gain {
    background: #E3F2FD;
    color: #1976D2;
}

.goal-badge.maintain {
    background: #E8F5E9;
    color: #2E7D32;
}

.goal-amount {
    font-size: 32px;
    font-weight: 700;
    color: #333;
}

.goal-message {
    font-size: 16px;
    color: #319C80;
    margin-top: 8px;
}

.timeline-schedule {
    background: #FAFAFA;
    border-radius: 12px;
    padding: 16px;
}

.schedule-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #E8E8E8;
}

.schedule-item:last-child {
    border-bottom: none;
}

.schedule-label {
    font-size: 14px;
    color: #666;
}

.schedule-value {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

/* 체중 조절 팁 */
.tip-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #F0F0F0;
}

.tip-item:last-child {
    border-bottom: none;
}

.tip-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.tip-content {
    flex: 1;
}

.tip-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.tip-desc {
    font-size: 14px;
    color: #666;
}

/* ========================================
   HEALTH RISK (건강 위험도)
   ======================================== */
.risk-gauge {
    height: 16px;
    background: #E8E8E8;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
}

.risk-gauge-fill {
    height: 100%;
    border-radius: 8px;
    transition: width 0.5s ease;
}

.risk-level {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.risk-description {
    text-align: center;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

/* 질환 위험 리스트 */
.disease-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #F0F0F0;
}

.disease-item:last-child {
    border-bottom: none;
}

.disease-name {
    width: 100px;
    font-size: 14px;
    color: #333;
    flex-shrink: 0;
}

.disease-risk-bar {
    flex: 1;
    height: 8px;
    background: #E8E8E8;
    border-radius: 4px;
    overflow: hidden;
}

.disease-risk-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.disease-risk-fill.low {
    background: #27ae60;
}

.disease-risk-fill.moderate {
    background: #f39c12;
}

.disease-risk-fill.high {
    background: #e67e22;
}

.disease-risk-fill.very-high {
    background: #e74c3c;
}

.disease-risk-label {
    width: 80px;
    text-align: right;
    font-size: 13px;
    font-weight: 500;
    flex-shrink: 0;
}

.disease-risk-label.low {
    color: #27ae60;
}

.disease-risk-label.moderate {
    color: #f39c12;
}

.disease-risk-label.high {
    color: #e67e22;
}

.disease-risk-label.very-high {
    color: #e74c3c;
}

/* 건강검진 권고 */
.check-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #F0F0F0;
}

.check-item:last-child {
    border-bottom: none;
}

.check-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.check-content {
    flex: 1;
}

.check-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.check-desc {
    font-size: 14px;
    color: #666;
}

/* ========================================
   CALORIE (칼로리 계산)
   ======================================== */
.calorie-main {
    background: #F8F9FA;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 12px;
}

.calorie-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #E8E8E8;
}

.calorie-item:last-child {
    border-bottom: none;
}

.calorie-item.highlight {
    padding-top: 16px;
}

.calorie-label {
    font-size: 14px;
    color: #666;
}

.calorie-item.highlight .calorie-label {
    font-weight: 600;
    color: #333;
}

.calorie-value {
    font-size: 18px;
    font-weight: 700;
    color: #319C80;
}

.calorie-note {
    font-size: 12px;
    color: #888;
    text-align: center;
}

/* 활동량별 칼로리 */
.activity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #F0F0F0;
    transition: background 0.2s ease;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item.active {
    background: #E8F5E9;
    border-radius: 8px;
    margin: 4px -8px;
    padding: 14px 24px;
}

.activity-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.activity-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.activity-desc {
    font-size: 12px;
    color: #888;
}

.activity-kcal {
    font-size: 16px;
    font-weight: 600;
    color: #319C80;
}

/* 목표별 칼로리 */
.goal-calorie-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 10px;
}

.goal-calorie-item:last-child {
    margin-bottom: 0;
}

.goal-calorie-item.loss {
    background: #FFEBEE;
}

.goal-calorie-item.maintain {
    background: #E8F5E9;
}

.goal-calorie-item.gain {
    background: #E3F2FD;
}

.goal-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.goal-name {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.goal-desc {
    font-size: 12px;
    color: #888;
}

.goal-kcal {
    font-size: 16px;
    font-weight: 700;
}

.goal-calorie-item.loss .goal-kcal {
    color: #E74C3C;
}

.goal-calorie-item.maintain .goal-kcal {
    color: #319C80;
}

.goal-calorie-item.gain .goal-kcal {
    color: #1976D2;
}

/* ========================================
   HEALTH TIPS (건강 팁)
   ======================================== */
.health-tip-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #F0F0F0;
}

.health-tip-item:last-child {
    border-bottom: none;
}

/* 생활 습관 */
.lifestyle-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #F0F0F0;
}

.lifestyle-item:last-child {
    border-bottom: none;
}

.lifestyle-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.lifestyle-content {
    flex: 1;
}

.lifestyle-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.lifestyle-desc {
    font-size: 14px;
    color: #666;
}

/* ========================================
   EXERCISE PLAN (운동 계획)
   ======================================== */
.program-focus {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: linear-gradient(135deg, #319C80 0%, #28816c 100%);
    border-radius: 12px;
    color: #fff;
    margin-bottom: 16px;
}

.focus-label {
    font-size: 14px;
    opacity: 0.9;
}

.focus-value {
    font-size: 18px;
    font-weight: 700;
}

.program-detail {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.program-item {
    flex: 1;
    padding: 16px;
    background: #F8F9FA;
    border-radius: 10px;
    text-align: center;
}

.program-type {
    display: block;
    font-size: 13px;
    color: #888;
    margin-bottom: 4px;
}

.program-duration {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.recommended-exercises {
    padding: 16px;
    background: #FAFAFA;
    border-radius: 10px;
}

.exercises-label {
    display: block;
    font-size: 13px;
    color: #888;
    margin-bottom: 10px;
}

.exercises-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.exercise-tag {
    display: inline-block;
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #E8E8E8;
    border-radius: 20px;
    font-size: 13px;
    color: #333;
}

/* 주간 운동 계획 */
.weekly-schedule {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.day-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #F8F9FA;
    border-radius: 8px;
    gap: 12px;
}

.day-item.rest {
    background: #FFF8E1;
}

.day-name {
    width: 30px;
    font-size: 14px;
    font-weight: 700;
    color: #319C80;
}

.day-item.rest .day-name {
    color: #F9A825;
}

.day-activity {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.day-duration {
    font-size: 13px;
    color: #888;
}

/* 주의사항 */
.caution-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #F0F0F0;
}

.caution-item:last-child {
    border-bottom: none;
}

.caution-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.caution-text {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* ========================================
   DIET GUIDE (식단 가이드)
   ======================================== */
.diet-type {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: linear-gradient(135deg, #319C80 0%, #28816c 100%);
    border-radius: 12px;
    color: #fff;
    margin-bottom: 16px;
}

.diet-type-label {
    font-size: 14px;
    opacity: 0.9;
}

.diet-type-value {
    font-size: 16px;
    font-weight: 700;
}

.meal-list {
    margin-bottom: 12px;
}

.meal-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #F0F0F0;
    gap: 12px;
}

.meal-item:last-child {
    border-bottom: none;
}

.meal-time {
    width: 70px;
    font-size: 13px;
    font-weight: 600;
    color: #319C80;
    flex-shrink: 0;
}

.meal-menu {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.meal-kcal {
    font-size: 13px;
    color: #888;
    flex-shrink: 0;
}

.diet-total {
    display: flex;
    justify-content: space-between;
    padding: 14px 16px;
    background: #F8F9FA;
    border-radius: 8px;
    font-weight: 600;
}

/* 영양소 비율 */
.nutrient-bars {
    margin-bottom: 12px;
}

.nutrient-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.nutrient-item:last-child {
    margin-bottom: 0;
}

.nutrient-label {
    width: 70px;
    font-size: 14px;
    color: #666;
    flex-shrink: 0;
}

.nutrient-bar {
    flex: 1;
    height: 12px;
    background: #E8E8E8;
    border-radius: 6px;
    overflow: hidden;
}

.nutrient-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.3s ease;
}

.nutrient-fill.carb {
    background: #F9A825;
}

.nutrient-fill.protein {
    background: #E74C3C;
}

.nutrient-fill.fat {
    background: #1976D2;
}

.nutrient-percent {
    width: 40px;
    text-align: right;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    flex-shrink: 0;
}

.nutrient-note {
    font-size: 12px;
    color: #888;
    text-align: center;
    margin-top: 8px;
}

/* 식단 팁 */
.diet-tip-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 0;
    border-bottom: 1px solid #F0F0F0;
}

.diet-tip-item:last-child {
    border-bottom: none;
}

.tip-bullet {
    color: #319C80;
    font-weight: 700;
    flex-shrink: 0;
}

.tip-text {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .result-sub-tabs-wrapper {
        padding: 0 16px;
        margin-bottom: 20px;
    }

    .result-sub-tab {
        padding: 8px 12px;
        font-size: 13px;
    }

    .body-fat-value {
        font-size: 40px;
    }

    .weight-range-display {
        flex-direction: column;
        gap: 10px;
    }

    .weight-range-item {
        padding: 12px;
    }

    .current-vs-ideal {
        flex-direction: column;
        gap: 12px;
    }

    .goal-amount {
        font-size: 28px;
    }

    .disease-item {
        flex-wrap: wrap;
    }

    .disease-name {
        width: 100%;
        margin-bottom: 6px;
    }

    .disease-risk-bar {
        order: 1;
    }

    .disease-risk-label {
        order: 2;
        width: auto;
    }

    .program-detail {
        flex-direction: column;
    }

    .meal-item {
        flex-wrap: wrap;
    }

    .meal-time {
        width: 100%;
        margin-bottom: 4px;
    }

    .meal-menu {
        flex: none;
        width: calc(100% - 80px);
    }
}

@media (max-width: 480px) {
    .result-sub-tab {
        padding: 8px 10px;
        font-size: 12px;
    }

    .body-fat-value {
        font-size: 36px;
    }

    .calorie-value {
        font-size: 16px;
    }

    .activity-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .goal-calorie-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .day-item {
        flex-wrap: wrap;
    }

    .day-activity {
        flex: none;
        width: calc(100% - 42px);
    }

    .day-duration {
        width: 100%;
        text-align: right;
    }
}
