/* ============================================================
   data-tab.css (refined)
   フォント: 3サイズ(26/13/11px) × 3ウェイト(800/600/400)
   色: 3色(#111/#555/#888)
   線: 2種(2px #111 / 1px #ddd)
   ============================================================ */

/* ── ページ ─────────────────────────────── */
#dpp { display: none; }
#dpp.show { display: block; }

#dtPage {
  max-width: 960px;
  margin: 0;
  padding: 24px 28px 40px;
  box-sizing: border-box;
}

/* ── セレクターバー ラベル ───────────────── */
.dt-sel-lbl {
  font-size: 11px;
  font-weight: 600;
  color: #888;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* ── ヘッダー (規格名 + 重量 + 塗装) ─────── */
#dtHeader {
  padding-bottom: 12px;
  margin-bottom: 10px;
}
.dt-kind-label {
  font-size: 11px;
  font-weight: 600;
  color: #888;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 6px;
  display: block;
}
.dt-spec-name {
  font-size: 28px;
  font-weight: 800;
  color: #111;
  letter-spacing: -.02em;
  line-height: 1.1;
  margin-bottom: 10px;
  display: block;
}
.dt-meta {
  display: flex;
  gap: 16px;
  align-items: baseline;
  flex-wrap: wrap;
  font-size: 13px;
  color: #555;
}
.dt-meta-val { font-size: 17px; font-weight: 800; color: #111; }
.dt-meta-div { width: 1px; height: 14px; background: #ccc; flex-shrink: 0; align-self: center; }

/* ── セクション見出し ───────────────────── */
.dt-sec {
  font-size: 11px;
  font-weight: 600;
  color: #555;
  letter-spacing: .06em;
  text-transform: uppercase;
  border-bottom: 2px solid #111;
  padding-bottom: 5px;
  margin-bottom: 10px;
  display: block;
}

/* ── 定尺 ───────────────────────────────── */
#dtStdArea {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #ddd;
}
#dtStdArea .dt-sec {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 8px;
}
#dtStdChips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dt-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 10px;
  height: 30px;
  background: #f5f5f5;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #333;
  box-sizing: border-box;
}
.dt-chip-x {
  background: none;
  border: none;
  font-size: 11px;
  color: #aaa;
  cursor: pointer;
  padding: 0;
  font-weight: 700;
  line-height: 1;
}
.dt-chip-x:hover { color: #c00; }
.dt-chip-add { display: inline-flex; align-items: center; gap: 5px; }
/* mmインプットと+追加ボタンを同じ高さ30pxに統一 */
.dt-chip-add input {
  width: 60px;
  height: 30px;
  padding: 0 7px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 12px;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
}
.dt-chip-add input:focus { border-color: #555; }
.dt-chip-add button {
  height: 30px;
  padding: 0 12px;
  background: #333;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  box-sizing: border-box;
  white-space: nowrap;
}

/* ── メイン 2カラム ─────────────────────── */
#dtMain {
  display: flex;
  gap: 24px;
  align-items: stretch;
}
#dtInfoCol { flex: 1; min-width: 0; }

/* 図コラム: 枠内で図を中央配置 */
#dtFigCol {
  width: 360px;
  flex-shrink: 0;
  align-self: stretch;
  border: 1.5px solid #ddd;
  border-radius: 10px;
  padding: 20px;
  background: #fff;
  display: flex;
  align-items: center;      /* 縦中央 */
  justify-content: center;  /* 横中央 */
}
#dtFigCol svg { max-width: 100%; height: auto; display: block; }
@media (max-width: 820px) {
  #dtMain { flex-direction: column-reverse; }
  #dtFigCol { width: 100%; align-self: auto; }
}

/* ── 断面寸法グリッド ───────────────────── */
.dt-dim-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1.5px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
}
.dt-dim-cell {
  background: #fff;
  padding: 10px 12px;
  text-align: center;
  border-right: 1px solid #eee;
  border-bottom: 1px solid #eee;
}
.dt-dim-cell:nth-child(3n) { border-right: none; }
.dt-dim-cell:nth-last-child(-n+3) { border-bottom: none; }
.dt-dim-lbl {
  font-size: 10px;
  font-weight: 400;
  color: #888;
  margin-bottom: 4px;
  display: block;
}
.dt-dim-val {
  font-size: 14px;
  font-weight: 700;
  color: #111;
  display: block;
}

