/* 料金表（本文は https://onelovedental.com/api/price_en.php から取り込み、基本の見た目は /api/price.css）。
   ここではワンラブの配色に合わせて上書きする。日本語の price.css と揃える */

/* 英文が単語の途中で折り返さないように（共通の body は break-all） */
.price {
  word-break: normal;
  overflow-wrap: anywhere;
}

.price_mascot {
  text-align: center;
}

.price_mascot img {
  width: 130px;
}

/* h2 は implant などと同じ共通の .section_title（index.html で付ける）。
   共有の /api/price.css にある .price_warranty h2 の丸枠だけ打ち消す */
.price .price_warranty h2 {
  color: #007b79;
  margin: 31px auto 3rem; /* マスコットの画像から見出しまでを 39px（日本語版と同じ）。画像の下に 8px の隙間がある */
  border: 0;
  border-radius: 0;
  width: auto;
  padding: 0;
}

/* 料金表の h2 の「(Tax Included)」。h2 の半分の大きさ。途中で折り返さない */
.price_tax_note {
  display: inline-block;
  font-size: 0.5em;
}

.price_card > section + section {
  margin-top: 64px;
}

/* このページの h3 の共通の見た目。共有の /api/price.css の見た目を上書きする。余白は節ごとに下で指定 */
.price .price_card h3 {
  font-family: var(--serif);
  font-weight: 600;
  text-align: left;
  color: #007b79;
  background: none;
  padding: 0 0 8px;
  border-bottom: 2px solid #007b79;
}

.price .price_warranty_point h3 {
  text-align: center;
  margin: 20px 10px;
}

