/* ========================================
   単色・フルカラーアイロンプリント
   トグルUI・選択UI用CSS
   ======================================== */

/* ===== トグルUI ===== */
.toggle {
  width: 50px;
  height: 26px;
  background: #ccc;
  border-radius: 20px;
  position: relative;
  cursor: pointer;
  margin-bottom: 8px;
}

.toggle.on {
  background: #f29700;
}

.toggle .knob {
  width: 22px;
  height: 22px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: 0.2s;
}

.toggle.on .knob {
  left: 26px;
}

/* =========================
   価格表
========================= */

/* 価格表ラップ */
.price-table-wrap {
  overflow-x: auto;
  margin: 15px 0;
}

/* 価格表 */
.price-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  text-align: center;
  min-width: 420px;
}

.price-table th,
.price-table td {
  border: 1px solid #ddd;
  padding: 8px 6px;
}

.price-table thead th {
  background: #f5f5f5;
  font-weight: bold;
}

.price-table tbody th {
  background: #fafafa;
  font-weight: bold;
  white-space: nowrap;
}

/* スマホ最適化 */
@media screen and (max-width: 768px) {
  .price-table {
    font-size: 13px;
  }

  .price-table-wrap {
    overflow-x: visible;
  }

  .price-table {
    min-width: 300px;
    border: none;
  }

  .price-table thead {
    display: none;
  }

  .price-table,
  .price-table tbody,
  .price-table tr,
  .price-table th,
  .price-table td {
    display: block;
    width: 100%;
  }

  .price-table tr {
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
  }

  .price-table tbody th {
    background: #f5f5f5;
    text-align: left;
    padding: 8px 10px;
    font-weight: bold;
  }

  .price-table td {
    text-align: right;
    padding: 8px 10px;
    border-top: 1px solid #eee;
    position: relative;
    white-space: nowrap;
  }

  /* ラベル表示（小・中・大） */
  .price-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 10px;
    top: 8px;
    font-weight: bold;
    color: #666;
  }

  /* 列ラベルを付与 */
  .price-table tbody tr td:nth-child(1)::before { content: "単色/フルカラー"; }
  .price-table tbody tr td:nth-child(2)::before { content: "小サイズ"; }
  .price-table tbody tr td:nth-child(3)::before { content: "中サイズ"; }
  .price-table tbody tr td:nth-child(4)::before { content: "大サイズ"; }
}

/* ==================================================
   外部HTML読み込み時の改行制御
================================================== */
/* ▼外部htmlを読み込んだ時に改行をそのまま扱う▼ */
#iron-print {
  white-space: pre-line;
}

/* ▼table関連は通常表示に戻す▼ */
#iron-print table,
#iron-print th,
#iron-print td {
  white-space: normal;
}

/* 商品説明エリア内の画像は必ず改行させる */
#iron-print img {
  display: block;
}