/* CSS - trafficInfo_ 접두사 사용 */
:root {
    --trafficInfo-brand-color: #fd7e14; /* 브랜드 색상 변수 */
    --trafficInfo-accent-color: #dc3545; /* 강조 색상 (빨간색 계열) */
}

.trafficInfo_container {
    font-family: "Gowun Dodum", sans-serif;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    max-width: 800px;
    margin: 20px auto;
    background-color: #fff; /* 흰색 배경 */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* 약간의 그림자 */
    margin-top: 90px;
}

.trafficInfo_heading {
    color: var(--trafficInfo-brand-color); /* 브랜드 색상 적용 */
    border-bottom: 2px solid var(--trafficInfo-brand-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 35px; /* 제목 크기 키움 */
    text-align: center; /* 가운데 정렬 */
    font-weight: 700;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

.trafficInfo_intro {
    margin-bottom: 20px;
    line-height: 1.6;
    color: #555;
}

.trafficInfo_intro p {
    margin-bottom: 10px;
}

/* 꿀팁 아코디언 헤더 안의 제목 스타일 (아코디언으로 변경되었으므로 intro h4 대신 사용) */
.trafficInfo_tipsAccordionHeader .trafficInfo_headerTitle {
    margin: 0;
    padding: 0;
    border: none;
    font-size: 1rem;
    color: inherit;
    font-weight: bold;
    font-family: "Gowun Dodum", sans-serif;
}


/* App Usage Guide */
.trafficInfo_appGuide {
    margin-top: 30px;
    margin-bottom: 20px;
}

.trafficInfo_appGuide h3 {
    color: #333;
    border-bottom: 1px dashed #ccc;
    padding-bottom: 5px;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.trafficInfo_gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); /* 반응형 이미지 그리드 */
    gap: 10px; /* 이미지 간 간격 */
}

.trafficInfo_gallery img {
    width: 90px;
    height: 140px;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #ddd; /* 이미지 테두리 */
}

.trafficInfo_gallery img:hover {
    transform: scale(1.05); /* 호버 시 약간 확대 */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Modal for Image Popup */
.trafficInfo_modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.8); /* Black background with opacity */
    align-items: center; /* Center vertically */
    justify-content: center; /* Center horizontally */
}

.trafficInfo_modalContent {
    position: relative; /* For buttons */
    max-width: 90%; /* Max width of modal content */
    max-height: 90%; /* Max height of modal content */
    display: flex;
    flex-direction: column; /* Stack image and caption vertically */
    align-items: center;
    justify-content: center;
}

.trafficInfo_modalImage {
    max-width: 100%;
    max-height: 80vh; /* Max height based on viewport height, leave space for caption */
    display: block;
    margin: auto; /* Center image inside flex container */
}

.trafficInfo_closeBtn {
    position: absolute;
    top: -20px; /* Move slightly above */
    right: -20px; /* Move slightly right */
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    /* Style adjustments for better visibility */
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    padding: 0 10px;
    line-height: 1;
    user-select: none; /* Prevent text selection */
}

.trafficInfo_closeBtn:hover,
.trafficInfo_closeBtn:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

.trafficInfo_navBtn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 50px;
    color: #fff;
    cursor: pointer;
    transition: 0.3s;
    user-select: none; /* Prevent text selection */
    padding: 0 15px; /* Increase clickable area */
    background-color: rgba(0, 0, 0, 0.3); /* Semi-transparent background */
    border-radius: 5px;
}

.trafficInfo_navBtn:hover,
.trafficInfo_navBtn:focus {
    color: #bbb;
    background-color: rgba(0, 0, 0, 0.5);
}


.trafficInfo_prevBtn {
    left: -70px;
}

.trafficInfo_nextBtn {
    right: -70px;
}

/* Caption/Numbering below image */
.trafficInfo_caption {
    color: #fff;
    text-align: center;
    margin-top: 10px;
    font-size: 1.2rem;
}


/* Selectors Area */
.trafficInfo_selectors {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #ffca85; /* 연회색 배경 */
    border-radius: 5+px;
}

.trafficInfo_selectors label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.trafficInfo_selectors select {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
    appearance: none; /* 기본 화살표 제거 */
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.362%22%20height%3D%22292.362%22%3E%3Cpath%20fill%3D%22%23000%22%20d%3D%22M287.15%2069.372a14.617%2014.617%200%200%200-20.663%200L146.18%20189.748%2025.877%2069.372a14.617%2014.617%200%200%200-20.664%200%2014.617%2014.617%200%200%200%200%2020.663L135.85%20220.718c5.71%205.71%2014.99%205.71%2020.70%200L287.15%2090.035a14.617%2014.617%200%200%200%200-20.663z%22%2F%3E%3C%2Fsvg%3E'); /* 커스텀 화살표 (검정색) */
    background-repeat: no-repeat;
    background-position: right 10px top 50%;
    background-size: 12px auto;
    padding-right: 30px; /* 커스텀 화살표 공간 확보 */
    font-family: "Gowun Dodum", sans-serif;
}

