/* style.css */

/* 카드 리스트 스타일 */
#recommendationList {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 10px 20px 30px 20px; /* 하단 패딩을 줘서 바닥에서 띄움 */
    width: 100%;
    box-sizing: border-box;
    pointer-events: auto;
}

#recommendationList::-webkit-scrollbar { display: none; }

.place-card {
    flex: 0 0 280px; 
    background: white;
    border-radius: 15px;
    padding: 20px; 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 10px; 
    box-sizing: border-box;
    cursor: pointer;
    transition: transform 0.2s;

    /* 하이라이트(텍스트 선택) 방지 속성 */
    -webkit-user-select: none; /* 크롬, 사파리 */
    -moz-user-select: none;    /* 파이어폭스 */
    -ms-user-select: none;     /* IE/Edge */
    user-select: none;         /* 표준 */
}
.place-card:hover {
    transform: translateY(-5px); /* 호버 시 살짝 들리는 효과 */
}

/* 카드 내부 텍스트 스타일 복구 */
.place-card h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #111;
    pointer-events: none; /* 텍스트 클릭 방해 금지 */
}

.place-card p {
    margin: 0;
    font-size: 0.95rem;
    color: #555;
    pointer-events: none;
}

/* 카드 내 버튼 스타일 (검색 버튼과 통일) */
.place-card .detail-btn {
    margin-top: 5px;
    padding: 8px 16px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
    align-self: flex-start;
    transition: all 0.2s;
}

.place-card .detail-btn:hover {
    background-color: #4A7DFF;
    color: white;
    border-color: #4A7DFF;
}

/* 상세 정보 패널 (바텀 시트) */
.detail-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50vh;
    background: #ffffff;
    z-index: 2000; /* 모든 요소보다 위에 배치 */
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: 0 -5px 25px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1); /* 부드러운 애니메이션 */
    pointer-events: auto;
    visibility: visible;
}

.detail-panel.hidden {
    transform: translateY(100%);
    visibility: hidden; /* 숨겨졌을 때 요소가 튀어나오지 않도록 방지 */
}

.drag-handle {
    width: 40px;
    height: 4px;
    background-color: #ddd;
    border-radius: 2px;
    margin: 12px auto;
    flex-shrink: 0;
}

/* 헤더: 제목과 X 버튼이 한 줄에 나오도록 강제 */
.detail-header {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    border-bottom: 1px solid #eee;
    width: 100%;
    min-height: 60px; /* 높이 확보 */
    box-sizing: border-box;
}

/* 제목: 검은색 강제 및 줄바꿈 방지 */
#detailTitle {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #111 !important;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 닫기 버튼: 검은색 및 크기 조정 */
#closeDetailBtn {
    background: none !important;
    border: none !important;
    font-size: 2.2rem;
    color: #333 !important;
    cursor: pointer;
    line-height: 1;
    padding: 0 10px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    color: #444;
}

.search-container {
    background: rgba(255, 255, 255, 0.95); /* 흰색 배경 (약간 투명) */
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15); /* 그림자 추가 */
    max-width: 350px; /* 너무 넓어지지 않게 고정 */
    width: 100%;
    box-sizing: border-box;
}

.search-container h2 {
    margin-top: 0;
    font-size: 1.4rem;
    color: #111;
}

.search-container p {
    color: #666;
    margin-bottom: 15px;
}

/* 입력 요소들 간격 조절 */
.search-container select, 
.search-container button {
    width: 100%;
    padding: 10px;
    margin-top: 8px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
}

/* 추천받기 버튼 강조 */
#recommendBtn {
    background-color: #4A7DFF;
    color: white;
    border: none;
    font-weight: bold;
    cursor: pointer;
    margin-top: 15px;
    transition: background 0.2s;
}

#recommendBtn:hover {
    background-color: #3563E9;
}

.hidden {
    display: none !important;
}

/* 수동 검색창(input) 스타일 - 추천 섹션의 select와 통일 */
#manualLocationInput {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
    outline: none;
}

#manualLocationInput:focus {
    border-color: #4A7DFF;
}

/* 수동 검색 버튼 스타일 - 추천받기 버튼과 통일 */
#manualLocationApplyBtn {
    width: 100%;
    padding: 12px;
    margin-top: 15px;
    background-color: #4A7DFF; /* 두 번째 이미지의 파란색 */
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

#manualLocationApplyBtn:hover {
    background-color: #3563E9;
}

/* 수동 입력 영역 간격 조절 */
.manual-location {
    display: flex;
    flex-direction: column;
}
/* 상세 패널 내부 스타일 보완 */

/* 1. 탭 콘텐츠 제어: active 클래스가 없으면 숨김 */
.tab-content {
    display: none; 
    padding: 15px 0;
    font-size: 0.95rem;
    color: #444;
}

.tab-content.active {
    display: block; /* active 클래스가 붙은 탭만 표시 */
}

/* 2. 액션 버튼 그리드 (길찾기, 저장 등) */
.action-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 15px 0;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border: none;
    background-color: #f0f2f5;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.action-btn:hover {
    background-color: #e4e6e9;
    transform: translateY(-2px);
}

.action-btn span {
    font-size: 0.8rem;
    font-weight: 600;
    color: #333;
}

/* 3. 탭 버튼 스타일 */
.detail-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid #eee;
    margin-top: 10px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.9rem;
    color: #888;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.tab-btn.active {
    color: #4A7DFF;
    font-weight: bold;
    border-bottom: 2px solid #4A7DFF;
}

/* 상세 정보 텍스트 정렬 */
.detail-body p {
    margin: 8px 0;
    line-height: 1.4;
}