/* static/css/price_pressure_embed.css */
.price-pressure-embed {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin: 3rem 0;
  padding: 1.5rem;
  border: 0.0625rem solid #dbe4f0;
  border-radius: 1rem;
  background: #ffffff;
  overflow: hidden;
}

.price-pressure-embed *,
.price-pressure-embed *::before,
.price-pressure-embed *::after {
  box-sizing: border-box;
}

.price-pressure-embed__head {
  margin-bottom: 1rem;
}

.price-pressure-embed__eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #2563eb;
}

.price-pressure-embed__title {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
  line-height: 1.5;
}

.price-pressure-embed__lead {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.9;
  color: #334155;
}

/* 修正：PCでは左に「指標一覧＋グラフ」、右に「選択中」 */
.price-pressure-embed__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(18rem, 0.58fr);
  gap: 1rem;
  align-items: start;
  margin: 1.25rem 0 1rem;
}

.price-pressure-embed__left {
  min-width: 0;
}

.price-pressure-embed__table-card,
.price-pressure-embed__chart-card,
.price-pressure-embed__current {
  min-width: 0;
  border: 0.0625rem solid #dbe4f0;
  border-radius: 0.875rem;
  background: #f8fafc;
}

/* 修正：ボタン領域の縦幅を詰める */
.price-pressure-embed__table-card {
  padding: 0.75rem;
}

.price-pressure-embed__chart-card {
  margin-top: 0.75rem;
  padding: 0.875rem;
  background: #ffffff;
}

.price-pressure-embed__panel-label {
  display: inline-block;
  margin: 0 0 0.55rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999rem;
  background: #e2e8f0;
  color: #334155;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.25;
}

.price-pressure-embed__current {
  position: sticky;
  top: 1rem;
  padding: 1rem;
  margin: 0;
  background: #f8fafc;
}

.price-pressure-embed__current-head {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.price-pressure-embed__current-marker {
  flex: 0 0 auto;
  width: 0.75rem;
  height: 0.75rem;
  margin-top: 0.35rem;
  border-radius: 999rem;
  background: #2563eb;
}

.price-pressure-embed__current-body {
  min-width: 0;
}

.price-pressure-embed__current-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
  color: #0f172a;
}

.price-pressure-embed__current-unit {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  line-height: 1.6;
  color: #64748b;
}

.price-pressure-embed__current-description {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  line-height: 1.8;
  color: #475569;
}

.price-pressure-embed__current-points {
  margin: 0.75rem 0 0;
  padding-left: 1.1em;
}

.price-pressure-embed__current-points li {
  margin: 0.35rem 0;
  font-size: 0.86rem;
  line-height: 1.7;
  color: #475569;
}

.price-pressure-embed__chart-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  overflow: hidden;
}

.price-pressure-embed__chart {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 15rem;
  margin: 0;
}

/* 修正：指標ボタン表の高さを詰める */
.price-pressure-embed__controls,
.price-pressure-embed [data-price-controls] {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
  margin: 0;
}

.price-pressure-embed__button,
.price-pressure-embed [data-price-controls] button {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  min-height: 2.35rem;
  padding: 0.4rem 0.6rem;
  border: 0.0625rem solid #dbeafe;
  border-radius: 0.65rem;
  background: #ffffff;
  color: #1d4ed8;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  box-shadow: none;
}

.price-pressure-embed__button-label {
  min-width: 0;
}

.price-pressure-embed__button-unit {
  flex: 0 0 auto;
  max-width: 45%;
  color: #64748b;
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: right;
}

.price-pressure-embed__button:hover,
.price-pressure-embed [data-price-controls] button:hover {
  background: #eef5ff;
}

.price-pressure-embed__button.is-active,
.price-pressure-embed [data-price-controls] button.is-active {
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
}

.price-pressure-embed__button.is-active .price-pressure-embed__button-unit,
.price-pressure-embed [data-price-controls] button.is-active .price-pressure-embed__button-unit {
  color: rgba(255, 255, 255, 0.82);
}

.price-pressure-embed__button.is-active:hover,
.price-pressure-embed [data-price-controls] button.is-active:hover {
  background: #2563eb;
  color: #ffffff;
}

.price-pressure-embed__button:focus-visible,
.price-pressure-embed [data-price-controls] button:focus-visible {
  outline: 0.1875rem solid rgba(37, 99, 235, 0.25);
  outline-offset: 0.125rem;
}

.price-pressure-embed__note {
  margin: 0.9rem 0 0;
  font-size: 0.8rem;
  line-height: 1.7;
  color: #64748b;
}

.price-pressure-embed__legend,
.price-pressure-embed__legend-button {
  display: none;
}

@media (max-width: 48rem) {
  .price-pressure-embed {
    margin: 2rem 0;
    padding: 1rem;
  }

  .price-pressure-embed__title {
    font-size: 1.15rem;
  }

  .price-pressure-embed__lead {
    font-size: 0.9rem;
  }

  /* 修正：スマホでは縦並び */
  .price-pressure-embed__layout {
    display: block;
    margin: 1rem 0;
  }

  .price-pressure-embed__table-card {
    padding: 0.75rem;
  }

  .price-pressure-embed__chart-card {
    margin-top: 0.75rem;
    padding: 0.75rem;
  }

  .price-pressure-embed__current {
    position: static;
    margin-top: 0.75rem;
    padding: 0.875rem;
  }

  .price-pressure-embed__chart {
    height: 14rem;
  }

  .price-pressure-embed__controls,
  .price-pressure-embed [data-price-controls] {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .price-pressure-embed__button,
  .price-pressure-embed [data-price-controls] button {
    min-height: 2.3rem;
    padding: 0.38rem 0.55rem;
    font-size: 0.8rem;
  }

  .price-pressure-embed__button-unit {
    max-width: 42%;
    font-size: 0.62rem;
  }
}