/* feedback.css — 感想（浮きボタン・重ね画面）・同意の帯・みんなの感想と対応・更新のお知らせ（src/feedback/feedback_ui.js・src/whatsnew.js）の見た目。
   index.html から style.css の後に読む。色は style.css の変数（--panel・--text・--muted・--line・--accent など）で明暗に合わせる。 */

/* どのタブでも出る「感想を送る」の浮きボタン（右下。同意の帯が出ている間は帯の上） */
.fb-fab {
  position: fixed; right: 12px; z-index: 25;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px) + var(--fb-banner-h, 0px));
  background: var(--accent); color: var(--accent-text); border: none; border-radius: 999px;
  padding: 9px 14px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
  box-shadow: 0 3px 10px rgba(0,0,0,.25);
}
body.fb-has-fab main { padding-bottom: 72px; }

/* 同意の帯（画面下・閉じられる。操作は止めない。出ている間は下に余白） */
.fb-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; align-items: center; gap: 10px;
  background: var(--panel); color: var(--text); border-top: 1px solid var(--line); font-size: 12px; line-height: 1.45;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -4px 12px rgba(0,0,0,.18);
}
.fb-banner-text { flex: 1 1 auto; min-width: 0; }
.fb-banner-close {
  flex: none; background: var(--accent); color: var(--accent-text); border: none; border-radius: 6px;
  padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer;
}
body.fb-has-banner { padding-bottom: var(--fb-banner-h, 64px); }

/* 設定の場所（#app-foot）の同意の文とボタン */
.app-foot { max-width: 640px; margin: 0 auto; padding: 0 12px 24px; }
.app-foot:empty { display: none; }
.app-foot-box { border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.fb-settings { display: flex; flex-direction: column; gap: 6px; }
.fb-consent-line { margin: 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
.fb-settings-btns, .wn-settings { display: flex; flex-wrap: wrap; gap: 8px; }

/* 重ね画面 */
.fb-modal {
  position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center; padding: 12px;
}
.fb-modal[hidden] { display: none; }
/* 感想の画面が開いている間（html に fb-lock）: 下に引っ張っての再読み込み・後ろのスクロールの連鎖を止める */
html.fb-lock, html.fb-lock body { overscroll-behavior-y: contain; }
.fb-modal, .fb-box, .fb-text { overscroll-behavior: contain; }
.fb-box {
  background: var(--panel); color: var(--text); border-radius: 14px; border: 1px solid var(--line);
  width: 100%; max-width: 560px; max-height: 92vh; max-height: 92dvh; overflow: auto; -webkit-overflow-scrolling: touch;
  padding: 16px 18px;
}
.fb-box h2 { margin: 0 0 8px; font-size: 19px; }
.fb-lead, .fb-note { font-size: 13px; color: var(--muted); margin: 4px 0 8px; line-height: 1.5; }
.fb-note { font-size: 12px; }
.fb-text {
  width: 100%; min-height: 120px; resize: vertical; font: inherit; font-size: 16px; /* 16px 未満だと iPhone が拡大する */
  padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text);
}
.fb-counter { text-align: right; font-size: 12px; color: var(--muted); margin: 2px 0 6px; font-variant-numeric: tabular-nums; }
.fb-draft-note { font-size: 12px; color: var(--accent); margin: 0 0 6px; }
.fb-check { display: flex; align-items: center; gap: 6px; font-size: 14px; margin: 4px 0; }
.fb-check input { width: 18px; height: 18px; }
.fb-preview { font-size: 12px; color: var(--text); background: var(--bg); border: 1px dashed var(--line); border-radius: 6px; padding: 6px 8px; margin: 4px 0; overflow-wrap: anywhere; }
.fb-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.fb-actions button {
  padding: 8px 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); cursor: pointer; font: inherit; font-weight: 600;
}
.fb-actions button.fb-primary { border: none; background: var(--accent); color: var(--accent-text); }
.fb-actions button.fb-link { margin-right: auto; border: none; background: none; color: var(--accent); text-decoration: underline; padding-left: 0; }
.fb-actions button:disabled { opacity: .5; cursor: default; }

/* みんなの感想と対応 */
.fb-empty { color: var(--muted); margin: 12px 0; }
.fb-items { list-style: none; margin: 0; padding: 0; }
.fb-item { border-bottom: 1px solid var(--line); padding: 8px 0; }
.fb-item-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.fb-badge { border-radius: 4px; padding: 0 6px; font-weight: 700; color: #fff; background: #777; }
.fb-st-received { background: #6b7a8a; }
.fb-st-in_progress { background: #c08a12; }
.fb-st-fixed { background: #2e9e5b; }
.fb-st-held { background: #8a6b8a; }
.fb-sum { font-size: 14px; margin-top: 3px; overflow-wrap: anywhere; }
.fb-item-note { font-size: 12px; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }

/* 更新のお知らせ */
.wn-ver { font-size: 14px; margin: 10px 0 4px; color: var(--muted); }
.wn-list { margin: 0 0 6px; padding-left: 1.3em; font-size: 14px; }

@media (max-width: 600px) {
  .fb-banner { font-size: 11px; padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px)); gap: 8px; }
  .fb-banner-close { padding: 6px 10px; }
  .fb-modal { padding: 8px; align-items: flex-start; }
  .fb-box { padding: 12px; max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); }
  .fb-actions button { flex: 1 1 auto; min-height: 40px; }
  .fb-actions button.fb-link { flex-basis: 100%; text-align: left; }
}
