/* だれでも軌道設計 — ミッションシーケンスの一覧

   css/ は index.html に書いた順で読み込まれる。同じ強さの規則は後勝ちなので、
   順番を入れ替えたり <link> の並びを変えたりしないこと。 */

/* ==================================================================
   Mission sequence cards
   ================================================================== */
/* カードの間の「+ シーケンスを追加」。数が増えるほど縦を食うので薄く低くする */
.add_sequence {
  display: block;
  background: var(--surface-muted);
  border: 1.5px dashed var(--gray-300);
  border-radius: var(--radius-md);
  text-align: center;
  color: var(--text-muted);
  user-select: none;
  padding: 4px;
  margin: 0 0 5px 0;
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.add_sequence:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-text);
}

/* ノードの数だけ縦に並ぶので2枚組の2行に収める。
     1行目: [チェック] [1. 打上げ]  …  [ゴミ箱]
     2行目: 天体名                      日付 */
.sequence {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 3px;
  flex: 1;
  position: relative;
  box-sizing: border-box;
  margin: 0 0 5px 0;
  max-width: 500px;
  background: var(--surface);
  padding: 6px 8px 7px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.sequence span {
  white-space: nowrap;
}
.seq-head {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  /* 消せないノード (自動マヌーバ) にはゴミ箱が無いので、
     高さを揃えておかないとその枚だけ背が低くなる */
  min-height: 20px;
}
/* 中身は1行。天体名を左、日付を右に振り分ける */
.seq-body {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 0 2px;
}
/* 連番と種別 */
.seq-badge {
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--chrome-alt);
  color: var(--chrome-text);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
}
.sequence.selected .seq-badge {
  background: var(--accent);
}
/* 天体名。幅が足りないときはここだけ縮めて、日付は最後まで読めるようにする */
.seq-name {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  font-size: 13px;
}
.seq-date {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.sequence:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--gray-300);
}
.sequence.selected {
  background: var(--accent-soft);
  border-color: var(--accent);
}

/* まとめて操作する対象のチェック。選択(操作パネルに出す1件)とは別なので、
   枠の色ではなく左の枠線で示す */
.seq-check {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin: 0 2px 0 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.sequence.checked {
  box-shadow: inset 3px 0 0 var(--accent);
}

/* チェックしたものへの操作をまとめたバー (1件以上選んでいる間だけ出す) */
.bulk-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding: 6px 10px;
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  border-radius: var(--radius-md);
}
/* 件数 → 操作 → 補足 の3段。操作は「選択解除」を左端、「まとめて削除」を
   右端に振り分けて、押し間違えないだけの距離を空ける */
.bulk-count {
  flex: 1 1 100%;
  order: 1;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-text);
  white-space: nowrap;
}
.bulk-actions {
  flex: 1 1 100%;
  order: 2;
  gap: 6px;
  flex-wrap: nowrap;
  justify-content: space-between;
}
.bulk-hint {
  flex: 1 1 100%;
  order: 3;
  font-size: 10px;
  line-height: 1.3;
  color: var(--accent-text);
  opacity: 0.85;
}
.bulk-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.bulk-btn:hover {
  border-color: var(--gray-300);
}
.bulk-btn.danger:hover {
  color: var(--danger-text);
  border-color: var(--danger);
  background: var(--danger-soft);
}
/* アイコンだけのボタン (まとめて削除)。丸のまま中身をアイコンに置き換える */
.bulk-btn--icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 22px;
  padding: 0;
}
.bulk-btn--icon svg {
  width: 13px;
  height: 13px;
  display: block;
  pointer-events: none;
}

/* 削除ボタン。1行目の右端に置く。普段は薄く、枠に触れたときだけはっきり出す
   (常に濃いと、並んだゴミ箱ばかりが目に付いてしまう) */
.seq-delete {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-left: auto;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  opacity: 0.25;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}
.sequence:hover .seq-delete {
  opacity: 0.8;
}
.seq-delete:hover {
  opacity: 1;
  color: var(--danger-text);
  border-color: var(--danger);
  background: var(--danger-soft);
}
.seq-delete svg {
  width: 13px;
  height: 13px;
  display: block;
  pointer-events: none; /* 押されたのはボタン、として扱う */
}

#sequence_propaty {
  width: 70px;
}
/* 英語の「Change」は日本語の「変更」より横に長い。
   選択欄の矢印のぶんも要るので、文字の幅ぴったりでは足りない */
:root[lang="en"] #sequence_propaty {
  width: 96px;
}
