/* 龙门山猛禽迁徙观察 — 前端展示样式 v1.1
 * 继承 WordPress 主题字体、字号、基础颜色
 * 响应式：桌面左右分栏，手机上下排列 */

#birding-app {
    max-width: 100%;
    margin: 0 auto;
}

/* ===== 顶部标题栏 ===== */
.birding-header {
    padding: 20px 0 10px;
}

.birding-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.birding-point-select {
    padding: 10px 20px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1.1em;
    font-weight: 600;
    min-width: 200px;
    background: #fff;
    cursor: pointer;
    appearance: auto;
}

.birding-season-tag {
    background: #e8f0dc;
    color: #3a6b1e;
    padding: 4px 14px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
}

.birding-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 8px;
    font-size: 0.9em;
    opacity: 0.75;
}

.birding-stats span {
    background: rgba(0,0,0,0.03);
    padding: 3px 10px;
    border-radius: 10px;
}

/* ===== 主体布局 ===== */
.birding-layout {
    display: flex;
    gap: 0;
    margin-top: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    height: calc(100vh - 150px);
    min-height: 500px;
}

.birding-map-panel {
    flex: 1;
    min-width: 0;
    position: relative;
}

#birding-map {
    width: 100%;
    height: 100%;
    min-height: 500px;
}

.birding-map-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 500px;
    background: #fafafa;
    color: #888;
    font-size: 0.95em;
    padding: 20px;
    text-align: center;
}

.birding-map-label {
    background: #2d5016;
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.birding-data-panel {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    border-left: 1px solid #e0e0e0;
    background: #fff;
}

.birding-data-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #eee;
    background: #fafaf5;
}

.birding-data-header h3 {
    margin: 0;
    font-size: 1em;
}

/* ===== 汇总表格 ===== */
.birding-table-wrap {
    flex: 1;
    overflow-y: auto;
}

.birding-summary-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.birding-summary-table thead {
    position: sticky;
    top: 0;
    z-index: 1;
}

.birding-summary-table th {
    background: #f5f5f0;
    padding: 10px 12px;
    text-align: left;
    border-bottom: 2px solid #ddd;
    font-weight: 600;
    font-size: 0.85em;
    color: #000;
}

.birding-summary-table th:first-child { width: auto; }
.birding-summary-table th.col-num { width: 90px; }

.birding-summary-table td {
    padding: 6px 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9em;
    overflow: hidden;
    text-overflow: ellipsis;
}

.birding-summary-table td:first-child { white-space: nowrap; }

.birding-summary-table tbody tr:hover td {
    background: #fafaf5;
}

.birding-summary-table tfoot td {
    border-top: 2px solid #ddd;
    border-bottom: none;
    background: #f8f8f3;
    font-size: 0.9em;
    padding: 8px 12px;
}

.col-num {
    text-align: right;
    width: 80px;
    white-space: nowrap;
}

.zero-val {
    color: #ccc;
}

.birding-loading,
.birding-empty-cell {
    text-align: center;
    padding: 40px 20px;
    opacity: 0.5;
}

/* ===== 响应式：手机 ===== */
@media (max-width: 768px) {
    .birding-layout {
        flex-direction: column;
        height: auto;
    }

    .birding-map-panel {
        flex: none;
    }

    #birding-map {
        height: 350px;
        min-height: 350px;
    }

    .birding-map-placeholder {
        min-height: 200px;
    }

    .birding-data-panel {
        border-left: none;
        border-top: 1px solid #e0e0e0;
        flex: none;
        max-height: 60vh;
    }

    .birding-table-wrap {
        max-height: 40vh;
    }

    .birding-point-select {
        width: 100%;
        font-size: 1em;
        padding: 8px 14px;
    }

    .birding-stats {
        gap: 8px;
    }

    .birding-summary-table th,
    .birding-summary-table td {
        padding: 5px 8px;
        font-size: 0.8em;
    }

    .col-num {
        width: 60px;
    }
}