/* ============================================
   ブロックパターン共通
   css/block-patterns.css
   ============================================ */

/* ============================================
   吹き出し
   ============================================ */

.chat-bubble {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin: 24px 0;
  max-width: 100%;
  box-sizing: border-box;
}

.chat-bubble--right {
  flex-direction: row;
}

/* アバター */
.chat-bubble__avatar {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
}

.chat-bubble__avatar img {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
}

.chat-bubble__avatar-placeholder {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #999;
}

/* テキスト */
.chat-bubble__text {
  position: relative;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 16px 20px;
  font-size: 15px;
  line-height: 1.8;
  flex: 1;
  min-width: 0;
}

.chat-bubble__text p {
  margin: 0;
}

/* 左 三角 */
.chat-bubble--left .chat-bubble__text::before {
  content: "";
  position: absolute;
  top: 22px;
  left: -10px;
  border-style: solid;
  border-width: 8px 10px 8px 0;
  border-color: transparent #ddd transparent transparent;
}
.chat-bubble--left .chat-bubble__text::after {
  content: "";
  position: absolute;
  top: 22px;
  left: -8px;
  border-style: solid;
  border-width: 8px 10px 8px 0;
  border-color: transparent #fff transparent transparent;
}

/* 右 三角 */
.chat-bubble--right .chat-bubble__text::before {
  content: "";
  position: absolute;
  top: 22px;
  right: -10px;
  border-style: solid;
  border-width: 8px 0 8px 10px;
  border-color: transparent transparent transparent #ddd;
}
.chat-bubble--right .chat-bubble__text::after {
  content: "";
  position: absolute;
  top: 22px;
  right: -8px;
  border-style: solid;
  border-width: 8px 0 8px 10px;
  border-color: transparent transparent transparent #fff;
}

/* モバイル */
@media (max-width: 600px) {
  .chat-bubble {
    gap: 10px;
    margin: 16px 0;
  }
  .chat-bubble__avatar,
  .chat-bubble__avatar img {
    width: 52px;
    height: 52px;
  }
  .chat-bubble__text {
    padding: 12px 14px;
    font-size: 14px;
  }
}


/* ============================================
   あわせて読みたい
   ============================================ */

.related-card {
  position: relative;
  margin: 40px 0 32px;
  border: 2px solid #ccc;
  border-radius: 12px;
  background: #fff;
  padding: 24px 20px 20px;
}

.related-card__label {
  position: absolute;
  top: -14px;
  left: 16px;
  display: inline-block;
  background: #aaa;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 18px;
  border-radius: 6px;
  letter-spacing: 0.05em;
  line-height: 1.4;
}

.related-card__link {
  display: flex;
  align-items: center;
  gap: 20px;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;
}

.related-card__link:hover {
  opacity: 0.8;
}

.related-card__thumb {
  flex-shrink: 0;
  width: 140px;
  height: 100px;
  overflow: hidden;
  border-radius: 6px;
  background: #eee;
}

.related-card__thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-card__body {
  flex: 1;
  min-width: 0;
}

.related-card__title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.7;
}

.related-card__arrow {
  flex-shrink: 0;
  font-size: 28px;
  color: #333;
  line-height: 1;
}

@media (max-width: 600px) {
  .related-card {
    padding: 20px 14px 14px;
  }
  .related-card__link {
    gap: 14px;
  }
  .related-card__thumb {
    width: 100px;
    height: 70px;
  }
  .related-card__title {
    font-size: 14px;
  }
}

/* エディタ内 */
.related-card--editor {
  pointer-events: auto;
}
.related-card--editor .related-card__link {
  cursor: default;
}

/* 検索結果 */
.nogic-search-results {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  border: 1px solid #ddd;
  border-radius: 4px;
  max-height: 240px;
  overflow-y: auto;
}

.nogic-search-results__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
  transition: background 0.15s;
}
.nogic-search-results__item:last-child {
  border-bottom: none;
}
.nogic-search-results__item:hover {
  background: #f0f0f0;
}

.nogic-search-results__thumb {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}
.nogic-search-results__no-thumb {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  background: #ddd;
  flex-shrink: 0;
}
.nogic-search-results__title {
  font-size: 13px;
  line-height: 1.4;
}

/* ============================================
   CTA エディタ用プレビュー
   ============================================ */

.nogic-cta-editor {
  padding: 16px;
  border: 2px dashed #ccc;
  border-radius: 8px;
  background: #fafafa;
}

.nogic-cta-editor__preview {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nogic-cta-editor__icon {
  font-size: 20px;
}

.nogic-cta-editor__title {
  font-size: 15px;
  font-weight: 600;
}