/* すべての節の横幅を最大 1000px に揃える */
.price .price_card > section {
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

/* 料金の区分の見出し。左端は料金の行の文字（PC は 16px 内側、SP は端から）に揃える */
.price .price_list h3 {
  font-size: 1.5rem;
  padding: 0 16px 8px;
  margin: 96px auto 0 auto;
}

@media (max-width: 767px) {
  .price .price_list h3 {
    padding-left: 0;
  }
}

/* 詳細ボタンの見た目。枠がないので、左の余白は取らず治療名の文字に揃える */
.price .price_table li:first-child > button {
  font-size: 14px;
  color: #767676;
  border: 0;
  padding: 8px 0;
}

/* 詳細ボタンは治療名の右横に並べる。名前が長いときは名前の側で折り返す。
   SP は治療名の列が 160px で横に並ぶ幅がないので、従来どおり名前の下 */
@media (min-width: 768px) {
  .price .price_table li:first-child {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .price .price_table li:first-child > button {
    flex-shrink: 0;
    margin: 0;
    white-space: nowrap;
  }
}

/* Payment Options と Tricare（all-smile.com と同じ仕様）。背景（ワンラブのゴールド #a9803f（予約ボタンの色）を薄くしたベージュ）をブラウザの全幅に広げ、中身は最大 1000px のまま。
   全幅の背景は box-shadow で描き、clip-path で上下にはみ出さないようにする（横スクロールは出ない） */
.price .price_card > section.price_payment,
.price .price_card > section.price_tricare {
  margin-top: 96px;
  margin-bottom: 64px;
  padding: 64px 0;
  background-color: rgba(169, 128, 63, 0.1);
  box-shadow: 0 0 0 100vmax rgba(169, 128, 63, 0.1);
  clip-path: inset(0 -100vmax);
}

/* 帯の上端から見出しまでは 64px（帯の内側の余白） */
.price .price_payment h2,
.price .price_tricare h2 {
  margin-top: 0;
}

.price .price_payment h3 {
  margin: 64px auto 16px auto;
}

/* Dental Loans と Orthodontic Treatment を横並びにする。見出しが2行になっても下線の高さは揃える。SP は縦並び */
@media (min-width: 768px) {
  .price .price_payment {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 32px;
  }

  .price .price_payment h2 {
    grid-column: 1 / -1;
  }

  .price .price_payment h3 {
    align-self: end;
    margin: 48px 0 16px;
  }

  .price .price_payment h3:nth-of-type(1),
  .price .price_payment p:nth-of-type(1) {
    grid-column: 1;
  }

  .price .price_payment h3:nth-of-type(2),
  .price .price_payment p:nth-of-type(2) {
    grid-column: 2;
  }

  .price .price_payment h3 {
    grid-row: 2;
  }

  .price .price_payment p {
    grid-row: 3;
  }
}

/* Tricare の説明とロゴ。PC は説明の右にロゴ、SP は説明の下に中央揃え */
.price_tricare_body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.price_tricare_body img {
  flex-shrink: 0;
  width: 200px;
  height: auto;
}

@media (max-width: 767px) {
  .price_tricare_body {
    flex-direction: column;
    gap: 24px;
  }
}

/* ページの一番下（Other Health Insurance の下）の余白 */
.price .price_overseas {
  padding-bottom: 128px;
}

.price_table {
  border-bottom-color: #dddddd;
}

.price .price_deduction_frame {
  background-color: rgba(153, 204, 204, 0.308);
}

/* 料金の下の治療ページへのリンク。日本語サイトの styles.css の .section_link_btn と同じ見た目 */
.section_link_buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0.5rem auto 0;
}

a.section_link_btn {
  position: relative;
  width: fit-content;
  padding: 0.9rem 4.5rem 0.9rem 3.5rem;
  background-color: transparent;
  border: 1px solid #007b79;
  border-radius: 999px;
  color: #007b79;
  font-weight: bold;
  font-size: 1.2rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  white-space: nowrap;
}

a.section_link_btn::after {
  content: "";
  /* 「>」は SVG（Material Icons の arrow_forward_ios と同じ形）。文字のときと同じく、1em 角を中身の枠の左上に置き、文字色で塗る */
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.23 20.23 8 22l10-10L8 2 6.23 3.77 14.46 12z'/%3E%3C/svg%3E") left top / 1em 1em no-repeat content-box;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.23 20.23 8 22l10-10L8 2 6.23 3.77 14.46 12z'/%3E%3C/svg%3E") left top / 1em 1em no-repeat content-box;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 1.5rem;
  height: auto;
  margin: auto;
  padding: 1rem 0.5rem;
  font-size: 1.3em;
  line-height: 1;
  aspect-ratio: 1 / 1;
}

a.section_link_btn:hover {
  opacity: 0.8;
}

@media (max-width: 767px) {
  .section_link_buttons {
    flex-direction: column;
  }

  a.section_link_btn {
    width: auto;
    min-width: 80%;
    max-width: 100%;
    padding: 0.9rem 3rem 0.9rem 2rem;
    font-size: 1rem;
    text-align: center;
    white-space: normal;
  }
}

/* 治療名が折り返さないよう、治療名の列を残りの幅いっぱいに広げ、価格の列は固定する。
   画像の列は画像の幅（200px）と左右の余白 16px ずつだけにして、価格と画像を右に寄せる。
   画像がない行も同じ幅を取るので、価格の位置は揃う。SP は表を横にスクロールするので変えない */
@media (min-width: 768px) {
  .price .price_table li:nth-child(1) {
    flex: 1 1 0;
    min-width: 0;
  }

  .price .price_table li:nth-child(2) {
    flex: 0 0 190px;
  }

  .price .price_table li:nth-child(3) {
    flex: 0 0 232px;
  }
}

/* 医療費控除の計算式。幅 900px 以上は1行に収める（画面幅に合わせて文字を小さくする）。それより狭いと小さくなりすぎるので折り返す */
.price .price_deduction_frame {
  max-width: 1000px;
}

@media (min-width: 900px) {
  .price .price_deduction_frame {
    font-size: clamp(15px, calc(2.3vw - 5.5px), 20px);
    white-space: nowrap;
  }

  .price .price_deduction_frame small {
    white-space: normal;
  }
}

/* 計算式のマイナスの線をワンラブの緑にする */
.price .price_minus::before {
  background-color: #007b79;
}

/* 保証の節（「自費診療には、安心の保証があります。」）は、onelovedental.com の日本語の料金ページと同じレイアウトにする。
   見出しは枠線なし、説明文は中央揃え、3列の本文と注記は左揃え（見出しは中央）。
   h3 は、いちばん長い「利用可能クレジットカード」（文字の大きさの約 12 倍の幅）が折り返さない大きさで、最大 1.5rem。
   3列のときは列の幅に合わせて小さくし、SP（1列）は 1.5rem まで */
.price .price_warranty h2 {
  border: 0;
}

.price .price_warranty > p {
  text-align: center;
}

.price .price_warranty_point li,
.price .price_warranty_point p {
  text-align: left;
}

.price .price_warranty_point h3 {
  font-size: clamp(16px, calc(2.7vw - 4.3px), 1.5rem);
  text-align: center;
}

@media (max-width: 767px) {
  .price .price_warranty_point h3 {
    font-size: min(1.5rem, calc((100vw - 68px) / 12.2));
  }
}

/* 保証の説明文の上下の余白（3院の日英で同じ）。見出しとの間は狭く、3列の見出しまでは広く（説明文の文字から h3 まで約 64px） */
.price .price_warranty h2 {
  margin-bottom: 16px;
}

.price .price_warranty > p {
  margin: 0;
  padding: 0;
}

.price .price_warranty_point {
  margin-top: 44px;
}

.price .price_warranty_point h3 {
  margin-top: 20px;
}

/* 料金ページの h2 は字間なし（英語版の料金ページと同じ）。書体はこのサイトの明朝（Shippori Mincho。太さは h3 と同じ 600） */
.price .price_card h2 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: normal;
}

/* 料金表の見出し（自費診療料金表 / Treatment Price List）の上下の余白（3院の日英で同じ）。
   前の節（保証）と区別しやすいよう上は 128px と広く、見出しから最初の区分の見出しまでは 48px と狭くする */