/* ── 断面性能トグル ─────────────────────── */
#dataPerfToggle {
  width: 100%;
  padding: 8px 14px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #555;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  margin-top: 4px;
  margin-bottom: 0;
  box-sizing: border-box;
}
#dataPerfToggle:hover { background: #ebebeb; }

/* ── 単位重量・塗装 ─────────────────────── */
#dataExtraInfo { margin-top: 4px; }
.dt-extra-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  font-size: 13px;
  color: #555;
}
.dt-extra-row:last-child { border-bottom: none; }
.dt-extra-row strong {
  font-size: 13px;
  font-weight: 700;
  color: #111;
  white-space: nowrap;
}

/* ── メモ ──────────────────────────────── */
#dataNoteArea {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 2px solid #111;
}
.dt-note-lbl {
  font-size: 11px;
  font-weight: 600;
  color: #555;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: block;
}
.dt-note-list {
  background: #f8f8f8;
  border-radius: 6px;
  padding: 10px 12px;
  min-height: 40px;
  max-height: 120px;
  overflow-y: auto;
  margin-bottom: 8px;
  font-size: 13px;
  color: #888;
}
.dt-note-item {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 4px;
  padding: 7px 10px;
  margin-bottom: 5px;
}
.dt-note-ts { font-size: 11px; color: #aaa; margin-bottom: 2px; }
.dt-note-text { font-size: 13px; color: #333; }
.dt-note-form { display: flex; gap: 6px; }
.dt-note-form textarea {
  flex: 1;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  resize: none;
  font-family: inherit;
  height: 48px;
  outline: none;
  box-sizing: border-box;
}
.dt-note-form textarea:focus { border-color: #555; }
.dt-note-form button {
  background: #333;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0 16px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}

/* ── カスタム鋼材モーダル ──────────────── */
#dtCustomModal { display: none; }
#dtCustomModal.open { display: flex; }

/* ── アクションボタン (.run スタイルに統一) ─── */
/* +追加ボタン */
#dpp .dt-chip-add button {
  height: 30px;
  padding: 0 12px;
  background: #fff;
  color: #1a1a2e;
  border: 1.5px solid #d4d4dc;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  box-sizing: border-box;
  white-space: nowrap;
  transition: background .15s, border-color .15s;
}
#dpp .dt-chip-add button:hover {
  background: rgba(109,40,217,.08);
  border-color: #ccc;
}

/* メモ送信ボタン */
#dpp .dt-note-form button {
  background: #fff;
  color: #1a1a2e;
  border: 1.5px solid #d4d4dc;
  border-radius: 6px;
  padding: 0 16px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, border-color .15s;
}
#dpp .dt-note-form button:hover {
  background: rgba(109,40,217,.08);
  border-color: #ccc;
}

/* ── ホバー色 (薄紫アクセント) ─────────────── */

/* 断面性能トグル */
#dataPerfToggle:hover {
  background: rgba(109,40,217,.06);
  border-color: #ccc;
}

/* 定尺チップ */
#dpp .dt-chip:hover {
  background: rgba(109,40,217,.06);
  border-color: #bbb;
}

/* サイズ入力のフォーカス */
#dpp #dataSpecInput:focus {
  border-color: #888 !important;
}

/* ドロップダウン選択肢 */
#dpp .data-spec-option:hover,
#dpp .data-spec-option.active {
  background: #f3efff !important;
  color: #111 !important;
}

/* 鋼種・サイズ・mm枠: ホバーを薄青(#faf5ff)→薄紫(#f3efff)に変更 */
#dpp input:hover,
#dpp select:hover {
  background: #f3efff !important;
}
#dpp input:focus,
#dpp select:focus {
  background: #fff !important;
  outline: none !important;
  box-shadow: none !important;
}

/* サイズドロップダウンが切れないよう overflow を解除 */
#dpp #dtSelectors,
#dpp #dtSelectors * {
  overflow: visible;
}
/* ただし spec dropdown だけ scroll 許可 */
#dpp .data-spec-dropdown {
  overflow-y: auto !important;
}
