/* --- 기본 스타일 --- */
#yodot-planner-app {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #ffffff;
    max-width: 480px;
    margin: 0 auto;
    border: 1px solid #e0e0e0;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
    min-height: 600px;
}
.screen { display: none; width: 100%; background-color: #ffffff; padding-bottom: 20px; }
.screen.active { display: block; animation: fadeIn 0.3s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.yodot-planner-header { 
    display: flex; justify-content: space-between; align-items: center; 
    padding: 15px; border-bottom: 1px solid #f0f0f0; background: #fff; 
    position: sticky; top: 0; z-index: 10;
}
.yodot-planner-header .title { font-size: 16px; font-weight: 700; color: #333; }
.yodot-planner-header .btn-close { font-size: 14px; color: #555; cursor: pointer; }
.yodot-planner-header .btn-complete { color: #007bff; font-weight: 600; cursor: pointer; }
.yodot-planner-header .btn-complete.disabled { color: #ccc; cursor: not-allowed; }

.content { padding: 20px; }
.input-group { margin-bottom: 25px; }
.input-group label { display: block; font-size: 13px; font-weight: 600; color: #666; margin-bottom: 8px; }
.input-field, .btn-select { width: 100%; padding: 12px; font-size: 15px; border: 1px solid #ddd; border-radius: 6px; box-sizing: border-box; background-color: #fff; }
.btn-select { text-align: left; color: #333; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.btn-select::after { content: '›'; font-size: 20px; color: #999; line-height: 1; }

/* --- 지역 선택 스타일 --- */
.region-category { 
    padding: 15px 20px; 
    font-size: 16px; 
    font-weight: 600; 
    border-bottom: 1px solid #f0f0f0; 
    cursor: pointer; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    background: #fff;
}
.region-category:after { content: '+'; font-size: 18px; color: #aaa; }
.region-category.open:after { content: '−'; }

.region-submenu { display: none; background-color: #f9f9f9; }
.region-submenu.open { display: block; }

.region-item { 
    padding: 12px 20px 12px 30px; 
    font-size: 15px; 
    border-bottom: 1px solid #f0f0f0; 
    cursor: pointer; 
    color: #555;
}
.region-item:hover { background-color: #eee; color: #000; }

/* --- 캘린더 스타일 (네비게이션 추가됨) --- */
.calendar-nav-container {
    display: flex; justify-content: space-between; align-items: center;
    background: #f8f9fa; padding: 10px; border-radius: 6px; margin-bottom: 15px;
}
.calendar-nav-btn {
    background: none; border: 1px solid #ddd; border-radius: 4px;
    padding: 5px 12px; cursor: pointer; font-size: 14px; background: #fff;
}
.calendar-nav-btn:hover { background: #eee; }
.calendar-display { font-weight: bold; font-size: 15px; }

.calendar-grid table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.calendar-grid th { padding: 5px; font-size: 12px; color: #888; }
.calendar-grid td { padding: 10px 0; text-align: center; cursor: pointer; font-size: 14px; }
.calendar-grid td.selected-range { background: #e3f2fd; }
.calendar-grid td.selected-start, .calendar-grid td.selected-end { background: #007bff; color: white; border-radius: 50%; font-weight: bold; }
.calendar-month-label { text-align: left; padding: 10px 5px; font-weight: bold; font-size: 15px; color: #333; border-bottom: 1px solid #eee; margin-bottom: 5px; }

/* 선택 불가능한 날짜 스타일 */
.calendar-grid td.disabled {
    color: #ddd;
    background-color: #fafafa;
    cursor: not-allowed;
    pointer-events: none;
    text-decoration: line-through;
}

/* --- 장소 리스트 --- */
.tab-nav { display: flex; border-bottom: 1px solid #ddd; margin-bottom: 10px; }
.tab-nav .tab-item { flex: 1; text-align: center; padding: 10px; cursor: pointer; border-bottom: 2px solid transparent; color: #888; }
.tab-nav .tab-item.active { color: #007bff; border-bottom-color: #007bff; font-weight: bold; }
.tab-content { display: none; }
.tab-content.active { display: block; }

.place-item { display: flex; align-items: center; padding: 15px 0; border-bottom: 1px solid #eee; }
.place-item input { margin-right: 15px; width: 20px; height: 20px; cursor: pointer; }
.place-item .info .name { font-weight: bold; font-size: 15px; }
.place-item .info .address { font-size: 13px; color: #888; margin-top: 3px; }

/* --- 일정 편집 화면 --- */
.itinerary-day { margin-bottom: 30px; border: 1px solid #eee; border-radius: 8px; overflow: hidden; }
.itinerary-day .day-header { background: #f8f9fa; padding: 12px 15px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #eee; }
.itinerary-day .day-title { font-weight: bold; font-size: 15px; }
.itinerary-day .btn-add-place { font-size: 13px; color: #007bff; cursor: pointer; font-weight: 600; }
.day-places-list { padding: 10px; min-height: 50px; background: #fff; }
.place-item-added { background: #fff; border: 1px solid #eee; padding: 10px; margin-bottom: 8px; border-radius: 6px; display: flex; justify-content: space-between; align-items: center; }
.place-item-added .name { font-weight: bold; font-size: 14px; }
.place-item-added .address { font-size: 12px; color: #888; }
.place-item-added .btn-menu { cursor: pointer; color: #ff4b4b; padding: 5px; }

/* --- 내 일정 목록 & 지도 --- */
.my-itineraries-list { max-width: 800px; margin: 0 auto; padding: 20px; }
.itinerary-item { background: #fff; border: 1px solid #ddd; border-radius: 8px; padding: 20px; margin-bottom: 20px; }
.itinerary-item h4 { margin: 0 0 10px 0; font-size: 20px; }
.itinerary-item-dates { color: #666; font-size: 14px; margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px solid #eee; }
.itinerary-day-details { margin-bottom: 15px; }
.itinerary-day-title { display: block; margin-bottom: 5px; color: #007bff; font-weight: 600; }
.itinerary-place-list { list-style: none; padding-left: 10px; margin: 0; }
.itinerary-place-list li { margin-bottom: 8px; font-size: 15px; position: relative; padding-left: 15px; }
.itinerary-place-list li:before { content: '•'; position: absolute; left: 0; color: #ccc; }
.itinerary-map-link { font-size: 12px; margin-left: 8px; color: #007bff; text-decoration: none; cursor: pointer; font-weight: bold; }
.itinerary-place-memo { font-size: 13px; color: #666; background: #fff3cd; padding: 2px 6px; border-radius: 4px; display: inline-block; margin-top: 4px; }

/* --- 지도 모달 CSS --- */
.yodot-modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 99999; }
.yodot-modal-content { position: relative; width: 90%; max-width: 600px; margin: 50px auto; background: #fff; border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.3); }
.yodot-modal-content h3 { padding: 15px; margin: 0; border-bottom: 1px solid #eee; }
.yodot-modal-close { position: absolute; top: 10px; right: 15px; font-size: 24px; cursor: pointer; }
.yodot-map-container { padding: 15px; }

/* [변경] 카카오맵용 ID (yodot_planner.php 및 yodot-map.php와 일치) */
#yodot-kakao-map { width: 100%; height: 400px; background-color: #f0f0f0; border-radius: 4px; }

/* --- 맵 UI --- */
.yodot-map-wrapper { position: relative; width: 100%; height: 500px; background: #eee; }
#yodot-full-map { width: 100%; height: 100%; }
.map-top-bar { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 100; }
.search-box { background: #fff; padding: 10px; border-radius: 4px; display: flex; align-items: center; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.search-box input { border: none; flex: 1; margin-left: 10px; outline: none; }
.refresh-btn { position: absolute; bottom: 80px; left: 50%; transform: translateX(-50%); z-index: 100; padding: 10px 20px; border-radius: 20px; border: none; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,0.2); cursor: pointer; display: flex; gap: 5px; align-items: center; font-weight: 600; color: #333; }
.filter-heart-btn { position: absolute; bottom: 80px; right: 20px; width: 40px; height: 40px; background: #fff; border-radius: 50%; box-shadow: 0 2px 5px rgba(0,0,0,0.2); z-index: 100; display: flex; justify-content: center; align-items: center; cursor: pointer; color: #ccc; font-size: 18px; }
.filter-heart-btn.active { color: #ff4b4b; }

.bottom-sheet { position: absolute; bottom: 0; left: 0; right: 0; background: #fff; border-radius: 20px 20px 0 0; transform: translateY(100%); transition: 0.3s; z-index: 200; box-shadow: 0 -2px 10px rgba(0,0,0,0.1); }
.bottom-sheet.open { transform: translateY(0); }
.sheet-handle-area { padding: 10px; text-align: center; cursor: pointer; }
.sheet-handle-bar { width: 40px; height: 4px; background: #ccc; border-radius: 2px; display: inline-block; }
.sheet-content { padding: 20px; }
.sheet-place-img { height: 150px; background-size: cover; background-position: center; border-radius: 8px; margin-bottom: 10px; background-color: #eee; }
.sheet-place-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.sheet-place-title { font-size: 18px; font-weight: bold; }
.btn-like-toggle { background: none; border: none; cursor: pointer; font-size: 20px; color: #ccc; }
.btn-like-toggle.liked { color: #ff4b4b; }
.sheet-place-addr { font-size: 13px; color: #666; }