/* =========================================================
   vona.jp - common.css  （子テーマ: /assets/css/common.css）
   目的：
   - 本文リンクの色/下線を全ページで統一
   - 外部リンク ↗︎ アイコンを自動付与（軽量）
   - 段落の可読性UP（p/li）
   - アンカーの隠れ対策（固定ヘッダー分のオフセット）
   - 目次の追随を無効化（必要なら調整）
   テーマ：Woodmart + Elementor
   ========================================================= */

/* ========== トークン（色/下線） ========== */
:root{
  --link:#c21f6a;
  --link-hover:#a61a5b;
  --link-visited:#8c1751;
  --u-thick:2px;
  --u-offset:.2em;

  /* Woodmart が使うリンク色変数にも反映（保険） */
  --wd-link-color: var(--link);
  --wd-link-hover-color: var(--link-hover);
}

/* ========== 可読性：本文サイズ底上げ ========== */
.entry-content p,
.entry-content li,
.elementor p,
.elementor li{
  font-size:1.0625rem; /* ≒17px */
  line-height:1.9;
  color:#333;
}
@media (max-width:640px){
  .entry-content p, .entry-content li,
  .elementor p, .elementor li{ font-size:1.125rem; } /* ≒18px */
}

/* ========== 本文テキストリンクを“強制統一” ========== */
/* 通常投稿/固定ページの本文 */
.entry-content a:not(.button):not([class*="btn"]):not(.wd-btn):not(.elementor-button){
  color:var(--link) !important;
  text-decoration:underline !important;
  text-underline-offset:var(--u-offset);
  text-decoration-thickness:var(--u-thick);
}
/* Elementor のテキスト系ウィジェット */
.elementor .elementor-widget-text-editor a:not(.button):not([class*="btn"]):not(.wd-btn):not(.elementor-button),
.elementor .elementor-widget-theme-post-content a:not(.button):not([class*="btn"]):not(.wd-btn):not(.elementor-button){
  color:var(--link) !important;
  text-decoration:underline !important;
  text-underline-offset:var(--u-offset);
  text-decoration-thickness:var(--u-thick);
}
/* ホバー/訪問済み */
.entry-content a:hover:not(.button):not([class*="btn"]):not(.wd-btn):not(.elementor-button),
.elementor .elementor-widget a:hover:not(.button):not([class*="btn"]):not(.wd-btn):not(.elementor-button){
  color:var(--link-hover) !important;
}
.entry-content a:visited:not(.button):not([class*="btn"]):not(.wd-btn):not(.elementor-button),
.elementor .elementor-widget a:visited:not(.button):not([class*="btn"]):not(.wd-btn):not(.elementor-button){
  color:var(--link-visited) !important;
}

/* ========== 例外：デザインを壊したくない領域は元のまま ========== */
.entry-content a[class*="btn"], .elementor a[class*="btn"],
.entry-content a.button,      .elementor a.button,
.entry-content .menu a,       .elementor .menu a,
.entry-content .breadcrumbs a,.elementor .breadcrumbs a,
.entry-content .woocommerce-loop-product__link, .elementor .woocommerce-loop-product__link,
.wd-nav a, .product-grid-item a{
  color:inherit !important;
  text-decoration:none !important;
}

/* ========== 外部リンク ↗︎（自ドメイン/アンカー/ボタン類は除外） ========== */
.entry-content a[href^="http"]:not([href*="//vona.jp"]):not([href^="#"]):not(.button):not([class*="btn"]):not(.wd-btn):not(.elementor-button)::after,
.elementor a[href^="http"]:not([href*="//vona.jp"]):not([href^="#"]):not(.button):not([class*="btn"]):not(.wd-btn):not(.elementor-button)::after{
  content:"";
  display:inline-block;
  width:.9em; height:.9em;
  margin-left:.35em; vertical-align:-.12em;
  background-color: currentColor;          /* テキスト色に追従 */
  -webkit-mask:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 3h7v7h-2V6.41l-9.29 9.3-1.42-1.42 9.3-9.29H14V3zM5 5h6v2H7v10h10v-4h2v6H5z"/></svg>') no-repeat center/contain;
          mask:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 3h7v7h-2V6.41l-9.29 9.3-1.42-1.42 9.3-9.29H14V3zM5 5h6v2H7v10h10v-4h2v6H5z"/></svg>') no-repeat center/contain;
}

