/* ============================================
 * 进度查询系统 - 查询结果卡片视觉覆盖层
 * 不改变任何原始功能，仅优化三端排版
 * ============================================ */

/* === 订单卡片：增强圆角和阴影层次 === */
.animate-fadeIn.flex.flex-col.overflow-hidden.rounded-xl.border.border-slate-200.bg-white.shadow-sm {
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px 0 rgba(0,0,0,0.04), 0 1px 2px -1px rgba(0,0,0,0.04);
}

/* === 卡片头部：确保状态徽章不溢出 === */
.pulse-badge {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 移动端状态徽章缩小 */
@media (max-width: 640px) {
  .pulse-badge {
    font-size: 10px;
    padding: 0.25rem 0.5rem;
    max-width: 8rem;
  }
}

/* === 信息区字段：尺寸由 JS 类统一控制（标签=值，同号），此文件不再覆盖 === */

/* === 进度条：优化高度和文字 === */
.animate-fadeIn .relative.h-7 {
  height: 1.75rem;
}

/* 进度条文字确保不被截断 */
.animate-fadeIn .relative.h-7 > div:last-child {
  font-size: 11px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* === 底部操作区：按钮移动端优化 === */
@media (max-width: 640px) {
  .animate-fadeIn .mt-auto.flex.gap-2\.5 {
    gap: 0.5rem;
    padding: 0.625rem 0.875rem;
  }
  .animate-fadeIn .mt-auto.flex.gap-2\.5 button {
    padding: 0.5rem 0.75rem;
    font-size: 11px;
  }
}

/* === 暗色模式微调 === */
@media (prefers-color-scheme: dark) {
  .animate-fadeIn.flex.flex-col.overflow-hidden.rounded-xl.border.border-slate-200.bg-white.shadow-sm {
    box-shadow: 0 1px 3px 0 rgba(0,0,0,0.2);
  }
}

/* === 统计条：移动端紧凑化 === */
@media (max-width: 640px) {
  .mb-3.flex.flex-wrap.items-center.gap-x-4.gap-y-1 {
    gap: 0.5rem 0.875rem;
    padding: 0.5rem 0.75rem;
    font-size: 11px;
  }
}

/* === 多订单网格：移动端单列间距优化 === */
@media (max-width: 639px) {
  .grid.gap-3.sm\:grid-cols-2 {
    gap: 0.625rem;
  }
}

/* ============================================
 * v2.7.6 抽屉改圆角浮动卡片 / 回退电脑端拉伸平铺
 * ============================================ */

/* === 1. 右侧抽屉式公告（v2.7.6：收窄标签 + 圆角浮动卡片） === */
.jd-drawer-tab {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 45;
  writing-mode: vertical-rl;
  letter-spacing: 0.25em;
  padding: 11px 6px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  color: #fff;
  background: #2563eb;
  border: none;
  border-radius: 8px 0 0 8px;
  box-shadow: -2px 2px 6px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: background 0.15s;
}
.jd-drawer-tab:hover { background: #1d4ed8; }
.jd-drawer-mask {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(15, 23, 42, 0.32);
}
.jd-drawer {
  position: fixed;
  top: 50%;
  right: 14px;
  width: min(340px, 86vw);
  max-height: min(72vh, 540px);
  z-index: 61;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 14px 44px rgba(15, 23, 42, 0.24);
  transform: translateY(-50%) translateX(calc(100% + 30px));
  opacity: 0;
  transition: transform 0.28s ease, opacity 0.28s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.jd-drawer-open { transform: translateY(-50%) translateX(0); opacity: 1; }
.jd-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  font-weight: 700;
  font-size: 14.5px;
  color: #0f172a;
}
.jd-drawer-close {
  border: none;
  background: transparent;
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
  padding: 4px 10px;
  border-radius: 8px;
  flex-shrink: 0;
}
.jd-drawer-close:hover { background: #e2e8f0; color: #0f172a; }
.jd-drawer-body {
  padding: 14px 16px;
  overflow-y: auto;
  font-size: 13.5px;
  line-height: 1.9;
  color: #334155;
  white-space: pre-wrap;
  word-break: break-word;
}
.dark .jd-drawer { background: #1e293b; border-color: #334155; }
.dark .jd-drawer-head { border-bottom-color: #334155; background: #0f172a; color: #f1f5f9; }
.dark .jd-drawer-close { color: #94a3b8; }
.dark .jd-drawer-close:hover { background: #334155; color: #f8fafc; }
.dark .jd-drawer-body { color: #cbd5e1; }

/* === 3. 帮助中心页面 === */
.jd-help {
  font-size: 14px;
  line-height: 1.9;
  color: #334155;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 22px 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.jd-help h1 {
  font-size: 21px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 6px;
}
.jd-help .sub {
  color: #64748b;
  font-size: 13px;
  margin-bottom: 6px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e2e8f0;
}
.jd-help h2 {
  font-size: 16px;
  font-weight: 700;
  color: #1e3a8a;
  margin: 24px 0 10px;
  padding-left: 10px;
  border-left: 4px solid #3b82f6;
}
.jd-help h3 {
  font-size: 14.5px;
  font-weight: 600;
  color: #0f172a;
  margin: 15px 0 6px;
}
.jd-help p { margin: 6px 0; }
.jd-help ul { margin: 6px 0 6px 2px; padding-left: 18px; list-style: disc; }
.jd-help li { margin: 5px 0; }
.jd-help b, .jd-help strong { color: #0f172a; }
.jd-help .warn {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 10px 13px;
  color: #92400e;
  font-size: 13px;
  margin: 10px 0;
}
.jd-help .tip {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 10px 13px;
  color: #1e40af;
  font-size: 13px;
  margin: 10px 0;
}
.jd-help table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 10px 0;
}
.jd-help th, .jd-help td {
  border: 1px solid #e2e8f0;
  padding: 8px 10px;
  text-align: left;
}
.jd-help th { background: #f1f5f9; color: #0f172a; font-weight: 600; }
.dark .jd-help { background: #1e293b; border-color: #334155; color: #cbd5e1; }
.dark .jd-help h1, .dark .jd-help h3 { color: #f8fafc; }
.dark .jd-help h2 { color: #93c5fd; }
.dark .jd-help b, .dark .jd-help strong { color: #f1f5f9; }
.dark .jd-help .sub { color: #94a3b8; border-bottom-color: #334155; }
.dark .jd-help .warn {
  background: rgba(251, 191, 36, 0.08);
  border-color: rgba(251, 191, 36, 0.35);
  color: #fcd34d;
}
.dark .jd-help .tip {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.35);
  color: #93c5fd;
}
.dark .jd-help th { background: #334155; color: #f1f5f9; }
.dark .jd-help th, .dark .jd-help td { border-color: #334155; }


/* ============================================
 * v4.0 广告位样式（后台「广告管理」配置）
 * 四种类型：顶部文字条 / 悬浮窗 / 底部横幅 / 弹窗(居中+右下角)
 * 支持：自动倒计时关闭角标、图片弹窗、延迟显示
 * 克制设计：细边框、轻阴影、不遮操作
 * ============================================ */
.jd-ad { z-index: 88; }
.jd-ad a.jd-ad-link {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; color: inherit;
}
.jd-ad .jd-ad-close {
  flex-shrink: 0; border: none; background: transparent;
  color: #94a3b8; font-size: 16px; line-height: 1;
  cursor: pointer; padding: 2px 6px; border-radius: 4px;
}
.jd-ad .jd-ad-close:hover { background: rgba(0,0,0,.06); color: #334155; }

/* 自动倒计时角标（duration>0 时显示，如 10、9、8…） */
.jd-ad-timer {
  flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 5px;
  border-radius: 99px; font-size: 11px; font-weight: 600;
  background: rgba(0,0,0,.45); color: #fff;
}
.jd-ad-timer:empty { display: none; }

/* === 顶部文字条 === */
.jd-ad-text {
  position: fixed; top: 0; left: 0; right: 0;
  background: linear-gradient(90deg, #1e3a8a, #2563eb);
  color: #fff; font-size: 13px;
  padding: 6px 16px;
  box-shadow: 0 1px 4px rgba(30,58,138,.2);
}
.jd-ad-text a.jd-ad-link { justify-content: center; }
.jd-ad-text .jd-ad-timer { margin-right: 4px; background: rgba(255,255,255,.25); }
.jd-ad-text .jd-ad-close { color: rgba(255,255,255,.7); position: absolute; right: 8px; top: 50%; transform: translateY(-50%); }
.jd-ad-text .jd-ad-close:hover { background: rgba(255,255,255,.15); color: #fff; }
/* 顶部广告占位：给下面内容让出高度（52px 顶栏 + 广告） */
.jd-ad-text + #root { padding-top: 8px; }

/* === 悬浮窗 ===
   电脑端：右下角客服按钮(右下角48px)上方，避开侧边栏
   手机端：左下角 */
.jd-ad-float {
  position: fixed; left: 16px; bottom: 16px;
  max-width: 260px; background: #fff;
  border: 1px solid #e2e8f0; border-radius: 12px;
  padding: 10px 14px; font-size: 13px; color: #334155;
  box-shadow: 0 6px 20px rgba(15,23,42,.12);
}
.jd-ad-float a.jd-ad-link { align-items: flex-start; }
.jd-ad-float .jd-ad-timer { position: absolute; top: 8px; right: 34px; }
.jd-ad-float .jd-ad-close { position: absolute; top: 6px; right: 6px; }
.dark .jd-ad-float { background: #1e293b; border-color: #334155; color: #cbd5e1; }
.dark .jd-ad-float .jd-ad-close { color: #64748b; }
.dark .jd-ad-float .jd-ad-close:hover { background: #334155; color: #f1f5f9; }

/* === 横幅广告（抽屉式）：从左侧滑入的圆角卡片，头部标题+独立关闭按钮 === */
.jd-ad-banner {
  position: fixed; left: 0; top: 50%; transform: translateY(-50%);
  width: min(88vw, 300px); background: #fff;
  border: 1px solid #e2e8f0; border-right: none;
  border-radius: 0 14px 14px 0;
  overflow: hidden; z-index: 200;
  box-shadow: 4px 8px 24px rgba(15,23,42,.14);
  animation: jdAdBannerIn .35s ease;
}
@keyframes jdAdBannerIn {
  from { opacity: 0; transform: translateY(-50%) translateX(-100%); }
  to { opacity: 1; transform: translateY(-50%) translateX(0); }
}
/* 头部：标题左 + 倒计时/关闭右（独立不重叠） */
.jd-ad-banner-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 12px; background: #f8fafc;
  border-bottom: 1px solid #eef2f7;
}
.jd-ad-banner-title {
  font-size: 13px; font-weight: 600; color: #0f172a;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1; min-width: 0;
}
.jd-ad-banner-head-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.jd-ad-banner-head-right .jd-ad-timer { background: rgba(0,0,0,.45); }
.jd-ad-banner-head-right .jd-ad-close {
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(0,0,0,.4); color: #fff; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.jd-ad-banner-head-right .jd-ad-close:hover { background: rgba(0,0,0,.65); }
/* 内容区 */
.jd-ad-banner-img { display: block; width: 100%; max-height: 150px; object-fit: cover; }
.jd-ad-banner-text {
  padding: 11px 13px 4px; font-size: 13px; color: #334155; line-height: 1.7;
}
.jd-ad-banner-btn {
  display: block; margin: 8px 13px 12px; text-align: center;
  background: #2563eb; color: #fff !important; text-decoration: none;
  border-radius: 7px; padding: 7px 0; font-size: 13px; font-weight: 600;
  transition: background .15s;
}
.jd-ad-banner-btn:hover { background: #1d4ed8; }
.dark .jd-ad-banner { background: #1e293b; border-color: #334155; }
.dark .jd-ad-banner-head { background: #0f172a; border-bottom-color: #334155; }
.dark .jd-ad-banner-title { color: #f1f5f9; }
.dark .jd-ad-banner-text { color: #cbd5e1; }

/* === 弹窗广告（参考 360 弹窗风格） === */
/* 居中大弹窗：蒙层 + 卡片 */
.jd-ad-popup-center {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  z-index: 200; width: min(92vw, 420px);
  background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(2,6,23,.35);
  animation: jdAdPopIn .3s ease;
}
@keyframes jdAdPopIn {
  from { opacity: 0; transform: translate(-50%, -48%) scale(.96); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.jd-ad-mask {
  position: fixed; inset: 0; z-index: 199;
  background: rgba(15,23,42,.55);
  animation: jdAdMaskIn .25s ease;
}
@keyframes jdAdMaskIn { from { opacity: 0; } to { opacity: 1; } }

/* 右下角弹窗（无蒙层，像 360 右下角推广） */
.jd-ad-popup-corner {
  position: fixed; right: 16px; bottom: 88px; z-index: 200;
  width: min(82vw, 320px);
  background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; overflow: hidden;
  box-shadow: 0 12px 36px rgba(2,6,23,.22);
  animation: jdAdCornerIn .3s ease;
}
@keyframes jdAdCornerIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.jd-ad-popup-box { position: relative; }
.jd-ad-popup-img { display: block; width: 100%; max-height: 260px; object-fit: cover; }
.jd-ad-popup-text {
  padding: 14px 18px 6px; font-size: 14px; color: #334155; line-height: 1.7;
}
.jd-ad-popup-btn {
  display: block; margin: 10px 18px 16px; text-align: center;
  background: #2563eb; color: #fff !important; text-decoration: none;
  border-radius: 8px; padding: 9px 0; font-size: 14px; font-weight: 600;
  transition: background .15s;
}
.jd-ad-popup-btn:hover { background: #1d4ed8; }
.jd-ad-popup-bar {
  position: absolute; top: 10px; right: 10px;
  display: flex; align-items: center; gap: 6px;
}
.jd-ad-popup-bar .jd-ad-close {
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(0,0,0,.45); color: #fff; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
}
.jd-ad-popup-bar .jd-ad-close:hover { background: rgba(0,0,0,.7); }
.jd-ad-popup-bar .jd-ad-timer { background: rgba(0,0,0,.45); }
.dark .jd-ad-popup-center, .dark .jd-ad-popup-corner { background: #1e293b; border-color: #334155; }
.dark .jd-ad-popup-text { color: #cbd5e1; }

/* 移动端：悬浮窗收窄、文字条字号缩小、弹窗适配、横幅抽屉适配 */
@media (max-width: 640px) {
  .jd-ad-text { font-size: 12px; padding: 5px 14px; }
  .jd-ad-float { max-width: 210px; padding: 8px 12px; font-size: 12px; }
  .jd-ad-banner { width: min(92vw, 280px); }
  .jd-ad-banner-text { padding: 10px 12px 4px; font-size: 12px; }
  .jd-ad-banner-btn { margin: 7px 12px 11px; }
  .jd-ad-popup-corner { right: 12px; bottom: 80px; width: 84vw; }
}

/* 电脑端（≥1024px，有 256px 侧边栏）：悬浮窗移到右下角客服上方；横幅抽屉移到侧边栏右侧，避免重叠 */
@media (min-width: 1024px) {
  .jd-ad-float { left: auto; right: 24px; bottom: 88px; }
  .jd-ad-banner { left: 256px; }
}
