/* 
Theme Name: Hello Elementor Child
Theme URI: https://github.com/elementor/hello-theme-child/
Description: Hello Elementor Child is a child theme of Hello Elementor, created by Elementor team
Author: Elementor Team
Author URI: https://elementor.com/
Template: hello-elementor
Version: 2.0.0
Text Domain: hello-elementor-child
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

/* Add your custom styles here */


/* 文字を確実に非表示にする（特にElementor内での強制上書き対策） */
.elementor-shortcode .ccc-favorite-post-toggle-button .text {
  display: none !important;
  visibility: hidden !important;
}

/* プラグインが挿入するアイコン/疑似要素を無効化（ハート対策） */
/* ただし、ツールチップ（title属性のツールチップやdata属性ベースのツールチップ）は除外 */
.elementor-shortcode .ccc-favorite-post-toggle-button i,
.elementor-shortcode .ccc-favorite-post-toggle-button svg {
  display: none !important;
  content: none !important;
  background: none !important;
  -webkit-mask: none !important;
  mask: none !important;
}

/* デフォルトの::afterは非表示（ツールチップ用::afterはhover時に表示） */
.elementor-shortcode .ccc-favorite-post-toggle-button::after {
  display: none !important;
  content: none !important;
}

/* アンカー自体に残る文字幅を消す（縦に"Fa\nvo\n..."と出る対策） */
.elementor-shortcode .ccc-favorite-post-toggle-button {
  font-size: 0 !important;       /* ← これで残文字の幅をゼロ化 */
  line-height: 1 !important;
  width: 24px !important;
  height: 24px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  white-space: nowrap !important;
  position: relative !important; /* ツールチップの位置指定用 */
}

/* 星を描画（未登録） */
.elementor-shortcode .ccc-favorite-post-toggle-button::before {
  content: "☆";
  font-size: 24px;
  color: #999;
}

/* 登録済み（saveクラスが付与された時） */
.elementor-shortcode .ccc-favorite-post-toggle-button.save::before {
  content: "★";
  color: gold;
}

/* ツールチップの復旧 - title属性のツールチップが表示されるようにする */
.elementor-shortcode .ccc-favorite-post-toggle-button {
  /* pointer-eventsを有効にしてツールチップが表示されるようにする */
  pointer-events: auto !important;
  cursor: pointer !important;
}

/* ツールチップの復旧 - title属性のツールチップが表示されるようにする */
/* ブラウザのデフォルトツールチップ（title属性）はCSSの影響を受けないが、念のためpointer-eventsを有効化 */
.elementor-shortcode .ccc-favorite-post-toggle-button[title] {
  pointer-events: auto !important;
  cursor: pointer !important;
}

/* ツールチップ用のCSS - data-title属性がある場合のみ表示（お気に入り未設定時のみ） */
.elementor-shortcode .ccc-favorite-post-toggle-button[data-title]:not(.save):hover::after {
  /* JavaScriptで設定されたdata-title属性のテキストをツールチップとして表示 */
  /* お気に入り登録済み（.saveクラス）の場合は表示しない */
  /* title属性は使用せず、ブラウザのデフォルトツールチップを表示しないようにする */
  content: attr(data-title) !important;
  position: absolute !important;
  bottom: calc(100% + 8px) !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  padding: 8px 12px !important;
  background-color: rgba(0, 0, 0, 0.9) !important;
  color: #fff !important;
  font-size: 12px !important;
  line-height: 1.5 !important;
  white-space: normal !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  border-radius: 4px !important;
  z-index: 10000 !important;
  pointer-events: none !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  max-width: 280px !important;
  min-width: 200px !important;
  text-align: left !important;
  box-sizing: border-box !important;
}

/* お気に入り登録済みの場合はツールチップを非表示 */
.elementor-shortcode .ccc-favorite-post-toggle-button.save:hover::after {
  display: none !important;
  content: none !important;
}

.elementor-shortcode .ccc-favorite-post-toggle-button:hover::before {
  /* 星アイコンの上にツールチップが表示されるようにz-indexを調整 */
  position: relative;
  z-index: 1;
}

