/* mobile.css - 모바일 전용 스타일 */

/* 768px 이하 (태블릿 세로 및 모바일) */
@media (max-width: 768px) {

    /* 기본 폰트 사이즈 증가 */
    body,
    html {
        font-size: 16px;
        /* 기본 14px -> 16px */
    }

    /* 패널 공통 */
    .panel {
        width: 95%;
        /* 화면 꽉 차게 */
        max-width: none;
        left: 2.5%;
        /* 중앙 정렬 느낌 */
    }

    .panel-header {
        height: 30px !important;
        /* 터치 영역 확대 */
    }

    .panel-header strong {
        line-height: 30px !important;
        font-size: 16px !important;
    }

    .toggle-btn {
        height: 30px !important;
        font-size: 24px !important;
        padding: 0 10px !important;
    }

    /* 길찾기 패널 */
    .route-container {
        top: 2px;
        /* 상단 여백 축소 */
    }

    .route-container input {
        height: 44px !important;
        /* 입력창 높이 확대 */
        font-size: 16px !important;
    }

    .route-container button {
        height: 44px !important;
        font-size: 14px !important;
    }

    .route-container .input-search-btn {
        height: 34px !important;
        top: 8px !important;
        font-size: 12px !important;
        padding: 0 10px !important;
    }

    /* 필터 패널 */
    .filter-container {
        top: auto;
        top: 35px;
        /* 하단으로 이동 혹은 위치 조정 필요시 */
    }

    /* 펼쳐진 상태에만 max-height와 스크롤 적용 */
    .filter-container:not(.collapsed) {
        /* 모바일에서는 필터가 너무 길 수 있으므로 접혀있거나 스크롤 처리 */
        max-height: 50vh;
        overflow-y: auto;
    }

    .filter-section label {
        font-size: 14px;
        padding: 8px 0;
        /* 터치 영역 확대 */
        display: flex;
        align-items: center;
    }

    .filter-section input[type="checkbox"] {
        transform: scale(1.5);
        /* 체크박스 확대 */
        margin-right: 10px;
    }

    /* 좌우 측면 패널 (경로 상세, 충전소 목록) */
    .container {
        flex-direction: column;
        /* 세로 배치? 지도 아래 목록? 
                                   하지만 현재 구조는 좌/우 패널임. 
                                   모바일에서는 패널이 화면을 많이 가리므로 
                                   접혔을 때 탭만 보이게 하고, 펼치면 전체 덮는게 나을 수 있음 */
    }

    /* 왼쪽 패널 (경로 상세) */
    .route-detail-container {
        position: absolute;
        /* 맵 위에 뜸 */
        top: 70px;
        left: 0;
        bottom: 0;
        width: 70%;
        /* 화면의 80% 차지 */
        max-width: 300px;
        z-index: 2000;
        border-right: 1px solid #ccc;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
    }

    .route-detail-container.collapsed {
        width: 30px;
        pointer-events: none;
        background: transparent;
        border: none;
        box-shadow: none;
    }
    
    .route-detail-container.collapsed .vertical-tab {
        pointer-events: auto;
    }

    /* 오른쪽 패널 (충전소 목록) */
    .table-container {
        position: absolute;
        /* 맵 위에 뜸 */
        top: 70px;
        right: 0;
        bottom: 0;
        width: 70%;
        /* 화면의 85% 차지 - 좀 더 넓게 */
        max-width: 300px;
        z-index: 2000;
        border-left: 1px solid #ccc;
        box-shadow: -2px 0 5px rgba(0, 0, 0, 0.3);
    }

    .table-container.collapsed {
        width: 30px;
        pointer-events: none;
        background: transparent;
        border: none;
        box-shadow: none;
    }

    .table-container.collapsed .vertical-tab {
        pointer-events: auto;
    }

    /* 테이블 스타일 조정 */
    th,
    td {
        font-size: 13px;
        /* 조금 키움 */
        padding: 8px 4px;
        /* 패딩 확대 */
    }

    /* 테이블 헤더 */
    thead th {
        height: 40px;
    }

    /* 수직 탭 (접혔을 때 여는 버튼) */
    .vertical-tab {
        padding: 10px 4px;
        font-size: 14px;
        width: 30px;
        /* 탭 넓이 확대 */
    }

    /* 리사이저 숨김 (모바일에서는 드래그 리사이징 불편) */
    .resizer {
        display: none;
    }

    .monitor-widget-container {
        left: 100px;
        top: 2px;
    }


    /* 검색 결과 독립 패널 */
    #search-result-panel {
        top: 45%;
        left: 15px;
        width: 90%;
        height: 50%;
    }

    /* 방문자 통계 */
    div[style*="fixed; bottom: 5px; left: 140px;"] {
        left: 5px !important;
        bottom: 5px !important;
        font-size: 11px !important;
        background: rgba(255, 255, 255, 0.9) !important;
        padding: 4px 8px !important;
    }
}