/* =========================
   リアクション全体
========================= */
.my-reactions {
  margin: 40px auto;
  padding-top: 10px;
  border-top: 1px solid #ececec;
}

/* =========================
   受信リアクション（常時表示）
========================= */
.my-reactions__received {
  margin-bottom: 12px;
}

.my-reactions__log {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: center;
  min-height: 28px;
}

.my-reactions__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 22px;
  line-height: 1;
}

/* =========================
   送信エリア
========================= */
.my-reactions__send {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* トグルボタン */
.my-reactions__toggle {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  border: 1px solid #d8d8d8;
  background: #fff;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  line-height: 1.4;
  color: #444;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, opacity .15s ease;
}

.my-reactions__toggle:hover {
  background: #fafafa;
  border-color: #cfcfcf;
}

.my-reactions__toggle:focus-visible {
  outline: 2px solid #b9c8ee;
  outline-offset: 2px;
}

/* 開いた時の余白 */
.my-reactions__body {
  margin-top: 8px;
}

.my-reactions__body[hidden] {
  display: none;
}

/* =========================
   タブ
========================= */
.my-reactions__tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.my-reactions__tab {
  appearance: none;
  border: 1px solid #d8d8d8;
  background: #fff;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  line-height: 1.4;
  color: #444;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.my-reactions__tab:hover {
  background: #fafafa;
  border-color: #cfcfcf;
}

.my-reactions__tab.is-active {
  background: #f5f8ff;
  border-color: #b9c8ee;
  color: #2f4f8f;
}

/* =========================
   パネル
========================= */
.my-reactions__panel {
  display: block;
}

.my-reactions__panel[hidden] {
  display: none;
}

/* パネルの箱 */
.my-reactions__panel .my-reactions__list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid #ececec;
  border-radius: 12px;
  background: #fafafa;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

/* 一覧タブは3行程度でスクロール */
.my-reactions__list--scroll {
  max-height: 132px;
  overflow-y: auto;
  align-content: flex-start;
  padding-right: 8px;
  background: rgba(255, 255, 255, 0.35);
}

/* スクロールバー */
.my-reactions__list--scroll::-webkit-scrollbar {
  width: 6px;
}

.my-reactions__list--scroll::-webkit-scrollbar-thumb {
  background: #cfcfcf;
  border-radius: 999px;
}

.my-reactions__list--scroll::-webkit-scrollbar-track {
  background: transparent;
}

/* =========================
   絵文字ボタン
   → ボックス化しない
========================= */
.my-reaction-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  line-height: 1;
  transition: transform .12s ease, opacity .12s ease, filter .15s ease;
}

.my-reaction-btn:hover {
  transform: translateY(-1px) scale(1.12);
  filter: brightness(1.05);
}

.my-reaction-btn:active {
  transform: scale(0.92);
}

.my-reaction-btn:focus-visible {
  outline: 2px solid #b9c8ee;
  outline-offset: 2px;
  border-radius: 6px;
}

.my-reaction-btn__emoji {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 22px;
  line-height: 1;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

.my-reaction-btn.is-loading,
.my-reaction-btn:disabled {
  opacity: .6;
  cursor: default;
}

/* =========================
   フロントページ（一覧カード）
========================= */
.top-feed-reactions .my-reactions {
  margin-top: 40px;
  margin-bottom: 0 !important;
  padding-top: 8px;
}

.top-feed-reactions .my-reactions__received {
  margin-bottom: 8px;
}

.top-feed-reactions .my-reactions__log {
  gap: 5px 6px;
  min-height: 24px;
}

.top-feed-reactions .my-reactions__item {
  width: 24px;
  height: 24px;
  font-size: 20px;
}

.top-feed-reactions .my-reactions__send {
  gap: 6px;
}

.top-feed-reactions .my-reactions__toggle,
.top-feed-reactions .my-reactions__tab {
  padding: 4px 10px;
  font-size: 11px;
}

.top-feed-reactions .my-reactions__panel .my-reactions__list {
  gap: 8px;
  padding: 10px;
  border-radius: 10px;
}

.top-feed-reactions .my-reactions__list--scroll {
  max-height: 112px;
}

.top-feed-reactions .my-reaction-btn {
  width: 30px;
  height: 30px;
}

.top-feed-reactions .my-reaction-btn__emoji {
  font-size: 20px;
}

/* =========================
   スマホ最適化
========================= */
@media (max-width: 480px) {
  .my-reactions {
    margin: 30px auto;
    padding-top: 8px;
  }

  .my-reactions__log {
    gap: 5px 6px;
  }

  .my-reactions__item {
    width: 26px;
    height: 26px;
    font-size: 20px;
  }

  .my-reactions__tabs {
    gap: 4px;
  }

  .my-reactions__toggle,
  .my-reactions__tab {
    padding: 4px 10px;
    font-size: 11px;
  }

  .my-reactions__panel .my-reactions__list {
    gap: 8px;
    padding: 10px;
  }

  .my-reactions__list--scroll {
    max-height: 120px;
  }

  .my-reaction-btn {
    width: 32px;
    height: 32px;
  }

  .my-reaction-btn__emoji {
    font-size: 20px;
  }

  .top-feed-reactions .my-reactions__item {
    width: 22px;
    height: 22px;
    font-size: 18px;
  }

  .top-feed-reactions .my-reaction-btn {
    width: 28px;
    height: 28px;
  }

  .top-feed-reactions .my-reaction-btn__emoji {
    font-size: 18px;
  }
}