/* 基础样式 */
.wp-footprint-container {
    font-family: "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    color: #333;
}

/* 地图容器 */
#footprint-map {
    z-index: 1;
}

/* Logo容器 */
.logo-container {
    position: absolute;
    bottom: 22px;
    left: 5px;
    z-index: 10;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 5px 8px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo-wrapper {
    float: left;
    margin-right: 10px;
}

.logo-wrapper svg {
    width: 32px;
    height: 32px;
}

.footprint-logo {
    margin: 0;
    font-size: 18px;
    color: #5B5FEF;
    line-height: 32px;
}

.logo-version {
    font-size: 12px;
    color: #999;
    margin-left: 5px;
}

.footprint-slogan {
    margin: 5px 0 0 0;
    font-size: 12px;
    color: #666;
    clear: both;
}

/* 地图控制栏 */
.map-controls {
    position: absolute;
    bottom: 22px;
    left: 200px;
    right: 15px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 10px;
}

.button-group {
    display: flex;
    gap: 5px;
}

.control-btn {
    background-color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.control-btn.active {
    background-color: #5B5FEF;
    color: white;
}

.control-btn:hover:not(.active) {
    background-color: #f5f5f5;
}

/* 开关按钮 */
.plane-switch {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.plane-switch input {
    display: none;
}

.plane-switch div {
    position: relative;
    width: 40px;
    height: 24px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s;
}

.plane-switch input:checked + div {
    background-color: #5B5FEF;
}

.plane-switch div div {
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    border-radius: 50%;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s;
}

.plane-switch input:checked + div div {
    transform: translateX(16px);
}

.switch-text {
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    color: #333;
    white-space: nowrap;
}

/* 缩放按钮 */
.zoom-buttons {
    display: flex;
    flex-direction: row;
}

.zoom-btn {
    width: 22px;
    height: 22px;
    background-color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    line-height: 0px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
    padding:.1em .1em .1em;
}

.zoom-btn:first-child {
    margin-bottom: 5px;
}

.zoom-btn:hover {
    background-color: #f5f5f5;
}

/* 比例尺 */
.amap-scale-text {
    background-color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* 类型过滤器 */
.type-filter {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 10;
    width: 250px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.type-filter.active {
    max-height: 400px;
}

.filter-header {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-header span {
    font-weight: bold;
    font-size: 16px;
}

.filter-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
}

.filter-close:hover {
    color: #333;
}

.filter-content {
    padding: 10px 0;
}

#type-filter-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

#type-filter-list li {
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#type-filter-list li:hover {
    background-color: #f5f5f5;
}

#type-filter-list li.active {
    background-color: #e6e8ff;
    color: #5B5FEF;
    position: relative;
}

#type-filter-list li.active::after {
    content: "✓";
    position: absolute;
    right: 15px;
}

.filter-toggle {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    z-index: 11;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #5B5FEF;
}

/* 足迹列表 */
.footprint-list-container {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 360px;
    background-color: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 90;
    transition: transform 0.3s ease-in-out;
    transform: translateX(100%); /* 默认隐藏在右侧 */
    overflow-y: auto;
}

.footprint-list-container.show {
    transform: translateX(0);
}

/* 边缘触发区域 */
.map-edge-trigger {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 20px;
    z-index: 85;
    cursor: pointer;
}

.edge-indicator:hover {
    width: 12px;
    background-color: rgba(89, 95, 239, 1);
}
.list-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.list-header h2 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.list-toggle {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #5B5FEF;
}

.footprint-list {
    overflow-y: auto;
    flex: 1;
    padding: 10px;
}

.footprint-item {
    position: relative;
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    color: white;
    min-height: 120px; /* 统一最小高度 */
}

.footprint-item-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0) 100%);
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.footprint-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.footprint-image {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.footprint-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.footprint-info {
    position: relative;
    z-index: 2;
}

.footprint-title {
    color: white;
    margin-top: 0;
    margin-bottom: 8px;
}

.footprint-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 12px;
}

.footprint-meta span {
    background: rgb(255 235 59);
    color: #000;
    padding: 2px 8px;
    border-radius: 12px;
}

