/* ============================================================
   快速查件 — 重新设计样式（参考图风格）
   ============================================================ */

/* --------------------------------------------------------------
   搜索框区域
   -------------------------------------------------------------- */
.tracking-input {
  background-color: #fff !important;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 10px 15px;
  font-size: 14px;
  height: 44px;
  width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tracking-input:focus {
  border-color: #1460ac;
  box-shadow: 0 0 0 2px rgba(20, 96, 172, 0.15);
  outline: none;
}

.tracking-input::placeholder {
  color: #999;
}

.btn-tracking {
  background-color: #1460ac;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 10px 30px;
  font-size: 14px;
  font-weight: 600;
  height: 44px;
  width: 100%;
  cursor: pointer;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

.btn-tracking:hover {
  background-color: #0f4a87;
}

.btn-tracking:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.tracking-status-row {
  margin-top: 15px;
}

/* --------------------------------------------------------------
   状态提示
   -------------------------------------------------------------- */
.tracking-loader {
  text-align: center;
  padding: 15px;
  color: #1460ac;
  font-size: 14px;
}

.tracking-loader .fa-spinner {
  margin-right: 8px;
}

.tracking-error {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
  padding: 12px 15px;
  border-radius: 4px;
  margin-top: 10px;
  font-size: 14px;
}

.tracking-error .fa-exclamation-circle {
  margin-right: 8px;
}

.tracking-empty {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.tracking-empty .fa-search {
  font-size: 48px;
  color: #ddd;
  margin-bottom: 15px;
  display: block;
}

.tracking-empty p {
  font-size: 16px;
  margin: 0;
}

.hidden {
  display: none !important;
}

/* --------------------------------------------------------------
   查询结果卡片
   -------------------------------------------------------------- */
.tracking-card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  margin-bottom: 30px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

/* 运单号码标题栏 - 蓝色背景 */
.tracking-card-header {
  background: #1460ac;
  color: #fff;
  padding: 16px 24px;
}

.tracking-card-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
}

.tracking-card-title .fa-barcode {
  margin-right: 8px;
}

/* --------------------------------------------------------------
   时间线（参考图风格）
   原数据 padding: 20px 24px 20px 32px;
   -------------------------------------------------------------- */
.tracking-timeline {
  padding: 20px 40px 20px 40px;
  position: relative;
}

/* 左侧竖线 - 时间轴中心线 
    left: 16px;
    top: 28px;
    bottom: 28px;
    width: 2px;
*/
.tracking-timeline::before {
  content: "";
  position: absolute;
  left: 22px;
  top: 28px;
  bottom: 28px;
  width: 4px;
  background: #5a8f3a;
}

.tracking-timeline-item {
  display: flex;
  align-items: flex-start;
  position: relative;
  margin-bottom: 12px;
  min-height: 22px;
}

.tracking-timeline-item:last-child {
  margin-bottom: 0;
}

/* 空心圆点 - 绝对定位，圆心对齐竖线
   timeline padding-left=32px，竖线在 left: 16px（相对于 timeline）
   item 的左边缘在 32px（相对于 timeline）
   圆点中心需要在 16px，所以相对于 item：16 - 32 = -16px
   圆点宽 12px，left 边缘：-16 - 6 = -22px */
.tracking-timeline-dot {
  position: absolute;
  left: -22px;
  top: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #5a8f3a;
  z-index: 1;
  box-sizing: border-box;
}

/* 所有节点统一使用相同的圆点样式 */
.tracking-timeline-item.latest .tracking-timeline-dot {
  width: 20px;
  height: 20px;
  border-width: 6px;
  left: -26px;
  top: 3px;
}

.tracking-timeline-content {
  flex: 1;
  min-width: 0;
}

.tracking-timeline-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
}

.tracking-timeline-info {
  flex: 1;
  min-width: 0;
}

.tracking-status {
  font-weight: 600;
  font-size: 16px;
  color: #1460ac;
}

.tracking-location {
  font-size: 14px;
  color: #666;
  margin-top: 4px;
}

.tracking-location .fa-map-marker {
  margin-right: 6px;
  color: #999;
}

.tracking-datetime {
  font-size: 14px;
  color: #666;
  white-space: nowrap;
  flex-shrink: 0;
}

.tracking-datetime .fa-clock-o {
  margin-right: 4px;
  color: #999;
}

.tracking-memo {
  font-size: 14px;
  color: #777;
  font-style: italic;
  margin-top: 4px;
}

.tracking-no-data {
  padding: 30px 24px;
  text-align: center;
  color: #999;
  font-size: 14px;
}

.tracking-no-data .fa-info-circle {
  margin-right: 8px;
  color: #ccc;
}

/* --------------------------------------------------------------
   分箱详细信息（参考图风格）
   -------------------------------------------------------------- */
.tracking-sub-packages {
  padding: 0 24px 24px;
}

/* 分箱标题 */
.tracking-sub-title {
  font-size: 16px;
  font-weight: 600;
  color: #5a8f3a;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e5e5e5;
}

.tracking-sub-title .fa-suitcase {
  margin-right: 8px;
}

/* 分箱运单号标题栏 - 绿色背景 */
.tracking-sub-header-bar {
  background: #5a8f3a;
  color: #fff;
  padding: 12px 16px;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.tracking-sub-header-left {
  font-size: 14px;
  font-weight: 600;
}

.tracking-sub-header-left .fa-plane {
  margin-right: 6px;
}

/* 右侧主单号标签 */
.tracking-sub-header-right {
  font-size: 13px;
  background: rgba(255, 255, 255, 0.25);
  padding: 4px 12px;
  border-radius: 4px;
}

/* 分箱轨迹列表 */
.tracking-sub-body {
  padding: 0 8px;
}

.tracking-sub-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tracking-sub-list li {
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.tracking-sub-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.tracking-sub-item-left {
  flex: 1;
  min-width: 0;
}

.tracking-sub-item-right {
  flex-shrink: 0;
}

.tracking-sub-status {
  font-weight: 600;
  color: #333;
}

.tracking-sub-loca {
  color: #666;
}

.tracking-sub-loca .fa-map-marker {
  margin-right: 4px;
  color: #999;
}

.tracking-sub-memo {
  color: #888;
  font-style: italic;
}

.tracking-sub-date {
  color: #999;
  font-size: 12px;
}

.tracking-sub-date .fa-clock-o {
  margin-right: 4px;
}

/* --------------------------------------------------------------
   响应式适配
   -------------------------------------------------------------- */
@media only screen and (max-width: 767px) {
  .tracking-timeline {
    padding-left: 36px;
  }

  .tracking-timeline::before {
    left: 24px;
  }

  .tracking-timeline-item {
    flex-direction: column;
  }

  .tracking-timeline-dot {
    margin-right: 0;
    margin-bottom: 8px;
  }

  .tracking-timeline-content {
    width: 100%;
  }

  .tracking-timeline-main {
    flex-direction: column;
    align-items: flex-start;
  }

  .tracking-sub-header-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .tracking-sub-list li {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .btn-tracking {
    margin-top: 10px;
  }
}

@media only screen and (max-width: 991px) {
  .tracking-input {
    margin-bottom: 10px;
  }
}
