/*
 * 友達紹介キャンペーンへの導線（TOP・商品ページ・マイページ・注文完了ページ共通）。
 * テンプレート: inc/referral-promo.php / template-parts/sections/astra-referral-promo.php ほか。
 *
 * 色・書体・カード・ボタンは、既存の LP（component-lp-page.css）と同じ値を使う。
 * 新しい背景・画像・発光は足さない。
 */

.astra-rp {
  --rp-yellow: #f9e547;
  --rp-cyan: #4ec3e0;
  --rp-cyan-line: #4ec3e1;
  --rp-body: #acacac;
  --rp-rule: #5e5c5c;

  box-sizing: border-box;
  color: #fff;
  font-family: var(--astra-gen-interface-jp), "Noto Sans JP", sans-serif;
  background-color: rgba(2, 2, 2, 0.604);
  border-radius: 8px;
  box-shadow: 0 6px 4px rgba(0, 0, 0, 0.16);
}

.astra-rp *,
.astra-rp *::before,
.astra-rp *::after {
  box-sizing: border-box;
}

.astra-rp__title {
  margin: 0;
  font-family: var(--astra-gen-interface-jp), "Noto Sans JP", sans-serif;
  font-weight: var(--astra-font-weight-semibold, 600);
  line-height: 1.3;
  color: #fff;
}

.astra-rp__lead {
  margin: 0;
  font-family: var(--astra-gen-interface-jp), "Noto Sans JP", sans-serif;
  font-weight: var(--astra-font-weight-regular, 400);
  line-height: 1.7;
  color: var(--rp-body);
  text-wrap: pretty;
}

/* 文の途中（「楽 / しもう」）で折り返さないよう、最後の句をひとまとまりにする。 */
.astra-rp__nowrap {
  display: inline-block;
}

.astra-rp__offers {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
}

.astra-rp__offer {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.astra-rp__who {
  font-family: var(--astra-gen-interface-jp), "Noto Sans JP", sans-serif;
  font-weight: var(--astra-font-weight-semibold, 600);
  line-height: 1.3;
  color: #fff;
}

.astra-rp__rate {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-family: var(--astra-roboto), "Noto Sans JP", sans-serif;
  font-weight: var(--astra-font-weight-bold, 700);
  line-height: 1;
  color: var(--rp-yellow);
}

.astra-rp__rate b {
  font-weight: inherit;
  letter-spacing: -0.02em;
}

/* 「%OFF」は数字より小さく（LP の特典カードと同じ比率）。 */
.astra-rp__unit {
  font-size: 0.4em;
}

/* 丸い縁取りのボタン（LP の .lp-button と同じ作り。矢印は既存の cyan-arrow-right）。 */
.astra-rp__btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex: none;
  max-width: 100%;
  border: 1.5px solid var(--rp-cyan-line);
  border-radius: 60px;
  font-family: var(--astra-source-code-pro), "Noto Sans JP", monospace;
  font-weight: var(--astra-font-weight-medium, 500);
  line-height: 1;
  color: var(--rp-cyan);
  text-decoration: none;
  background: none;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.astra-rp__btn:hover,
.astra-rp__btn:focus-visible {
  background-color: rgba(78, 195, 224, 0.12);
  color: var(--rp-cyan);
}

.astra-rp__btn svg {
  flex: none;
  height: auto;
}

/* ---- TOP（News の手前の帯）---- */
.astra-referral-promo {
  position: relative;
  z-index: 1;
  padding-top: 120px;
}

.astra-rp--top {
  display: flex;
  align-items: center;
  gap: 48px;
  padding: 40px 56px;
}

.astra-rp--top .astra-rp__text {
  flex: 1 1 0;
  min-width: 0;
}

.astra-rp--top .astra-rp__title {
  font-size: 32px;
  margin-bottom: 10px;
}

.astra-rp--top .astra-rp__lead {
  font-size: 16px;
}

.astra-rp--top .astra-rp__offers {
  flex: none;
  gap: 48px;
}

.astra-rp--top .astra-rp__who {
  font-size: 15px;
  margin-bottom: 8px;
}

.astra-rp--top .astra-rp__rate {
  font-size: 56px;
}

.astra-rp--top .astra-rp__btn {
  min-width: 220px;
  min-height: 58px;
  padding: 0 24px 0 30px;
  font-size: 16px;
}

.astra-rp--top .astra-rp__btn svg {
  width: 44px;
}

@media screen and (max-width: 1100px) {
  .astra-rp--top {
    flex-wrap: wrap;
    gap: 28px 40px;
    padding: 36px 40px;
  }

  .astra-rp--top .astra-rp__text {
    flex: 1 1 100%;
  }

  /* 2段に折り返したとき、ボタンは右端へ（左に寄ったままだと右が空いて見える）。 */
  .astra-rp--top .astra-rp__btn {
    margin-left: auto;
  }
}

@media screen and (max-width: 768px) {
  .astra-referral-promo {
    padding-top: 56px;
  }

  .astra-rp--top {
    flex-direction: column;
    align-items: stretch;
    gap: 22px;
    padding: 26px 20px 28px;
    text-align: center;
  }

  .astra-rp--top .astra-rp__title {
    font-size: 22px;
    margin-bottom: 8px;
  }

  .astra-rp--top .astra-rp__lead {
    font-size: 13px;
    line-height: 1.7;
  }

  .astra-rp--top .astra-rp__offers {
    gap: 0;
    border-block: 1px solid var(--rp-rule);
    padding-block: 16px;
  }

  .astra-rp--top .astra-rp__offer {
    flex: 1 1 0;
  }

  .astra-rp--top .astra-rp__offer + .astra-rp__offer {
    border-left: 1px solid var(--rp-rule);
  }

  .astra-rp--top .astra-rp__who {
    font-size: 12px;
    margin-bottom: 6px;
  }

  .astra-rp--top .astra-rp__rate {
    font-size: 44px;
  }

  .astra-rp--top .astra-rp__btn {
    align-self: center;
    min-width: 200px;
    min-height: 46px;
    padding: 0 18px 0 24px;
    border-width: 1px;
    font-size: 14px;
  }

  .astra-rp--top .astra-rp__btn svg {
    width: 34px;
  }
}

/* ---- 商品ページ（「カートに追加」の下の小さな帯）---- */
.astra-rp--pdp {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin-top: 14px;
  padding: 12px 16px;
  border: 1px solid var(--rp-rule);
  background-color: rgba(2, 2, 2, 0.4);
  box-shadow: none;
  text-decoration: none;
  color: #fff;
  transition: border-color 0.2s ease;
}

.astra-rp--pdp:hover,
.astra-rp--pdp:focus-visible {
  border-color: var(--rp-cyan-line);
  color: #fff;
}

.astra-rp__pdp-label {
  font-weight: var(--astra-font-weight-semibold, 600);
  font-size: 13px;
  line-height: 1.4;
  color: #fff;
}

.astra-rp__pdp-text {
  flex: 1 1 200px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--rp-body);
}

