/* =========================================================
   Affiliate Blocks - LP08 口コミ・レビュー
   review-block.css
========================================================= */

.ab-review {
  --ab-review-accent: #2563eb;
  --ab-review-bg: #ffffff;
  --ab-review-good: #16a34a;
  --ab-review-good-bg: #f0fdf4;
  --ab-review-good-border: #bbf7d0;
  --ab-review-bad: #dc2626;
  --ab-review-bad-bg: #fff1f2;
  --ab-review-bad-border: #fecdd3;
  --ab-review-neutral: #ca8a04;
  --ab-review-neutral-bg: #fffbeb;
  --ab-review-neutral-border: #fde68a;
  --ab-review-text: #1f2937;
  --ab-review-muted: #6b7280;
  --ab-review-line: #e5e7eb;

  width: 100%;
  max-width: 860px;
  margin: 32px auto;
  padding: 26px 18px;
  background: var(--ab-review-bg);
  border: 2px solid rgba(37, 99, 235, 0.14);
  border-radius: 22px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  box-sizing: border-box;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  color: var(--ab-review-text);
}

.ab-review *,
.ab-review *::before,
.ab-review *::after {
  box-sizing: border-box;
}

/* =========================================================
   見出し
========================================================= */

.ab-review-head {
  text-align: center;
  margin-bottom: 22px;
}

.ab-review-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 14px;
  margin-bottom: 10px;
  color: #ffffff;
  background: var(--ab-review-accent);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
}

.ab-review-title {
  margin: 0 0 10px;
  color: #111827;
  font-size: 26px;
  font-weight: 900;
  line-height: 1.45;
}

.ab-review-description {
  max-width: 720px;
  margin: 0 auto;
  color: var(--ab-review-muted);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.9;
}

/* =========================================================
   リスト・カード
========================================================= */

.ab-review-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.ab-review-card {
  position: relative;
  padding: 20px 18px;
  background: #ffffff;
  border: 2px solid var(--ab-review-line);
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.ab-review-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 7px;
  height: 100%;
  background: var(--ab-review-good);
}

.ab-review-card.is-good {
  background: linear-gradient(180deg, var(--ab-review-good-bg) 0%, #ffffff 100%);
  border-color: var(--ab-review-good-border);
}

.ab-review-card.is-good::before {
  background: var(--ab-review-good);
}

.ab-review-card.is-bad {
  background: linear-gradient(180deg, var(--ab-review-bad-bg) 0%, #ffffff 100%);
  border-color: var(--ab-review-bad-border);
}

.ab-review-card.is-bad::before {
  background: var(--ab-review-bad);
}

.ab-review-card.is-neutral {
  background: linear-gradient(180deg, var(--ab-review-neutral-bg) 0%, #ffffff 100%);
  border-color: var(--ab-review-neutral-border);
}

.ab-review-card.is-neutral::before {
  background: var(--ab-review-neutral);
}

/* =========================================================
   タイプバッジ
========================================================= */

.ab-review-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  margin-bottom: 14px;
  padding: 5px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--ab-review-good);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
}

.ab-review-card.is-good .ab-review-type-badge {
  background: var(--ab-review-good);
}

.ab-review-card.is-bad .ab-review-type-badge {
  background: var(--ab-review-bad);
}

.ab-review-card.is-neutral .ab-review-type-badge {
  background: var(--ab-review-neutral);
}

.ab-review-type-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: inherit;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

/* =========================================================
   ユーザー情報
========================================================= */

.ab-review-user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.ab-review-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  color: #ffffff;
  background: var(--ab-review-good);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.22);
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

.ab-review-card.is-good .ab-review-avatar {
  background: var(--ab-review-good);
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.22);
}

.ab-review-card.is-bad .ab-review-avatar {
  background: var(--ab-review-bad);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.ab-review-card.is-neutral .ab-review-avatar {
  background: var(--ab-review-neutral);
  box-shadow: 0 4px 12px rgba(202, 138, 4, 0.2);
}

.ab-review-user-body {
  min-width: 0;
}

.ab-review-user strong,
.ab-review-user-body strong {
  display: block;
  color: #111827;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.5;
}

.ab-review-user span,
.ab-review-user-body span {
  display: block;
  margin-top: 1px;
  color: var(--ab-review-muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}

/* =========================================================
   星評価
========================================================= */

.ab-review-rating {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 12px;
}

.ab-review-stars {
  display: inline-flex;
  align-items: center;
  gap: 1px;
}

.ab-review-star {
  color: #d1d5db;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.ab-review-star.is-active {
  color: #f59e0b;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

.ab-review-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 2px 9px;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
}

/* =========================================================
   口コミ本文
========================================================= */

.ab-review-comment-title {
  margin: 10px 0 8px;
  color: #111827;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.6;
}

.ab-review-text {
  margin: 0;
  color: #374151;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.9;
}

/* =========================================================
   編集部コメント
========================================================= */

.ab-review-editor-comment {
  margin-top: 22px;
  padding: 18px 18px;
  background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
  border: 2px solid rgba(37, 99, 235, 0.2);
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.08);
}

.ab-review-editor-comment-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  color: var(--ab-review-accent);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.5;
}

