html {
  -ms-content-zooming: none;
  -ms-touch-action: pan-x pan-y;
  touch-action: pan-y;
}
body:has(.youtube-live-box.m-active) {
  height:100%; min-height:100%; overflow:hidden !important; touch-action:none;
  position: fixed;
  top: 0; bottom: 0; left: 0; right: 0;
}
em {font-style: normal;}


.youtube-live-box {
  display: flex;
  width: 100%;
  max-width: 1440px;
  gap: 14px;
  transition: none;
}
@media screen and (min-width: 1025px) {
  .youtube-live-box > div {
    height: 712px !important;
  }
}
.live-video-box {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #000;
  width: 100%;
  max-width: 1000px;
}
.live-video-box > iframe {
  aspect-ratio: 16 / 9;
  height: auto;
}


/* chat ===================================================== */
.chat-messages-box {
  display: block;
  position: relative;
  min-width: 426px;
  max-width: 426px;
  font-family: "Noto Sans KR", sans-serif;
  height: 712px;
}
.chat-messages-wrapper {
  background-color: #FAFAFA;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* ====== chat off-overlay ====== */
.chat-off-overlay {
  display: none;
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  align-items: center;
  justify-content: center;
  z-index: 2;
  bottom: 0;
}
.chat-messages-box.chat-off .chat-off-overlay,
.chat-messages-box.chat-login-not .chat-off-overlay {
  display: flex;
}
.chat-off-overlay > span {
  display: none;
  color: #fff;
  text-align: center;
  font-size: 15px;
}
.chat-messages-box.chat-off .chat-off-txt {display: inline-block;}
.chat-messages-box.chat-login-not .chat-login-not-txt {display: inline-block;}
.chat-messages-box.chat-off.chat-login-not .chat-off-txt {display: none;}

@media screen and (max-width: 1024px) {
  .chat-off-overlay {height: calc(100% - 50px);}
}


/* ====== chat header ====== */
.chat-header {
  display: flex;
  align-items: center;
  background: #F0F0F0;
  border-top: 1px solid #E6E6E6;
  border-bottom: 1px solid #E6E6E6;
  box-sizing: border-box;
  height: 100%;
  max-height: 50px;
  padding: 10px 15px;
  justify-content: space-between;
  color: #212B38;
}
.chat-header > span {
  font-weight: 600;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -0.06em;
  color: #003E67;
}
.chat-header > div {
  display: flex;
  align-items: center;
}
.chat-header > div span {
  font-size: 14px;
  margin-right: 8px;
}
.chat-header > div span em {
  font-weight: 500; color: #003E67;
}
.chat-close-btn, .answer-close-btn, .attn-close-btn {
  border: none !important; padding: 0 !important;
  width: 24px; height: 24px;
  cursor: pointer;
  background-color: transparent !important;
}
.youtube-live-box .m-chat-open-btn {
  border: none;
  background-color: #C3E7FF;
  padding: 10px;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 20px;
}
.youtube-live-box .m-chat-open-btn:hover,
.youtube-live-box .m-chat-open-btn:focus {
  border: none; background-color: #C3E7FF;
}
.m-chat-open-btn > span {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.06em;
  color: #18A0FB;
}
.chat-close-btn,
.m-chat-open-btn {display: none;}

/* ====== chat body ====== */
.chat-content-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-x: hidden;
}
.chat-content-wrap {
  display: flex;
  height: 100%;
  flex-grow: 1;
}
.chat-content-inner {
  width: 100%;
  display: flex;
  overflow-x: hidden;
  overflow-y: auto;
  flex: 1 1 100%;
  flex-direction: column-reverse;
  -webkit-overflow-scrolling: touch;
}
.chat-content-inner::-webkit-scrollbar {
  width: 4px;
  border-radius: 100px; 
}
.chat-content-inner::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.08);
}
.chat-content-list {
  display: flex;
  flex-direction: column;
  padding: 0 20px 20px;
  flex: 1 1 auto;
  width: 100%;
  box-sizing: border-box;
  bottom: 0;
  transition: 0.3s ease-in-out;
}
.comment-area {margin: 0; margin-right: 24px;}
/* delete new ★ */
.comment-area._my:not(._all) {margin-right: 0; margin-left: 24px;}
.comment-area+.comment-area {margin-top: 20px;}
.comment-area._my+.comment-area {margin-top: 24px;}
.comment-area.admin-message+.comment-area._my {margin-top: 30px;}
.comment-area._my+.comment-area._my {margin-top: 10px;}
.comment-wrap {float: left;}
.comment-area:last-child {margin-bottom: 0;}


