/* =========================================
   Affiliate Blocks - LP03 Check Diagnosis
   check-diagnosis-block.js class match version
========================================= */

.ab-check-diagnosis,
.ab-check-diagnosis * {
  box-sizing: border-box;
}

.ab-check-diagnosis {
  width: 100%;
  max-width: 860px;
  margin: 32px auto;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
}

.ab-check-diagnosis-inner {
  position: relative;
  width: 100%;
  padding: 28px 22px;
  border-radius: 22px;
  background: linear-gradient(180deg, #f4fbff 0%, #ffffff 100%);
  border: 3px solid rgba(30, 136, 229, 0.24);
  box-shadow: 0 12px 28px rgba(30, 136, 229, 0.14);
  overflow: hidden;
}

.ab-check-diagnosis-inner::before {
  content: "";
  position: absolute;
  top: -90px;
  right: -90px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(30, 136, 229, 0.08);
  pointer-events: none;
}

.ab-check-diagnosis-inner::after {
  content: "";
  position: absolute;
  left: -100px;
  bottom: -120px;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: rgba(255, 152, 0, 0.10);
  pointer-events: none;
}

.ab-check-diagnosis-label,
.ab-check-diagnosis-title,
.ab-check-diagnosis-lead,
.ab-check-diagnosis-list,
.ab-check-diagnosis-count,
.ab-check-diagnosis-result-wrap,
.ab-check-diagnosis-button-wrap,
.ab-check-diagnosis-note {
  position: relative;
  z-index: 1;
}

/* ラベル */
.ab-check-diagnosis-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 12px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #ffffff;
  color: #1565c0;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.4;
  box-shadow: 0 6px 18px rgba(30, 136, 229, 0.13);
}

.ab-check-diagnosis-label::before {
  content: "✓";
  display: inline-grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #1e88e5;
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
}

/* タイトル */
.ab-check-diagnosis-title {
  margin: 0 0 12px !important;
  padding: 0 !important;
  color: #111827;
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 900;
  line-height: 1.38;
  letter-spacing: -0.02em;
}

/* 説明文 */
.ab-check-diagnosis-lead {
  margin: 0 0 22px !important;
  padding: 0 !important;
  color: #374151;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.85;
}

/* チェックリスト */
.ab-check-diagnosis-list {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
}

.ab-check-diagnosis-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid rgba(30, 136, 229, 0.18);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.94);
  color: #1f2937;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.6;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.055);
}

.ab-check-diagnosis-checkbox {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ab-check-diagnosis-checkmark {
  position: relative;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  border-radius: 7px;
  border: 2px solid #90caf9;
  background: #ffffff;
}

.ab-check-diagnosis-checkmark::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 11px;
  border: solid #ffffff;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
  opacity: 0;
}

.ab-check-diagnosis-checkbox:checked + .ab-check-diagnosis-checkmark {
  background: #1e88e5;
  border-color: #1e88e5;
}

.ab-check-diagnosis-checkbox:checked + .ab-check-diagnosis-checkmark::after {
  opacity: 1;
}

.ab-check-diagnosis-item:has(.ab-check-diagnosis-checkbox:checked) {
  border-color: #1e88e5;
  background: #f4fbff;
}

.ab-check-diagnosis-item-text {
  flex: 1 1 auto;
}

/* チェック数 */
.ab-check-diagnosis-count {
  display: none;
  margin: 16px 0 0 !important;
  text-align: center;
  color: #1e88e5;
  font-size: 14px;
  font-weight: 900;
}

.ab-check-diagnosis.is-result-shown .ab-check-diagnosis-count {
  display: block;
}

/* 結果 */
.ab-check-diagnosis-result-wrap {
  margin-top: 18px;
}

.ab-check-diagnosis-result {
  display: none;
  padding: 20px 18px;
  border-radius: 18px;
  background: #ffffff;
  border: 3px solid rgba(30, 136, 229, 0.24);
  box-shadow: 0 10px 24px rgba(30, 136, 229, 0.14);
  text-align: center;
}

.ab-check-diagnosis-result.is-active {
  display: block;
  animation: ab-check-diagnosis-fade 0.25s ease;
}

/* エディターでは結果を全部見せる */
.ab-check-diagnosis-result.is-preview {
  display: block;
  margin-bottom: 12px;
}

