/* ==================== 白云山地图样式 ====================
   文件：src/css/baiyunshan-map.css
   描述：白云山林场 Leaflet 地图组件样式
   原则：使用 .bym- 命名空间隔离，不影响现有页面样式
   ======================================================== */

/* ==================== 地图容器 ==================== */

/* 根容器 —— 负责撑满父级并建立层叠上下文 */
.bym-map-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 240px;
    overflow: hidden;
    z-index: 1;
}

/* 地图画布 —— Leaflet 在此渲染 */
.bym-map-wrapper .bym-map-container {
    width: 100%;
    height: 100%;
}

/* ==================== 地图控件微调 ==================== */

/* 缩放控件微调 —— 使 +/- 按钮与本项目的暗色 UI 协调 */
.bym-map-wrapper .leaflet-control-zoom {
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    border-radius: 6px !important;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

.bym-map-wrapper .leaflet-control-zoom a {
    width: 32px !important;
    height: 32px !important;
    line-height: 32px !important;
    font-size: 16px !important;
    color: #333 !important;
    background: #fff !important;
    border-bottom: 1px solid #e5e5e5 !important;
}

.bym-map-wrapper .leaflet-control-zoom a:last-child {
    border-bottom: none !important;
}

.bym-map-wrapper .leaflet-control-zoom a:hover {
    background: #f0f0f0 !important;
    color: #000 !important;
}

/* 比例尺控件微调 */
.bym-map-wrapper .leaflet-control-scale {
    font-size: 11px !important;
    color: #555 !important;
}

.bym-map-wrapper .leaflet-control-scale-line {
    background: rgba(255, 255, 255, 0.85) !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    border-radius: 2px !important;
}

/* ==================== 响应式布局 ==================== */

/* 大屏（≥1440px）：完整显示，留充足交互空间 */
@media (min-width: 1440px) {
    .bym-map-wrapper {
        min-height: 360px;
    }
}

/* 中等屏幕（1024px ~ 1439px）：标准 */
@media (min-width: 1024px) and (max-width: 1439px) {
    .bym-map-wrapper {
        min-height: 300px;
    }
}

/* 平板（768px ~ 1023px） */
@media (min-width: 768px) and (max-width: 1023px) {
    .bym-map-wrapper {
        min-height: 260px;
    }

    .bym-map-wrapper .leaflet-control-zoom a {
        width: 28px !important;
        height: 28px !important;
        line-height: 28px !important;
        font-size: 14px !important;
    }

    .bym-map-wrapper .leaflet-control-scale {
        font-size: 10px !important;
    }
}

/* 手机横屏 / 小平板（480px ~ 767px） */
@media (min-width: 480px) and (max-width: 767px) {
    .bym-map-wrapper {
        min-height: 240px;
    }

    .bym-map-wrapper .leaflet-control-zoom a {
        width: 26px !important;
        height: 26px !important;
        line-height: 26px !important;
        font-size: 13px !important;
    }
}

/* 手机竖屏（< 480px） */
@media (max-width: 479px) {
    .bym-map-wrapper {
        min-height: 200px;
        border-radius: 0;
    }

    .bym-map-wrapper .leaflet-control-zoom {
        display: none;   /* 手机端极窄屏幕隐藏缩放控件，保留手势 */
    }

    .bym-map-wrapper .leaflet-control-attribution {
        font-size: 9px !important;
        padding: 2px 6px !important;
    }

    .bym-map-wrapper .leaflet-control-scale {
        font-size: 9px !important;
        margin-bottom: 4px !important;
    }
}

/* ==================== 辅助类 ==================== */

/* 固定高度模式 —— 给容器一个确定像素高度 */
.bym-map--fixed {
    height: 500px;
    min-height: 500px;
}

/* 全屏模式 —— 占满视口 */
.bym-map--fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
}

/* 卡片模式 —— 带圆角和阴影，适合嵌入面板 */
.bym-map--card {
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* ==================== 打印样式 ==================== */

@media print {
    .bym-map-wrapper {
        min-height: 400px;
        page-break-inside: avoid;
    }

    .bym-map-wrapper .leaflet-control-zoom,
    .bym-map-wrapper .leaflet-control-attribution {
        display: none;
    }
}
