/* ============================================
   hashout → Social Report リニューアルポップアップ
   ============================================ */

:root {
  --renewal-blue: #1558D6;
  --renewal-blue-dark: #0F45B0;
  --renewal-blue-bg: #F3F7FF;
  --renewal-blue-light: #EEF4FF;
}

/* 背景スクロール禁止 */
body.renewal-no-scroll {
  overflow: hidden;
}

/* ---- オーバーレイ ---- */
.renewal-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 9999;
  background: rgba(8, 18, 40, 0.65);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  /* paddingで四辺に余白を確保し、ポップアップが画面内に収まるようにする */
  padding: 20px 16px;
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
}

/* ---- ポップアップ本体 ---- */
.renewal-popup {
  background: #ffffff;
  border-radius: 16px;
  max-width: 500px;
  width: 100%;
  /* flex列構造でヘッダー固定・中身スクロール・フッター固定を実現 */
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  /* overlayのpaddingで余白を取るため、ここでは高さ上限のみ指定 */
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  -webkit-box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
          box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
}

/* ---- ヘッダー（上部固定） ---- */
.renewal-header {
  background: #1558D6;
  background: var(--renewal-blue);
  padding: 28px 28px 24px;
  position: relative;
  /* ヘッダーの上角にborder-radiusを付けてポップアップ角丸を再現 */
  border-radius: 16px 16px 0 0;
  -ms-flex-negative: 0;
      flex-shrink: 0;
}

.renewal-header-circle {
  position: absolute;
  border-radius: 50%;
}

.renewal-header-circle--lg {
  width: 200px;
  height: 200px;
  right: -30px;
  top: -30px;
  background: rgba(255, 255, 255, 0.06);
}

.renewal-header-circle--sm {
  width: 140px;
  height: 140px;
  right: 40px;
  bottom: -60px;
  background: rgba(255, 255, 255, 0.04);
}

