/* =====================================================================
   style.css — 重ねがけ割引の計算 ツール固有の微調整のみ。
   共通スタイルは /_shared/shirugear.css に任せる（結果表示は sg-result）。
   ===================================================================== */

/* 割引リスト（適用順） */
.sg-disc-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: var(--sg-space-3, 12px) 0;
}
.sg-disc-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px;
  border: 1px solid var(--sg-border, #e5e7eb);
  border-radius: 10px;
  background: var(--sg-surface, #fff);
}
.sg-disc-row__num {
  flex: 0 0 1.6em;
  height: 1.6em;
  line-height: 1.6em;
  text-align: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
  background: var(--sg-accent, #3b5bdb);
  border-radius: 999px;
}
.sg-disc-row__type {
  flex: 1 1 150px;
  min-width: 130px;
}
.sg-disc-row__value {
  flex: 0 1 90px;
  min-width: 70px;
  text-align: right;
}
.sg-disc-row__unit {
  flex: 0 0 auto;
  color: var(--sg-muted, #777);
  font-size: 0.9rem;
}
.sg-disc-row__ctrls {
  flex: 0 0 auto;
  display: inline-flex;
  gap: 4px;
  margin-left: auto;
}

/* 小さな操作ボタン */
.sg-iconbtn {
  min-width: 2em;
  height: 2em;
  border: 1px solid var(--sg-border, #e5e7eb);
  border-radius: 8px;
  background: var(--sg-surface, #fff);
  color: var(--sg-fg, #222);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}
.sg-iconbtn:hover:not(:disabled) {
  background: var(--sg-surface-2, #f4f6fb);
}
.sg-iconbtn:disabled {
  opacity: 0.35;
  cursor: default;
}
.sg-iconbtn--del {
  color: #c0392b;
}

/* 追加行 */
.sg-add-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.sg-add-type {
  flex: 1 1 200px;
}

/* 結果を4分割 */
.sg-result-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 16px;
}
.sg-result-cell {
  min-width: 0;
}
.sg-result-cell--net .sg-result__value {
  color: var(--sg-accent, #3b5bdb);
  font-weight: 700;
}
.sg-result-cell .sg-result__value {
  font-size: 1.35rem;
  line-height: 1.4;
  word-break: break-word;
}

/* ステップ内訳 */
.sg-steps {
  display: flex;
  flex-direction: column;
  margin-top: var(--sg-space-3, 12px);
  border-top: 1px solid var(--sg-border, #e5e7eb);
}
.sg-step {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--sg-border, #e5e7eb);
}
.sg-step__label {
  flex: 1 1 auto;
  line-height: 1.5;
}
.sg-step__val {
  flex: 0 0 auto;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.sg-step__sub {
  display: block;
  font-size: 0.78rem;
  color: var(--sg-muted, #777);
}
.sg-step__pt {
  color: #2f9e44;
  font-weight: 600;
}
.sg-step--base .sg-step__label {
  font-weight: 600;
}
.sg-step--total {
  border-bottom: none;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 2px solid var(--sg-border, #e5e7eb);
}
.sg-step--total .sg-step__label {
  font-weight: 600;
  font-size: 0.9rem;
}
.sg-step--total .sg-step__val {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--sg-accent, #3b5bdb);
}
