/* 投稿の保存先を使う画面の入力欄（ご意見・ご要望の画面、シミュレーターの画面の下のコメント欄）と、ほかの画面と共用の部品 */

/* 検索結果の見出しの右端に出す「マイセットに保存」。リンクと同じ見た目で出す。保存済みは緑で、下線なし */
.result-save {
  margin-left: auto;
  padding: 0;
  border: none;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 0.85rem;
  text-decoration: underline;
  cursor: pointer;
}

.result-save.saved {
  color: var(--ok);
  font-weight: 600;
  text-decoration: none;
}

.result-save:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* リンクをボタンの見た目で出すとき */
a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  text-decoration: none;
}

a.button.primary {
  color: var(--accent-contrast);
}

/* ご意見・ご要望の画面の本体 */
.posts-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
}

.posts-page input[type="text"],
.posts-page input[type="url"],
.posts-page textarea,
.community input[type="text"],
.community textarea {
  width: 100%;
  min-height: 36px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.posts-page textarea,
.community textarea {
  min-height: 6em;
  resize: vertical;
}

/* 表示できないものの知らせ（マイセットの「この構成は、いまのデータでは表示できません」など） */
.post-problem {
  margin: 0;
  font-size: 0.85rem;
  color: var(--danger);
  white-space: pre-line;
}

/* ---- 入力欄（ご意見・ご要望の画面） ---- */

.form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
  font-size: 0.85rem;
  color: var(--muted);
}

.required-mark {
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 600;
}

.submit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.submit-actions .primary {
  flex: 0 1 240px;
}

.form-message.error {
  color: var(--danger);
}

.submit-message {
  white-space: pre-line;
}

.post-problem:empty {
  display: none;
}

/* 画面には出さず、読み上げだけに使う文字 */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* コメント欄の「報告」「削除」などの、目立たない文字のボタン */
.comment-tool {
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}

.comment-tool:hover:not(:disabled) {
  color: var(--danger);
  text-decoration: underline;
}

.comment-tool:disabled {
  cursor: default;
}
