/* --- plan.html 전용 스타일 --- */

/* --- 앱 섹션 스타일 --- */
.apps-categories { margin-bottom: 2em; }
.app-category { margin-bottom: 1.8em; }
.app-category h4 {
    font-size: 1.1em;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 0.8em;
    padding-bottom: 0.3em;
    border-bottom: 1px solid var(--border-light-color);
    display: flex;
    align-items: center;
}
.app-category h4 i {
    margin-right: 8px;
    color: var(--text-light-color);
    width: 1.2em;
    text-align: center;
}
.apps-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 15px;
    justify-items: center;
}
.app-item-link { /* 링크 스타일 */
    text-decoration: none;
    color: inherit;
    display: block;
}
.app-item-link:hover .app-name {
    color: var(--hover-accent-color);
}
.app-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}
.app-icon {
    font-size: 2.5em;
    margin-bottom: 6px;
    width: 50px;
    height: 50px;
    line-height: 50px;
    border-radius: 10px;
    color: #fff;
    background-color: var(--primary-color); /* 기본 아이콘 배경 */
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}
/* 앱 아이콘 색상 (필요 시 조정) */
.cat-map .app-icon { background-color: #34A853; }
.cat-payment .app-icon { background-color: #1A73E8; }
.cat-translate .app-icon { background-color: #6c757d; }
.cat-review .app-icon { background-color: #FF8C00; }
.cat-taxi .app-icon { background-color: #fbbc05; }
.cat-subway .app-icon { background-color: #dc3545; }
.cat-vpn .app-icon { background-color: #4285F4; }
.app-name {
    font-size: 0.8em;
    font-weight: 400;
    color: var(--text-color);
    line-height: 1.3;
    word-break: keep-all; /* 단어 단위 줄바꿈 */
}

/* --- 회화 학습 테이블 스타일 --- */
.phrase-table {
    /* 기본 테이블 스타일 상속 */
    table-layout: fixed; /* 컬럼 너비 고정 */
    width: 100%;
}
.phrase-table th:nth-child(1), .phrase-table td:nth-child(1) { width: 25%; } /* 한국어 */
.phrase-table th:nth-child(2), .phrase-table td:nth-child(2) { width: 30%; } /* 중국어 */
.phrase-table th:nth-child(3), .phrase-table td:nth-child(3) { width: 25%; } /* Pinyin */
.phrase-table th:nth-child(4), .phrase-table td:nth-child(4) { width: 20%; } /* 한글 음차 */
.chinese-phrase { /* 중국어 셀 클릭 가능 표시 */
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.chinese-phrase:hover {
    background-color: #fff8e1; /* 연한 노란색 배경 */
    color: var(--primary-color);
}

/* --- 예산 섹션 스타일 --- */
.budget-subsections-container { /* 예산 하위 섹션 묶음 */
    margin-top: 1em;
}
.cost-section { /* 각 비용 항목 그룹 */
    margin-bottom: 1em;
}
/* 고정 비용 */
.fixed-costs .cost-item {
    display: flex;
    align-items: center;
    margin-bottom: 1em;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 6px;
}
.fixed-costs .icon-fixed {
    color: var(--text-light-color);
    font-size: 1.8em;
    width: 2em;
    text-align: center;
    margin-right: 15px;
    flex-shrink: 0;
}
.fixed-costs .cost-details {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.fixed-costs .cost-details strong {
    font-weight: 500;
    margin-bottom: 2px;
}
.fixed-costs .cost-details span {
    font-size: 0.9em;
    color: var(--text-light-color);
    line-height: 1.4;
}
.fixed-costs .cost-details a { /* 숙소 정보 링크 */
    color: var(--primary-color);
    text-decoration: underline;
}
.fixed-costs .cost-tip {
    font-size: 0.85em;
    color: var(--text-light-color);
    padding: 8px 12px;
    background-color: #f0f0f0;
    border-radius: 4px;
    margin-top: 0.5em;
    line-height: 1.5;
}
.fixed-costs .cost-tip i { margin-right: 5px; width: auto; }

/* 변동 비용 테이블 */
.budget-table {
    /* 기본 테이블 스타일 상속 */
    width: 100%;
    border-collapse: separate; /* 셀 간 간격 */
    border-spacing: 0 4px;
    margin-bottom: 1em;
    font-size: 0.9em;
}
.budget-table th, .budget-table td {
    border: 1px solid var(--border-light-color);
    padding: 10px 12px;
    text-align: left;
    vertical-align: middle;
    background-color: var(--content-bg-color);
}
.budget-table th {
    background-color: #f1f3f5;
    font-weight: 500;
    border-bottom-width: 2px;
    border-color: var(--border-color);
}
.budget-table td:first-child { font-weight: 500; }
.budget-table td:first-child i {
    margin-right: 8px;
    color: var(--secondary-color);
    font-size: 1.2em;
    width: 1.3em;
    text-align: center;
    vertical-align: middle;
}
.budget-table td:last-child {
    font-weight: 500;
    color: var(--primary-color);
    text-align: right;
}
/* 테이블 모서리 둥글게 */
.budget-table tr:first-child th:first-child { border-top-left-radius: 6px; }
.budget-table tr:first-child th:last-child { border-top-right-radius: 6px; }
.budget-table tr:last-child td:first-child { border-bottom-left-radius: 6px; }
.budget-table tr:last-child td:last-child { border-bottom-right-radius: 6px; }

/* 예산 절약 팁 */
.saving-tips {
    padding: 15px;
    border: 1px dashed var(--success-color);
    border-radius: 6px;
    background-color: #f0fff4; /* 연한 녹색 배경 */
}
.saving-tips ul.check-list { margin-bottom: 0; margin-top: 0; }
.saving-tips ul.check-list li { font-weight: normal; line-height: 1.6; margin-bottom: 0.5em; }
.saving-tips ul.check-list i { color: var(--success-color); font-size: 1em; margin-right: 8px; }

/* 총 예산 예시 */
.total-budget-example {
    padding: 15px;
    border: 1px dashed var(--warning-color);
    border-radius: 6px;
    background-color: #fff9e6; /* 연한 노란색 배경 */
    display: flex;
    flex-direction: column;
}
.total-budget-example .total-amount {
    text-align: center;
    padding: 1.5em 1em;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    margin: 1em 0;
}
.total-budget-example .total-amount strong {
    display: block;
    font-size: 1em;
    color: var(--text-light-color);
    margin-bottom: 0.5em;
}
.total-budget-example .total-amount strong i { margin-right: 5px; width: auto; }
.total-budget-example .total-amount span {
    display: block;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.4em;
}
.total-budget-example .total-amount span:first-of-type { font-size: 2em; } /* TWD 금액 */
#example-budget-krw { /* KRW 금액 */
    font-size: 1.2em;
    color: var(--text-light-color);
}
.total-budget-example .total-amount small {
    font-size: 0.9em;
    color: var(--text-light-color);
}

/* 사용자 예산 입력 테이블 */
.user-budget-table {
    /* 기본 테이블 스타일 상속 */
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1em;
    font-size: 0.95em;
}
.user-budget-table th, .user-budget-table td {
    border: 1px solid var(--table-border-color);
    padding: 8px 12px;
    text-align: left;
    vertical-align: middle;
}
.user-budget-table thead th { background-color: #e9ecef; font-weight: 500; }
.user-budget-table tfoot th, .user-budget-table tfoot td {
    background-color: #f8f9fa;
    font-weight: bold;
    border-top: 2px solid var(--table-border-color);
}
.user-budget-table td:first-child i {
    margin-right: 8px;
    color: var(--secondary-color);
    width: 1.3em;
    text-align: center;
}
.user-budget-table input[type="number"],
.user-budget-table input[type="text"] {
    /* 기본 입력 필드 스타일 상속 */
    font-size: inherit;
    padding: 6px 8px;
}
/* 컬럼 너비 */
.user-budget-table th:nth-child(1), .user-budget-table td:nth-child(1) { width: 30%; min-width: 120px;}
.user-budget-table th:nth-child(2), .user-budget-table td:nth-child(2) { width: 30%; min-width: 100px;}
.user-budget-table th:nth-child(3), .user-budget-table td:nth-child(3) { width: 40%; min-width: 150px;}

/* --- 일정 계획 섹션 스타일 --- */
.schedule-table {
    /* 기본 테이블 스타일 상속 */
}
/* 컬럼 정렬 */
.schedule-table th:nth-child(1), .schedule-table td:nth-child(1), /* 일차 */
.schedule-table th:nth-child(2), .schedule-table td:nth-child(2) { /* 시간대 */
    text-align: center;
    vertical-align: middle;
}
.schedule-table th:nth-child(3), .schedule-table td:nth-child(3), /* 활동 */
.schedule-table th:nth-child(4), .schedule-table td:nth-child(4) { /* 비고 */
    text-align: left;
    vertical-align: top; /* 내용 길어질 수 있으므로 상단 정렬 */
    white-space: normal; /* 자동 줄바꿈 */
}
/* 모바일에서 컬럼 너비 조정 */
@media (max-width: 767px) {
    .schedule-table td:nth-child(3), .schedule-table td:nth-child(4) { min-width: 150px; }
}

/* --- 준비물 체크리스트 테이블 스타일 --- */
.checklist-table {
    /* 기본 테이블 스타일 상속 */
}
/* 컬럼 너비 */
.checklist-table th:nth-child(1), .checklist-table td:nth-child(1) { width: 25%; vertical-align: middle; } /* 카테고리 */
.checklist-table th:nth-child(2), .checklist-table td:nth-child(2) { width: 45%; } /* 항목 */
.checklist-table th:nth-child(3), .checklist-table td:nth-child(3) { width: 30%; } /* 비고 */
/* 카테고리 클릭 가능 표시 */
.checklist-table tbody .checklist-category {
    cursor: pointer;
    user-select: none; /* 텍스트 선택 방지 */
    transition: background-color 0.2s ease;
}
.checklist-table tbody .checklist-category:hover {
    background-color: #f0f0f0;
}
/* 완료된 항목 스타일 */
.checklist-table tbody tr.prepared td {
    background-color: #d1e7dd !important; /* 연한 녹색 배경 */
    color: #0f5132; /* 어두운 녹색 텍스트 */
    text-decoration: line-through; /* 취소선 */
}
/* 완료 아이콘 (가상 요소 사용) */
.checklist-table tbody tr.prepared td.checklist-category::before {
    content: "\f00c"; /* Font Awesome 체크 아이콘 */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: var(--success-color);
    margin-right: 8px;
    font-size: 0.9em;
    text-decoration: none; /* 아이콘에는 취소선 제거 */
    display: inline-block;
}