.price .price_list h2 {
  margin-top: 128px;
  margin-bottom: 0;
}

.price .price_list h2 + h3 {
  margin-top: 48px;
}

/* 「(Tax Included)」は改行して、見出しの2行目に置く */
.price_tax_note {
  display: block;
}

/* 保証の見出しと説明文（とロゴ）は1枚のカードにまとめる。背景は白、角は丸めず、柔らかく広がる影を付ける */
.price .price_warranty_card {
  max-width: 1000px;
  margin: 0 auto;
  padding: 48px 48px 56px;
  background-color: #fff;
  border-radius: 0;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.08);
}

@media (max-width: 767px) {
  .price .price_warranty_card {
    padding: 32px 20px 40px;
  }
}

.price .price_warranty_card .price_logo_icon {
  padding-top: 0;
}

.price .price_warranty_card > h2:first-child {
  margin-top: 0;
}

/* カードから3列の見出しまで */
.price .price_warranty_card + .price_warranty_point {
  margin-top: 48px;
}

/* SP はカードの内側が狭いので、見出しは 1.5rem にして左右の余白をなくす（onelovedental.com の日本語版と同じ大きさ） */
@media (max-width: 767px) {
  .price .price_warranty_card h2 {
    font-size: 1.5rem;
    line-height: 1.4;
    padding-left: 0;
    padding-right: 0;
  }
}

/* カード内の説明文は中央揃え。上下の余白は見出しの margin で取る */
.price .price_warranty_card p {
  margin: 0;
  padding: 0;
  text-align: center;
}

/* 保証書のように、カードの縁から 16px 内側に 1px の金色の線で枠を描く（色はこのサイトのゴールド #a9803f） */
.price .price_warranty_card {
  position: relative;
}

.price .price_warranty_card::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid #a9803f;
  pointer-events: none;
}

/* SP は枠線と文字が近づきすぎないよう、左右の余白を広げる */
@media (max-width: 767px) {
  .price .price_warranty_card {
    padding-left: 32px;
    padding-right: 32px;
  }
}

/* カード内のマスコットは、キャラクターなので小さく見えないよう少し大きめ（150px） */
.price .price_warranty_card .price_mascot img {
  width: 150px;
}

/* カード内の余白：ロゴの下と見出しの下の間隔を揃える（3院の日英で同じ。文字から文字まで約 32px）
   見出しの余白・行間はカード内で統一し、ロゴの下と説明文の上の余白で間隔を取る */
.price .price_warranty_card .price_logo_icon,
.price .price_warranty_card .price_mascot {
  margin: 0 0 33px;
  padding-bottom: 0;
}

.price .price_warranty_card .price_logo_icon img,
.price .price_warranty_card .price_mascot img {
  display: block;
  margin: 0 auto;
}

.price .price_warranty_card h2 {
  margin: 0 auto;
  padding-top: 0;
  padding-bottom: 0;
  line-height: 1.4;
}

.price .price_warranty_card p {
  margin-top: 28px; /* 説明文の行間の分を差し引いて、見出しの文字から約 32px */
}

/* SP の Payment Options は縦の余白を詰める（3院の英語版で同じ） */
@media (max-width: 767px) {
  .price .price_card > section.price_payment,
  .price section.price_payment {
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .price .price_payment h2 {
    margin-bottom: 0;
  }

  .price .price_payment h3 {
    margin: 32px 0 12px;
  }

  .price .price_payment p {
    margin: 0;
    padding: 0;
  }
}

/* SP の縦の余白を詰める（保証の3項目、料金の行、区分の間。3院の日英で同じ） */
@media (max-width: 767px) {
  .price .price_warranty_point {
    gap: 40px;
  }

  .price .price_warranty_point h3 {
    margin: 0 0 12px;
    padding: 0 0 8px;
  }

  .price .price_warranty_point p {
    margin: 0;
    padding: 0;
  }

  .price .price_table li:first-child > button {
    margin: 4px 0 0;
  }

  .price .price_table li:nth-child(3) img {
    width: 160px;
    height: auto;
  }

  .price .price_list h3,
  .price .price_list .price_memo_field:empty + h3 {
    margin-top: 48px;
  }

  .price .price_list .price_memo_field {
    margin: 0;
    padding: 12px 0 0;
  }

  .price .price_list .price_memo_field:empty {
    padding: 0;
  }

  .price .price_card .link_group,
  .price .price_card .price_links,
  .price .price_card .section_link_buttons {
    margin-bottom: 0;
    padding-bottom: 0;
  }
}

/* SP の Tricare：説明とロゴの間を詰める。帯の上下は Payment Options と同じ 40px（3院の英語版で同じ） */
@media (max-width: 767px) {
  .price .price_tricare_body {
    gap: 16px;
  }

  .price .price_tricare_body p {
    margin: 0;
    padding: 0;
  }

  .price .price_card > section.price_tricare,
  .price section.price_tricare {
    padding-top: 40px;
    padding-bottom: 40px;
  }
}
