/* live-train.css — 鉄道運行影響レイヤー スタイル */

/* ── 交通影響カード（左パネル統合版：#lac-train-slot に注入） ─────────────── */

.ltc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.ltc-title {
    font-size: 13px;
    font-weight: 600;
    color: #e6edf3;
}

/* 都道府県セレクター */
.ltc-pref-select {
    font-size: 11px;
    background: #21262d;
    border: 1px solid #30363d;
    border-radius: 4px;
    color: #c9d1d9;
    padding: 2px 4px;
    cursor: pointer;
    max-width: 110px;
}

.ltc-pref-select:focus {
    outline: none;
    border-color: #58a6ff;
}

/* ── 路線リスト ────────────────────────────────────────────────────────────── */

.ltc-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    border-bottom: 1px solid #21262d;
    font-size: 12px;
}

.ltc-item:last-of-type {
    border-bottom: none;
}

.ltc-item-focusable {
    cursor: pointer;
}

.ltc-item-focusable:hover {
    background: rgba(88, 166, 255, 0.08);
    border-radius: 4px;
}

.ltc-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 4px;
    white-space: nowrap;
    color: #fff;
    flex-shrink: 0;
}

.ltc-badge-delay              { background: #b45309; }
.ltc-badge-partial-suspension { background: #c2410c; }
.ltc-badge-suspended          { background: #b91c1c; }
.ltc-badge-unknown            { background: #374151; }

.ltc-name {
    flex: 1;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ltc-operator {
    font-size: 10px;
    color: #8b949e;
    white-space: nowrap;
}

/* ── 状態メッセージ ──────────────────────────────────────────────────────── */

.ltc-no-issue {
    font-size: 12px;
    color: #3fb950;
    padding: 4px 0;
}

.ltc-unavailable {
    font-size: 12px;
    color: #8b949e;
    padding: 4px 0;
}

.ltc-stale-notice {
    font-size: 10px;
    color: #e3b341;
    padding: 4px 0;
    border-top: 1px solid #21262d;
    margin-top: 4px;
}

.ltc-source-note {
    font-size: 10px;
    color: #484f58;
    padding: 4px 0 0;
    margin-top: 4px;
    border-top: 1px solid #21262d;
}

/* ── 地図レイヤー 路線色 ─────────────────────────────────────────────────── */

/* Leaflet CircleMarker / Path に付与するクラス */
.train-line-normal {
    stroke: #6b7280;
    fill: #6b7280;
}

.train-line-delay {
    stroke: #d97706;
    fill: #d97706;
}

.train-line-partial-suspension {
    stroke: #ea580c;
    fill: #ea580c;
}

.train-line-suspended {
    stroke: #dc2626;
    fill: #dc2626;
}

.train-line-unknown {
    stroke: #9ca3af;
    fill: #9ca3af;
}

.train-line-unavailable {
    stroke: #6b7280;
    fill: none;
}

/* ── レイヤーパネル内のヒント ──────────────────────────────────────────── */

#train-layer-hint {
    font-size: 10px;
    color: #8b949e;
    padding: 2px 0 0 18px;
    display: none;
}

#train-layer-hint.visible {
    display: block;
}

/* ── 詳細ボタン ──────────────────────────────────────────────────────────── */

.ltc-detail-btn {
    font-size: 10px;
    padding: 2px 7px;
    background: #21262d;
    border: 1px solid #30363d;
    border-radius: 4px;
    color: #8b949e;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.6;
}

.ltc-detail-btn:hover,
.ltc-detail-btn:active {
    background: #2d333b;
    color: #c9d1d9;
    border-color: #58a6ff;
}

/* ── 詳細モーダル ─────────────────────────────────────────────────────────── */

.ltc-detail-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 9990;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
}

.ltc-detail-card {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 12px;
    width: 100%;
    max-width: 360px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.ltc-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid #21262d;
    gap: 8px;
}

.ltc-detail-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.ltc-detail-name {
    font-size: 14px;
    font-weight: 600;
    color: #e6edf3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ltc-detail-close {
    background: none;
    border: none;
    color: #8b949e;
    font-size: 16px;
    cursor: pointer;
    padding: 0 0 0 8px;
    line-height: 1;
    flex-shrink: 0;
}

.ltc-detail-close:hover {
    color: #e6edf3;
}

.ltc-detail-body {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ltc-detail-row {
    display: flex;
    gap: 10px;
    font-size: 12px;
    align-items: flex-start;
}

.ltc-detail-label {
    color: #8b949e;
    white-space: nowrap;
    min-width: 56px;
    flex-shrink: 0;
}

.ltc-detail-value {
    color: #c9d1d9;
    flex: 1;
    word-break: break-all;
}

.ltc-detail-desc {
    line-height: 1.5;
}

.ltc-detail-footer {
    padding: 8px 14px 12px;
    border-top: 1px solid #21262d;
}

.ltc-detail-map-btn {
    width: 100%;
    padding: 9px;
    background: #21262d;
    border: 1px solid #30363d;
    border-radius: 6px;
    color: #c9d1d9;
    font-size: 12px;
    cursor: pointer;
}

.ltc-detail-map-btn:hover,
.ltc-detail-map-btn:active {
    background: #2d333b;
    border-color: #58a6ff;
}

/* ── モバイル対応 ────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
    .ltc-pref-select {
        max-width: 90px;
    }

    .ltc-detail-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .ltc-detail-card {
        max-width: 100%;
        border-radius: 16px 16px 0 0;
        border-bottom: none;
    }
}