.ab-review-editor-comment-title::before {
  content: "💬";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.ab-review-editor-comment-text {
  margin: 0;
  color: #374151;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.9;
}

/* =========================================================
   スタイル切り替え：コンパクト
========================================================= */

.ab-review-style-compact {
  padding: 22px 16px;
}

.ab-review-style-compact .ab-review-list {
  gap: 12px;
}

.ab-review-style-compact .ab-review-card {
  padding: 16px 16px;
  border-radius: 14px;
}

.ab-review-style-compact .ab-review-avatar {
  width: 38px;
  height: 38px;
  font-size: 17px;
}

.ab-review-style-compact .ab-review-comment-title {
  font-size: 16px;
}

.ab-review-style-compact .ab-review-text {
  font-size: 14px;
}

/* =========================================================
   スタイル切り替え：フラット
========================================================= */

.ab-review-style-flat {
  box-shadow: none;
  border-color: var(--ab-review-line);
}

.ab-review-style-flat .ab-review-card {
  box-shadow: none;
  border-radius: 14px;
}

.ab-review-style-flat .ab-review-card::before {
  width: 5px;
}

.ab-review-style-flat .ab-review-editor-comment {
  box-shadow: none;
}

/* =========================================================
   編集画面専用
========================================================= */

.ab-review-block-editor {
  border-style: dashed;
}

.ab-review-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.ab-review-card-top .components-base-control {
  width: 180px;
  margin-bottom: 0;
}

.ab-review-card-top .components-base-control__field {
  margin-bottom: 0;
}

.ab-review-edit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--ab-review-line);
  border-radius: 14px;
}

.ab-review-edit-grid .components-base-control {
  margin-bottom: 0;
}

.ab-review-edit-grid .components-base-control:nth-last-child(1) {
  grid-column: 1 / -1;
}

.ab-review-preview {
  padding: 14px;
  background: #ffffff;
  border: 1px solid var(--ab-review-line);
  border-radius: 14px;
}

.ab-review-card-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.ab-review-card-controls .components-button {
  min-height: 32px;
  padding: 4px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  color: #374151;
  font-size: 13px;
  font-weight: 700;
  box-shadow: none;
}

.ab-review-card-controls .components-button:hover {
  background: #f9fafb;
}

.ab-review-card-controls .components-button.is-destructive {
  color: #dc2626;
  border-color: #fecaca;
}

.ab-review-add-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

.ab-review-add-button,
.components-button.ab-review-add-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 15px;
  color: #ffffff;
  background: var(--ab-review-good);
  border: none;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 6px 14px rgba(22, 163, 74, 0.2);
}

.ab-review-add-button:hover,
.components-button.ab-review-add-button:hover {
  color: #ffffff;
  background: #15803d;
}

.ab-review-add-button.is-neutral,
.components-button.ab-review-add-button.is-neutral {
  background: var(--ab-review-neutral);
  box-shadow: 0 6px 14px rgba(202, 138, 4, 0.2);
}

.ab-review-add-button.is-neutral:hover,
.components-button.ab-review-add-button.is-neutral:hover {
  background: #a16207;
}

.ab-review-add-button.is-bad,
.components-button.ab-review-add-button.is-bad {
  background: var(--ab-review-bad);
  box-shadow: 0 6px 14px rgba(220, 38, 38, 0.2);
}

.ab-review-add-button.is-bad:hover,
.components-button.ab-review-add-button.is-bad:hover {
  background: #b91c1c;
}

/* Gutenberg内の余白調整 */
.editor-styles-wrapper .ab-review {
  margin-top: 24px;
  margin-bottom: 24px;
}

.editor-styles-wrapper .ab-review-title {
  color: #111827;
}

.editor-styles-wrapper .ab-review p {
  margin-top: 0;
}

/* =========================================================
   スマホ最適化
========================================================= */

@media (max-width: 700px) {
  .ab-review {
    margin: 24px auto;
    padding: 22px 14px;
    border-radius: 18px;
  }

  .ab-review-title {
    font-size: 22px;
  }

  .ab-review-description {
    font-size: 14px;
    line-height: 1.8;
  }

  .ab-review-card {
    padding: 18px 15px;
    border-radius: 16px;
  }

  .ab-review-card::before {
    width: 5px;
  }

  .ab-review-type-badge {
    margin-bottom: 12px;
    font-size: 12px;
  }

  .ab-review-user {
    align-items: flex-start;
  }

  .ab-review-avatar {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .ab-review-comment-title {
    font-size: 16px;
  }

  .ab-review-text {
    font-size: 14px;
    line-height: 1.85;
  }

  .ab-review-editor-comment {
    padding: 16px 14px;
    border-radius: 16px;
  }

  .ab-review-editor-comment-title {
    font-size: 15px;
  }

  .ab-review-editor-comment-text {
    font-size: 14px;
  }

  .ab-review-card-top {
    display: block;
  }

  .ab-review-card-top .components-base-control {
    width: 100%;
    margin-top: 10px;
  }

  .ab-review-edit-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
  }

  .ab-review-card-controls {
    justify-content: flex-start;
  }

  .ab-review-add-wrap {
    display: grid;
    grid-template-columns: 1fr;
  }

  .ab-review-add-button,
  .components-button.ab-review-add-button {
    width: 100%;
  }
}

