/* 服务网点Web地图样式 */

/* 页面头部样式 */
.service-points-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.service-points-header h1 {
    font-weight: 300;
    margin-bottom: 0.5rem;
}

.service-points-header .lead {
    opacity: 0.9;
    font-size: 1.1rem;
}

.service-stats .badge-lg {
    font-size: 1rem;
    padding: 0.5rem 1rem;
}

/* 地图容器样式 */
.map-container {
    position: relative;
    height: 70vh;
    min-height: 500px;
}

.service-points-map {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0;
}

/* 地图加载覆盖层 */
.map-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(2px);
}

.loading-content {
    text-align: center;
    color: #6c757d;
}

.loading-content p {
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* 侧边栏样式 */
.sidebar {
    height: 70vh;
    min-height: 500px;
    background: #f8f9fa;
    border-left: 1px solid #dee2e6;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 1rem;
    background: #fff;
    border-bottom: 1px solid #dee2e6;
    flex-shrink: 0;
}

.sidebar-header h4 {
    margin: 0;
    color: #495057;
    font-size: 1.1rem;
    font-weight: 600;
}

/* 搜索框样式 */
.search-box {
    padding: 1rem;
    background: #fff;
    border-bottom: 1px solid #dee2e6;
    flex-shrink: 0;
}

.search-box .form-control {
    border-radius: 0.25rem 0 0 0.25rem;
    font-size: 0.9rem;
}

.search-box .btn {
    border-radius: 0 0.25rem 0.25rem 0;
    border-left: none;
}

/* 网点列表样式 */
.points-list {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.point-item {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
}

.point-item:hover {
    background: #f8f9fa;
    transform: translateX(2px);
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.point-item.active {
    background: #e3f2fd;
    border-left: 4px solid #007bff;
}

.point-item:last-child {
    border-bottom: none;
}

.point-header {
    margin-bottom: 0.5rem;
}

.point-name {
    margin: 0;
    color: #495057;
    font-size: 1rem;
    font-weight: 600;
}

.point-details p {
    margin: 0.25rem 0;
    font-size: 0.85rem;
    color: #6c757d;
    line-height: 1.4;
}

.point-details i {
    width: 12px;
    text-align: center;
    opacity: 0.7;
}

.point-address {
    color: #495057 !important;
}

.point-phone {
    color: #28a745 !important;
}

/* 加载状态样式 */
.loading-points {
    color: #6c757d;
    font-size: 0.9rem;
}

.no-points {
    color: #6c757d;
    font-style: italic;
}

/* 弹出窗口样式 */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border: none;
}

.leaflet-popup-content {
    margin: 0;
    padding: 0;
    line-height: 1.4;
}

.service-point-popup-content {
    padding: 1rem;
    min-width: 250px;
}

.popup-title {
    margin: 0 0 0.75rem 0;
    color: #495057;
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 2px solid #007bff;
    padding-bottom: 0.5rem;
}

.popup-details p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.popup-details strong {
    color: #495057;
    font-weight: 600;
}

.popup-details a {
    text-decoration: none;
    font-weight: 500;
}

.popup-details a:hover {
    text-decoration: underline;
}

.popup-details i {
    width: 16px;
    text-align: center;
}

/* 错误消息样式 */
.error-message {
    padding: 2rem;
}

.error-message .alert {
    margin: 0;
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(220, 53, 69, 0.2);
}

/* 响应式设计 */
@media (max-width: 991.98px) {
    .sidebar {
        height: auto;
        min-height: auto;
        border-left: none;
        border-top: 1px solid #dee2e6;
    }
    
    .map-container {
        height: 50vh;
        min-height: 400px;
    }
    
    .service-points-header .col-md-4 {
        text-align: left !important;
        margin-top: 1rem;
    }
}

@media (max-width: 767.98px) {
    .service-points-header {
        padding: 2rem 0;
    }
    
    .service-points-header h1 {
        font-size: 1.75rem;
    }
    
    .service-points-header .lead {
        font-size: 1rem;
    }
    
    .map-container {
        height: 60vh !important;
        min-height: 400px !important;
    }
    
    .service-points-map {
        width: 100% !important;
        height: 100% !important;
    }
    
    .sidebar-header h4 {
        font-size: 1rem;
    }
    
    .point-item {
        padding: 0.75rem;
    }
    
    .service-point-popup-content {
        padding: 0.75rem;
        min-width: 200px;
    }
    
    .popup-title {
        font-size: 1rem;
    }
}

/* 自定义滚动条 */
.points-list::-webkit-scrollbar {
    width: 6px;
}

.points-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.points-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.points-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 动画效果 */
.point-item {
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Leaflet地图自定义样式 */
.leaflet-popup-tip {
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.leaflet-control-zoom {
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.leaflet-control-zoom a {
    border: none;
    color: #495057;
    font-weight: bold;
}

.leaflet-control-zoom a:hover {
    background: #007bff;
    color: white;
}

/* 地图标记自定义样式 */
.leaflet-marker-icon {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* 页面脚部样式 */
.container-fluid.bg-light {
    border-top: 1px solid #dee2e6;
}

.container-fluid.bg-light h5 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 1rem;
}

.container-fluid.bg-light .list-unstyled li {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.container-fluid.bg-light a {
    color: #007bff;
    text-decoration: none;
}

.container-fluid.bg-light a:hover {
    text-decoration: underline;
}

.service-description {
    border-top: 1px solid #eee;
    padding-top: 10px;
}

.description-content {
    background-color: #f9f9f9;
    padding: 10px;
    border-radius: 5px;
    margin-top: 5px;
}