/* ===== マイページの「お気に入り」だけに適用 ===== */

/* 「Favorite items X」を非表示 */
#ccc-my_favorite-list #ccc-favorite-count {
  display: none !important;
}

/* 1件ごとの行を 60px / 1fr / auto の3カラムに固定する */
#ccc-my_favorite-list .list-ccc_favorite {
  display: grid !important;
  grid-template-columns: 60px 1fr auto; /* 左:サムネ / 中央:会社名 / 右:ボタン */
  align-items: center;
  gap: 12px;
  width: 100% !important;
  padding: 10px 0;
  border-bottom: 1px solid #ddd;
}

/* プラグイン既定の float / width を全面解除 */
#ccc-my_favorite-list .list-ccc_favorite > * {
  float: none !important;
  width: auto !important;
  max-width: none !important;
}

/* 左カラム: サムネ */
#ccc-my_favorite-list .list-ccc_favorite .img-post {
  grid-column: 1;
}
#ccc-my_favorite-list .list-ccc_favorite .img-post-thumbnail,
#ccc-my_favorite-list .list-ccc_favorite .img-post img {
  width: 60px !important;
  height: 60px !important;
  object-fit: cover;
  display: block;
  border-radius: 4px; /* 任意 */
}

/* 中央カラム: 会社名 */
#ccc-my_favorite-list .list-ccc_favorite .title-post {
  grid-column: 2;
  margin: 0 !important;
  flex: initial !important;  /* 念のため解除 */
  min-width: 0;              /* テキストの折返し制御に必須 */
}
#ccc-my_favorite-list .list-ccc_favorite .title-post a {
  font-size: 16px !important;
  font-weight: 600;
  color: #333;
  text-decoration: none;
  white-space: normal;       /* 1行内で自然に改行 */
  writing-mode: horizontal-tb !important; /* 縦書きが混入していた場合の保険 */
}

/* 右カラム: マイナス（削除）ボタン */
#ccc-my_favorite-list .list-ccc_favorite .ccc-favorite-post-toggle {
  grid-column: 3;
  justify-self: end;         /* 右端に寄せる */
  margin-left: 12px !important;
}

/* 抜粋は未使用なら消す */
#ccc-my_favorite-list .list-ccc_favorite .excerpt-post {
  display: none !important;
}

/* リスト全体 */
#ccc-my_favorite-list .list-ccc_favorite {
  display: flex;
  align-items: flex-start; /* 上揃えにして細かく調整 */
  width: 100%;
  margin-bottom: 13px;
  border-bottom: 1px solid #ddd;
  padding: 10px 0;
}

/* サムネイル */
#ccc-my_favorite-list .list-ccc_favorite .img-post {
  flex: 0 0 60px;
  margin-right: 15px;
}
#ccc-my_favorite-list .list-ccc_favorite .img-post img {
  width: 60px;
  height: 60px;
  object-fit: cover;
}

/* 会社名 */
#ccc-my_favorite-list .list-ccc_favorite .title-post {
  flex: 1;
  margin: 0;
  padding-top: 5px; /* ←ここで会社名を5px上に */
}
#ccc-my_favorite-list .list-ccc_favorite .title-post a {
  font-size: 16px;
  font-weight: 500;
  color: #333;
  text-decoration: none;
}

/* 削除ボタン（黄色アイコン） */
#ccc-my_favorite-list .list-ccc_favorite .ccc-favorite-post-toggle {
  flex: 0 0 auto;
  margin-left: 15px;
  margin-top: 20px;

  /* 縦方向の位置調整を margin-top ではなく align-self で行う */
  align-self: center; /* 行の中央に揃える */
}

/* -----------------------------------------------------------------------------
 * Message loop typography (Elementor Loop ID 1445)
 * 会社名・担当者名・日付などのカラムを 13px / 600 で統一
 * -------------------------------------------------------------------------- */
