/* 注文できるエディタ商品のページが読み込む。購入ボタンの下の「枚数ごとの価格」の欄。
   表の中身はビルドが <!--orilab:discount-table--> の位置に書く（src/lib/orilab.mjs の
   discountTableHtml）。もとの表は枚数が横に並び、狭い幅では横スクロールになるので、
   ここでは縦向き（1行が1つの枚数）に組み直す。 */

.agent-qty {
  clear: both;
  margin: 18px 0 10px;
  padding: 14px 12px 10px;
  border: 1px solid #d5dbe6;
  border-top: 3px solid #0b1b4a;
  background: #f6f8fc;
  text-align: left;
  scroll-margin-top: 80px;
}
/* ドンドン割のない商品では表が出ない。そのときは欄ごと出さない。 */
.agent-qty:not(:has(table)) {
  display: none;
}
.agent-qty .agent-qty__title {
  margin: 0 0 6px;
  padding: 0;
  border: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0;
  color: #0b1b4a;
}
.agent-qty .agent-qty__lead {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.7;
  color: #333;
}
.agent-qty > small {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.6;
  color: #666;
}

/* 表を縦向きに: 行（tr）を縦の列として横に並べる。セルの高さをそろえて行を合わせる。 */
.agent-qty .scroll-table {
  margin: 0;
  overflow: visible;
}
.agent-qty .scroll-table table.dondon_price_table {
  display: flex;
  width: 100%;
  margin: 0;
  overflow: visible;
  white-space: normal;
  border: 1px solid #d5dbe6;
  border-bottom: 0;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
}
.agent-qty .scroll-table table.dondon_price_table thead,
.agent-qty .scroll-table table.dondon_price_table tbody {
  display: contents;
}
.agent-qty .scroll-table table.dondon_price_table tr {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  min-width: 0;
}
.agent-qty .scroll-table table.dondon_price_table thead tr {
  flex: 0 0 22%;
}
.agent-qty .scroll-table table.dondon_price_table tbody tr.discout-rate-col {
  flex: 0 0 34%;
}
.agent-qty .scroll-table table.dondon_price_table tr th,
.agent-qty .scroll-table table.dondon_price_table tr td {
  display: block;
  box-sizing: border-box;
  width: auto;
  min-width: 0;
  height: 44px;
  margin: 0;
  padding: 0 4px;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid #d5dbe6;
  background: #fff;
  font-size: 14px;
  font-weight: 400;
  line-height: 43px;
  text-align: center;
  white-space: nowrap;
  color: #222;
}
/* 見出しの行（各列のいちばん上） */
.agent-qty .scroll-table table.dondon_price_table thead tr th:first-child,
.agent-qty .scroll-table table.dondon_price_table tbody tr th {
  /* PC の商品ページでは欄の幅が約220px。「(ドンドン割)」が1行に入る大きさにする */
  padding: 9px 2px 0;
  background: #01133b;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
}
.agent-qty .scroll-table table.dondon_price_table thead tr th:first-child {
  padding-top: 0;
  font-size: 12px;
  line-height: 43px;
}
/* 枚数の列 */
.agent-qty .scroll-table table.dondon_price_table thead tr th:not(:first-child) {
  background: #eef1f7;
  font-weight: 700;
}
/* 価格の列: 税抜と税込の2行 */
.agent-qty .scroll-table table.dondon_price_table tbody tr:not(.discout-rate-col) td {
  padding-top: 5px;
  font-weight: 700;
  line-height: 1.3;
  border-left: 1px solid #d5dbe6;
  border-right: 1px solid #d5dbe6;
}
.agent-qty .scroll-table table.dondon_price_table tbody tr:not(.discout-rate-col) td small {
  font-size: 11px;
  font-weight: 400;
  color: #555;
}
/* 割引率の列 */
.agent-qty .scroll-table table.dondon_price_table tbody tr.discout-rate-col td {
  background: #fff;
  font-size: 14px;
  font-weight: 700;
  color: #d6001c;
}
.agent-qty .scroll-table table.dondon_price_table tbody tr.discout-rate-col td:nth-child(2) {
  font-weight: 400;
  color: #666;
}

/* ページ下の「価格」の欄から、上の表への案内 */
.agent-qty-ref a {
  font-weight: 700;
  text-decoration: underline;
}
