/* ============================
レイアウト全体
============================ */
html, body {
    height: 100%;
}

body {
    background-color: #F3E5F5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

/* ============================
ナビゲーション
============================ */
.navbar-custom {
    background-color: #7E57C2;
}

.navbar-custom .navbar-brand {
    color: #fff;
}

.nav-link.active {
    border-bottom: 2px solid #fff;
}

/* ハンバーガーアイコン（白） */
.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.7);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(255, 255, 255, 0.9)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

.navbar-toggler:hover {
    border-color: rgba(255, 255, 255, 1);
}

/* ============================
ボタン
============================ */
.btn-custom {
    background-color: #7E57C2;
    color: #fff;
    border: none;
}

.btn-custom:hover {
    background-color: #5E35B1;
}

.back-to-top {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: #7E57C2;
    color: #fff;
    border: none;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.2s ease;
    z-index: 999;
}

.back-to-top:hover {
    background-color: #5E35B1;
    transform: translateY(-3px);
}

.leaflet-popup-content .route-btn {
    background-color: #7E57C2;   /* ラベンダー */
    color: #ffffff;              /* 常時白文字 */
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    display: inline-block;
    text-decoration: none;
}

.leaflet-popup-content .route-btn:hover {
    background-color: #5E35B1;   /* 濃いラベンダー */
    color: #ffffff;
}

.leaflet-popup-content {
    font-size: 15px;
    line-height: 1.5;
}

.leaflet-popup-content-wrapper {
    border-radius: 10px;
    border: 2px solid #c7b7e6; /* ラベンダー */
}

.card-clickable.active {
    border: 2px solid #a88be0;
    background: #f7f2ff;
}

.marker-highlight {
    filter: drop-shadow(0 0 6px rgba(0,0,0,0.4));
}
/* ============================
フッター
============================ */
.footer-custom {
    background-color: #5E35B1;
    color: #fff;
}

.footer-text {
    color: #fff !important;
    opacity: 0.9;
}

/* ============================
カード・表・装飾
============================ */
.card-custom {
    background-color: #F3E5F5;
}

.chart-card {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    height: 100%;
}

mark {
    background-color: #FFEB3B;
    padding: 0 2px;
}

/* アニメーションを明示的に指定し直す */
.spinner-border {
    animation: spinner-border .75s linear infinite !important;
}

.card-clickable {
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.2s ease;
    background-color: #ffffff; /* 通常は白 */
}

.card-clickable:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
    background-color: #F3E5F5; /* 薄いラベンダー */
    border-color: #7E57C2; /* メインラベンダー */
}

/* 回転アニメーションの定義を明示的に追加 */
@keyframes spinner-border {
    to { transform: rotate(360deg); }
}

.spinner-border.text-primary {
    color: #7E57C2 !important; /* スピナーの基準色 */
    border-color: #7E57C2 !important; /* 全体の色 */
    border-right-color: transparent !important; /* 回転を見せるための透明部分 */
}


.table thead th {
    position: sticky;
    top: 0;
    background-color: #343a40;
    color: #fff;   /* ← これが必要！ */
    z-index: 2;
}


/* ============================
リンク
============================ */
a {
    color: #7E57C2;
}

a:hover {
    color: #5E35B1;
}

/* ============================
スマホ専用調整
============================ */
@media (max-width: 576px) {
    .search-area {
        margin-top: 1rem;
        margin-bottom: 1.5rem;
    }
}

/* ============================
stats.php 日本地図
============================ */

.map-container {
    width: 100%;
    height: 600px; /* PC */
}
@media (max-width: 767px) {
    .map-container {
        /* スマホでは「少し縦長の長方形」くらいに留めるのが、
            Plotlyのgeolayerが一番大きく広がるポイントです */
        height: 500px; 
    }
}

/* iframeの中の地図を触る時のブラウザ挙動を制御 */
.map-container iframe {
    touch-action: none; /* 上下スクロールはブラウザに任せ、左右の勝手な挙動を抑える */
}



