/* 標高・海抜チェッカー / 地図距離測定ツール 共通スタイル
   地図コンポーネント(geo_map_tool.js)を、標高チェッカー・距離測定ツールの両方で使う。
   本文幅(48rem)は変えず、縦積み。Leaflet本体の見た目はvendor/leaflet/leaflet.cssで、
   ここでは地図の高さ・自作パネルだけを整える。 */

.pt-geo-intro {
    margin: 0.8rem 0 0.4rem;
}

.pt-geo-panel {
    margin: 1rem 0 1.1rem;
    padding: 0.9rem 1rem;
    border: 0.0625rem solid var(--pt-green-border);
    border-radius: 1rem;
    background: linear-gradient(160deg, #eef6ff 0%, var(--pt-green-bg) 100%);
}

.pt-geo-panel h2 {
    margin-top: 0;
}

.pt-geo-field-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 0.7rem;
}

.pt-geo-input {
    flex: 1 1 14rem;
    min-width: 0;
    padding: 0.55rem 0.75rem;
    border: 0.0625rem solid #ccd3da;
    border-radius: 0.6rem;
    font-size: 1rem;
    font-family: inherit;
}

.pt-geo-btn {
    flex: 0 0 auto;
    padding: 0.55rem 1.1rem;
    border: none;
    border-radius: 62.5rem;
    background: linear-gradient(90deg, var(--pt-blue-light), var(--pt-teal));
    color: #fff;
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    white-space: nowrap;
}

.pt-geo-btn:hover {
    filter: brightness(1.08);
}

.pt-geo-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pt-geo-btn--ghost {
    background: #fff;
    border: 0.0625rem solid #ccd3da;
    color: var(--pt-blue);
}

.pt-geo-btn--small {
    padding: 0.35rem 0.8rem;
    font-size: 0.82rem;
}

.pt-geo-hint {
    margin: 0.2rem 0 0.6rem;
    font-size: 0.78rem;
    color: #666;
}

/* ---------- 地図本体 ---------- */
.pt-geo-map-wrap {
    margin: 0 0 1.1rem;
}

.pt-geo-map {
    width: 100%;
    height: 24rem;
    border: 0.0625rem solid #ccd3da;
    border-radius: 0.8rem;
    background: #dbe6ee;
}

@media (max-width: 30rem) {
    .pt-geo-map {
        height: 19rem;
    }
}

.pt-geo-map-note {
    margin: 0.4rem 0 0;
    font-size: 0.78rem;
    color: #666;
}

/* Leafletのポップアップ・コントロールが本文フォントとずれないように */
.pt-geo-map .leaflet-popup-content,
.pt-geo-map .leaflet-control {
    font-family: inherit;
}

/* ---------- 標高モードの結果 ---------- */
.pt-geo-result {
    margin: 0 0 1.1rem;
    padding: 1rem 1.1rem;
    border: 0.0625rem solid #c9d3dc;
    border-radius: 1rem;
    background: #fff;
}

.pt-geo-result__label {
    margin: 0 0 0.2rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #555;
}

.pt-geo-result__value {
    margin: 0 0 0.3rem;
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.15;
}

.pt-geo-result__coords {
    margin: 0 0 0.7rem;
    font-size: 0.85rem;
    color: #555;
}

.pt-geo-range {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    border-radius: 62.5rem;
    font-weight: 700;
    font-size: 0.88rem;
}

.pt-geo-range--red {
    background: #fdeaea;
    color: #a13a2f;
    border: 0.0625rem solid #f0c2bd;
}

.pt-geo-range--yellow {
    background: #fff6da;
    color: #8a6a00;
    border: 0.0625rem solid #f0dd9e;
}

.pt-geo-range--green {
    background: var(--pt-green-bg);
    color: var(--pt-green-dark);
    border: 0.0625rem solid var(--pt-green-border);
}

.pt-geo-hazard-link {
    display: inline-block;
    margin-top: 0.7rem;
    font-size: 0.88rem;
}

.pt-geo-empty {
    color: #777;
    font-size: 0.9rem;
}

.pt-geo-error {
    margin: 0.6rem 0;
    padding: 0.7rem 0.9rem;
    border: 0.0625rem solid #f0c2bd;
    border-radius: 0.6rem;
    background: #fdeaea;
    color: #a13a2f;
    font-size: 0.88rem;
}

.pt-geo-error:empty {
    display: none;
}

/* ---------- 2地点の高低差比較 ---------- */
.pt-geo-compare {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.6rem;
    align-items: center;
    margin: 0 0 0.6rem;
}

@media (max-width: 30rem) {
    .pt-geo-compare {
        grid-template-columns: 1fr;
    }
}

.pt-geo-compare__slot {
    padding: 0.7rem 0.8rem;
    border: 0.0625rem solid #d5dde5;
    border-radius: 0.7rem;
    background: #f7fafc;
    text-align: center;
}

.pt-geo-compare__slot-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--pt-blue);
    margin-bottom: 0.2rem;
}

.pt-geo-compare__slot-name {
    font-size: 0.88rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.pt-geo-compare__slot-elev {
    font-size: 1.1rem;
    font-weight: 800;
}

.pt-geo-compare__arrow {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--pt-blue);
    text-align: center;
}

.pt-geo-compare__diff {
    margin-top: 0.4rem;
    font-weight: 700;
    color: var(--pt-green-dark);
    text-align: center;
}

/* ---------- 距離測定モードの結果 ---------- */
.pt-geo-points {
    margin: 0 0 0.8rem;
    padding-left: 1.1rem;
}

.pt-geo-points li {
    margin-bottom: 0.2rem;
    font-size: 0.9rem;
}

.pt-geo-total {
    margin: 0 0 0.4rem;
    font-size: 1.9rem;
    font-weight: 800;
}

.pt-geo-speed-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.6rem 0;
}

.pt-geo-chip {
    position: relative;
    display: inline-flex;
}

.pt-geo-chip input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.pt-geo-chip span {
    display: inline-block;
    padding: 0.35rem 0.9rem;
    border: 0.0625rem solid #ccd3da;
    border-radius: 62.5rem;
    background: #fff;
    color: var(--pt-blue);
    font-weight: 700;
    font-size: 0.85rem;
    white-space: nowrap;
}

.pt-geo-chip input:checked + span {
    background: var(--pt-blue);
    border-color: transparent;
    color: #fff;
}

.pt-geo-time {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--pt-green-dark);
}

.pt-geo-calorie-field {
    margin-top: 0.9rem;
    padding-top: 0.8rem;
    border-top: 0.0625rem dashed #d5dde5;
}

.pt-geo-calorie-result {
    margin-top: 0.6rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.pt-geo-checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    margin: 0.4rem 0 0.7rem;
    font-size: 0.9rem;
}