/* date */
.chat-content-list > .date-check {
  margin-top: 20px;
  margin-bottom: 16px;
}
/* delete new ★ */
.date-check:has(+.date-check) {display: none;}

.chat-content-list > .date-check > span {
  display: flex;
  align-items: center;
}
.chat-content-list > .date-check > span::before,
.chat-content-list > .date-check > span::after {
  content: '';
  display: block;
  width: 100%;
  height: 1px;
  background-color: #E2E2E2;
}
.chat-content-list > .date-check span {
  color: #979797;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 500;
  white-space: nowrap;
  font-style: normal;
  letter-spacing: -0.02em;
}
.chat-content-list > .date-check span em {padding: 0 20px;}
.chat-content-list > .date-check span strong {font-weight: 500;}

/* chat Message balloon 채팅 컨텐츠 말풍선 */
/* user */
.comment-wrap-top {
  font-size: 14px;
  letter-spacing: -0.06em;
  display: flex;
  margin-bottom: 8px;
}
.comment-content-box {
  display: flex;
  flex-direction: column;

  background: #F0F0F0;
  border-radius: 0 8px 8px 8px;
  color: #666;
  width: 100%;
}
.comment-wrap-bt {
  display: flex;
  align-items: end;
  flex-direction: row;
}
.comment-wrap-bt > #comment-time {
  color: #AAA;
  font-size: 10px;
  letter-spacing: -0.02em;
  white-space: nowrap;
  margin-left: 4px;
}
.comment-wrap-bt .comment-content-box span {
  letter-spacing: -0.02em;
  line-height: 1.4;
  font-size: 14px;
  padding: 12px;
}
.comment-content-box a {color: #18A0FB;}


.comment-area._my .comment-wrap {float: right;}

/* delete new ★ */
.admin-chat-ver .comment-area._my._all .comment-wrap {float: left;}

.comment-area._my .comment-wrap-top {display: none; justify-content: end;}
.comment-name strong {
  font-weight: 500;
  color: #212B38;
  line-height: 1.4;
}
.comment-to-target {color: #aaa; font-weight: 400; margin-left: 6px;}
.comment-area._me .comment-to-target {color: #00558F;}

/* delete new ★ */
.comment-area._my:not(._all) .comment-wrap-bt {
  flex-direction: row-reverse;
}
/* delete new ★ */
.comment-area._my:not(._all) .comment-wrap-bt > #comment-time {
  margin-left: 0; margin-right: 4px;
}
.comment-area._my .comment-content-box {
  background: #00558F;
  border-radius: 8px 0 8px 8px;
  color: #fff;
}
/* delete new ★ */
.admin-chat-ver .comment-area._my._all .comment-wrap .comment-content-box {
  border-radius: 0 8px 8px 8px;
}

.comment-wrap-bt .comment-content-box .reply-comment {
  display: none; flex-direction: column;
  color: #9D9D9D;
  position: relative;
  padding-bottom: 10px;
}
.comment-area._all._to-user .reply-comment {
  display: flex; line-height: 1.4;
}
.reply-comment > * {display: contents; font-size: 14px !important;}
.reply-comment::before {
  content: '모두에게 답장';
  display: block;
  color: #666;
  font-weight: 600;
}
.reply-comment::after {
  content: '';
  display: block;
  position: absolute;
  bottom: 0;
  background-color: #E2E2E2;
  height: 1px;
  width: calc(100% - 24px);
}
.comment-wrap-bt .comment-content-box .reply-comment+span {padding-top: 10px;}





/* ====== chat text input 채팅 입력 ====== */
.chat-write-wrap {
  position: relative;
  padding: 10px 12px 12px;
  border-top: 1px solid #E6E6E6;
  border-bottom: 1px solid #E6E6E6;
  background-color: #FAFAFA;

  display: flex;
  flex-direction: row;
  align-items: end;
}
.chat-write-inner {
  display: flex;
  border: 1px solid #8FD2FF;
  border-radius: 8px;
  align-items: center;
  background-color: #fff;
  flex-grow: 1;
}
.chat-input-area {
  display: flex;
  flex: 1 0;
  width: 100%;
  padding: 5.5px 0;
  min-height: 23px;
}
.chat-write-textarea {
  display: block;
  -webkit-overflow-scrolling: touch;
  -ms-overflow-style: none;
  scrollbar-width: none;
  overflow-y: auto;
  resize: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  -webkit-touch-action: pan-y;
  outline: none;
  flex: 1 1 auto;

  border: none !important;
  background-color: rgba(0, 0, 0, 0);
  line-height: 23px;
  font-size: 16px;
  color: #666;
  width: 100%;
  height: 23px;
  padding: 0 10px 0 12px;
  max-height: 92px;
  transition: none;
}
.chat-write-textarea::placeholder {
  color: rgba(102, 102, 102, 0.6);
}
.chat-write-textarea:focus,
.chat-write-textarea:focus-visible {
  outline: none !important;
  box-shadow: none;
}
.chat-write-btn-box {
  padding-left: 5px;
}
.youtube-live-box .chat-write-submit-btn,
.chat-write-submit-btn {
  background-color: #18A0FB !important;
  border: none !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  padding: 0 !important;
  width: 36px;
  height: 36px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.chat-write-submit-btn > img {
  width: 20px; height: 20px;
}

@media screen and (max-width: 1024px) {
  .youtube-live-box {
    flex-direction: column;
    gap: 0;
  }
  .live-video-box {
    flex: 0 0 auto;
    max-width: 1024px;
  }
  .youtube-live-box.m-active {
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    z-index: 99999;
    height: 100%;
    max-height: 100dvh;
  }
  .youtube-live-box.m-active .m-chat-open-btn {
    display: none; height: 0; width: 0; visibility: hidden;
  }
  .chat-messages-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    flex: 1 1 auto;
    overflow: hidden;
  }
  .chat-content-wrapper {
    flex: 1 1 auto;
    overflow-y: auto;
    height: auto;
  }
  .chat-write-wrap {
    flex-shrink: 0;
  }

  .chat-messages-box {
    display: none;
    min-width: 280px; max-width: none;
  }
  .chat-messages-box.admin-chat-ver {display: block;}
  .chat-messages-box.active {
    display: flex;
    bottom: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    height: 100%;
    flex: 1 1 auto;
    flex-direction: column;
    overflow: hidden;
  }
  .chat-header {padding: 10px 14px;}
  .youtube-live-box > div {height: auto;}
  .chat-close-btn,
  .m-chat-open-btn {display: block;}
  .chat-messages-box.admin-chat-ver .m-chat-open-btn {
    display: none;
    visibility: hidden; width: 0; height: 0;
  }
}

@supports (-webkit-touch-callout: none) {
  body {min-height: 100dvh;}
}
@media screen and (max-width: 1024px) and (orientation: landscape) {
  .youtube-live-box.m-active {flex-direction: row;}
  .youtube-live-box.m-active .live-video-box {max-width: 60%;}
  .youtube-live-box.m-active .chat-messages-box {min-width: 250px;}
}


/* admin chat ============================================= */
.chat-messages-box.admin-chat-ver {
  max-width: 618px;
  height: 80vh;
  min-height: 712px;
  max-height: 1000px;
  width: 100%;
}
.chat-messages-box.admin-chat-ver .comment-content-box {
  max-width: 360px;
}
.chat-messages-box.admin-chat-ver div.comment-area:not([class*="_"]) .comment-user-div {
  cursor: pointer;
}
.chat-messages-box.admin-chat-ver .comment-to-target {
  display: none;
}
/* answer */
.comment-area+.comment-area._answer {margin-top: 14px;}
/* delete new ★ */ 
.comment-area._answer+.comment-area._answer {margin-top: 10px;}

.chat-messages-box.admin-chat-ver .comment-area._answer .comment-wrap-top {
  display: none;
}
.chat-messages-box.admin-chat-ver .comment-area._answer .comment-content-box {
  box-sizing: border-box;
  background-color: #fff;
  border: 1px solid #E2E2E2;
  margin: -1px;
}
.chat-messages-box.admin-chat-ver .comment-area._answer #comment-message::before {
  content: '답변하기';
  display: block;
  color: #00558F;
  font-weight: 500;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #E2E2E2;
}
.chat-messages-box.admin-chat-ver .comment-area._answer._all #comment-message::before {
  content: '전체 답변하기';
}

