@charset "UTF-8";

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    display: flex;
    height: 100vh;
    color: #333;
}

#map {
    flex: 1;
    height: 100%;
}

#sidebar { 
    width: 260px; 
    min-width: 260px;
    padding: 8px; 
    background: #f8f9fa; 
    overflow-y: auto; 
    box-shadow: -2px 0 5px rgba(0,0,0,0.1); 
    font-size: 0.78rem;
}

@media (max-width: 768px) {
    body { flex-direction: column; }
    #map { height: 40vh; }
    #sidebar { width: 100%; min-width: 100%; height: 60vh; }
}

h1 {
    font-size: 1.0rem;
    color: #c0392b;
    border-bottom: 2px solid #c0392b;
    padding-bottom: 3px;
    margin-bottom: 6px;
}

.meta-info {
    font-size: 0.7rem;
    color: #555;
    background: #eef2f5;
    padding: 5px 6px;
    border-radius: 4px;
    margin-bottom: 6px;
}

.meta-info div { margin-bottom: 2px; }

.route-toggle-box {
    background: #e3f2fd;
    border: 1px solid #90caf9;
    padding: 5px 6px;
    border-radius: 5px;
    margin-bottom: 8px;
    font-size: 0.75rem;
    font-weight: bold;
}

.route-toggle-title { margin-bottom: 3px; color: #1565c0; }
.route-toggle-options { display: flex; flex-direction: column; gap: 3px; padding-left: 2px; }
.route-toggle-options label { cursor: pointer; display: flex; align-items: center; gap: 4px; }

.action-btns { display: flex; flex-direction: column; gap: 5px; margin-bottom: 8px; }
.btn {
    width: 100%;
    padding: 6px 4px;
    font-size: 0.72rem;
    font-weight: bold;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: #fff;
    text-align: center;
}

.btn-share { background: #27ae60; }
.btn-share:hover { background: #219150; }
.btn-export { background: #2980b9; }
.btn-export:hover { background: #1f6391; }

.pump-card {
    background: #fff;
    border-radius: 6px;
    padding: 6px 8px;
    margin-bottom: 6px;
    border-left: 4px solid #3498db;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.pump-card.fire {
    border-left-color: #e74c3c;
    background: #fff5f5;
}

.pump-title {
    font-weight: bold;
    font-size: 0.82rem;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
}

.input-group { 
    margin-bottom: 4px; 
    display: flex; 
    flex-direction: row; 
    align-items: center; 
    justify-content: space-between; 
    gap: 2px;
}

.input-group label { 
    font-size: 0.7rem; 
    color: #444; 
    white-space: nowrap; 
    flex: 1;
}

.input-group input { 
    width: 58px; 
    padding: 2px 4px; 
    border: 1px solid #ccc; 
    border-radius: 4px; 
    font-size: 0.78rem; 
    text-align: right; 
}

.data-list { font-size: 0.72rem; background: #f1f2f6; padding: 5px 6px; border-radius: 4px; }
.data-item { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; white-space: nowrap; }
.data-item:last-child { margin-bottom: 0; }
.data-label { color: #444; }
.data-value { font-weight: bold; text-align: right; }
.indent-label { padding-left: 6px; color: #666; }

.gauge-box {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 3px 6px;
    border-radius: 4px;
    margin: 3px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gauge-label { font-size: 0.65rem; }
.gauge-val { font-size: 0.8rem; font-weight: bold; font-family: monospace; }
.gauge-ok { color: #2ecc71; }
.gauge-warn { color: #f1c40f; }
.gauge-danger { color: #e74c3c; animation: blink 1s infinite; }

@keyframes blink { 50% { opacity: 0.5; } }
.text-danger { color: #e74c3c; }
.note { font-size: 0.65rem; color: #7f8c8d; margin-top: 6px; line-height: 1.2; }

/* 印刷用スタイル */
@media print {
    @page {
        size: A4 landscape;
        margin: 2mm;
    }

    html, body {
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
        color: #000 !important;
        overflow: hidden !important;
        page-break-after: avoid !important;
        page-break-before: avoid !important;
    }

    body {
        display: flex !important;
        flex-direction: row !important;
    }

    .action-btns, .toggle-btn, .btn, #left-panel, #left-panel-reopen-btn, .modal-overlay, .note {
        display: none !important;
    }

    #map-container, #map {
        width: 75% !important;
        height: 100vh !important;
        flex: 0 0 75% !important;
        position: relative !important;
    }

    #sidebar, #right-panel {
        width: 25% !important;
        min-width: 25% !important;
        flex: 0 0 25% !important;
        height: 100vh !important;
        max-height: 100vh !important;
        padding: 0 !important;
        box-shadow: none !important;
        border-left: 1px solid #ccc !important;
        background: #fff !important;
        overflow: hidden !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        transform: scale(0.60) !important;
        transform-origin: top left !important;
    }

    h1 {
        font-size: 0.85rem !important;
        margin-bottom: 2px !important;
        padding-bottom: 1px !important;
    }

    .meta-info {
        padding: 1px 3px !important;
        margin-bottom: 2px !important;
        font-size: 0.58rem !important;
        line-height: 1.05 !important;
    }

    .route-toggle-box {
        padding: 1px 3px !important;
        margin-bottom: 2px !important;
        font-size: 0.58rem !important;
    }

    .pump-card {
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        padding: 1px 3px !important;
        margin-bottom: 2px !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    .pump-title {
        font-size: 0.70rem !important;
        margin-bottom: 1px !important;
    }

    .input-group {
        margin-bottom: 1px !important;
    }

    .input-group label {
        font-size: 0.58rem !important;
    }

    .input-group input {
        padding: 0 2px !important;
        font-size: 0.65rem !important;
        height: 15px !important;
        width: 50px !important;
    }

    .data-list {
        padding: 1px 3px !important;
        font-size: 0.58rem !important;
        line-height: 1.1 !important;
    }

    .data-item {
        margin-bottom: 0px !important;
    }

    .gauge-box {
        padding: 1px 3px !important;
        margin: 1px 0 !important;
    }

    .gauge-label {
        font-size: 0.55rem !important;
    }

    .gauge-val {
        font-size: 0.68rem !important;
    }

    #map .gm-style > div:first-child {
        opacity: 0.45 !important;
    }

    #map .gm-style > div:nth-child(2),
    #map .gm-style-marker,
    #map svg {
        opacity: 1.0 !important;
        filter: drop-shadow(0px 0px 2px rgba(0,0,0,0.8)) !important;
    }

    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}