.elementor.elementor-1445 .elementor-element.elementor-element-e56e402,
.elementor.elementor-1445 .elementor-element.elementor-element-e56e402 *,
.elementor.elementor-1445 .elementor-element.elementor-element-e56e402 a,
.elementor.elementor-1445 .elementor-element.elementor-element-e56e402 .elementor-heading-title,
.elementor.elementor-1445 .elementor-element.elementor-element-e56e402 .bizx-message-category,
.elementor.elementor-1445 .elementor-element.elementor-element-e56e402 .bizx-message-read-status {
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.5;
}

.elementor.elementor-1445 .elementor-element.elementor-element-f71ac53 .elementor-heading-title,
.elementor.elementor-1445 .elementor-element.elementor-element-f71ac53 .elementor-heading-title a,
.elementor.elementor-1445 .elementor-element.elementor-element-64de8f5 .elementor-heading-title,
.elementor.elementor-1445 .elementor-element.elementor-element-64de8f5 .elementor-heading-title a,
.elementor.elementor-1445 .elementor-element.elementor-element-58e5522 .elementor-heading-title,
.elementor.elementor-1445 .elementor-element.elementor-element-58e5522 .elementor-heading-title a,
.elementor.elementor-1445 .elementor-element.elementor-element-2b11772 .elementor-heading-title,
.elementor.elementor-1445 .elementor-element.elementor-element-2b11772 .elementor-heading-title a {
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.5 !important;
}

.elementor.elementor-1445 .elementor-element.elementor-element-959e57b,
.elementor.elementor-1445 .elementor-element.elementor-element-f3cedef,
.elementor.elementor-1445 .elementor-element.elementor-element-81d3b9f,
.elementor.elementor-1445 .elementor-element.elementor-element-a34a173,
.elementor.elementor-1445 .elementor-element.elementor-element-11e16ff {
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.5 !important;
  /* font-family is not specified to respect Elementor's default kit settings */
}

.elementor.elementor-1445 .elementor-element.elementor-element-959e57b .elementor-widget-container,
.elementor.elementor-1445 .elementor-element.elementor-element-f3cedef .elementor-widget-container,
.elementor.elementor-1445 .elementor-element.elementor-element-81d3b9f .elementor-widget-container,
.elementor.elementor-1445 .elementor-element.elementor-element-a34a173 .elementor-widget-container,
.elementor.elementor-1445 .elementor-element.elementor-element-11e16ff .elementor-widget-container {
  font-size: inherit !important;
  font-weight: inherit !important;
  line-height: inherit !important;
  font-family: inherit !important;
}

/* 言語別フォント指定 - Elementor要素には適用しない（デフォルトキット設定を尊重） */
/* テーマ側の基本フォントのみ指定。Elementor要素（.elementorクラスを持つ要素）は除外 */
html[lang="ja"] body {
    font-family: "Noto Sans JP", "Noto Sans", sans-serif;
}

html[lang="en"] body {
    font-family: "Noto Sans", "Noto Sans JP", sans-serif;
}

html[lang="vi"] body {
    font-family: "Noto Sans", "Noto Sans JP", sans-serif;
}

/* Elementor要素はデフォルトキットのフォント設定を優先 */
.elementor,
.elementor * {
    font-family: inherit;
}

/* 空白のタブタイトルを非表示にしてスペースを詰める */
/* タブインデックス3〜6（空白タブ）を直接非表示 */
.e-n-tabs-heading .e-n-tab-title[data-tab-index="3"],
.e-n-tabs-heading .e-n-tab-title[data-tab-index="4"],
.e-n-tabs-heading .e-n-tab-title[data-tab-index="5"],
.e-n-tabs-heading .e-n-tab-title[data-tab-index="6"] {
    display: none !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Dashiconsフォントの確実な読み込み */
@font-face {
    font-family: "dashicons";
    src: url("/wp-includes/fonts/dashicons.woff2") format("woff2"),
         url("/wp-includes/fonts/dashicons.woff") format("woff"),
         url("/wp-includes/fonts/dashicons.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}

.dashicons,
.dashicons-before:before {
    font-family: "dashicons" !important;
    display: inline-block;
    line-height: 1;
    font-weight: normal;
    font-style: normal;
    speak: never;
    text-decoration: inherit;
    text-transform: none;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    width: 1em;
    height: 1em;
    vertical-align: middle;
}