/* ========== 目次・参考リンクを“リンクらしく” ========== */
.toc a, .ref-list a{
  font-weight:700;
  color:var(--link) !important;
  text-decoration:underline !important;
}

/* ========== アンカーの隠れ対策（固定ヘッダー分オフセット） ========== */
html{
  scroll-behavior:smooth;
  scroll-padding-top: calc(var(--header-h, 64px) + 12px);
}
body.admin-bar{ --header-h: 96px; } /* ログイン時の管理バー考慮 */
section[id], h2[id], h3[id]{ scroll-margin-top: calc(var(--anchor-offset, 80px)); }

/* ========== 目次の追随を止める（必要に応じてON） ========== */
.toc{ position: static !important; max-height:none; overflow:visible; }
/* PCだけ控えめstickyにしたい場合は上をコメントアウトし、下を有効化
.toc{ position: sticky; top:12px; max-height:60vh; overflow:auto; }
@media (max-width:1024px){ .toc{ position: static; max-height:none; overflow:visible; } }
*/

/* ========== フォーカスリング（アクセシビリティ） ========== */
a:focus-visible{
  outline:2px solid var(--link) !important;
  outline-offset:2px;
  border-radius:3px;
}

/* ========== デバッグ用（必要な時だけ有効化して確認） ========== */
/* 全リンクに緑の点線が出れば common.css が効いています（確認後は無効化）
a[href]{ outline:3px dashed lime !important; }
*/


/* ===== 副作用ストッパー：ボタン/CTA/共有アイコンは元のデザイン維持 ===== */

/* CTAボタン（白文字・下線なしに戻す） */
a.button,
button.button,
.woocommerce a.button,
.woocommerce button.button,
.elementor .elementor-button,
.wd-btn,
.btn,
[class*="btn-"],      /* 例: .btn-cta など */
.add_to_cart_button,
.single_add_to_cart_button {
  color: #fff !important;
  text-decoration: none !important;
}

/* Wooのグリッド・カード系リンクは装飾しない */
.product-grid-item a,
.wd-nav a,
.menu a {
  color: inherit !important;
  text-decoration: none !important;
}

/* SNS・共有アイコンは下線や↗︎を付けない／色はテーマに従う */
.social-icons a,
.wd-social-icons a,
.elementor-social-icons a,
.share-buttons a,
.share-links a {
  color: inherit !important;
  text-decoration: none !important;
}
.social-icons a[href^="http"]::after,
.wd-social-icons a[href^="http"]::after,
.elementor-social-icons a[href^="http"]::after,
.share-buttons a[href^="http"]::after,
.share-links a[href^="http"]::after {
  content: none !important;
}
/* ===== CTA/ボタン類は白文字＆下線なしに固定（副作用ストッパー） ===== */

/* a要素で class 名に "btn" を含むものを全部カバー（btn, btn-cta, btn-primary など） */
a[class*="btn"],
.elementor a[class*="btn"],
.entry-content a[class*="btn"]{
  color:#fff !important;
  text-decoration:none !important;
  border-bottom:0 !important;          /* テーマが下線に border を使う場合の保険 */
}

/* 代表的なボタン群（Woo/Elementor/テーマ）も明示 */
a.button, button.button,
.woocommerce a.button, .woocommerce button.button,
.elementor .elementor-button, .wd-btn,
.add_to_cart_button, .single_add_to_cart_button{
  color:#fff !important;
  text-decoration:none !important;
}

/* ホバー時も白のまま（背景だけが変わるデザインを想定） */
a[class*="btn"]:hover,
.elementor .elementor-button:hover,
a.button:hover, .woocommerce a.button:hover{
  color:#fff !important;
}

/* SNSアイコンや共有リンクには下線/↗︎を付けない */
.social-icons a, .wd-social-icons a, .elementor-social-icons a,
.share-buttons a, .share-links a{
  color:inherit !important;
  text-decoration:none !important;
}
.social-icons a[href^="http"]::after,
.wd-social-icons a[href^="http"]::after,
.elementor-social-icons a[href^="http"]::after,
.share-buttons a[href^="http"]::after,
.share-links a[href^="http"]::after{
  content:none !important;
}


