/* 여행 계획 페이지 스타일 */

/* 헤더 컨테이너 */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: relative;
    padding: 20px 0;
}

.header-left {
    flex: 1;
    text-align: center;
}

.header-right {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.back-btn {
    background: linear-gradient(45deg, #74b9ff, #0984e3);
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    font-size: 0.9rem;
    white-space: nowrap;
}

.back-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* 플래너 컨테이너 */
.planner-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 플래너 폼 */
.planner-form {
    background: white;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.planner-form h3 {
    color: #0984e3;
    margin-bottom: 20px;
    font-size: 1.4rem;
    text-align: center;
}

.form-group {
    margin-bottom: 18px;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2d3436;
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #74b9ff;
}

/* 여행지 선택 영역 */
.destinations-section {
    background: white;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.destinations-section h3 {
    color: #00b894;
    margin-bottom: 20px;
    font-size: 1.4rem;
    text-align: center;
}

.favorites-list {
    max-height: 250px;
    overflow-y: auto;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 15px;
    border: 2px solid #e9ecef;
}

.favorite-checkbox-item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background: white;
    border-radius: 10px;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.favorite-checkbox-item:hover {
    border-color: #74b9ff;
    box-shadow: 0 2px 8px rgba(116, 185, 255, 0.2);
}

.favorite-checkbox-item input[type="checkbox"] {
    margin-right: 15px;
    transform: scale(1.2);
    accent-color: #74b9ff;
}

.favorite-checkbox-item .location-info {
    flex: 1;
}

.favorite-checkbox-item .location-name {
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 5px;
    font-size: 1rem;
}

.favorite-checkbox-item .location-description {
    color: #636e72;
    font-size: 0.85rem;
}

.favorite-checkbox-item .drag-handle {
    cursor: move;
    color: #b2bec3;
    font-size: 1.2rem;
    margin-left: 15px;
}

/* 일정 상세 설정 */
.schedule-section {
    background: white;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.schedule-section h3 {
    color: #fd79a8;
    margin-bottom: 20px;
    font-size: 1.4rem;
    text-align: center;
}

.schedule-container {
    display: grid;
    gap: 18px;
}

.schedule-day {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    border: 2px solid #e9ecef;
}

.schedule-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid #dee2e6;
}

.schedule-day-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3436;
}

.schedule-day-date {
    color: #636e72;
    font-size: 0.85rem;
}

.schedule-item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background: white;
    border-radius: 10px;
    border: 1px solid #dee2e6;
}

.schedule-item-number {
    background: #74b9ff;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-right: 15px;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.schedule-item-info {
    flex: 1;
}

.schedule-item-name {
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 5px;
    font-size: 1rem;
}

.schedule-item-description {
    color: #636e72;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.schedule-item-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.schedule-item-controls input,
.schedule-item-controls select {
    padding: 8px 10px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.85rem;
}

.schedule-item-controls input[type="time"] {
    width: 110px;
}

.schedule-item-controls select {
    width: 90px;
}

/* 지도 영역 */
.map-section {
    background: white;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.map-section h3 {
    color: #fdcb6e;
    margin-bottom: 20px;
    font-size: 1.4rem;
    text-align: center;
}

.map-container {
    border-radius: 15px;
    overflow: hidden;
}

#plannerMap {
    border-radius: 15px !important;
}

/* 액션 버튼들 */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.action-buttons .btn {
    min-width: 140px;
    padding: 12px 20px;
    font-size: 0.9rem;
}

/* 모달 스타일 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px 15px 25px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    color: #0984e3;
    margin: 0;
    font-size: 1.4rem;
}

.close-modal-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-modal-btn:hover {
    background: #f0f0f0;
    color: #666;
}

.modal-body {
    padding: 15px 25px 25px 25px;
}

.saved-plans-list {
    display: grid;
    gap: 12px;
}

.saved-plan-item {
    background: #f8f9fa;
    padding: 18px;
    border-radius: 15px;
    border: 1px solid #dee2e6;
    cursor: pointer;
    transition: all 0.3s ease;
}

.saved-plan-item:hover {
    border-color: #74b9ff;
    background: #f0f8ff;
}

.saved-plan-title {
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 8px;
    font-size: 1rem;
}

.saved-plan-details {
    color: #636e72;
    font-size: 0.85rem;
}

/* 드래그 앤 드롭 스타일 */
.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.drag-over {
    border-color: #74b9ff;
    background: #f0f8ff;
}

/* 체크된 항목 스타일 */
.favorite-checkbox-item.checked {
    background: #e8f5e8;
    border-color: #00b894;
}

.favorite-checkbox-item.checked .location-name {
    color: #00b894;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .planner-container {
        padding: 15px;
    }
    
    .header-container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 15px 0;
    }
    
    .header-right {
        position: static;
        transform: none;
        margin-top: 10px;
    }
    
    .back-btn {
        padding: 10px 18px;
        font-size: 0.85rem;
    }
    
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .action-buttons .btn {
        width: 100%;
        max-width: 280px;
        min-width: auto;
    }
    
    .schedule-item-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .schedule-item-controls input,
    .schedule-item-controls select {
        width: 100%;
    }
    
    .schedule-item-controls input[type="time"] {
        width: 100%;
    }
    
    .schedule-item-controls select {
        width: 100%;
    }
    
    .favorites-list {
        max-height: 200px;
        padding: 12px;
    }
    
    .favorite-checkbox-item {
        padding: 12px;
        margin-bottom: 8px;
    }
    
    .favorite-checkbox-item .location-name {
        font-size: 0.95rem;
    }
    
    .favorite-checkbox-item .location-description {
        font-size: 0.8rem;
    }
    
    .schedule-day {
        padding: 15px;
    }
    
    .schedule-day-header {
        margin-bottom: 15px;
        padding-bottom: 10px;
    }
    
    .schedule-day-title {
        font-size: 1.1rem;
    }
    
    .schedule-day-date {
        font-size: 0.8rem;
    }
    
    .schedule-item {
        padding: 12px;
        margin-bottom: 8px;
    }
    
    .schedule-item-number {
        width: 26px;
        height: 26px;
        font-size: 0.85rem;
        margin-right: 12px;
    }
    
    .schedule-item-name {
        font-size: 0.95rem;
    }
    
    .schedule-item-description {
        font-size: 0.8rem;
    }
    
    .planner-form,
    .destinations-section,
    .schedule-section,
    .map-section {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .planner-form h3,
    .destinations-section h3,
    .schedule-section h3,
    .map-section h3 {
        font-size: 1.3rem;
        margin-bottom: 18px;
    }
}

@media (max-width: 480px) {
    .planner-container {
        padding: 10px;
    }
    
    .planner-form,
    .destinations-section,
    .schedule-section,
    .map-section {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .header-container {
        padding: 10px 0;
    }
    
    .back-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
    
    .favorites-list {
        max-height: 180px;
        padding: 10px;
    }
    
    .favorite-checkbox-item {
        padding: 10px;
        margin-bottom: 6px;
    }
    
    .schedule-day {
        padding: 12px;
    }
    
    .schedule-item {
        padding: 10px;
        margin-bottom: 6px;
    }
    
    .schedule-item-number {
        width: 24px;
        height: 24px;
        font-size: 0.8rem;
        margin-right: 10px;
    }
    
    .action-buttons .btn {
        max-width: 250px;
        padding: 10px 16px;
        font-size: 0.85rem;
    }
}

/* 숨김 클래스 */
.hidden {
    display: none !important;
}

/* 지도 인포윈도우 스타일 개선 */
.kakao-map-info-window {
    font-family: 'Noto Sans KR', sans-serif !important;
}

/* 인포윈도우 내부 텍스트 스타일 */
.kakao-map-info-window .info-window-content {
    padding: 8px 12px !important;
    text-align: center !important;
    min-width: 80px !important;
    max-width: 120px !important;
    word-break: keep-all !important;
    white-space: nowrap !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
}

.kakao-map-info-window .info-window-number {
    display: block !important;
    margin-bottom: 4px !important;
    font-size: 14px !important;
    font-weight: bold !important;
    color: #333 !important;
}

.kakao-map-info-window .info-window-city {
    display: inline-block !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    color: #666 !important;
    font-size: 11px !important;
}
