/* SCOREBOOK_CHAT_GLOBAL_LIVE_STYLE_V12_2_BEGIN
 * 실제 화면에서 확인된 p.sb-chat-row의 남은 3열 grid를 제거합니다.
 * 닉네임 전체 + 콜론 + 본문을 하나의 문장 흐름으로 표시합니다.
 */

/* 메시지별 시간은 계속 숨김 */
html body p.sb-chat-row .sl-chat-time,
html body p.sb-chat-row time,
html body .sb-chat-row .sl-chat-time,
html body .sb-chat-row time,
html body #sl-chat-msgs .sl-chat-time,
html body .sl-chat-msgs .sl-chat-time {
  display: none !important;
  grid-column: auto !important;
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  visibility: hidden !important;
}

/* 실제 화면에서 DevTools로 확인된 행: p.sb-chat-row */
html body p.sb-chat-row,
html body .sb-chat-row,
html body #home-live-chat p.sb-chat-row,
html body .classic-chat-log p.sb-chat-row,
html body [data-classic-chat] p.sb-chat-row,
html body #sl-chat-msgs p.sb-chat-row,
html body .sl-chat-msgs p.sb-chat-row {
  position: relative !important;
  display: block !important;
  float: none !important;
  clear: both !important;
  flex: none !important;
  flex-flow: initial !important;
  grid-template-columns: none !important;
  grid-template-rows: none !important;
  grid-template-areas: none !important;
  grid-auto-columns: auto !important;
  grid-auto-rows: auto !important;
  align-items: initial !important;
  justify-content: initial !important;
  gap: 0 !important;
  column-gap: 0 !important;
  row-gap: 0 !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  text-align: left !important;
  text-indent: 0 !important;
  white-space: normal !important;
  overflow: visible !important;
  line-height: 1.5 !important;
}

/* JS 적용 전에도 기존 자식의 grid 열/고정폭/말줄임을 즉시 해제 */
html body p.sb-chat-row > *:not(.sl-chat-time):not(time),
html body .sb-chat-row > *:not(.sl-chat-time):not(time) {
  position: static !important;
  display: inline !important;
  float: none !important;
  clear: none !important;
  grid-column: auto !important;
  grid-row: auto !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  vertical-align: baseline !important;
}

html body p.sb-chat-row > *:first-child:not(.sl-chat-time):not(time),
html body .sb-chat-row > *:first-child:not(.sl-chat-time):not(time) {
  white-space: nowrap !important;
  margin-right: 4px !important;
}

/* V11이 재구성한 한 문장 행. 이전 V6 행도 즉시 호환합니다. */
html body p.sb-chat-row > .sb-chat-v12-line,
html body .sb-chat-row > .sb-chat-v12-line,
html body p.sb-chat-row > .sb-chat-v6-line,
html body .sb-chat-row > .sb-chat-v6-line {
  position: static !important;
  display: block !important;
  float: none !important;
  clear: both !important;
  grid-column: auto !important;
  grid-row: auto !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  text-align: left !important;
  text-indent: 0 !important;
  white-space: normal !important;
  overflow: visible !important;
  line-height: inherit !important;
}

html body .sb-chat-v12-name,
html body .sb-chat-v6-name {
  position: static !important;
  display: inline !important;
  float: none !important;
  clear: none !important;
  grid-column: auto !important;
  grid-row: auto !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 4px 0 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
  vertical-align: baseline !important;
  color: #07517f !important;
  font-weight: 800 !important;
}

html body .sb-chat-v12-message, html body .sb-chat-v6-message {
  position: static !important;
  display: inline !important;
  float: none !important;
  clear: none !important;
  grid-column: auto !important;
  grid-row: auto !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-wrap: break-word !important;
  word-break: keep-all !important;
  vertical-align: baseline !important;
  color: #202b33 !important;
  font-weight: 400 !important;
}
/* SCOREBOOK_CHAT_GLOBAL_LIVE_STYLE_V12_2_END */


/* 모든 메뉴 페이지에서 라이브스코어 페이지와 같은 채팅 행 흐름을 강제 */
html body #sl-chat-msgs > .sl-chat-line,
html body .sl-chat-msgs > .sl-chat-line {
  display: block !important;
  float: none !important;
  clear: both !important;
  grid-template-columns: none !important;
  grid-template-rows: none !important;
  grid-template-areas: none !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  padding: 4px 0 !important;
  margin: 0 !important;
  border-bottom: 1px solid #edf1f4 !important;
  line-height: 1.45 !important;
  overflow: visible !important;
  text-align: left !important;
}

html body #sl-chat-msgs > .sl-chat-line > .name,
html body .sl-chat-msgs > .sl-chat-line > .name,
html body #sl-chat-msgs > .sl-chat-line > .msg,
html body .sl-chat-msgs > .sl-chat-line > .msg {
  position: static !important;
  display: inline !important;
  float: none !important;
  clear: none !important;
  grid-column: auto !important;
  grid-row: auto !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  vertical-align: baseline !important;
}

html body #sl-chat-msgs > .sl-chat-line > .name,
html body .sl-chat-msgs > .sl-chat-line > .name {
  margin-right: 4px !important;
  white-space: nowrap !important;
  color: #07517f !important;
  font-weight: 800 !important;
}

html body #sl-chat-msgs > .sl-chat-line > .msg,
html body .sl-chat-msgs > .sl-chat-line > .msg {
  color: #202b33 !important;
  font-weight: 400 !important;
  overflow-wrap: anywhere !important;
  word-break: keep-all !important;
}

/* 메시지 시간과 불필요한 접속자 칩은 모든 페이지에서 동일하게 제거 */
html body .classic-chat-log time,
html body #home-live-chat time,
html body #sl-chat-msgs time,
html body .sl-chat-msgs time,
html body #sl-chat-msgs .sl-chat-time,
html body .sl-chat-msgs .sl-chat-time,
html body .classic-chat-log .sl-chat-time {
  display: none !important;
}

html body #sl-chat-online,
html body .sl-livechat-online,
html body .classic-chat-users[data-chat-users] {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
}

html body .classic-chat-log,
html body #home-live-chat,
html body #sl-chat-msgs,
html body .sl-chat-msgs {
  overflow-x: hidden !important;
}

/* 라이브스코어 페이지의 기본 채팅 높이를 다른 PC 메뉴에도 통일 */
@media (min-width: 1281px) {
  html body .classic-left-rail .classic-sports-chat .classic-chat-log,
  html body .classic-left-rail #home-live-chat {
    height: 356px !important;
  }
}

@media (min-width: 921px) and (max-width: 1280px) {
  html body .classic-left-rail .classic-sports-chat .classic-chat-log,
  html body .classic-left-rail #home-live-chat {
    height: 330px !important;
  }
}
