/* ebook5サポートセンター（/com/）の静的版で足した見た目。_build/com/build.py が assets/com.css に書き出す
 * テーマ（supportdesk/style.css）の後に読む。テーマの id・class は変えず、足すだけ。色は #169dda（テーマの青）
 */

/* ---------- リアルタイム検索：検索中は虫眼鏡がくるくる回る印に変わる ---------- */
#page-header #searchform #s::placeholder { color: #9a9a9a; opacity: 1; }
/* 入力欄の虫眼鏡：テーマの PNG（にじむ）を SVG に。位置と大きさはテーマのまま */
#page-header #searchform #s { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'%3E%3Ccircle cx='9.5' cy='9.5' r='6.5' fill='none' stroke='%23808080' stroke-width='2.2'/%3E%3Cpath d='M14.5 14.5L19.5 19.5' stroke='%23808080' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E"); background-size: 22px 22px; }
@media (prefers-reduced-motion: no-preference) {
  #page-header #live-search.is-searching #searchform #s {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8' fill='none' stroke='%23d6d6d6' stroke-width='3'/%3E%3Cpath d='M11 3a8 8 0 0 1 8 8' fill='none' stroke='%23169dda' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 11 11' to='360 11 11' dur='0.7s' repeatCount='indefinite'/%3E%3C/path%3E%3C/svg%3E");
  }
}
#search-result mark { background: none; color: #169dda; font-weight: 700; padding: 0; }
#search-result .sr-snip { display: block; margin-top: 4px; font-size: 12px; line-height: 1.6; color: #8a8a8a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#search-result .sr-snip mark { font-weight: 600; }
#search-result li.is-active > a { background-color: #eef7fc; }
#search-result li.sr-loading { padding: 15px 20px 15px 55px; color: #8a8a8a; position: relative; }
#search-result li.sr-loading::before {
  content: ""; position: absolute; left: 20px; top: 50%; width: 16px; height: 16px; margin-top: -8px;
  border-radius: 50%; border: 2px solid #d6d6d6; border-top-color: #169dda;
}
@media (prefers-reduced-motion: no-preference) {
  #search-result li.sr-loading::before { animation: com-spin .7s linear infinite; }
  #jquery-live-search #search-result { animation: com-drop .14s ease-out; }
}
#search-result li.sr-all { border-top: 1px solid #eee; }
#search-result li.sr-all a { padding: 12px 20px 12px 55px; color: #169dda; font-size: 14px; }
#search-result li.sr-all a::after { content: " \203A"; }
#search-result .nothing-here { line-height: 1.7; }
#search-result .nothing-here a { color: #169dda; }
@keyframes com-spin { to { transform: rotate(360deg); } }
@keyframes com-drop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* 検索ページ：件数と一致語 */
.com-count { color: #8a8a8a; font-size: 14px; margin: 0 0 20px; }
#com-search-results mark { background: #fff3b0; color: inherit; padding: 0 1px; }

/* ---------- FAQ 本文：画像の拡大 ---------- */
.entry-content img.com-zoomable { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'%3E%3Ccircle cx='9' cy='9' r='7' fill='%23fff' fill-opacity='.92' stroke='%23169dda' stroke-width='1.9'/%3E%3Cpath d='M6.5 9h5' stroke='%23169dda' stroke-width='1.9' stroke-linecap='round'/%3E%3Cpath d='M9 6.5v5' stroke='%23169dda' stroke-width='1.9' stroke-linecap='round'/%3E%3Cpath d='M14.2 14.2L20 20' stroke='%23169dda' stroke-width='2.3' stroke-linecap='round'/%3E%3C/svg%3E") 9 9, zoom-in; }
.com-zoom-badge {
  position: absolute; z-index: 50; width: 28px; height: 28px; border-radius: 50%; pointer-events: none;
  background: rgba(255, 255, 255, .95); box-shadow: 0 1px 6px rgba(0, 0, 0, .25); color: #169dda;
  display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .15s;
}
.com-zoom-badge.is-on { opacity: 1; }
.com-zoom {
  position: fixed; inset: 0; z-index: 100000; background: rgba(20, 22, 24, .88);
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'%3E%3Ccircle cx='9' cy='9' r='7' fill='%23fff' fill-opacity='.92' stroke='%23169dda' stroke-width='1.9'/%3E%3Cpath d='M6.5 9h5' stroke='%23169dda' stroke-width='1.9' stroke-linecap='round'/%3E%3Cpath d='M14.2 14.2L20 20' stroke='%23169dda' stroke-width='2.3' stroke-linecap='round'/%3E%3C/svg%3E") 9 9, zoom-out;
}
.com-zoom img { max-width: 100%; max-height: calc(100vh - 90px); width: auto; height: auto; background: #fff; box-shadow: 0 8px 30px rgba(0, 0, 0, .4); }
.com-zoom__cap { color: #ddd; font-size: 13px; margin: 12px 0 0; text-align: center; }
.com-zoom__close {
  position: absolute; top: 12px; left: 12px; width: 36px; height: 36px; border: 0; border-radius: 50%;
  padding: 0; background: rgba(255, 255, 255, .95); color: #169dda; cursor: pointer;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 6px rgba(0, 0, 0, .3);
}
.com-zoom__close svg { flex: none; }
.com-zoom__close:hover { background: #fff; }
.com-zoom__close:focus-visible { background: #fff; outline: 2px solid #fff; outline-offset: 2px; }
html.com-zoom-open { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) {
  .com-zoom { animation: com-fade .15s ease-out; }
  .com-zoom img { animation: com-pop .18s ease-out; }
}
@keyframes com-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes com-pop { from { transform: scale(.96); } to { transform: none; } }

/* ---------- FAQ 本文：目次で飛んだ先・見出しのリンク ---------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .com-flash { text-decoration-line: underline; text-decoration-thickness: 3px; text-underline-offset: 7px; animation: com-flash 2.4s ease-out forwards; }
}
.entry-content [id] { scroll-margin-top: 16px; }
@keyframes com-flash { 0% { text-decoration-color: rgba(22, 157, 218, 0); } 15%, 65% { text-decoration-color: rgba(22, 157, 218, 1); } 100% { text-decoration-color: rgba(22, 157, 218, 0); } }

.com-anchor {
  /* 大きさは常に一定（文字を中に出すと、行末で折り返して印が行ったり来たりする＝震える） */
  position: relative; display: inline-flex; align-items: center; justify-content: center; vertical-align: middle;
  width: 30px; height: 30px; margin: -4px 0 0 6px; padding: 0; border: 1px solid transparent; border-radius: 50%;
  background: transparent; color: #169dda; line-height: 1; cursor: pointer; opacity: .45;
  transition: opacity .15s, background-color .15s, border-color .15s;
}
.com-anchor svg { flex: none; }
h1.com-has-anchor > .com-anchor { margin-top: -6px; }
.com-has-anchor:hover > .com-anchor { opacity: 1; }
.com-anchor:hover, .com-anchor:focus-visible, .com-anchor.is-copied { opacity: 1; background: #eef7fc; border-color: #cfe8f6; outline: none; }
.com-anchor.is-copied { color: #1a8a4a; background: #eaf7ef; border-color: #c4e8d1; }
/* 吹き出し：ボタンの上に重ねて出す（レイアウトを動かさない） */
.com-anchor__label {
  position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%);
  padding: 5px 9px; border-radius: 4px; background: #333; color: #fff;
  font-size: 12px; font-weight: 400; letter-spacing: 0; line-height: 1.3; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .15s;
}
.com-anchor:hover .com-anchor__label, .com-anchor:focus-visible .com-anchor__label, .com-anchor.is-copied .com-anchor__label { opacity: 1; }
.com-anchor.is-copied .com-anchor__label { background: #1a8a4a; }
.com-anchor__label::before { content: attr(data-label); }
@media (hover: none) { .com-anchor { opacity: .7; } }

#com-toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 100001; transform: translate(-50%, 16px);
  background: #333; color: #fff; font-size: 14px; padding: 10px 18px; border-radius: 22px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .2); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
#com-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 共通 ---------- */
.com-sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid #169dda; outline-offset: 2px; }

/* ---------- 待ち時間の帯（スケルトン）：銀色の光が左から右へ流れる ---------- */
.com-skel, #search-result li.sr-skel span {
  display: block; border-radius: 4px;
  background: linear-gradient(90deg, #eceef0 25%, #f7f8f9 37%, #eceef0 63%); background-size: 400% 100%;
}
@media (prefers-reduced-motion: no-preference) {
  .com-skel, #search-result li.sr-skel span { animation: com-shimmer 1.3s ease-in-out infinite; }
}
@keyframes com-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.com-skel-item { padding: 0 0 36px; margin: 0 0 36px; border-bottom: 1px solid #eee; }
.com-skel-item .com-skel { margin: 0 0 12px; }
.com-skel--title { height: 26px; width: 72%; }
.com-skel--meta { height: 14px; width: 34%; }
.com-skel--line { height: 14px; width: 96%; }
.com-skel--line.short { width: 60%; }
#search-result li.sr-skel { padding: 18px 20px 18px 55px; }
#search-result li.sr-skel span { height: 16px; width: 70%; }
#search-result li.sr-skel:nth-child(2) span { width: 55%; }
#search-result li.sr-skel:nth-child(3) span { width: 63%; }

/* ---------- お知らせ：種類で絞り込む・もっと見る ---------- */
.com-news-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 32px; }
.com-news-filter button {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 1px solid #d9dde1; border-radius: 18px;
  background: #fff; color: #444; font-size: 14px; line-height: 1.2; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s;
}
.com-news-filter button span { font-size: 12px; color: #999; }
.com-news-filter button:hover { border-color: #169dda; color: #169dda; }
.com-news-filter button[aria-pressed="true"] { background: #169dda; border-color: #169dda; color: #fff; }
.com-news-filter button[aria-pressed="true"] span { color: rgba(255, 255, 255, .8); }
.com-news-more { text-align: center; margin: 8px 0 20px; }
.com-news-more button {
  padding: 12px 28px; border: 1px solid #169dda; border-radius: 24px; background: #fff; color: #169dda;
  font-size: 15px; cursor: pointer; transition: background-color .15s, color .15s;
}
.com-news-more button:hover { background: #169dda; color: #fff; }
@media (prefers-reduced-motion: no-preference) {
  .com-in { animation: com-in .35s ease-out both; }
}
@keyframes com-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- FAQ：役に立ちましたか？ ---------- */
.com-fb { margin: 40px 0 10px; padding: 22px 24px; border: 1px solid #e3e7ea; border-radius: 8px; background: #fafbfc; text-align: center; }
.com-fb__q { margin: 0 0 14px; font-weight: 600; color: #393c40; }
.com-fb__q:last-child { margin: 0; font-weight: 400; }
.com-fb__btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.com-fb button {
  padding: 9px 22px; border: 1px solid #c9d3da; border-radius: 20px; background: #fff; color: #393c40;
  font-size: 14px; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s;
}
.com-fb button:hover { border-color: #169dda; color: #169dda; }
.com-fb__chat { margin: 12px 0 0; font-size: 14px; color: #666; }
.com-fb__chat .com-fb__ai { margin-left: 4px; padding: 6px 16px; border-color: #169dda; color: #169dda; }
