/* 交易对展示卡片样式 - 通用 + 手机端优化（设计：左图标 | 品名+双价 | 交易） */

/* 待数据：不占位、不展示，避免「-- 再消失」的闪动 */
.article-symbol-card--pending {
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  overflow: hidden !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.article-symbol-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fff;
  border-radius: 112px;
  padding-block: 0;
  padding-inline-start: 16px;
  padding-inline-end: 12px;
  margin: 20px 0;
  box-sizing: border-box;
  border: 1px solid #e5e5e5;
  height: 63px;
  min-height: 63px;
}

.article-symbol-card .symbol-info {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 20px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.article-symbol-card .symbol-card-media {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.article-symbol-card .symbol-card-body {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  min-width: 0;
  gap: 24px;
}

/* 与历史贵金属图标一致：32×32（viewBox 82 的 SVG 等比缩放）；多类图标颜色以内联 fill 为准 */
.article-symbol-card .symbol-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: block;
}

.article-symbol-card .symbol-name {
  font-family: 'Sinter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-style: normal;
  font-weight: 600;
  font-size: 18px;
  line-height: 26px;
  color: #000;
  white-space: nowrap;
  flex-shrink: 0;
}

.article-symbol-card .symbol-price-wrapper {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-inline-start: auto;
  flex-shrink: 0;
}

/* 竖线分隔（默认桌面端隐藏，由间距区分；手机端显示） */
.article-symbol-card .symbol-price-divider {
  display: none;
  flex-shrink: 0;
  width: 1px;
  height: 16px;
  background: rgba(0, 0, 0, 0.12);
  align-self: center;
}

.article-symbol-card .symbol-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  white-space: nowrap;
  box-sizing: border-box;
}

.article-symbol-card .price-label {
  font-family: 'Sinter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 14px;
  line-height: 22px;
  color: rgba(0, 0, 0, 0.48);
  white-space: nowrap;
}

.article-symbol-card .price-value {
  font-family: 'Sinter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 18px;
  line-height: 26px;
  display: inline-flex;
  align-items: baseline;
  text-align: left;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  box-sizing: border-box;
}

.article-symbol-card .price-main {
  font-size: 18px;
  font-weight: 400;
  line-height: 26px;
  display: inline-block;
  vertical-align: baseline;
  font-variant-numeric: tabular-nums;
  min-width: 0;
  white-space: nowrap;
  box-sizing: border-box;
}

/* 价格最后一位缩小（点差后一位 / 最小有效位） */
.article-symbol-card .price-last-digit {
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  display: inline-block;
  vertical-align: baseline;
  margin-inline-start: 1px;
}

.article-symbol-card .buy-price {
  color: #00ac47;
}
.article-symbol-card .sell-price {
  color: #c8102e;
}

.article-symbol-card .symbol-trade-btn {
  display: inline-flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 14px 24px;
  gap: 8px;
  min-width: 120px;
  width: auto;
  height: 48px;
  box-sizing: border-box;
  background: #a52933;
  border: none;
  border-radius: 999px;
  color: #fff;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.article-symbol-card .symbol-trade-btn:hover {
  background: #8a2525;
  color: #fff;
  text-decoration: none;
}

.article-symbol-card .symbol-trade-btn:active {
  background: #7a2020;
  transform: scale(0.98);
}

/* ========== 手机端：单行胶囊卡，与设计稿一致 ========== */
@media (max-width: 768px) {
  .article-symbol-card {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px 10px 10px 12px;
    height: auto;
    min-height: 56px;
    border-radius: 999px;
    margin: 16px 0;
  }

  .article-symbol-card .symbol-info {
    flex: 1;
    min-width: 0;
    gap: 10px;
    align-items: center;
  }

  .article-symbol-card .symbol-card-body {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2px;
    flex: 1;
    min-width: 0;
  }

  .article-symbol-card .symbol-name {
    font-size: 15px;
    line-height: 22px;
    font-weight: 600;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .article-symbol-card .symbol-price-wrapper {
    margin-inline-start: 0;
    gap: 8px;
    width: 100%;
    min-width: 0;
  }

  /* 手机端不展示「买入/卖出」文案，避免拥挤 */
  .article-symbol-card .price-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .article-symbol-card .symbol-price {
    position: relative;
    gap: 0;
  }

  .article-symbol-card .symbol-price-divider {
    display: block;
  }

  .article-symbol-card .price-value {
    font-size: 15px;
    line-height: 22px;
  }

  .article-symbol-card .price-main {
    font-size: 15px;
    line-height: 22px;
    width: auto;
    overflow: visible;
    text-overflow: clip;
  }

  .article-symbol-card .price-last-digit {
    font-size: 11px;
  }

  .article-symbol-card .symbol-icon {
    width: 36px;
    height: 36px;
  }

  /* 右侧红色胶囊按钮：紧凑，非全宽 */
  .article-symbol-card .symbol-trade-btn {
    min-width: unset;
    width: auto;
    min-height: 44px;
    height: 44px;
    padding: 0 18px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 999px;
    flex-shrink: 0;
  }
}

/* 极窄屏再压一点字号，避免换行 */
@media (max-width: 380px) {
  .article-symbol-card .symbol-name {
    font-size: 14px;
  }
  .article-symbol-card .price-main,
  .article-symbol-card .price-value {
    font-size: 14px;
  }
  .article-symbol-card .symbol-trade-btn {
    padding: 0 12px;
    font-size: 13px;
  }
}

/* RTL 布局支持 */
[dir="rtl"] .article-symbol-card .symbol-trade-btn {
  margin-inline-start: 0;
  margin-inline-end: 0;
}
