/* 화면 위 도구줄 공용 양식 — 단추·배지를 **한 줄에, 같은 크기로** (#390, 원장님 2026-10-11)
 *
 * 원장님: *"지금 단추 크기도 그렇고 넓이도 디자인도 전부 제각각 이니까 좀 정리를 잘 해서
 * 한줄에 단추가 다 표현될 수 있게 해주고 위의 작업한 양식을 class에 넣어줘"*
 *
 * 무엇이 문제였나 — 채점 화면 도구줄에 열 몇 개가 섞여 있는데
 *   · 배지는 `fs-6` 라 크고 단추는 `btn-sm` 이라 작아 **높이가 제각각**이었다
 *   · 어떤 것은 `px-2`, 어떤 것은 inline style 로 색·너비를 따로 줬다
 *   · 줄바꿈(flex-wrap)이라 좁아지면 두 줄·세 줄로 흩어졌다
 *
 * 그래서 양식을 여기 한 곳에 둔다. 화면은 `.pe-bar` 만 붙이고, 안에 무엇을 넣을지만 고른다.
 * 새 단추가 늘어도 크기·모양을 따로 적지 않는다.
 *
 *   <div class="pe-bar">
 *     <button class="btn btn-sm btn-primary">1차 42/710</button>
 *     <span class="badge bg-info text-dark">정답 공개됨</span>
 *     <button class="btn btn-sm pe-accent">전체 정답공개</button>
 *     <button class="btn btn-sm btn-outline-danger pe-push">2차 답안리셋</button>
 *   </div>
 */

.pe-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  /* ★ 한 줄 — 좁아지면 줄을 늘리지 않고 옆으로 민다. 단추가 아래로 흩어지지 않는다. */
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;          /* 가로 막대가 단추를 가리지 않게 */
  scrollbar-width: thin;
}
.pe-bar::-webkit-scrollbar { height: 6px; }
.pe-bar::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

/* 단추든 배지든 **같은 알약** — 높이·글씨·여백을 여기서 한 번만 정한다 */
.pe-bar .btn,
.pe-bar .badge {
  height: 30px;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;          /* 글자가 접혀 단추가 두 줄이 되지 않게 */
  flex: 0 0 auto;               /* 줄어들어 글자가 잘리지 않게 */
}
.pe-bar .btn i,
.pe-bar .badge i { font-size: .82em; }

/* 크기를 따로 주던 옛 표기를 눌러 둔다 — 화면에서 하나씩 지우지 않아도 모양이 맞는다 */
.pe-bar .fs-6 { font-size: .8rem !important; }
.pe-bar .px-2 { padding-left: 11px !important; padding-right: 11px !important; }

/* 묶음 단추(풀이법대로 함 / 다시)는 가운데를 붙여 하나처럼 */
.pe-bar .btn-group { flex: 0 0 auto; display: inline-flex; }
.pe-bar .btn-group .btn { border-radius: 0; }
.pe-bar .btn-group .btn:first-child { border-radius: 999px 0 0 999px; }
.pe-bar .btn-group .btn:last-child { border-radius: 0 999px 999px 0; }

/* 곁들이는 글(누가·언제 검사했나) — 단추가 아니므로 알약을 입히지 않는다 */
.pe-bar .pe-note {
  flex: 0 1 auto;
  font-size: .74rem;
  color: #6c757d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

/* 못 누르는 단추 — 왜 흐린지 한눈에 (화면마다 inline style 로 적던 것) */
.pe-bar .btn:disabled,
.pe-bar .btn.disabled { opacity: .5; cursor: not-allowed; }

/* 오른쪽 끝으로 미는 것(답안리셋처럼 위험한 것) */
.pe-bar .pe-push { margin-left: auto; }

/* 색 갈래 — inline style 대신 이름으로 (#390) */
.pe-bar .pe-accent { background: #7c3aed; border-color: #7c3aed; color: #fff; }
.pe-bar .pe-accent:hover { background: #6d28d9; border-color: #6d28d9; color: #fff; }
.pe-bar .pe-soft-green { background: #dcfce7; color: #15803d; }
.pe-bar .pe-soft-purple { background: #ede9fe; color: #6d28d9; }
.pe-bar .pe-soft-indigo { background: #eef2ff; color: #4338ca; }

/* 좁은 화면(태블릿 세로 이하) — 더 줄여 한 줄을 지킨다 */
@media (max-width: 820px) {
  .pe-bar .btn,
  .pe-bar .badge { height: 28px; min-height: 28px; padding: 0 9px; font-size: .74rem; }
  .pe-bar .pe-note { display: none; }
}