/* 狭い列では「、」の位置で折り返し、「15%OFF」だけが次の行に落ちないようにする。 */
.astra-rp__pdp-nw {
  display: inline-block;
}

.astra-rp__pdp-text b {
  font-family: var(--astra-roboto), "Noto Sans JP", sans-serif;
  font-weight: var(--astra-font-weight-bold, 700);
  color: var(--rp-yellow);
}

.astra-rp__pdp-more {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  font-family: var(--astra-source-code-pro), "Noto Sans JP", monospace;
  font-weight: var(--astra-font-weight-medium, 500);
  font-size: 12px;
  line-height: 1;
  color: var(--rp-cyan);
  white-space: nowrap;
}

.astra-rp__pdp-more svg {
  width: 30px;
  height: auto;
}

@media screen and (max-width: 768px) {
  .astra-rp--pdp {
    margin-top: 12px;
    padding: 12px 14px;
    gap: 4px 10px;
  }

  .astra-rp__pdp-text {
    flex-basis: 100%;
    font-size: 12px;
  }

  .astra-rp__pdp-more {
    margin-left: 0;
  }
}

/* ---- マイページ（ダッシュボードのカード／「友達紹介」タブ）---- */
.astra-rp__lead b,
.astra-rp__note b {
  font-family: var(--astra-roboto), "Noto Sans JP", sans-serif;
  font-weight: var(--astra-font-weight-bold, 700);
  color: var(--rp-yellow);
}

.astra-rp--account {
  padding: 28px 28px 26px;
  margin: 0 0 28px;
}

.astra-rp--account .astra-rp__title {
  font-size: 22px;
  margin-bottom: 10px;
}

.astra-rp--account .astra-rp__lead {
  font-size: 14px;
  margin-bottom: 20px;
}

.astra-rp__note {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--rp-body);
}

.astra-rp--account .astra-rp__btn {
  min-height: 48px;
  padding: 0 20px 0 26px;
  font-size: 14px;
}

.astra-rp--account .astra-rp__btn svg {
  width: 38px;
}

.astra-rp__share {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}

.astra-rp__link {
  display: flex;
  gap: 10px;
}

.astra-rp__field {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 48px;
  padding: 0 20px;
  border: 1.5px solid var(--rp-rule);
  border-radius: 60px;
  background: transparent;
  color: #fff;
  font-family: var(--astra-source-code-pro), monospace;
  font-size: 13px;
}

.astra-rp__field:focus-visible {
  outline: none;
  border-color: var(--rp-cyan-line);
}

.astra-rp--account .astra-rp__btn--small {
  justify-content: center;
  min-width: 0;
  padding: 0 22px;
  cursor: pointer;
  background: transparent;
}

