/* ============================================================
   New API · 钱包页补丁
   1) 隐藏订阅套餐卡片，父级改单列
   2) 用猫店商品页替换“未启用在线充值”提示
   ============================================================ */

/* 订阅套餐隐藏后，添加资金占满整行 */
.wallet-single-col {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
}

[data-wallet-sub-hidden="1"] {
  display: none !important;
}

/* 商品板块外框 */
.wallet-shop-embed {
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--border, #d5e3f7);
  border-radius: calc(var(--radius, 0.625rem) + 0.125rem);
  background: var(--card, #fff);
}

.wallet-shop-embed__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border, #d5e3f7);
}

.wallet-shop-embed__title {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.wallet-shop-embed__eyebrow {
  color: var(--muted-foreground, #5a6f8f);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.wallet-shop-embed__name {
  overflow: hidden;
  color: var(--foreground, #081a33);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-shop-embed__meta {
  overflow: hidden;
  color: var(--muted-foreground, #5a6f8f);
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-shop-embed__open {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border: 1px solid var(--border, #d5e3f7);
  border-radius: 999px;
  color: var(--primary, #1e63ff);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.wallet-shop-embed__open:hover {
  border-color: var(--primary, #1e63ff);
  background: var(--accent, #dbe9ff);
  text-decoration: none;
}

/* iframe 视口：顶部负偏移裁掉猫店顶栏 */
.wallet-shop-embed__viewport {
  position: relative;
  height: clamp(400px, 46vh, 560px);
  overflow: hidden;
  background: #f4f6fa;
}

.wallet-shop-embed__viewport iframe {
  display: block;
  width: 100%;
  height: calc(100% + 80px + 44px);
  margin-top: -80px;
  border: 0;
  background: #fff;
}

/* 点击进入猫店后临时加高，保证下单弹窗完整可见 */
.wallet-shop-embed--expanded .wallet-shop-embed__viewport {
  height: clamp(600px, 62vh, 720px);
}

/* 手机 UA 下猫店是 H5 版，顶部蓝色头部高度随宽度变化；
   JS 会按 iframe 实际宽度写入 --wallet-shop-crop。 */
.wallet-shop-embed--mobile .wallet-shop-embed__viewport iframe {
  height: calc(100% + var(--wallet-shop-crop, 229px));
  margin-top: calc(0px - var(--wallet-shop-crop, 229px));
}

.wallet-shop-embed__foot {
  padding: 7px 14px;
  border-top: 1px solid var(--border, #d5e3f7);
  color: var(--muted-foreground, #5a6f8f);
  font-size: 10px;
  line-height: 1.4;
}

@media (max-width: 640px) {
  .wallet-shop-embed__head {
    align-items: flex-start;
    padding: 10px 12px;
  }

  .wallet-shop-embed__meta {
    display: none;
  }

  .wallet-shop-embed__viewport {
    height: 380px;
  }

  .wallet-shop-embed__foot {
    padding: 6px 12px;
  }
}