@keyframes ab-check-diagnosis-fade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ab-check-diagnosis-result-title {
  margin: 0 0 10px !important;
  padding: 0 !important;
  color: #111827;
  font-size: 21px;
  font-weight: 900;
  line-height: 1.5;
}

.ab-check-diagnosis-result-text {
  margin: 0 !important;
  color: #374151;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.8;
}

/* 結果ボタン */
.ab-check-diagnosis-button-wrap {
  display: none;
  justify-content: center;
  margin-top: 18px;
  text-align: center;
}

.ab-check-diagnosis.is-result-shown .ab-check-diagnosis-button-wrap {
  display: flex;
}

.ab-check-diagnosis-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 420px;
  min-height: 56px;
  padding: 13px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff9800 0%, #ff5722 100%);
  color: #ffffff !important;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.5;
  text-decoration: none !important;
  box-shadow: 0 8px 0 #c94712, 0 14px 24px rgba(255, 87, 34, 0.28);
  overflow: hidden;
}

.ab-check-diagnosis-button::after {
  content: "›";
  margin-left: 10px;
  font-size: 1.25em;
  font-weight: 900;
}

/* ボタン光 */
.ab-check-diagnosis-button::before {
  content: "";
  position: absolute;
  top: -40%;
  left: -80%;
  width: 45%;
  height: 180%;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.65) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(25deg);
  animation: ab-check-diagnosis-shine 2.8s infinite;
}

.ab-check-diagnosis-button span {
  position: relative;
  z-index: 1;
}

@keyframes ab-check-diagnosis-shine {
  0% {
    left: -80%;
  }

  45% {
    left: 130%;
  }

  100% {
    left: 130%;
  }
}

/* 注釈 */
.ab-check-diagnosis-note {
  margin: 14px 0 0 !important;
  color: #6b7280;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
  text-align: center;
}

/* 中央寄せ */
.ab-check-diagnosis.is-centered {
  text-align: center;
}

.ab-check-diagnosis.is-centered .ab-check-diagnosis-label {
  margin-left: auto;
  margin-right: auto;
}

.ab-check-diagnosis.is-centered .ab-check-diagnosis-lead {
  max-width: 720px;
  margin-left: auto !important;
  margin-right: auto !important;
}

