/* ===== rt 頁面左右布局（對齊 hsz2 / tao：.rt-layout / .rt-panel / .rt-map） ===== */
.rt-layout {
    display: flex;
    flex-direction: row;
    gap: 12px;
    padding: 12px;
    box-sizing: border-box;
    /* 高度由 panel 內容驅動,map stretch 跟著等高 */
}
.rt-panel {
    width: 35%;
    min-width: 320px;
    padding: 12px;
    background-color: #f8f8f8;
    /* 不設 overflow / height,內容多自然撐高 */
}
.rt-map {
    flex: 1;
    position: relative;
    min-height: 500px;   /* panel 內容很少時保證 map 至少有顯示空間 */
}
.rt-map .map-area,
.rt-map #VW,
.rt-map #VW iframe {
    width: 100%;
    height: 100%;
    border: none;
}
.rt-map #VW iframe { display: block; }

/* 手機版：上下排列 */
@media (max-width: 991px) {
    .rt-layout {
        flex-direction: column;
        height: auto;
    }
    .rt-panel {
        width: 100%;
        min-width: unset;
        max-height: none;
        overflow-y: visible;
    }
    .rt-map {
        height: 60vh;
    }
}

/* xs (<576px):vw 頁 map 高度強制鏈(同 hsz2/tao)
 * 原因:.rt-map height:60vh 在 CSS 層贏 specificity,但
 *       #VW/iframe 的 height:100% 在 column flex + 空 iframe
 *       (JS 動態塞 src) + mobile URL bar 三重作用下會塌。
 * 解法:全鏈 !important + min-height fallback + iframe absolute 鋪滿。
 */
@media (max-width: 575.98px) {
    .rt-layout {
        min-height: 60vh !important;
        height: auto !important;
    }
    .rt-map {
        height: 60vh !important;
        min-height: 60vh !important;
        flex: 0 0 auto !important;
        display: block !important;
        position: relative !important;
    }
    .rt-map .map-area,
    .rt-map #VW,
    .rt-map #VW iframe,
    .rt-map iframe#map {
        width: 100% !important;
        height: 100% !important;
        min-height: 60vh !important;
        display: block !important;
        border: 0 !important;
    }
    .rt-map #VW { position: relative !important; }
    .rt-map #VW iframe,
    .rt-map iframe#map {
        position: absolute !important;
        top: 0 !important; left: 0 !important;
        right: 0 !important; bottom: 0 !important;
    }
}

/* .container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    padding: 1rem;
} */

.ibus-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    padding: 1rem;
    width: 90%;
    margin: 0 auto; /* 水平置中 */
}
.sidebar {
    width: 35%;
    background-color: #f0f8ff;
    padding: 1rem;
    border-radius: 10px;
}
.map-area {
    width: 100%;
    height: 100%;
    border: 1px solid #ccc;
    border-radius: 10px;
}
.content-area {
    /* 防止地圖被直式時被壓扁 */
    min-height: 400px;
}
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    border: 1px solid #ddd;
    padding: 0.5rem;
    text-align: center;
}
th {
    background-color: #dff0ff;
}

/* ===== rt 頁站牌表格去格線(限縮 .rt-panel 內 table) =====
 * 上面全域 `th, td { border: 1px solid #ddd }` 是 hsq2 既有,
 * 會影響全頁所有 table;這裡只把 rt 頁 panel 內的站牌表洗掉,
 * 後台 .poi/.chttl/.time_table 及其他頁面不受影響。
 * table-striped 斑馬色仍保留,視覺上仍可分列。
 */
.rt-panel table,
.rt-panel table thead,
.rt-panel table tbody,
.rt-panel table tr,
.rt-panel table th,
.rt-panel table td {
    border: 0 !important;
}
.rt-panel table > :not(caption) > * > * {
    border-bottom-width: 0 !important;
}

/* CSS畫的舊 marker */
 /* .stop-icon {
    background: #ff7b00;
    color: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    text-align: center;
    line-height: 28px;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
    border: 1px solid white;
} */

/* 看起來沒什麼用的css 保證leaflet預設樣式不會干擾我自訂的icon */
.custom-stop-icon {
    background: none;
    border: none;
}

.stop-icon {
    width: 100%;
    height: 100%;
    /* background-image: url('../../images/stopMark_b.svg'); */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;

    position: relative;
    font-size: 14px;
    font-weight: bold;
    color: white;
    text-align: center;
    line-height: 30px; /* 數字往下移多少 */
    /* padding-right: 3px; */

}

/* 指到時跳出的小框 */
.stop-tooltip {
    font-size: 14px;
    font-weight: bold;
    text-align: center;
}

/* debug用 看圖片版marker實際邊框 */
.leaflet-marker-icon.debug-marker {
    border: 1px solid red !important;
    box-sizing: border-box;
    background-color: rgba(255, 0, 0, 0.1); /* 可選：淡紅底，更清楚範圍 */
}
