/* 시세 흐름 페이지(/prices). docs/community.md "prices". 색은 style.css 변수(밝은·어두운 모드)를 쓴다 */

.prices-controls {
  display: grid;
  gap: 12px;
}

.prices-search {
  display: grid;
  gap: 4px;
}

.prices-search .text-input {
  font-size: 16px; /* iOS 확대 방지 */
}

.prices-estimate {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--warn-bg);
  color: var(--warn-text);
  font-size: 13px;
  line-height: 1.6;
}

.prices-estimate strong {
  margin-right: 4px;
}

.prices-rules {
  margin-top: -4px;
  font-size: 13px;
}

.prices-rules summary {
  min-height: 32px;
  padding: 4px 0;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
}

.prices-rules ul {
  margin: 4px 0 0;
  padding-left: 18px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ---- 아이템 목록 ---- */

.prices-list-note {
  margin: 0 0 8px;
}

.prices-list-note[data-kind="error"] {
  color: var(--error-text);
}

.prices-items {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.prices-items[aria-busy="true"] {
  opacity: 0.6;
}

.prices-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px 10px;
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  text-align: left;
}

.prices-item:hover {
  background: var(--surface-2);
}

.prices-item[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}

.prices-item-name {
  min-width: 0;
  color: var(--item-link);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.prices-item-facts {
  grid-column: 1;
  color: var(--text-muted);
  font-size: 12px;
}

.prices-item-price {
  grid-column: 2;
  grid-row: 1 / span 2;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---- 아이템 하나 ---- */

.prices-detail[aria-busy="true"] .prices-chart,
.prices-detail[aria-busy="true"] .prices-recent {
  opacity: 0.6;
}

.prices-detail-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.prices-detail-head .panel-title {
  min-width: 0;
  margin: 0;
  color: var(--item-link);
  overflow-wrap: anywhere;
}

.prices-detail-head .panel-title:focus {
  outline: none;
}

.prices-close {
  flex: none;
}

.prices-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.prices-fact {
  min-width: 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface-2);
}

.prices-fact dt {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}

.prices-fact dd {
  margin: 2px 0 0;
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.prices-fact-detail {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}

@media (min-width: 640px) {
  .prices-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.prices-chart {
  margin: 0 0 8px;
  min-width: 0;
}

.prices-svg {
  display: block;
  max-width: 100%;
  height: auto;
  overflow: visible;
}

.prices-grid line {
  stroke: var(--border);
  stroke-width: 1;
}

.prices-axis {
  fill: var(--text-muted);
  font-family: var(--font);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.prices-count {
  fill: color-mix(in srgb, var(--unknown) 55%, transparent);
}

.prices-range {
  stroke: var(--item);
  stroke-width: 3;
  stroke-linecap: round;
}

.prices-trend {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-dasharray: 4 3;
  opacity: 0.8;
}

.prices-median {
  fill: var(--accent);
  stroke: var(--surface);
  stroke-width: 2;
}

.prices-day:hover .prices-median {
  r: 5.5;
}

.prices-table-wrap {
  margin: 4px 0 12px;
}

.prices-table-wrap summary {
  min-height: 36px;
  padding: 6px 0;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.prices-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.prices-table th,
.prices-table td {
  padding: 6px 4px;
  border-bottom: 1px solid var(--border);
  text-align: right;
  white-space: nowrap;
}

.prices-table th:first-child,
.prices-table td[colspan] {
  text-align: left;
}

.prices-table thead th {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}

.prices-subtitle {
  margin: 12px 0 8px;
  font-size: 15px;
}

.prices-recent {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.prices-mention {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.prices-mention-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.prices-intent-sell {
  background: var(--ok-bg);
  color: var(--ok-text);
}

.prices-intent-buy {
  background: var(--premium-bg);
  color: var(--premium-text);
}

.prices-intent-unknown {
  background: var(--unknown-bg);
  color: var(--unknown-text);
}

.prices-value {
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.prices-value-empty {
  color: var(--text-muted);
  font-weight: 600;
}

.prices-content {
  font-size: 14px;
}

.prices-source {
  display: inline-block;
  margin-top: 4px;
  padding-left: 0;
}

.prices-more {
  width: 100%;
  margin-top: 8px;
}
