/* ==========================================================================
   멀티보드 관리자 — board-lineup.css (라인업 + 매칭투수 모달)
   ========================================================================== */

.zone-lineup { flex-direction: column; align-items: stretch; justify-content: flex-start; padding: 0; }
.lineup-body { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.zone-lineup.mode-select .lineup-body { display: none; }
.zone-lineup.mode-select .player-select-panel { display: flex; }
.lineup-table-wrap { display: block; flex: 1 1 auto; min-height: 0; padding: 8px 12px 12px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #3C4652 transparent; }
.lineup-table-wrap::-webkit-scrollbar { width: 6px; height: 6px; }
.lineup-table-wrap::-webkit-scrollbar-track { background: transparent; }
.lineup-table-wrap::-webkit-scrollbar-thumb { background: #3C4652; border-radius: 999px; }
.lineup-table-wrap::-webkit-scrollbar-thumb:hover { background: #4B5866; }

.field-view-footer.lineup-player-info { flex: 0 0 auto; }
.lineup-player-info .pitcher-badge { border-color: #0D9B7A; background: #0B2A2F; color: #0DDFEE; }
.lineup-player-info .field-pitcher-main { border-bottom-color: #1E2833; }
.lineup-player-info .btn.pitcher-history-btn { min-width: 40px; padding: 0 10px; }
.player-info-actions { display: flex; flex-shrink: 0; align-items: center; gap: 6px; }
.player-info-actions.sub { gap: 8px; }

.btn.lineup-toggle-btn { gap: 6px; height: 28px; padding: 0 12px; border-radius: 4px; background: transparent; color: #BFC7CE; font-size: 1.2rem; font-weight: 600; }
.btn.lineup-toggle-btn:hover { background: #151920; border-color: var(--mb-line-strong); color: #FFFFFF; }
.btn.lineup-toggle-btn:active { transform: scale(0.96); }
.btn.lineup-toggle-btn img { width: 16px; height: 16px; }

.lineup-inning-tabs { display: flex; flex-shrink: 0; flex-wrap: nowrap; gap: 6px; padding: 10px 12px 8px; overflow: hidden; }
.btn.lineup-inning-tab { height: 28px; min-width: 44px; padding: 0 10px; border-radius: 4px; background: #0A0E14; border-color: #404B57; color: #BFC7CE; font-size: 1.3rem; font-weight: 700; }
.btn.lineup-inning-tab:hover { background: #111820; border-color: #5F6872; color: #FFFFFF; }
.btn.lineup-inning-tab.active,
.btn.lineup-inning-tab[aria-selected="true"] { background: #0D5C54; border-color: #0D9B7A; color: #FFFFFF; }

.lineup-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.lineup-table thead th { height: 32px; padding: 0 8px; background: #0A0E14; border-bottom: 1px solid #404B57; font-size: 1.3rem; font-weight: 700; line-height: 1; color: #8B949E; text-align: left; }
.lineup-table tbody td { height: 32px; padding: 4px 8px; background: #111820; border-bottom: 1px solid #8A8C8F; font-size: 1.4rem; font-weight: 600; line-height: 1; color: #FFFFFF; vertical-align: middle; }
/* col 1:타순, 2:대타/대주자, 3:선수명, 4:루상, 5:포지션, 6:최근기록 */
.lineup-table th:first-child,
.lineup-table td:first-child { text-align: center; }
.lineup-table th:nth-child(2),
.lineup-table td:nth-child(2) { text-align: center; overflow: hidden; }
.lineup-table th:nth-child(3),
.lineup-table td:nth-child(3) { text-align: center; }
.lineup-table th:nth-child(4),
.lineup-table td:nth-child(4) { text-align: center; }
.lineup-table th:nth-child(5),
.lineup-table td:nth-child(5) { text-align: center; }
.lineup-table th:nth-child(6),
.lineup-table td:nth-child(6) { text-align: left; }

.lineup-col-order   { width: 42px; }
.lineup-col-role    { width: 50px; }
.lineup-col-name    { width: 10%; }
.lineup-col-base    { width: 44px; }
.lineup-col-position { width: 56px; }
.lineup-col-record  { width: auto; }

.lineup-role { display: inline-flex; align-items: center; justify-content: center; height: 20px; padding: 0 4px; border-radius: 3px; font-size: 1.2rem; font-weight: 600; line-height: 1; white-space: nowrap; }
.lineup-role.runner { background: #0D2356; color: #6B9BF5; border: 1px solid #1A3A7A; }
.lineup-role.batter { background: #2A0D45; color: #C47FFF; border: 1px solid #4A1A7A; }

/*
  [루상 아이콘 — 클래스로 제어]
  기본: 아이콘 없음
  .lineup-base-cell.base-1  → 1루 아이콘
  .lineup-base-cell.base-2  → 2루 아이콘
  .lineup-base-cell.base-3  → 3루 아이콘
  .lineup-base-cell.batter  → 타석 아이콘
*/
.lineup-base-cell { padding-left: 6px; padding-right: 6px; }
.lineup-base-cell::after { content: ''; display: none; width: 18px; height: 18px; background: center / contain no-repeat; }
.lineup-base-cell.base-1::after { display: inline-block; background-image: url('../img/icon_base_1.png'); }
.lineup-base-cell.base-2::after { display: inline-block; background-image: url('../img/icon_base_2.png'); }
.lineup-base-cell.base-3::after { display: inline-block; background-image: url('../img/icon_base_3.png'); }
.lineup-base-cell.batter::after { display: inline-block; background-image: url('../img/icon_batter.png'); }

/* 행 전체는 클릭 가능 커서 */
.lineup-row:not(.disabled) { cursor: pointer; }
/* 텍스트·뱃지 등 비상호작용 요소는 기본 커서로 재정의 */
.lineup-row .lineup-role,
.lineup-row .record-chip,
.lineup-row .record-chip-list { cursor: default; }
/* 상호작용 버튼은 포인터 유지 */
.lineup-row .pitcher-chip-btn { cursor: pointer; }

.lineup-row.disabled td { background: #0D131A; color: #7F8A95; }
.lineup-row.disabled td:first-child { color: #6B7580; }
.lineup-row.disabled td:last-child { background: #111820; color: #FFFFFF; }

.lineup-row.focus:not(.disabled) td { background: #0B2A2F; box-shadow: inset 0 1px 0 #00D4F0, inset 0 -1px 0 #00D4F0; }
.lineup-row.focus:not(.disabled) td:first-child { box-shadow: inset 1px 0 0 #00D4F0, inset 0 1px 0 #00D4F0, inset 0 -1px 0 #00D4F0; }
.lineup-row.focus:not(.disabled) td:last-child { box-shadow: inset -1px 0 0 #00D4F0, inset 0 1px 0 #00D4F0, inset 0 -1px 0 #00D4F0; }

/* Tab 포커스 시 행 하이라이트 — 브라우저 기본 outline 제거 후 td로 표현 */
.lineup-row:focus { outline: none; }
.lineup-row:focus:not(.disabled):not(.focus) td { background: #FFFFFF08; }

/* hover·focus 공통 — 삼각형 화살표 표시 */
.lineup-row:hover:not(.disabled):not(.focus) td:first-child,
.lineup-row:focus:not(.disabled):not(.focus) td:first-child { position: relative; }
.lineup-row:hover:not(.disabled):not(.focus) td:first-child::before,
.lineup-row:focus:not(.disabled):not(.focus) td:first-child::before { content: ""; position: absolute; left: -10px; top: 50%; width: 0; height: 0; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 8px solid #BFC7CE; transform: translateY(-50%); pointer-events: none; }

/* hover 배경 (삼각형 선언 분리 후 배경만) */
.lineup-row:hover:not(.disabled):not(.focus) td { background: #FFFFFF08; }

.record-chip-list { display: flex; position: relative; flex-wrap: wrap; align-items: center; gap: 4px; padding-left: 12px; }
.record-chip-list + .record-chip-list { margin-top: 0; }
.record-chip-list::before { content: ""; position: absolute; left: 0; top: 50%; width: 8px; height: 8px; background: #EF4444; border-radius: 1px; transform: translateY(-50%); }
.record-chip-list.red::before { background: #E40000; }
.record-chip { display: inline-flex; align-items: center; justify-content: center; min-height: 21px; padding: 0 6px; border-radius: 4px; background: #20262C; border: 1px solid currentColor; font-size: 1.3rem; font-weight: 600; line-height: 1; white-space: nowrap; }
.record-chip.out       { color: var(--rc-out); }
.record-chip.hit       { color: var(--rc-hit); }
.record-chip.steal     { color: var(--rc-steal); }
.record-chip.sacrifice { color: var(--rc-sacrifice); }
.record-chip.onbase    { color: var(--rc-onbase); }
.record-chip.error     { color: var(--rc-error); }
.record-chip.score     { color: var(--rc-score); }

/* --------------------------------------------------------------------------
   매칭투수 칩 버튼 (JS로 .record-chip-list 앞에 동적 삽입)
   -------------------------------------------------------------------------- */

/* 칩 버튼이 있으면 ::before 숨김 */
.record-chip-list:has(.pitcher-chip-btn)::before { display: none; }

.pitcher-chip-btn { position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 10px; height: 10px; padding: 0; border: 0; border-radius: 2px; background: #EF4444; cursor: pointer; transition: filter 0.12s ease, transform 0.1s ease; }
.pitcher-chip-btn:hover { filter: brightness(1.3); transform: translateY(-50%) scale(1.2); }
.pitcher-chip-btn:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 2px; border-radius: 2px; }

/* pitcher-modal 공통 컴포넌트 스타일은 board.css 로 이동됨 */