.trafficInfo_selectors select:last-child {
    margin-bottom: 0;
}

/* Accordion Styles */
.trafficInfo_accordionHeader {
    background-color: var(--trafficInfo-brand-color); /* 브랜드 색상 적용 */
    color: white;
    cursor: pointer;
    padding: 15px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 18px;
    font-weight: 600;
    transition: background-color 0.4s ease;
    margin-top: 10px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    font-family: "Gowun Dodum", sans-serif;
}

.trafficInfo_active, .trafficInfo_accordionHeader:hover {
    background-color: #e06b11; /* 호버 시 약간 어두운 색상 */
}

/* Arrow Icon using ::after */
.trafficInfo_accordionHeader::after {
    content: '\25BC'; /* Unicode for Down Arrow */
    font-size: 1.2em;
    margin-left: 10px;
    transition: transform 0.2s ease-out;
    display: inline-block;
}

.trafficInfo_active::after {
    transform: rotate(180deg); /* Open state */
    /* content: '\25B2'; */ /* Optional: Use Up Arrow character */
}


.trafficInfo_accordionPanel {
    padding: 0 18px;
    background-color: white;
    max-height: 0; /* Start closed */
    overflow: hidden;
    transition: max-height 0.2s ease-out, padding 0.2s ease-out; /* Add padding transition */
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
}
.trafficInfo_accordionPanel.active { /* State when panel is open */
    padding: 18px; /* Add padding when open */
    /* max-height will be set by JS */
}

/* Pulse animation for tips accordion */
@keyframes trafficInfo_pulse {
    0% { box-shadow: 0 0 0 0 rgba(var(--trafficInfo-brand-color-rgb, 253, 126, 20), 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(var(--trafficInfo-brand-color-rgb, 253, 126, 20), 0); }
    100% { box-shadow: 0 0 0 0 rgba(var(--trafficInfo-brand-color-rgb, 253, 126, 20), 0); }
}

.trafficInfo_tipsAccordionHeader.trafficInfo_pulse {
    animation: trafficInfo_pulse 2s infinite; /* Apply pulse animation */
    --trafficInfo-brand-color-rgb: 253, 126, 20; /* Define RGB for RGBA */
}


/* Table Styles inside Accordion */
.trafficInfo_priceTable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    margin-bottom: 15px;
    font-size: 0.9em;
    min-width: 600px; /* 테이블 최소 너비 설정 (모바일에서 스크롤되도록) */
}

.trafficInfo_priceTable th, .trafficInfo_priceTable td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.trafficInfo_priceTable th {
    background-color: #fccbcb;
    font-weight: bold;
}

.trafficInfo_priceTable tbody tr:nth-child(even) {
    background-color: #fccbcb;
}

/* Align price columns to the right */
.trafficInfo_priceTable td:nth-child(3),
.trafficInfo_priceTable td:nth-child(4),
.trafficInfo_priceTable td:nth-child(5),
.trafficInfo_priceTable td:nth-child(6) {
    text-align: right;
    white-space: nowrap; /* Prevent wrapping of numbers + 동 */
}

/* Make table container scrollable on small screens */
.trafficInfo_accordionPanel > .trafficInfo_priceTable {
    display: block; /* Enable overflow */
    overflow-x: auto; /* Add horizontal scroll if needed */
}


