/* html, body의 높이를 100%로 설정하여 브라우저 화면 전체를 사용 */
html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    /* 스크롤바 방지  */
}

/* [헤더] - [지도] - [푸터] 순서로 수직 배치 */
body {
    display: flex;
    flex-direction: column;
    /* 세로 방향 정렬 */
    font-family: 'Noto Sans KR', sans-serif;
}

.main-header,
.main-footer {
    flex: 0 0 auto;
    /* 크기 고정 */
    z-index: 100;
    /* 지도보다 위에 표시되도록 순서 상향 조정 */
    background: white;
}

/* 지도 section */
.map-section {
    flex: 1;
    /* 남은 공간 자동 채움 */
    position: relative;
    /* 자식의 기준점 */
    width: 100%;
    overflow: hidden;
    display: flex;
    /* 지도 꽉 채우기 위해 flex 선언 */
}

.map-filter-box {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 50;
    /* 지도보다 위에 표시 */
    background: white;
    padding: 8px 12px;
    border-radius: 20px;
    /* 둥근 알약 모양 버튼 */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    /* 그림자로 입체감 부여 */
    display: flex;
    align-items: center;
}

.map-filter-box label {
    font-size: 0.9rem;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    margin: 0;
}


.map-placeholder,
#map_placeholder {
    flex: 1;
    width: 100%;
    height: 100%;
    position: relative;
}

/* map 크기 강제 적용 */
#map {
    width: 100%;
    height: 100% !important;
}


/* container 수직 중앙 정렬 */
.container {
    width: 100%;
    padding: 0 15px;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 헤더 스타일 */
.main-header {
    border-bottom: 1px solid #eee;
    padding: 10px 0;
}

.logo img {
    height: 35px;
    vertical-align: middle;
}

.search-bar {
    display: flex;
    flex-grow: 1;
    margin: 0 10px;
    max-width: 400px;
}

.search-bar input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
}

.search-bar button {
    background: #5cb85c;
    color: white;
    border: none;
    padding: 0 15px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

/* 헤더 우측 버튼 그룹 */
.header-right {
    display: flex;
    gap: 5px;
    /* 버튼 사이 간격 */
}

/* 버튼 공통 스타일 */
.btn-header {
    padding: 8px 12px;
    border-radius: 4px;
    border: none;
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    cursor: pointer;
}

/* 버튼 색상별 스타일 */
.btn-header.login {
    background: #007bff;
}

.btn-header.logout-mode {
    background: #6c757d;
}

.btn-header.menu-icon {
    background: #6c757d;
}

/* footer */
.main-footer {
    background: #343a40;
    color: #fff;
    padding: 8px 0;
}

.main-footer .container {
    justify-content: space-around;
}

.footer-btn {
    background: none;
    border: none;
    color: #ccc;
    display: flex;
    flex-direction: column;
    /* 아이콘 위, 텍스트 아래 */
    align-items: center;
    font-size: 0.75rem;
    cursor: pointer;
    text-decoration: none;
}

/* 이미지 색상 반전*/
.footer-btn img {
    height: 24px;
    margin-bottom: 2px;
    filter: invert(1);
    /* 검은색 아이콘을 흰색으로 변경 */
}

.footer-btn:hover {
    color: white;
}

/* dropdown menu */
.main-nav {
    display: none;
    position: absolute;
    top: 60px;
    right: 10px;
    background: white;
    border: 1px solid #ddd;
    width: 150px;
    z-index: 2000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.main-nav.show {
    display: block;
}

.main-nav a {
    display: block;
    padding: 10px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
}

/* 검색어 입력 자동완성 스타일 */
.search-results {
    display: none;
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    /* 가로 중앙 정렬 */
    width: 90%;
    max-width: 400px;
    background: white;
    border: 1px solid #ddd;
    max-height: 200px;
    overflow-y: auto;
    /* 내용 많으면 스크롤 */
    z-index: 3000;
    list-style: none;
    padding: 0;
}

.search-results.show {
    display: block;
}

.search-results li {
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

/* 반응형 웹 */
@media (max-width: 768px) {
    .search-bar {
        display: none;
    }

    .logo img {
        height: 30px;
    }
}