/**
 * 人生地图 - 主样式文件
 */

/* 时间线事件卡片样式 */
.timeline-event-card {
    border-left: 4px solid #1e73be;
    padding: 20px;
    margin-bottom: 20px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}
.timeline-event-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}
.event-title {
    color: #1e73be;
    font-weight: 600;
    font-size: 24px;
    margin-bottom: 15px;
}
.event-meta {
    color: #555;
    margin-bottom: 15px;
}
.event-meta > div {
    margin-right: 15px;
    margin-bottom: 10px;
    display: inline-block;
}
.lead {
    font-size: 1.1rem;
    color: #333;
}
.border-left {
    border-left: 4px solid #1e73be;
    padding-left: 10px;
}
.event-details .mb-2 i, 
.event-impacts .mb-2 i {
    color: #1e73be;
    width: 20px;
    text-align: center;
}
.mb-2 {
    margin-bottom: 10px;
}
.mb-3 {
    margin-bottom: 15px;
}
.mr-1 {
    margin-right: 5px;
}
.detailed-content {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}
.map-container {
    margin-bottom: 20px;
}
.col-md-6 {
    width: 48%;
    display: inline-block;
    vertical-align: top;
}
@media (max-width: 768px) {
    .col-md-6 {
        width: 100%;
    }
}
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}
.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 时间线列表样式 */
.ditu-rensheng-timeline-list {
    list-style: none;
    padding-left: 30px;
    position: relative;
}
.ditu-rensheng-timeline-list:before {
    content: '';
    position: absolute;
    top: 0;
    left: 8px;
    height: 100%;
    width: 4px;
    background: #e9ecef;
}
.ditu-rensheng-timeline-item {
    position: relative;
    margin-bottom: 20px;
    padding-left: 20px;
}
.ditu-rensheng-timeline-item:before {
    content: '';
    position: absolute;
    left: -22px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #1e73be;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #1e73be;
}
.ditu-rensheng-event {
    color: #6c757d;
}
.ditu-rensheng-date {
    font-style: italic;
    color: #6c757d;
}

/* 地图样式 */
.timeline-popup {
    max-width: 300px;
}
.timeline-popup h3 {
    font-size: 16px;
    margin: 0 0 5px;
    color: #1e73be;
}
.timeline-popup p {
    margin: 5px 0;
    font-size: 14px;
}
.timeline-popup a {
    display: inline-block;
    margin-top: 10px;
    color: #1e73be;
    text-decoration: none;
}

/* 信息窗口样式 */
/* .ditu-infowindow {
    padding: 15px;
    max-width: 350px;
    overflow: hidden;
    font-family: "Microsoft YaHei", "Segoe UI", sans-serif;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 8px;
    background: #fff;
    border-top: 3px solid #1e73be;
    line-height: 1.5;
}

.ditu-infowindow h3 {
    font-size: 16px;
    font-weight: bold;
    margin: 0 0 10px 0;
    color: #1e73be;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
    position: relative;
}

.ditu-infowindow h3:after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 250px;
    height: 2px;
    background-color: #1e73be;
}

.ditu-infowindow p {
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

.ditu-infowindow p.date {
    color: #666;
    font-style: italic;
    font-size: 12px;
    padding-left: 18px;
    position: relative;
}

.ditu-infowindow p.date:before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%231e73be"><path d="M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 18H4V8h16v13z"/></svg>') no-repeat center center;
    background-size: contain;
}

.ditu-infowindow strong {
    font-weight: 600;
    color: #333;
}

.ditu-infowindow a {
    display: inline-block;
    margin-top: 12px;
    color: #fff;
    background-color: #1e73be;
    padding: 6px 12px;
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.ditu-infowindow a:hover {
    background-color: #155892;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
} */

/* 修改天地图信息窗口样式 */
.tdt-infowindow-content {
    font-family: "Microsoft YaHei", "Segoe UI", sans-serif !important;
}

.tdt-infowindow-content-wrapper {
    border-radius: 8px !important;
    overflow: hidden !important;
    box-shadow: 0 3px 14px rgba(0,0,0,0.2) !important;
}

.tdt-infowindow-close {
    top: 5px !important;
    right: 5px !important;
    color: #666 !important;
    font-weight: bold !important;
    width: 22px !important;
    height: 22px !important;
    font-size: 22px !important;
    line-height: 22px !important;
    opacity: 0.7 !important;
    border-radius: 50% !important;
    transition: all 0.2s ease !important;
}

.tdt-infowindow-close:hover {
    background-color: #f5f5f5 !important;
    opacity: 1 !important;
}

/* 信息窗口位置调整 */
.tdt-infowindow-tip {
    opacity: 0.9 !important;
}

/* 错误和加载状态样式改进 */
.ditu-rensheng-no-data,
.ditu-rensheng-error,
.map-loading,
.map-error {
    padding: 20px;
    text-align: center;
    color: #666;
    background-color: #f9f9f9;
    border: 1px dashed #ddd;
    margin: 10px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.ditu-rensheng-error,
.map-error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.map-loading {
    color: #004085;
    background-color: #cce5ff;
    border-color: #b8daff;
}

/* 地图容器样式 */
.ditu-rensheng-map-container {
    position: relative;
    margin-bottom: 30px;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
} 
.ditu-infowindow {
    width: auto !important; /* 尝试自动宽度 */
    /* 或者设置你期望的最小/最大宽度 */
    /* min-width: 200px !important; */
    /* max-width: 400px !important; */
}
/* 信息窗口容器样式 */
.ditu-enhanced-infowindow {
    width: 320px;
    max-width: 100%;
    max-height: 400px;
    overflow: auto;
    position: relative;
    padding: 0;
    margin: 0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* 背景图片层 */
.ditu-infowindow-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: brightness(0.7);
    z-index: 1;
    opacity: 0.7;
}

/* 内容层 */
.ditu-infowindow-content {
    position: relative;
    z-index: 2;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: 8px;
    margin: 0;
}

/* 标题样式 */
.ditu-infowindow-content h3 {
    margin: 0 0 10px 0;
    padding: 0;
    font-size: 18px;
    color: #333;
    text-shadow: 0 1px 1px rgba(255,255,255,0.8);
}

/* 段落样式 */
.ditu-infowindow-content p {
    margin: 5px 0;
    line-height: 1.5;
    color: #333;
}

/* 日期样式 */
.ditu-infowindow-content p.date {
    font-style: italic;
    color: #555;
}

/* 链接样式 */
.ditu-infowindow-content a {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 12px;
    background-color: #2D8CF0;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.ditu-infowindow-content a:hover {
    background-color: #2380E1;
}

/* 自适应宽度容器 */
.ditu-infowindow-wrapper {
    max-width: 100%;
    min-width: 250px;
}

/* 天地图信息窗口样式覆盖 */
.tdt-infowindow-content {
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
}

.tdt-infowindow-content-wrapper {
    margin: 0 !important;
}

/* 适配移动设备 */
@media (max-width: 480px) {
    .ditu-enhanced-infowindow {
        width: 280px;
    }
}