.renewal-badge {
  display: inline-block;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-size: 11px;
  padding: 4px 12px;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.renewal-title {
  color: #ffffff;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.5;
  margin: 0 0 8px;
  position: relative;
  z-index: 1;
}

.renewal-subtitle {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  margin: 0;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

/* ---- 右カラム（横並び時のラッパー、通常時はflexの残り領域を占有） ---- */
.renewal-right-col {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  -webkit-box-flex: 1;
      -ms-flex: 1 1 auto;
          flex: 1 1 auto;
  min-height: 0;
  border-radius: 0 0 16px 16px;
}

/* ---- 中央スクロールエリア ---- */
.renewal-scroll-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  -webkit-box-flex: 1;
      -ms-flex: 1 1 auto;
          flex: 1 1 auto;
  /* スクロール可能なことを示す上下グラデーション */
  background:
    linear-gradient(#fff 30%, rgba(255,255,255,0)),
    linear-gradient(rgba(255,255,255,0), #fff 70%) 0 100%,
    radial-gradient(farthest-side at 50% 0, rgba(0,0,0,0.08), transparent),
    radial-gradient(farthest-side at 50% 100%, rgba(0,0,0,0.08), transparent) 0 100%;
  background-repeat: no-repeat;
  background-color: #ffffff;
  background-size: 100% 24px, 100% 24px, 100% 8px, 100% 8px;
  background-attachment: local, local, scroll, scroll;
}

/* ---- ブランド移行表示 ---- */
.renewal-migration {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  background: #F3F7FF;
  background: var(--renewal-blue-bg);
  padding: 14px 28px;
}

.renewal-migration > * + * {
  margin-left: 12px;
}

.renewal-chip {
  display: -webkit-inline-box;
  display: -ms-inline-flexbox;
  display: inline-flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
}

.renewal-chip--old {
  background: #ffffff;
  color: #555555;
  border: 1px solid #dddddd;
}

.renewal-chip--new {
  background: #1558D6;
  background: var(--renewal-blue);
  color: #ffffff;
}

.renewal-arrow {
  color: #1558D6;
  color: var(--renewal-blue);
  font-size: 20px;
}

/* ---- 本文 ---- */
.renewal-body {
  padding: 18px 28px 20px;
}

.renewal-section-label {
  color: #1558D6;
  color: var(--renewal-blue);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  margin: 0 0 10px;
}

.renewal-check-list {
  list-style: none;
  padding: 0;
  margin: 0 0 4px;
}

.renewal-check-list li {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: start;
      -ms-flex-align: start;
          align-items: flex-start;
  font-size: 13px;
  margin-bottom: 11px;
}

.renewal-check-list li > * + * {
  margin-left: 10px;
}

.renewal-check-icon {
  display: -webkit-inline-box;
  display: -ms-inline-flexbox;
  display: inline-flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  width: 20px;
  height: 20px;
  min-width: 20px;
  background: #1558D6;
  background: var(--renewal-blue);
  border-radius: 50%;
  -ms-flex-negative: 0;
      flex-shrink: 0;
  margin-top: 1px;
}

.renewal-item-title {
  color: #1558D6;
  color: var(--renewal-blue);
  font-weight: 500;
  display: block;
}

.renewal-item-desc {
  color: #666666;
  display: block;
  margin-top: 2px;
  line-height: 1.5;
}

.renewal-new-badge {
  background: #EEF4FF;
  background: var(--renewal-blue-light);
  color: #1558D6;
  color: var(--renewal-blue);
  font-size: 10px;
  border-radius: 4px;
  padding: 2px 6px;
  margin-left: 6px;
  display: inline-block;
  vertical-align: middle;
}

.renewal-divider {
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  margin: 14px 0;
}

/* ---- フッター（下部固定・CTAボタン） ---- */
.renewal-footer {
  -ms-flex-negative: 0;
      flex-shrink: 0;
  padding: 12px 28px 20px;
  background: #ffffff;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  /* 下角にborder-radiusを付けてポップアップ角丸を再現 */
  border-radius: 0 0 16px 16px;
}

.renewal-btn {
  display: block;
  width: 100%;
  background: #1558D6;
  background: var(--renewal-blue);
  color: #ffffff;
  font-size: 15px;
  border-radius: 10px;
  padding: 14px;
  text-align: center;
  text-decoration: none;
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.renewal-btn:hover,
.renewal-btn:focus {
  background: #0F45B0;
  background: var(--renewal-blue-dark);
  color: #ffffff;
  text-decoration: none;
}

.renewal-note {
  text-align: center;
  font-size: 11px;
  color: #aaaaaa;
  margin: 8px 0 0;
}

/* ---- モバイル縦向き ---- */
@media screen and (max-width: 480px) {
  .renewal-overlay {
    padding: 12px 0 0;
    -webkit-box-align: end;
        -ms-flex-align: end;
            align-items: flex-end;
  }

  .renewal-popup {
    width: 100%;
    max-width: 100%;
    border-radius: 16px 16px 0 0;
    max-height: calc(100vh - 12px);
    max-height: calc(100dvh - 12px);
  }

  .renewal-header {
    padding: 22px 20px 18px;
    border-radius: 16px 16px 0 0;
  }

  .renewal-title {
    font-size: 17px;
  }

  .renewal-migration {
    padding: 12px 20px;
  }

  .renewal-body {
    padding: 16px 20px 16px;
  }

  .renewal-footer {
    padding: 12px 20px 24px;
    border-radius: 0;
  }

  .renewal-right-col {
    border-radius: 0;
  }
}

/* ---- 高さ不足時：横並びレイアウト ---- */
@media screen and (max-height: 560px) {
  .renewal-overlay {
    padding: 8px;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
  }

  /* popupを横長に拡張 */
  .renewal-popup {
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
        -ms-flex-direction: row;
            flex-direction: row;
    max-width: 820px;
    width: 100%;
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 12px;
  }

  /* ヘッダーを左カラムに */
  .renewal-header {
    width: 38%;
    -ms-flex-negative: 0;
        flex-shrink: 0;
    padding: 28px 24px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    border-radius: 12px 0 0 12px;
  }

  .renewal-title {
    font-size: 17px;
  }

  .renewal-subtitle {
    font-size: 12px;
  }

  /* 右カラム：スクロールエリア＋フッターをまとめる */
  .renewal-right-col {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    -webkit-box-flex: 1;
        -ms-flex: 1 1 auto;
            flex: 1 1 auto;
    min-width: 0;
    border-radius: 0 12px 12px 0;
  }

  .renewal-scroll-body {
    padding: 0;
  }

  .renewal-migration {
    padding: 12px 20px;
  }

  .renewal-body {
    padding: 14px 20px 12px;
  }

  .renewal-check-list li {
    font-size: 12px;
    margin-bottom: 8px;
  }

  .renewal-footer {
    padding: 10px 20px 14px;
    border-radius: 0 0 12px 0;
  }

  .renewal-btn {
    padding: 11px;
    font-size: 14px;
  }
}