.ab-check-diagnosis.is-centered .ab-check-diagnosis-list {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.ab-check-diagnosis.is-centered .ab-check-diagnosis-item {
  text-align: left;
}

/* オレンジ */
.ab-check-diagnosis.ab-check-diagnosis--orange .ab-check-diagnosis-inner {
  background: linear-gradient(180deg, #fffaf0 0%, #ffffff 100%);
  border-color: rgba(255, 152, 0, 0.28);
  box-shadow: 0 12px 28px rgba(255, 152, 0, 0.14);
}

.ab-check-diagnosis.ab-check-diagnosis--orange .ab-check-diagnosis-label {
  color: #b45f00;
}

.ab-check-diagnosis.ab-check-diagnosis--orange .ab-check-diagnosis-label::before,
.ab-check-diagnosis.ab-check-diagnosis--orange .ab-check-diagnosis-checkbox:checked + .ab-check-diagnosis-checkmark {
  background: #ff9800;
  border-color: #ff9800;
}

/* グリーン */
.ab-check-diagnosis.ab-check-diagnosis--green .ab-check-diagnosis-inner {
  background: linear-gradient(180deg, #f1fff6 0%, #ffffff 100%);
  border-color: rgba(46, 175, 99, 0.28);
  box-shadow: 0 12px 28px rgba(46, 175, 99, 0.14);
}

.ab-check-diagnosis.ab-check-diagnosis--green .ab-check-diagnosis-label {
  color: #1b7f45;
}

.ab-check-diagnosis.ab-check-diagnosis--green .ab-check-diagnosis-label::before,
.ab-check-diagnosis.ab-check-diagnosis--green .ab-check-diagnosis-checkbox:checked + .ab-check-diagnosis-checkmark {
  background: #2eaf63;
  border-color: #2eaf63;
}

.ab-check-diagnosis.ab-check-diagnosis--green .ab-check-diagnosis-button {
  background: linear-gradient(135deg, #2eaf63 0%, #168747 100%);
  box-shadow: 0 8px 0 #0f6334, 0 14px 24px rgba(46, 175, 99, 0.28);
}

/* シンプル */
.ab-check-diagnosis.ab-check-diagnosis--simple .ab-check-diagnosis-inner {
  background: #ffffff;
  border-color: #e5e7eb;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.ab-check-diagnosis.ab-check-diagnosis--simple .ab-check-diagnosis-inner::before,
.ab-check-diagnosis.ab-check-diagnosis--simple .ab-check-diagnosis-inner::after {
  display: none;
}

.ab-check-diagnosis.ab-check-diagnosis--simple .ab-check-diagnosis-label {
  background: #f9fafb;
  color: #374151;
  box-shadow: none;
}

.ab-check-diagnosis.ab-check-diagnosis--simple .ab-check-diagnosis-label::before,
.ab-check-diagnosis.ab-check-diagnosis--simple .ab-check-diagnosis-checkbox:checked + .ab-check-diagnosis-checkmark {
  background: #6b7280;
  border-color: #6b7280;
}

/* スマホ */
@media screen and (max-width: 600px) {
  .ab-check-diagnosis {
    margin: 24px auto;
  }

  .ab-check-diagnosis-inner {
    padding: 22px 14px;
    border-width: 2px;
    border-radius: 20px;
  }

  .ab-check-diagnosis-title {
    font-size: 22px;
  }

  .ab-check-diagnosis-lead {
    font-size: 14px;
    text-align: left;
  }

  .ab-check-diagnosis-item {
    padding: 12px;
    font-size: 14px;
  }

  .ab-check-diagnosis-result {
    padding: 18px 14px;
    border-width: 2px;
  }

  .ab-check-diagnosis-result-title {
    font-size: 19px;
  }

  .ab-check-diagnosis-result-text {
    font-size: 14px;
    text-align: left;
  }

  .ab-check-diagnosis-button {
    width: 100%;
    max-width: 100%;
    font-size: 16px;
  }

  .ab-check-diagnosis-note {
    font-size: 12px;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ab-check-diagnosis-button,
  .ab-check-diagnosis-button::before {
    animation: none !important;
    transition: none !important;
  }
}
/* =========================================
   LP03 チェック診断：結果タイトルのテーマH3装飾リセット
========================================= */

.ab-check-diagnosis .ab-check-diagnosis-result-title {
  display: block !important;
  width: auto !important;
  max-width: 100% !important;
  margin: 0 0 10px !important;
  padding: 0 !important;
  border: none !important;
  border-left: none !important;
  border-right: none !important;
  border-top: none !important;
  border-bottom: none !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #111827 !important;
  font-size: 21px !important;
  font-weight: 900 !important;
  line-height: 1.5 !important;
  text-align: center !important;
  letter-spacing: 0 !important;
}

.ab-check-diagnosis .ab-check-diagnosis-result-title::before,
.ab-check-diagnosis .ab-check-diagnosis-result-title::after {
  content: none !important;
  display: none !important;
}
/* =========================================
   LP03 チェック診断：結果ごとの帯色変更
   high = 7個以上
   middle = 4〜6個
   low = 0〜3個
========================================= */

/* 共通：結果タイトルを帯っぽくする */
.ab-check-diagnosis .ab-check-diagnosis-result-title {
  display: inline-block !important;
  width: auto !important;
  max-width: 100% !important;
  margin: 0 0 14px !important;
  padding: 10px 16px !important;
  border-radius: 12px !important;
  border: none !important;
  box-shadow: none !important;
  text-align: center !important;
}

/* 7個以上 */
.ab-check-diagnosis .ab-check-diagnosis-result[data-result="high"] .ab-check-diagnosis-result-title {
  background: linear-gradient(135deg, #ffebee 0%, #fff5f5 100%) !important;
  color: #c62828 !important;
  border: 2px solid #ef9a9a !important;
}

/* 4〜6個 */
.ab-check-diagnosis .ab-check-diagnosis-result[data-result="middle"] .ab-check-diagnosis-result-title {
  background: linear-gradient(135deg, #fff8e1 0%, #fffdf5 100%) !important;
  color: #b26a00 !important;
  border: 2px solid #ffcc80 !important;
}

/* 0〜3個 */
.ab-check-diagnosis .ab-check-diagnosis-result[data-result="low"] .ab-check-diagnosis-result-title {
  background: linear-gradient(135deg, #e8f5e9 0%, #f6fff7 100%) !important;
  color: #2e7d32 !important;
  border: 2px solid #a5d6a7 !important;
}