/* =========================================
   时间轴与结果卡片 (海内外共用高级版)
   路径: /static/shared/css/tracking-info.css
========================================= */

.tracking-info-container {
    font-family: -apple-system, Arial, sans-serif; background-color: #fff;
    padding: 30px; border-radius: 12px; color: #333;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1); margin-bottom: 30px;
    width: 900px; max-width: 95vw; box-sizing: border-box; text-align: left;
}

/* 头部信息 */
.tracking-info-container .header {
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 2px solid #f3f4f6; padding-bottom: 15px; margin-bottom: 25px;
}
.tracking-info-container .header h2, .tracking-info-container .header h3 {
    font-size: 16px; margin: 0; color: #4b5563; font-weight: normal;
}
.tracking-info-container .header strong { color: #111827; font-size: 18px; }
.tracking-info-container .header .status .highlight { color: #007bff; font-weight: bold; font-size: 16px; margin-left: 8px;}

/* 核心内容区：左右分栏 */
.tracking-info-container .tracking-content { display: flex; justify-content: space-between; gap: 40px; }

/* 左侧概览 */
.tracking-info-container .overview {
    width: 35%; background: #f9fafb; padding: 24px; border-radius: 10px; border: 1px solid #e5e7eb;
}
.tracking-info-container .overview h3 { font-size: 15px; margin: 0 0 10px 0; color: #374151; }
.tracking-info-container .overview h3 span { font-weight: 600; color: #111827; }
.tracking-info-container .overview p { font-size: 14px; margin: 0 0 12px 0; color: #4b5563; line-height: 1.5; }
.tracking-info-container .overview p strong { color: #1f2937; }
.tracking-info-container .overview p.cargo-ready-date,
.tracking-info-container .overview p.customs-clearance { color: #0ea5e9; font-weight: 600; background: #e0f2fe; padding: 4px 8px; border-radius: 4px; display: inline-block;}

/* 右侧时间轴 */
.tracking-info-container .timeline { width: 60%; padding-left: 30px; border-left: 3px solid #e5e7eb; position: relative; }
.tracking-info-container .timeline-item { position: relative; margin-bottom: 30px; padding-left: 30px; }
.tracking-info-container .timeline-item p { margin: 0 0 6px 0; font-size: 15px; color: #374151; line-height: 1.6; }

/* 🌟 圆点核心样式 (高级大圆点) 🌟 */
.tracking-info-container .timeline-dot {
    position: absolute; left: -41px; top: 2px; /* 完美居中对齐左侧粗线 */
    width: 18px; height: 18px; border-radius: 50%; border: 4px solid #fff;
    box-shadow: 0 0 0 1px #e5e7eb, 0 2px 4px rgba(0,0,0,0.1); background: #9ca3af; z-index: 2; transition: all 0.3s;
}

/* 过去状态 -> 亮蓝色 */
.tracking-info-container .timeline-item.past-event .timeline-dot {
    background-color: #3b82f6; box-shadow: 0 0 0 2px #bfdbfe, 0 2px 6px rgba(59,130,246,0.3);
}
.tracking-info-container .timeline-item.past-event { border-left: 3px solid #3b82f6; margin-left: -33px; padding-left: 60px;} /* 动态蓝线填充 */

/* 未来状态 -> 灰色/红色 */
.tracking-info-container .timeline-item.future-event .timeline-dot {
    background-color: #ef4444; box-shadow: 0 0 0 2px #fecaca;
}
.tracking-info-container .timeline-item.future-event p { color: #9ca3af; }

/* 兜底跳转卡片 (Fallback Box) */
.fallback-alert-box {
    display: flex; align-items: flex-start; background-color: #fffbeb; border: 1px solid #fde68a;
    border-radius: 12px; padding: 24px; margin: 0; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); width: 100%; box-sizing: border-box;
}
.fallback-icon { font-size: 28px; margin-right: 16px; margin-top: 2px; }
.fallback-content { flex: 1; }
.fallback-title { margin: 0 0 8px 0; color: #92400e; font-size: 18px; font-weight: bold;}
.fallback-desc { color: #b45309; font-size: 15px; margin: 0 0 15px 0; line-height: 1.5; }
.fallback-copy-area { background-color: #fff; border: 1px dashed #d97706; padding: 12px; border-radius: 6px; color: #92400e; user-select: all; margin-bottom: 20px;}
.fallback-copy-area .copy-hint { font-size: 12px; color: #b45309; margin-left: 10px; user-select: none; }
.btn-official-redirect {
    display: inline-block; background-color: #f59e0b; color: white; padding: 12px 24px;
    border-radius: 8px; text-decoration: none; font-weight: bold; font-size: 15px;
    transition: all 0.2s ease; box-shadow: 0 2px 4px rgba(245,158,11,0.3);
}
.btn-official-redirect:hover { background-color: #d97706; transform: translateY(-1px); }
/* ========================================= */
/* 海外版 (Global) 专属追踪卡片 UI (海空运通用) */
/* ========================================= */

.global-tracking-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    margin-bottom: 30px;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    width: 900px; max-width: 95vw; box-sizing: border-box; text-align: left;
}

/* 顶部 Header */
.global-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
}

.global-card-header .header-left {
    font-size: 15px;
    color: #333;
}

.global-card-header .legend {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #666;

}

.legend-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}
.legend-dot.actual { background-color: #1890ff; }
.legend-dot.estimated { background-color: #ff4d4f; }

/* 身体部分：左侧 + 右侧网格布局 */
.global-card-body {
    display: flex;
    padding: 30px;
    gap: 40px;
}

/* 左侧信息大纲 (灰色背景框) */
.global-sidebar {
    flex: 0 0 320px;
    background-color: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 2.2;
    color: #333;
}

.global-sidebar hr {
    border: none;
    border-top: 1px dashed #ccc;
    margin: 15px 0;
}

.global-sidebar .op-title {
    font-size: 15px;
    margin-bottom: 15px;
    color: #222;
}

.global-sidebar .highlight-info {
    color: #0088cc;
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 15px;
}

.global-sidebar .highlight-val {
    color: #666;
    font-weight: normal;
}

/* 右侧动态时间轴 */
.global-timeline-wrapper {
    flex: 1;
    padding-top: 10px;
}

.global-timeline-item {
    position: relative;
    padding-left: 30px;
    padding-bottom: 30px;
}

.global-timeline-item:last-child {
    padding-bottom: 0;
}

/* 时间轴的主轴线 (左侧粗蓝/灰线) */
.timeline-line {
    position: absolute;
    left: 7px;
    top: 20px;
    bottom: -20px;
    width: 3px;
}
.global-timeline-item:last-child .timeline-line {
    display: none; /* 最后一个节点不需要向下延伸线 */
}
.line-actual { background-color: #1890ff; }
.line-estimated { background-color: #eee; } /* 未来的线是灰色的 */

/* 时间轴的圆点 */
.timeline-circle {
    position: absolute;
    left: 0;
    top: 3px;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    z-index: 2;
}
.dot-actual { background-color: #1890ff; }
.dot-estimated { background-color: #ff4d4f; }

.timeline-content p {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #333;
    line-height: 1.6;
}
.timeline-content .flight-info {
    font-size: 13px;
    color: #888;
}

/* 响应式：手机端时上下排列 */
@media (max-width: 768px) {
    .global-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .global-card-header .legend {
        align-self: flex-start;
    }
    .global-card-body {
        flex-direction: column;
        padding: 20px;
    }
    .global-sidebar {
        flex: auto;
    }
}