/* 交易对展示卡片样式 - 通用样式 */

/* 待数据：不占位、不展示，避免「-- 再消失」的闪动 */
.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;
  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;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex: 1;
  flex-wrap: nowrap;
  overflow: hidden;
  position: relative;
}
.article-symbol-card .symbol-name-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.article-symbol-card .symbol-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: block;
}
.article-symbol-card .symbol-icon circle {
  fill: #C8B197;
}

.article-symbol-card .symbol-name {
  font-family: 'Sinter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-style: normal;
  font-weight: 500;
  font-size: 18px;
  line-height: 26px;
  color: #000000;
  display: flex;
  align-items: center;
  white-space: nowrap;
  flex: none;
  flex-grow: 0;
}
.article-symbol-card .symbol-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  white-space: nowrap;
  /* 固定宽度，确保整个价格区域稳定 */
  /* 标签宽度（42px）+ gap（4px）+ 价格值宽度（90px）= 136px */
  /* width: 136px; */
  justify-content: flex-start;
  /* 使用 box-sizing 确保宽度计算准确 */
  box-sizing: border-box;
}
.article-symbol-card .symbol-price-wrapper {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-inline-start: auto;
  margin-inline-end: 32px;
}
.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);
  display: flex;
  align-items: center;
  text-align: right;
  flex: none;
  flex-grow: 0;
  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: flex;
  align-items: baseline;
  text-align: left;
  white-space: nowrap;
  flex: none;
  flex-grow: 0;
  /* 固定宽度，防止内容变化导致布局抖动 */
  /* 根据最大可能的价格长度设置（如 1874.52 需要约 90px） */
  width: 90px;
  /* 左对齐，让价格紧贴标签 */
  justify-content: flex-start;
  /* 使用 tabular-nums 确保数字宽度一致 */
  font-variant-numeric: tabular-nums;
  /* 使用 box-sizing 确保宽度计算准确 */
  box-sizing: border-box;
}

/* 价格主要部分 - 固定宽度防止抖动（不补零版本） */
.article-symbol-card .price-main {
  font-size: 18px;
  font-weight: 400;
  line-height: 26px;
  display: inline-block;
  vertical-align: baseline;
  
  /* 关键：使用 tabular-nums 确保数字宽度一致 */
  /* 即使不补零，相同数字的宽度也保持一致（如 0 和 1 宽度相同） */
  font-variant-numeric: tabular-nums;
  
  /* 固定宽度，而不是 min-width，确保宽度不变 */
  /* 根据最大可能的价格长度设置（如 1874.52 需要约 90px） */
  width: 90px;
  
  /* 左对齐，让价格紧贴标签 */
  text-align: left;
  
  /* 防止换行 */
  white-space: nowrap;
  
  /* 使用 box-sizing 确保宽度计算准确 */
  box-sizing: border-box;
  
  /* 超出部分处理 */
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 价格最后一位数字 - 缩小显示 */
.article-symbol-card .price-last-digit {
  font-size: 12px;
  font-weight: 400;
  line-height: 18px;
  opacity: 0.85;
  display: inline-block;
  vertical-align: baseline;
  /* 使用相同的 line-height 比例来对齐基线 */
  /* 18px 字体的 line-height 26px，12px 字体使用 18px line-height 来匹配 */
}
.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: #FFFFFF;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex: none;
  margin-inline-start: auto;
}
.article-symbol-card .symbol-trade-btn:hover {
  background: #8a2525;
}
.article-symbol-card .symbol-trade-btn:active {
  background: #7a2020;
}
@media (max-width: 768px) {
  .article-symbol-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    height: auto;
    min-height: auto;
    border-radius: 12px;
  }
  .article-symbol-card .symbol-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
  }
  .article-symbol-card .symbol-trade-btn {
    width: 100%;
    border-radius: 25px;
  }
}

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