/* japan_transit_live_map - style.css */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
    background: #f4f6f8;
    color: #222;
    line-height: 1.6;
}

a {
    color: #1976d2;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ヘッダー */
header.site-header {
    background: linear-gradient(90deg, #1565c0, #1976d2);
    color: #fff;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

header.site-header h1 {
    margin: 0;
    font-size: 20px;
}

header.site-header nav a {
    color: #fff;
    margin-left: 16px;
    font-size: 14px;
}

/* メインコンテナ */
.container {
    max-width: 1200px;
    margin: 24px auto;
    padding: 0 16px;
}

.container.full {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* カード */
.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    padding: 20px;
    margin-bottom: 20px;
}

.card h2 {
    margin-top: 0;
    border-bottom: 2px solid #1976d2;
    padding-bottom: 8px;
    font-size: 18px;
}

/* メニュー一覧 */
.menu-list {
    list-style: none;
    padding: 0;
}

.menu-list li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.menu-list li:last-child {
    border-bottom: none;
}

.menu-list li a {
    display: block;
    font-weight: bold;
}

.menu-list .desc {
    color: #666;
    font-size: 13px;
    font-weight: normal;
    margin-top: 4px;
}

/* フォーム */
form .form-row {
    margin-bottom: 12px;
}

form label {
    display: block;
    font-weight: bold;
    margin-bottom: 4px;
    font-size: 14px;
}

form input[type="text"],
form input[type="password"],
form input[type="url"],
form input[type="number"],
form select,
form textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

form textarea {
    min-height: 80px;
    resize: vertical;
}

button,
input[type="submit"],
.btn {
    display: inline-block;
    background: #1976d2;
    color: #fff;
    border: none;
    padding: 9px 18px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
}

button:hover,
input[type="submit"]:hover,
.btn:hover {
    background: #125ea8;
    text-decoration: none;
}

.btn-danger {
    background: #d32f2f;
}

.btn-danger:hover {
    background: #a82424;
}

.btn-secondary {
    background: #757575;
}

.btn-secondary:hover {
    background: #555;
}

/* テーブル */
table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 14px;
}

table th,
table td {
    border: 1px solid #e0e0e0;
    padding: 8px 12px;
    text-align: left;
    vertical-align: middle;
}

table th {
    background: #f0f4f8;
    font-weight: bold;
}

table tr:hover td {
    background: #fafbfc;
}

/* メッセージ */
.msg {
    padding: 10px 14px;
    border-radius: 4px;
    margin-bottom: 16px;
}

.msg-success {
    background: #e8f5e9;
    border-left: 4px solid #43a047;
    color: #1b5e20;
}

.msg-error {
    background: #ffebee;
    border-left: 4px solid #e53935;
    color: #b71c1c;
}

.msg-info {
    background: #e3f2fd;
    border-left: 4px solid #1976d2;
    color: #0d47a1;
}

/* マップ画面 */
#map {
    width: 100%;
    height: calc(100vh - 60px);
}

.map-wrap {
    position: relative;
    width: 100%;
    height: calc(100vh - 60px);
}

.filter-panel {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255,255,255,0.95);
    padding: 12px 16px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    z-index: 1000;
    font-size: 14px;
    min-width: 180px;
}

.filter-panel h3 {
    margin: 0 0 8px;
    font-size: 14px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 4px;
}

.filter-panel label {
    display: block;
    margin: 4px 0;
    cursor: pointer;
}

.filter-panel input[type="checkbox"] {
    margin-right: 6px;
}

.legend-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    margin-right: 4px;
    vertical-align: middle;
}

.icon-jr { background: #2e7d32; }
.icon-private_rail { background: #c62828; }
.icon-bus { background: #f57c00; }
.icon-airplane { background: #1565c0; }
.icon-ferry { background: #00838f; }

/* ステータスバッジ */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    color: #fff;
}

.badge-success { background: #43a047; }
.badge-failed { background: #e53935; }
.badge-running { background: #fb8c00; }

/* ログイン画面 */
.login-box {
    max-width: 380px;
    margin: 80px auto;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.login-box h2 {
    margin-top: 0;
    text-align: center;
    color: #1976d2;
}

/* フッター */
footer.site-footer {
    text-align: center;
    padding: 20px;
    color: #777;
    font-size: 12px;
}

/* ポップアップ */
.leaflet-popup-content {
    font-size: 13px;
    line-height: 1.5;
}

.leaflet-popup-content .popup-title {
    font-weight: bold;
    font-size: 14px;
    color: #1976d2;
    margin-bottom: 4px;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .filter-panel {
        top: auto;
        bottom: 12px;
        right: 12px;
        left: 12px;
        min-width: auto;
    }
    header.site-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    header.site-header nav a {
        margin-left: 0;
        margin-right: 12px;
    }
}