/* chat-write-answer-tab */
.chat-write-answer-tab {
  display: block;
  width: 100%;
  position: absolute;
  bottom: 100%;
  left: 0;
  background-color: #FAFAFA;
  font-size: 14px;
  border-top: 1px solid #E6E6E6;
}
.chat-write-answer-tab .chat-write-answer-wrap {
  display: flex;
  padding: 12px 20px 6px;
  align-items: center;
  justify-content: space-between;
}
.chat-answer-user-info {
  display: flex;
  flex-direction: column;
  color: #666666;
  line-height: 1.4;
  font-weight: 400;
  letter-spacing: -0.02em;
  padding-right: 10px;
}
.chat-answer-user-info > span:first-child {
  color: #212B38;
  font-weight: 500;
  margin-bottom: 2px;
}
.chat-answer-btn-wrap {
  display: flex;
  align-items: center;
}
.chat-answer-btn-wrap > button:not(.answer-close-btn) {
  border: none;
  cursor: pointer;
  background-color: #E4E4E4;
  border-radius: 6px;
  padding: 8px 10px;
  color: #A2A2A2;
  font-weight: 400;
  white-space: nowrap;
}
.chat-answer-btn-wrap > button.on {
  background-color: #9DD1FB;
  color: #327BC7;
}
.chat-answer-btn-wrap > .answer-all-btn {
  margin-left: 10px;
}
.chat-answer-btn-wrap > .answer-close-btn {
  margin-left: 14px;
}