.astra-rp__btn--small.is-copied {
  color: var(--rp-yellow);
  border-color: var(--rp-yellow);
}

.astra-rp__btn--line {
  align-self: flex-start;
}

.astra-rp__more {
  display: inline-block;
  font-size: 13px;
  line-height: 1.6;
  color: var(--rp-cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.astra-rp--dash .astra-rp__btn {
  align-self: flex-start;
}

/* 紹介の状況（日付と状態だけ。紹介された方の情報は出さない）。 */
.astra-rp-history {
  margin: 0 0 28px;
  font-family: var(--astra-gen-interface-jp), "Noto Sans JP", sans-serif;
  color: #fff;
}

.astra-rp-history__title {
  margin: 0 0 12px;
  font-family: var(--astra-gen-interface-jp), "Noto Sans JP", sans-serif;
  font-weight: var(--astra-font-weight-semibold, 600);
  font-size: 18px;
  line-height: 1.4;
  color: #fff;
}

.astra-rp-history .astra-rp-history__list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid #5e5c5c;
}

.astra-rp-history .astra-rp-history__item {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 4px;
  border-bottom: 1px solid #5e5c5c;
  font-size: 14px;
}

.astra-rp-history__status {
  min-width: 72px;
  padding: 4px 14px;
  border: 1px solid #acacac;
  border-radius: 60px;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
  color: #acacac;
}

.astra-rp-history__status.is-approved {
  border-color: #f9e547;
  color: #f9e547;
}

.astra-rp-history__status.is-rejected {
  border-color: #646464;
  color: #646464;
}

.astra-rp-history__note,
.astra-rp-history__empty {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.7;
  color: #acacac;
}

@media screen and (max-width: 768px) {
  .astra-rp--account {
    padding: 22px 18px 20px;
  }

  .astra-rp--account .astra-rp__title {
    font-size: 19px;
  }

  .astra-rp--account .astra-rp__lead {
    font-size: 13px;
  }

  .astra-rp__link {
    flex-direction: column;
  }

  .astra-rp__btn--line {
    align-self: stretch;
  }

  .astra-rp--dash .astra-rp__btn {
    align-self: stretch;
  }
}

/* ---- 注文完了ページ（AutomateWoo の共有ウィジェットを、サイトのカードとボタンに揃える）---- */
.aw-referrals-share-widget.aw-referrals-well {
  box-sizing: border-box;
  width: min(100%, 980px);
  margin: 48px auto 0;
  padding: 28px 32px 30px;
  background-color: rgba(2, 2, 2, 0.604);
  color: #fff;
  border-radius: 8px;
  box-shadow: 0 6px 4px rgba(0, 0, 0, 0.16);
  font-family: var(--astra-gen-interface-jp), "Noto Sans JP", sans-serif;
}

.aw-referrals-share-widget .aw-referrals-share-widget-text {
  padding: 0;
  text-align: center;
}

.aw-referrals-share-widget .aw-referrals-share-widget-text h3 {
  margin: 0 0 10px;
  font-family: var(--astra-gen-interface-jp), "Noto Sans JP", sans-serif;
  font-weight: var(--astra-font-weight-semibold, 600);
  font-size: 18px;
  line-height: 1.5;
  color: #fff;
  text-wrap: balance;
}

.aw-referrals-share-widget .aw-referrals-share-widget-text p {
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
  color: #acacac;
  text-wrap: pretty;
}

.aw-referrals-share-widget .aw-referrals-share-buttons {
  margin: 20px 0 0;
}

.aw-referrals-share-widget .aw-referrals-share-buttons a.btn {
  min-width: 220px;
  margin: 0;
  padding: 0 28px;
  min-height: 48px;
  border: 1.5px solid #4ec3e1;
  border-radius: 60px;
  background: none;
  font-family: var(--astra-source-code-pro), "Noto Sans JP", monospace;
  font-weight: var(--astra-font-weight-medium, 500);
  font-size: 14px;
  line-height: 1;
  color: #4ec3e0;
  transition: background-color 0.2s ease;
}

.aw-referrals-share-widget .aw-referrals-share-buttons a.btn::before {
  content: none;
}

.aw-referrals-share-widget .aw-referrals-share-buttons a.btn:hover,
.aw-referrals-share-widget .aw-referrals-share-buttons a.btn:focus-visible {
  background-color: rgba(78, 195, 224, 0.12);
  opacity: 1;
}

@media screen and (max-width: 768px) {
  .aw-referrals-share-widget.aw-referrals-well {
    margin-top: 32px;
    padding: 22px 18px 22px;
  }

  .aw-referrals-share-widget .aw-referrals-share-widget-text h3 {
    font-size: 16px;
  }

  .aw-referrals-share-widget .aw-referrals-share-widget-text p {
    font-size: 13px;
    text-align: left;
  }

  .aw-referrals-share-widget .aw-referrals-share-buttons a.btn {
    width: 100%;
    min-width: 0;
  }
}
