/* ============================================================
   物流追踪页面专用样式 - tracking.css
   配色：以 #ff6b35 橙红为主色，与 main.css 保持统一
   ============================================================ */

/* ── 查询英雄区 ────────────────────────── */
.tracking-hero {
  padding: 0.8rem 0 1rem;
  text-align: center;
}

.tracking-hero-title {
  font-size: 0.693rem;
  font-weight: 700;
  color: #1e1e1e;
  margin: 0 0 0.267rem;
}

.tracking-hero-sub {
  font-size: 0.373rem;
  color: #666;
  margin: 0 0 0.8rem;
}

.tracking-search-box {
  max-width: 9.6rem;
  margin: 0 auto;
}

.search-input-wrap {
  display: flex;
  border: 0.053rem solid #e0e0e0;
  border-radius: 0.133rem;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 0.053rem 0.32rem rgba(0,0,0,0.08);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.search-input-wrap:focus-within {
  border-color: #ff6b35;
  box-shadow: 0 0.053rem 0.32rem rgba(255, 107, 53, 0.18);
}

.tracking-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0.4rem 0.533rem;
  font-size: 0.4rem;
  color: #1e1e1e;
  background: transparent;
}

.tracking-input::placeholder {
  color: #bbb;
}

/* 输入框抖动动画（校验失败时） */
@keyframes inputShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-0.133rem); }
  40%, 80% { transform: translateX(0.133rem); }
}

.input-shake {
  animation: inputShake 0.4s ease;
}

.tracking-btn {
  padding: 0 0.693rem;
  background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
  color: #fff;
  border: none;
  font-size: 0.4rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
  min-width: 1.8rem;
}

.tracking-btn:hover {
  opacity: 0.9;
}

.tracking-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.search-tip {
  font-size: 0.32rem;
  color: #999;
  margin: 0.267rem 0 0;
}

/* ── 结果容器 ──────────────────────── */
.tracking-result-wrap {
  margin: 0.533rem 0 1.067rem;
}

/* ── 错误提示 ──────────────────────── */
.tracking-error {
  text-align: center;
  padding: 0.8rem;
  background: #fff8f5;
  border: 0.027rem solid #ffd0bb;
  border-radius: 0.16rem;
}

.error-icon {
  font-size: 0.8rem;
  margin-bottom: 0.267rem;
}

.error-msg {
  font-size: 0.4rem;
  color: #cc4a1a;
  margin: 0;
}

/* ── 结果卡片 ──────────────────────── */
.tracking-card {
  background: #fff;
  border-radius: 0.213rem;
  box-shadow: 0 0.053rem 0.427rem rgba(0,0,0,0.1);
  overflow: hidden;
}

.tracking-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.267rem;
  padding: 0.533rem 0.693rem;
  background: linear-gradient(135deg, #fff5f0 0%, #fff 100%);
  border-bottom: 0.027rem solid #f0e8e4;
}

.waybill-info {
  display: flex;
  align-items: center;
  gap: 0.267rem;
}

.waybill-label {
  font-size: 0.347rem;
  color: #999;
}

.waybill-no {
  font-size: 0.453rem;
  font-weight: 700;
  color: #1e1e1e;
  letter-spacing: 0.04em;
}

.latest-status-badge {
  font-size: 0.347rem;
  padding: 0.133rem 0.373rem;
  border-radius: 9999px;
  background: #fff3ed;
  color: #ff6b35;
  border: 0.027rem solid #ffc4a4;
  font-weight: 600;
  max-width: 6rem;
  word-break: break-all;
  text-align: center;
}

.latest-status-badge.delivered {
  background: #f0fdf4;
  color: #16a34a;
  border-color: #86efac;
}

/* ── 时间轴 ──────────────────────────── */
.tracking-timeline {
  padding: 0.533rem 0.693rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 0.373rem 0.08rem 1fr;
  grid-template-rows: auto 1fr;
  gap: 0 0.373rem;
  padding-bottom: 0.427rem;
  position: relative;
}

.timeline-item:last-child .tl-line {
  display: none;
}

/* 圆点 */
.tl-dot {
  grid-column: 1;
  grid-row: 1;
  width: 0.267rem;
  height: 0.267rem;
  border-radius: 50%;
  background: #d1d5db;
  border: 0.053rem solid #d1d5db;
  margin-top: 0.107rem;
  justify-self: center;
  flex-shrink: 0;
  transition: background 0.2s;
}