/* =========================================================
   さらに小さいスマホ
========================================================= */

@media (max-width: 480px) {
  .ab-review {
    padding: 20px 12px;
  }

  .ab-review-title {
    font-size: 20px;
  }

  .ab-review-kicker {
    font-size: 11px;
  }

  .ab-review-rating {
    gap: 6px;
  }

  .ab-review-star {
    font-size: 16px;
  }

  .ab-review-score {
    font-size: 12px;
  }
}
/* =========================================================
   表示スタイル差分を強める
   card / compact / flat
========================================================= */

/* カード型：リッチなLPカード */
.ab-review-style-card {
  background: linear-gradient(180deg, #f8fbff 0%, var(--ab-review-bg) 100%);
  border: 3px solid rgba(37, 99, 235, 0.16);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.1);
}

.ab-review-style-card .ab-review-card {
  border-radius: 20px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

/* コンパクト型：情報を詰めたリスト風 */
.ab-review-style-compact {
  padding: 18px 14px;
  border-radius: 16px;
  box-shadow: none;
}

.ab-review-style-compact .ab-review-head {
  margin-bottom: 16px;
}

.ab-review-style-compact .ab-review-title {
  font-size: 22px;
}

.ab-review-style-compact .ab-review-description {
  font-size: 14px;
}

.ab-review-style-compact .ab-review-list {
  gap: 10px;
}

.ab-review-style-compact .ab-review-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  column-gap: 14px;
  align-items: start;
  padding: 14px 14px 14px 18px;
  border-radius: 12px;
  box-shadow: none;
}

.ab-review-style-compact .ab-review-type-badge {
  grid-column: 1 / 2;
  margin-bottom: 8px;
  font-size: 12px;
}

.ab-review-style-compact .ab-review-user {
  grid-column: 1 / 2;
  display: block;
  margin-bottom: 0;
}

.ab-review-style-compact .ab-review-avatar {
  width: 34px;
  height: 34px;
  margin-bottom: 6px;
  font-size: 15px;
}

.ab-review-style-compact .ab-review-rating,
.ab-review-style-compact .ab-review-comment-title,
.ab-review-style-compact .ab-review-text {
  grid-column: 2 / 3;
}

.ab-review-style-compact .ab-review-comment-title {
  margin-top: 0;
  font-size: 15px;
}

.ab-review-style-compact .ab-review-text {
  font-size: 14px;
  line-height: 1.75;
}

/* フラット型：枠なし・シンプル表示 */
.ab-review-style-flat {
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.ab-review-style-flat .ab-review-head {
  padding: 0 0 14px;
  border-bottom: 2px solid #e5e7eb;
  text-align: left;
}

.ab-review-style-flat .ab-review-kicker {
  background: transparent;
  color: var(--ab-review-accent);
  padding: 0;
  border-radius: 0;
}

.ab-review-style-flat .ab-review-title {
  font-size: 24px;
}

.ab-review-style-flat .ab-review-list {
  gap: 0;
}

.ab-review-style-flat .ab-review-card {
  padding: 18px 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid #e5e7eb;
  border-radius: 0;
  box-shadow: none;
}

.ab-review-style-flat .ab-review-card::before {
  display: none;
}

.ab-review-style-flat .ab-review-type-badge {
  border-radius: 6px;
}

.ab-review-style-flat .ab-review-editor-comment {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  box-shadow: none;
}

/* スマホではコンパクト型を縦並びに戻す */
@media (max-width: 700px) {
  .ab-review-style-compact .ab-review-card {
    display: block;
  }

  .ab-review-style-compact .ab-review-type-badge,
  .ab-review-style-compact .ab-review-user,
  .ab-review-style-compact .ab-review-rating,
  .ab-review-style-compact .ab-review-comment-title,
  .ab-review-style-compact .ab-review-text {
    grid-column: auto;
  }
}
/* =========================================
   LP08 口コミ・レビュー：テーマ見出し装飾リセット
========================================= */

.ab-review .ab-review-title,
.ab-review .ab-review-comment-title,
.ab-review .ab-review-editor-comment-title {
  margin-top: 0 !important;
  border: none !important;
  border-left: none !important;
  border-bottom: none !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  text-decoration: none !important;
}

.ab-review .ab-review-title::before,
.ab-review .ab-review-title::after,
.ab-review .ab-review-comment-title::before,
.ab-review .ab-review-comment-title::after,
.ab-review .ab-review-editor-comment-title::before,
.ab-review .ab-review-editor-comment-title::after {
  content: none !important;
  display: none !important;
}