.footprint-address {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.footprint-date {
    color: #999;
}

.footprint-type {
    color: #5B5FEF;
}

.footprint-excerpt {
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.4;
}

.view-detail {
    background: rgba(255,255,255,0.9);
    color: #333;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.view-detail:hover {
    background: white;
}

.no-footprints {
    padding: 30px 15px;
    text-align: center;
    color: #999;
}

.no-footprints p {
    margin: 10px 0;
}

/* 详情弹窗与高德信息窗口统一样式 */
.footprint-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.footprint-modal.active {
    display: block;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
}

.modal-content {
    position: relative;
    width: 360px; /* 与footprint-list-container宽度一致 */
    max-width: 360px;
    height: auto; /* 内容自适应高度 */
    max-height: 80vh; /* 限制最大高度 */
    min-height: 120px; /* 统一最小高度 */
    background: white;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 高德地图信息窗口样式 - 与footprint-item完全一致 */
.amap-info-window {
    width: 360px !important; /* 匹配右侧列表宽度 */
    max-width: 360px !important;
    height: auto !important; /* 内容自适应高度 */
    max-height: 80vh !important; /* 限制最大高度 */
    min-height: 120px !important; /* 统一最小高度 */
    border-radius: 8px !important; /* 匹配列表项圆角 */
    overflow: hidden !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    padding: 0 !important; /* 清除默认内边距 */
    margin: 0 !important;
    border: none !important; /* 清除可能存在的默认边框 */
}

/* 清除高德信息窗口默认样式干扰 */
.amap-info-window .amap-info-content {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

/* 信息窗口关闭按钮样式统一 */
.modal-close, .info-close {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    background: rgba(0,0,0,0.5) !important;
    color: white !important;
    border: none !important;
    width: 30px !important;
    height: 30px !important;
    border-radius: 50% !important;
    font-size: 16px !important;
    cursor: pointer !important;
    z-index: 10 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background 0.3s !important;
}

/* 足迹列表中的文章标题（取消下划线+白色文字） */
.footprint-list .footprint-item .article-links-container .article-links a {
    color: #4da6ff !important;
    text-decoration: none !important; /* 关键：取消链接默认下划线 */
}

/* （可选）编辑标题按钮（保持浅白色，无下划线） */
.footprint-list .footprint-item .article-links-container .edit-title-btn {
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none !important; /* 确保按钮也无下划线 */
}

.modal-close:hover, .info-close:hover {
    background: rgba(0,0,0,0.8) !important;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.modal-header {
    margin-bottom: 15px;
}

.modal-title {
    margin: 0 0 10px 0;
    font-size: 22px;
    color: #333;
}

.modal-meta {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.modal-address {
    font-weight: bold;
}

.modal-date {
    color: #999;
    margin-left: 10px;
}

.modal-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.modal-gallery img {
    width: calc(33.333% - 7px);
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s;
}

.modal-gallery img:hover {
    transform: scale(1.03);
}

.modal-description {
    line-height: 1.6;
    color: #333;
}

.modal-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
}

.modal-action {
    background-color: #5B5FEF;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
}

.modal-action:hover {
    background-color: #4a50e0;
    color: white;
}

/* 图片查看器 */
.image-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
}

.image-viewer.active {
    display: flex;
}

.viewer-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 30px;
    color: white;
    cursor: pointer;
    z-index: 201;
}

.viewer-content {
    max-width: 90%;
    max-height: 80%;
}

.viewer-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

.viewer-prev, .viewer-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 40px;
    color: white;
    cursor: pointer;
    z-index: 201;
    width: 60px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.viewer-prev {
    left: 0;
}

.viewer-next {
    right: 0;
}

.viewer-prev:hover, .viewer-next:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* 错误提示 */
.wp-footprint-error {
    padding: 15px;
    background-color: #fff0f0;
    border-left: 4px solid #dc3232;
    color: #dc3232;
    border-radius: 4px;
    margin: 10px 0;
}

/* 区域统计样式 */
.region-stats {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.region-stats h4 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 8px;
}

.stats-list {
    max-height: 200px;
    overflow-y: auto;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 4px;
    margin-bottom: 5px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.stat-item:hover {
    background: #e9ecef;
    border-color: #5B5FEF;
}

.stat-item.active {
    background: #5B5FEF;
    color: white;
    border-color: #4a50e0;
}

.region-name {
    font-weight: 500;
    color: inherit;
}

.footprint-count {
    font-size: 12px;
    color: #6c757d;
    background: rgba(0,0,0,0.1);
    padding: 2px 8px;
    border-radius: 12px;
}

.stat-item.active .footprint-count {
    background: rgba(255,255,255,0.2);
    color: white;
}

/* 边界控制样式 */
.boundary-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.boundary-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.boundary-toggle:hover {
    background: #e9ecef;
}

.boundary-toggle.active {
    background: #5B5FEF;
    color: white;
    border-color: #4a50e0;
}

.boundary-toggle input[type="checkbox"] {
    margin: 0;
}

.boundary-toggle .toggle-text {
    font-size: 14px;
    font-weight: 500;
}

/* 加载状态样式 */
.stats-loading {
    text-align: center;
    color: #6c757d;
    padding: 20px;
}

.stats-loading p {
    margin: 0;
    font-size: 14px;
}

/* 响应式设计 - 统一移动端样式 */
@media (max-width: 768px) {
    .map-controls {
        justify-content: center;
    }
    
    .button-group:first-child {
        order: 3;
        width: 100%;
        justify-content: center;
    }
    
    .footprint-list-container,
    .modal-content,
    .amap-info-window {
        width: 95% !important;
        max-width: 95% !important;
    }
    
    .modal-body {
        max-height: calc(90vh - 40px);
    }
    
    .modal-gallery img {
        width: calc(50% - 5px);
    }
    
    .stat-item {
        flex-direction: row;
        align-items: flex-start;
        gap: 5px;
    }
    
    .footprint-count {
        align-self: flex-end;
    }
    
    .region-stats {
        margin-bottom: 15px;
        padding: 10px;
    }
}
    