.tl-dot-active {
  background: #ff6b35;
  border-color: #ff6b35;
  box-shadow: 0 0 0 0.08rem rgba(255, 107, 53, 0.25);
  width: 0.32rem;
  height: 0.32rem;
}

/* 竖线 */
.tl-line {
  grid-column: 1;
  grid-row: 2;
  width: 0.053rem;
  background: #e5e7eb;
  justify-self: center;
  min-height: 0.267rem;
}

/* 内容 */
.tl-content {
  grid-column: 3;
  grid-row: 1 / 3;
  padding-bottom: 0.107rem;
}

.tl-time {
  display: flex;
  align-items: baseline;
  gap: 0.213rem;
  margin-bottom: 0.107rem;
}

.tl-date {
  font-size: 0.347rem;
  color: #888;
}

.tl-hour {
  font-size: 0.32rem;
  color: #bbb;
}

.tl-desc {
  font-size: 0.4rem;
  color: #374151;
  line-height: 1.6;
}

/* 最新节点高亮 */
.timeline-item.is-latest .tl-date {
  color: #ff6b35;
  font-weight: 600;
}

.timeline-item.is-latest .tl-hour {
  color: #f7931e;
}

.timeline-item.is-latest .tl-desc {
  color: #1e1e1e;
  font-weight: 600;
}

/* ── 卡片底部 ────────────────────────── */
.tracking-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.267rem;
  padding: 0.427rem 0.693rem;
  background: #fafafa;
  border-top: 0.027rem solid #f0f0f0;
}

.tracking-card-footer p {
  font-size: 0.347rem;
  color: #888;
  margin: 0;
}

.consult-btn {
  display: inline-block;
  padding: 0.213rem 0.533rem;
  background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
  color: #fff;
  border-radius: 9999px;
  font-size: 0.373rem;
  font-weight: 600;
  transition: opacity 0.2s, transform 0.2s;
  white-space: nowrap;
}

.consult-btn:hover {
  opacity: 0.9;
  transform: translateY(-0.027rem);
  color: #fff;
}

/* ── 使用说明 ────────────────────────── */
.tracking-guide {
  padding: 0.533rem 0 1.067rem;
}

.guide-list {
  display: flex;
  gap: 0.533rem;
  flex-wrap: wrap;
}

.guide-item {
  display: flex;
  align-items: flex-start;
  gap: 0.373rem;
  flex: 1;
  min-width: 5.333rem;
  background: #fff;
  border-radius: 0.16rem;
  padding: 0.533rem;
  box-shadow: 0 0.027rem 0.213rem rgba(0,0,0,0.06);
}

.guide-icon {
  width: 0.693rem;
  height: 0.693rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
  color: #fff;
  font-size: 0.4rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.guide-content h4 {
  font-size: 0.427rem;
  color: #1e1e1e;
  margin: 0 0 0.133rem;
  font-weight: 600;
}

.guide-content p {
  font-size: 0.347rem;
  color: #666;
  margin: 0;
  line-height: 1.6;
}

/* ── 响应式 - 桌面端 ─────────────────── */
@media screen and (min-width: 1024px) {
  .tracking-hero-title {
    font-size: 1.4rem;
  }

  .tracking-hero-sub {
    font-size: 0.75rem;
  }

  .tracking-input {
    font-size: 0.8rem;
    padding: 0.7rem 1rem;
  }

  .tracking-btn {
    font-size: 0.8rem;
    padding: 0 1.4rem;
  }

  .search-tip {
    font-size: 0.64rem;
  }

  .waybill-no {
    font-size: 0.9rem;
  }

  .waybill-label {
    font-size: 0.7rem;
  }

  .latest-status-badge {
    font-size: 0.7rem;
    padding: 0.267rem 0.75rem;
  }

  .tl-dot {
    width: 0.533rem;
    height: 0.533rem;
    margin-top: 0.133rem;
  }

  .tl-dot-active {
    width: 0.64rem;
    height: 0.64rem;
  }

  .tl-date {
    font-size: 0.7rem;
  }

  .tl-hour {
    font-size: 0.64rem;
  }

  .tl-desc {
    font-size: 0.8rem;
  }

  .tracking-card-footer p {
    font-size: 0.7rem;
  }

  .consult-btn {
    font-size: 0.75rem;
    padding: 0.4rem 1rem;
  }

  .guide-item {
    padding: 1rem;
  }

  .guide-icon {
    width: 1.4rem;
    height: 1.4rem;
    font-size: 0.8rem;
  }

  .guide-content h4 {
    font-size: 0.85rem;
  }

  .guide-content p {
    font-size: 0.7rem;
  }
}
