/* style.css - 新幹線全制覇ログ */

:root {
    --map-bg: #f9f9f9;
    --sidebar-width: 300px;
    /* 必要に応じて使用 */
}

/* メインレイアウトコンテナ */
.app-main-content {
    height: calc(100vh - 60px);
    min-height: 600px;
}

.map-column-bg {
    background-color: var(--map-bg) !important;
    /* ドットグリッド */
    background-image: radial-gradient(#d1d1d1 1px, transparent 1px);
    background-size: 20px 20px;
}

/* マップ上部のヘッダー帯 */
.map-header-overlay {
    z-index: 10;
    /* Bootstrapの変数をCSSで使用。定義されていない場合はフォールバック */
    background: rgba(var(--bs-body-bg-rgb, 255, 255, 255), 0.8);
    backdrop-filter: blur(5px);
}

/* ズームコントロール領域 */
#zoom-controls {
    z-index: 9;
    min-height: 50px;
    flex-shrink: 0;
}

.zoom-controls-scroll {
    overflow-x: auto;
    white-space: nowrap;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.zoom-controls-scroll::-webkit-scrollbar {
    display: none;
}

.btn-zoom {
    white-space: nowrap;
    flex-shrink: 0;
}

/* サイドバー */
.sidebar-panel {
    z-index: 20;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.05);
    /* Bootstrapのshadow-lgをCSSで微調整する場合 */
}

/* 進捗バーの高さ調整 */
.conquest-progress-container {
    height: 16px;
}

/* CSVアップロード用Input (非表示) */
#csv-upload {
    display: none;
}

/* トーストコンテナ */
#page-toast-container {
    z-index: 1100;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
    transition: opacity 0.3s ease;
}

/* SVGエリア */
.svg-container {
    cursor: grab;
    touch-action: none;
}

.svg-container:active {
    cursor: grabbing;
}

/* マップ下部の操作ガイド */
.map-guide-text {
    pointer-events: none;
    opacity: 0.5;
}

/* 路線図のスタイル */
.rail-line {
    transition: stroke 0.3s, stroke-width 0.3s;
}

.rail-segment-group:hover .rail-line {
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.3));
    stroke-width: 14px;
}

/* 駅のノード (クリック・ホバー完全無効化) */
.station-group {
    pointer-events: none;
}

.station-node {
    fill: #fff;
    stroke: #666;
    stroke-width: 2px;
}

/* 駅名ラベル */
.station-label {
    font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", sans-serif;
    font-size: 14px;
    font-weight: 700;
    fill: #333;
    pointer-events: none;
    text-shadow:
        2px 0 0 #fff, -2px 0 0 #fff,
        0 2px 0 #fff, 0 -2px 0 #fff;
    user-select: none;
}

/* 縦書きラベル */
.vertical-label {
    writing-mode: vertical-rl;
    text-orientation: upright;
    letter-spacing: 1px;
    font-size: 13px;
}

/* 凡例 */
.legend-line {
    display: inline-block;
    width: 20px;
    height: 4px;
    border-radius: 2px;
    margin-right: 5px;
}

.status-0 {
    background-color: #e0e0e0;
    border: 1px dashed #999;
}

.status-1 {
    background-color: #2E8B57;
}

.progress-bar {
    transition: width 0.6s ease;
}

/* ▼▼▼ マップコントローラー ▼▼▼ */
.map-controller-overlay {
    position: absolute;
    top: 130px;
    left: 20px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 十字キー */
.d-pad-container {
    display: grid;
    grid-template-columns: 40px 40px 40px;
    grid-template-rows: 40px 40px 40px;
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    padding: 5px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.d-pad-btn {
    border: none;
    background: transparent;
    color: #555;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.d-pad-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
    color: #000;
}

.d-pad-btn:active {
    background-color: rgba(0, 0, 0, 0.2);
    transform: scale(0.95);
}

.d-pad-up {
    grid-column: 2;
    grid-row: 1;
}

.d-pad-left {
    grid-column: 1;
    grid-row: 2;
}

.d-pad-center {
    grid-column: 2;
    grid-row: 2;
    background-color: rgba(0, 0, 0, 0.05);
}

.d-pad-right {
    grid-column: 3;
    grid-row: 2;
}

.d-pad-down {
    grid-column: 2;
    grid-row: 3;
}

/* ズームボタン */
.zoom-pad-container {
    display: flex;
    flex-direction: column;
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: 20px;
    overflow: hidden;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    width: 40px;
}

.zoom-pad-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: #555;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

.zoom-pad-btn:last-child {
    border-bottom: none;
}

.zoom-pad-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
    color: #000;
}

.zoom-pad-btn:active {
    background-color: rgba(0, 0, 0, 0.2);
}