.trafficInfo_results {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #007bff; /* Keep the original blue border */
    border-radius: 5px;
    background-color: #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.trafficInfo_resultsHeading {
    /* color: #007bff; <-- Remove or override */
    color: black; /* Apply brand color */
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

/* New container for side-by-side price categories */
.trafficInfo_priceSummary {
    display: flex;
    gap: 20px; /* Space between 4-seater and 6-seater sections */
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.trafficInfo_priceCategory {
    /* margin-bottom: 15px; <-- Remove or adjust for flex layout */
    /* padding-bottom: 15px; <-- Remove or adjust for flex layout */
    /* border-bottom: 1px dashed #ddd; <-- Remove or adjust for flex layout */
    flex: 1 1 45%; /* Allow flex growing/shrinking, start at 45% width */
    min-width: 250px; /* Prevent shrinking too much */
    border: 1px solid #ddd; /* Add back a border for separation */
    border-radius: 4px;
    padding: 15px; /* Add padding inside category box */
    background-color: #f8f9fa; /* Light background for category box */
}

/* Style for the last price category when NOT wrapped */
.trafficInfo_priceSummary > .trafficInfo_priceCategory:last-child {
    /* border-bottom: none; <-- Remove for horizontal layout */
    /* padding-bottom: 0; <-- Remove for horizontal layout */
    /* margin-bottom: 0; <-- Remove for horizontal layout */
}

.trafficInfo_priceCategory h4 {
    margin-top: 0;
    margin-bottom: 10px;
    /* color: #555; <-- Remove or override */
    color: black; /* Apply brand color */
    text-align: center; /* Center category title */
}

.trafficInfo_priceRow {
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
}

.trafficInfo_priceLabel {
    font-weight: bold;
    /* color: #333; <-- Remove or override */
    color: black; /* Apply brand color */
    margin-right: 15px;
}

.trafficInfo_priceValue {
    /* color: #007bff; <-- Remove or override */
    color: var(--trafficInfo-brand-color); /* Apply brand color */
    font-weight: bold;
}

.trafficInfo_noData {
    text-align: center;
    color: var(--trafficInfo-accent-color); /* 강조 색상 적용 */
    font-weight: bold;
    padding: 20px;
}

.trafficInfo_disclaimer {
    margin-top: 20px;
    font-size: 0.9em;
    color: #666;
    border-top: 1px dashed #ddd;
    padding-top: 10px;
}
.trafficInfo_disclaimer.small {
    font-size: 0.8em; /* 작은 면책 조항 */
}
.trafficInfo_priceCategory .trafficInfo_disclaimer.small {
    /* Override for small disclaimer inside price category */
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #ccc;
}


/* Mobile Responsiveness */
@media (max-width: 768px) {
    .trafficInfo_container {
        padding: 15px;
        margin: 0px auto;
        max-width: 95%; /* 모바일에서 너비 조절 */
    }

    .trafficInfo_heading {
        font-size: 1.5rem; /* 모바일 제목 크기 */
    }

    .trafficInfo_intro, .trafficInfo_disclaimer {
        font-size: 0.9em;
    }

    .trafficInfo_selectors {
        padding: 10px;
    }

    .trafficInfo_selectors select {
        padding: 8px;
        font-size: 0.9rem;
    }

    .trafficInfo_accordionHeader {
        padding: 12px 15px;
        font-size: 0.9rem;
    }

    .trafficInfo_accordionPanel {
        padding: 0 10px; /* 모바일에서 패널 좌우 패딩 줄임 */
    }
    .trafficInfo_accordionPanel.active {
        padding: 10px; /* 모바일에서 열렸을 때 패딩 */
    }

    /* Mobile layout for price categories (stack vertically) */
    .trafficInfo_priceSummary {
        flex-direction: column; /* Stack vertically on mobile */
        gap: 15px; /* Space between stacked categories */
    }

    .trafficInfo_priceCategory {
        width: 92%; /* Take full width */
        flex: none; /* Disable flex shrinking/growing */
        margin-bottom: 0; /* Remove margin-bottom for flex item gap */
        padding: 10px; /* Adjust padding */
    }
    /* Add back border for stacked categories */
    .trafficInfo_priceSummary > .trafficInfo_priceCategory:not(:last-child) {
        /*border-bottom: 1px dashed #ddd; */ /* Add back border-bottom between stacked items if needed */
        /*padding-bottom: 15px;*/
        /*margin-bottom: 15px; No, use gap*/
    }


    .trafficInfo_priceTable {
        font-size: 0.8em; /* 모바일 테이블 글자 크기 */
        min-width: auto; /* Remove min-width on mobile to avoid unnecessary scroll */
    }

    .trafficInfo_priceTable th, .trafficInfo_priceTable td {
        padding: 6px; /* 모바일 테이블 셀 패딩 */
    }

    /* Make table scrollable again on mobile if it overflows */
    .trafficInfo_accordionPanel > .trafficInfo_priceTable {
        overflow-x: auto;
    }


    .trafficInfo_results {
        padding: 10px;
    }

    .trafficInfo_resultsHeading {
        font-size: 1.1rem;
    }

    /*.trafficInfo_priceCategory { <-- Now handled by specific rules under .trafficInfo_priceSummary */
    /*    padding-bottom: 10px;*/
    /*    margin-bottom: 10px;*/
    /*}*/

    .trafficInfo_priceCategory h4 {
        font-size: 1rem;
    }

    /* Adjust modal button size/position for mobile */
    .trafficInfo_navBtn {
        font-size: 50px;
        padding: 0 10px;
    }

    .trafficInfo_prevBtn { left: -20px; }
    .trafficInfo_nextBtn { right: -20px; }

    .trafficInfo_closeBtn {
        font-size: 30px;
        top: -15px;
        right: -15px;
        padding: 0 7px;
    }
}