/* 복제된 질문 =================== */
.comment-area._answer._my .comment-content-box,
.comment-area._answered._my .comment-content-box {
  background: #F0F0F0;
  color: #666;
}


/* TOP Notice CSS ============ */
/* TOP Notice Button */
.chat-notice-btn-box {
  display: flex;
  align-items: end;
  height: 100%;
  margin-right: 5px;
}
.chat-notice-submit-btn {
  border: none !important;
  display: block;
  height: 100%;
  background-color: #E4E4E4;
  border-radius: 6px;
  cursor: pointer;
  padding: 0 10px;
  max-height: 36px;
}
.chat-notice-submit-btn.active {
  background-color: #9DD1FB;
}
.chat-notice-submit-btn > span {
  letter-spacing: -0.02em;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.4;
  color: #A2A2A2;
}
.chat-notice-submit-btn.active > span {
  color: #327BC7;
}

/* TOP Notice Fixed Message ================= */
.chat-content-wrap {
  position: relative;
}
.notice-chat-area {
  position: sticky;
  top: 12px;
  left: 50%;
  transform: translateX(-8px);
  display: block;
  box-sizing: border-box;
  width: calc( 100% + 16px );
  z-index: 1;
  overflow-x: clip !important;
  margin-bottom: 10px;
}
.notice-chat-box {
  display: block;
  background-color: #E2F3FF;
  border-radius: 8px;
  padding: 14px 18px 14px 18px;
}
.notice-chat-wrap {
  display: flex;
  gap: 12px;
  height: 100%;
}
.notice-chat-wrap > div {display: block;}
.notice-chat-area .notice-icon {
  flex-shrink: 0;
  width: 20px; height: 20px;
}
.notice-chat-area .notice-swch-icon {
  flex-shrink: 0;
  width: 20px; height: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.notice-chat-area .notice-icon > img {
  display: block;
  width: 100%; height: 100%;
}
.notice-chat-area .notice-swch-icon > img {
  display: block;
  width: 14px; height: 8px;
  transition: 0.3s ease-in-out;
}
.notice-cont {flex-grow: 1;}
.notice-chat-area .notice-cont span {
  display: block;
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: #00558F;
  font-weight: 400;
  word-break: break-word;
  transition: max-height 0.3s ease-in-out;
  max-height: 1000px;
  overflow: hidden;
}
.chat-content-wrapper.notice-fold-on .notice-chat-area .notice-cont span {
  text-overflow: ellipsis;
  overflow: hidden;
  word-break: break-word;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  max-height: 4.2em;
}
.notice-chat-area .notice-cont span a {
  color: #18A0FB;
  word-break: break-all;
}
.chat-content-wrapper.notice-fold-on .notice-swch-icon > img {
	transform: rotateZ(180deg);
}
.chat-messages-box:has(.chat-write-answer-tab) .chat-notice-btn-box {
  cursor: not-allowed;
}
.chat-messages-box:has(.chat-write-answer-tab) .chat-notice-submit-btn {
	pointer-events : none;
}


/* Modal ================================= */
.attn-modal {
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}
.youtube-live-box.m-active+.attn-modal {z-index: 99999;}
.attn-modal-box {
  display: block;
  position: relative;
  background-color: #fff;
  border-radius: 8px;
  width: 100%;
  max-width: 642px;
  box-shadow: 0 4px 40px rgba(0, 0, 0, 0.25);
  margin: 0 20px;
}
.attn-modal button {cursor: pointer;}
.attn-close-btn {
  position: absolute;
  top: 14px; right: 14px;
}
.attn-modal-wrap {
  display: block;
  padding: 56px 40px 64px;
}
.attn-modal-cont {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.4;
  letter-spacing: -0.06em;
  text-align: center;
  word-break: keep-all;
}
.attn-modal-cont > img {
  display: block; width: 46px; height: 46px;
}
.attn-modal-cont > span {
  font-size: 24px;
  font-weight: 600;
  color: #212B38;
  margin-top: 14px;
}
.attn-modal-cont a {
  color: #18A0FB !important;
  word-break: break-all !important;
}
.attn-modal-cont .attn-modal-txt {
  font-weight: 400;
  font-size: 18px;
  color: #666;
  padding: 0 14px;
  margin-top: 10px;
  margin-bottom: 40px;
}
.attn-modal-btn-list {
  display: flex;
  width: 100%;
  gap: 20px;
}
.attn-modal-btn-list > button {
  width: 100%;
  padding: 12px;
  border: none;
  background-color: #EDEDED;
  border-radius: 8px;
  font-size: 20px;
  color: #A2A2A2;
  line-height: 1.2;
  letter-spacing: -0.06em;
  word-break: keep-all;
}
.attn-modal-btn-list > button:hover {
  border: none !important;
}
.attn-modal-btn-list > button.attn-ok-btn {
  background-color: #18A0FB;
  color: #fff;
}
@media screen and (max-width: 767px) {
  .attn-modal-wrap {padding: 30px 20px 36px;}
  .attn-modal-cont > span {font-size: 18px;}
  .attn-modal-cont .attn-modal-txt {
    font-size: 15px;
    margin-bottom: 24px;
  }
  .attn-modal-btn-list {gap: 8px;}
  .attn-modal-btn-list > button {font-size: 14px;}
}


/* ===============admin page layout */
.wp_admin_livechat_section {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  align-items: flex-start;
  margin-bottom: 30px;
}
.wp_admin_livechat_section h2,
.wp_admin_livechat_section h3 {
  margin: 0;
}
.wp_admin_livechat_section form {
  max-width: 618px;
  margin-left: 50px;
  box-sizing: border-box;
}
.wp_admin_livechat_section form > h3 {
  margin-bottom: 20px;
}
.wp_admin_livechat_section form > div {
  display: flex;
  flex-direction: row;
  align-items: center;
  margin-bottom: 12px;
}
.wp_admin_livechat_section form > div:last-of-type {
  align-items: flex-start;
  margin-bottom: 30px;
}
.wp_admin_livechat_section form > .live_tit {
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #ccc;
}
.wp_admin_livechat_section form > .live_tit > h2 {
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.wp_admin_livechat_section form > .live_tit > h2:first-child {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  color: #003E67;
}
.wp_admin_livechat_section form label {width: 80px;}
.wp_admin_livechat_section form select,
.wp_admin_livechat_section form input[type=text],
.wp_admin_livechat_section form textarea  {
  margin: 0;
}
.wp_admin_livechat_section form textarea {
  height: 6.25em;
  resize: none;
}
.wp_admin_livechat_section form input[type=text],
.wp_admin_livechat_section form textarea {
  flex-grow: 1;
}
.wp_admin_livechat_section form input[type=submit] {
  display: block;
  padding: 0 24px;
  font-size: 15px;
  width: 100%;
}

@media screen and (max-width: 1200px) {
  .wp_admin_livechat_section {
    flex-direction: column;
  }
  .wp_admin_livechat_section form {
    width: 100%; margin: 0 0 20px 0;
  }
  .wp_admin_livechat_section form > div:last-of-type {margin-bottom: 20px;}
}
@media screen and (max-width: 782px) {
  .wp_admin_livechat_section form > .live_tit > h2:last-child {
    font-size: 16px;
  }
  .chat-messages-box.admin-chat-ver {height: 75vh;}
  .wp_admin_livechat_section form > div {margin: 8px;}
  .wp_admin_livechat_section form label {width: 74px;}
  .wp_admin_livechat_section form select {
    min-height: 20px;
    padding: 5px 24px 5px 8px;
    line-height: 1.4;
    font-size: 15px;
    margin: 0;
  }
  .wp_admin_livechat_section form input[type=text],
  .wp_admin_livechat_section form textarea {
    font-size: 15px;
    min-height: 20px;
    height: 4.5em;
  }
  .wp_admin_livechat_section form input[type=text] {
    height: auto;
  }
}
