/* ===========================================================
   Groww H5 — 个股详情（参考 core-pages-2.png）
   =========================================================== */

.gw-stock { padding-bottom: 24px; }

/* 顶部：返回 + 收藏 + 分享 */
.gw-stock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0 var(--gw-pad);
}
.gw-stock-head .gw-head-icon:first-child { margin-left: -10px; }
.gw-stock-head-actions { display: flex; gap: 14px; }

/* 名称行：logo 方块 + 两行文字 */
.gw-stock-title {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px var(--gw-pad) 0;
}
.gw-stock-logo {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gw-stock-names { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.gw-stock-names strong { font-size: 17px; font-weight: var(--gw-fw-bold); color: var(--gw-ink); }
.gw-stock-names em { font-style: normal; font-size: 12px; color: var(--gw-ink-3); }

/* 大价格 */
.gw-stock-price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px var(--gw-pad) 0;
}
.gw-stock-ltp {
  font-size: 30px;
  font-weight: var(--gw-fw-bold);
  color: var(--gw-ink);
  letter-spacing: -0.6px;
}
.gw-stock-change { font-size: 15px; font-weight: var(--gw-fw-semi); }
.gw-stock-today { font-size: 13px; color: var(--gw-ink-3); }

/* 面积图 */
.gw-chart {
  position: relative;
  height: 240px;
  margin: 8px 0 0;
  padding-right: 46px;                 /* 给右侧价位轴留位 */
}
.gw-chart-svg { width: 100%; height: 100%; display: block; }
.gw-chart-axis {
  position: absolute;
  right: 8px;
  top: 0;
  bottom: 0;
  width: 40px;
  font-size: 10px;
  color: var(--gw-ink-3);
}
.gw-chart-axis span { position: absolute; right: 0; transform: translateY(-50%); }
.gw-chart-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gw-ink-3);
  font-size: 13px;
}

/* 周期胶囊 */
.gw-periods {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px var(--gw-pad);
}
.gw-period {
  height: 32px;
  min-width: 44px;
  padding: 0 12px;
  border: none;
  border-radius: var(--gw-r-pill);
  background: none;
  color: var(--gw-ink-2);
  font-size: 13px;
  font-weight: var(--gw-fw-med);
}
.gw-period.is-active {
  background: var(--gw-green-soft);
  color: var(--gw-green);
  font-weight: var(--gw-fw-semi);
}
.gw-period-candles { margin-left: auto; color: var(--gw-green); }
.gw-period-candles .gw-icon { width: 20px; height: 20px; }

/* 三个 tab：下划线指示器 */
.gw-stabs {
  display: flex;
  gap: 28px;
  padding: 0 var(--gw-pad);
  border-bottom: 1px solid var(--gw-line);
}
.gw-stab {
  position: relative;
  padding: 10px 0 12px;
  border: none;
  background: none;
  font-size: 15px;
  font-weight: var(--gw-fw-med);
  color: var(--gw-ink-3);
}
.gw-stab.is-active { color: var(--gw-green); font-weight: var(--gw-fw-semi); }
.gw-stab.is-active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--gw-green);
}

/* OHLC 四宫格：两列，中间竖线分隔 */
.gw-ohlc {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 16px var(--gw-pad);
  border: 1px solid var(--gw-line);
  border-radius: var(--gw-r-md);
  overflow: hidden;
}
.gw-ohlc-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  font-size: 13px;
}
.gw-ohlc-cell span { color: var(--gw-ink-3); }
.gw-ohlc-cell b { font-weight: var(--gw-fw-med); color: var(--gw-ink); }
/* 左列画右边线，第一行画下边线 */
.gw-ohlc-cell:nth-child(odd) { border-right: 1px solid var(--gw-line); }
.gw-ohlc-cell:nth-child(-n+2) { border-bottom: 1px solid var(--gw-line); }

/* Buy / Sell 双按钮 */
.gw-trade-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 8px var(--gw-pad) 0;
}
.gw-trade-btn {
  height: 48px;
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 16px;
  font-weight: var(--gw-fw-semi);
}
.gw-trade-btn.is-buy { background: var(--gw-green); }
.gw-trade-btn.is-sell { background: var(--gw-blue); }
