﻿@charset "UTF-8";

/* #### 첨부 이미지 표시 #### */
.attached-images {
  margin-bottom: 24px;
  padding: 16px;
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
}

.attached-images h4 {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: #495057;
}

.image-gallery {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.image-item {
  position: relative;
  text-align: center;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 30px 10px 10px 10px;
  background: white;
}

.image-item img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 4px;
}

.image-caption {
  position: absolute;
  top: 4px;
  left: 4px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 500;
  z-index: 1;
  pointer-events: none;
}

/* #### Q&A #### */
.qna-answer {
  padding-top: 16px;
  margin-top: 24px;
  border-top: 2px solid #F1F1F5;
}
.qna-answer > h5 {
  font-size: 16px;
  font-weight: 600;
}
.qna-answer>h5 b {
  display: inline-block;
  margin-left: 4px;
  font-weight: 600;
}
.form_qna_answer {
  margin-top: 16px;
}
.form_qna_answer .input_answer {
  display: flex;
  align-items: center;
  gap: 8px;
}
.form_qna_answer .input_answer input {
  flex: 1;
}
.form_qna_answer .input_answer .btn {
  width: 113px;
  flex-shrink: 0;
  align-self: flex-end;
}
.qna-answer__item {
  padding: 16px 0;
  border-bottom: 2px solid #dee2e6;
}
.answer-reg__info {
  display: flex;
  justify-content: space-between;
  align-items:flex-start;
}
.answer-reg__info .reg_info {
  display: flex;
  align-items: center;
  gap: 8px;
}
.answer-reg__info .reg_info .reg_thum {
  display: inline-block;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
}
.answer-reg__info .reg_info .reg_thum img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.answer-reg__info .reg_info h4 {
  font-size: 18px;
  font-weight: 600;
  color: #111;
}
.answer-reg__info .yes_answer {
  display: inline-block;
  padding: 0 12px;
  background-color: #EBF0F9;
  color: var(--color-brand);
  text-align: center;
  width: auto;
  height: 30px;
  line-height: 30px;
  border-radius: 800px;
  font-size: 16px;
  font-weight: 600;
  margin-left: 4px;
}
.answer-reg__info .answer_reg .reg_date {
  line-height: 1.5;
  color: #767676;
  margin-top: 4px;
}
.qna-answer__item .answer_menu {
  position: relative;
}
.qna-answer__item .answer_menu .btn_menu {
  display: inline-block;
  width: 24px;
  height: 24px;
  background: url(/_img/icon/icon_answer_menu.svg) no-repeat center / contain;
}
.qna-answer__item .answer_menu .answer_menu--ul {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  border-radius: 8px;
  background-color: #fff;
  z-index: 10;
  box-shadow: 0 0 10px rgb(0, 0, 0, 0.16);
}
.qna-answer__item .answer_menu.open .answer_menu--ul {
  display: block;
}
.qna-answer__item .answer_menu .answer_menu--ul li {
  min-width: 60px;
  height: 36px;
  line-height: 36px;
  text-align: center;
  font-size: 16px;
}
.qna-answer__item .answer_content {
  margin-top: 8px;
}
.qna-answer__item .answer_content p {
  line-height: 1.6;
  color: #333;
}
.tag__list {
  margin-top: 8px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.tag__list .tag {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: #F1F1F5;
  padding: 0 16px;
  height: 30px;
  border-radius: 8px;
}
.tag__list .tag span {
  font-size: 16px;
  font-weight: 700;
  color: #767676;
  line-height: 1.5;
}
.tag__list .tag .btn_delete_tag {
  display: inline-block;
  width: 16px;
  height: 16px;
  background: url(/_img/icon/icon_delete_tag.svg) no-repeat center center / contain;
}
/* #### FAQ #### */
.faq-type__wrap {
  overflow-x: auto;
}
.faq-type__wrap::-webkit-scrollbar {
  display: none;
}
.faq-type__list {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
}
.faq-type label {
  display: flex;
  align-items: center;
  font-size: 18px;
  font-weight: 600;
}
.faq-type input[type=radio],
.faq-type input[type=checkbox] {
  display: none;
}
.faq-type input[type=radio]+em,
.faq-type input[type=checkbox]+em {
  display: flex;
  justify-content: center;
  align-items: center;
  width: max-content;
  height: 41px;
  padding: 0 16px;
  font-style: normal;
  background-color: #F1F1F5;
  color: #999;
  border-radius: 100px;
}
.faq-type input[type=radio]:checked+em,
.faq-type input[type=checkbox]:checked+em {
  background-color: #111;
  color: #fff;
}
.faq__list {
  margin-top: 40px;
}
.faq__list .faq__item {
  padding: 24px 0;
  border-bottom: 1px solid #F1F1F5;
}
.faq__list .faq__item:first-child {
  padding-top: 0px;
}
.faq__item .faq_question {
  padding: 0 16px;
  cursor: pointer;
}
.faq__item .faq_question h3 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  color: #111;
  position: relative;
  padding-right: 24px;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.faq__item .faq_question h3::after {
  content: '';
  display: inline-block;
  width: 20px;
  height: 14px;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  transition: 0.5s;
  background: url(/_img/icon/icon_gnb_arrow.svg) no-repeat center center/ contain;
}
.faq__item .faq_answer {
  background-color: #F5F7FC;
  border-radius: 8px;
  margin-top: 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, margin-top 0.4s ease, opacity 0.3s ease;
  visibility: hidden;
}

.faq__item .faq_answer__content {
padding: 16px;
}

.faq__item .faq_answer__content p {
margin: 0;
white-space: pre-wrap;
overflow-wrap: anywhere;
word-break: break-word;
line-height: 1.6;
color: #333;
}

.faq__item .faq_answer__content pre code {
  white-space: pre-wrap;  /* 줄바꿈/공백 유지 */
  font-family: monospace;
}

.faq__item.open .faq_question h3::after {
  transform: translateY(-50%) scaleY(-1);
}

.faq__item.open .faq_answer {
  margin-top: 24px;
  max-height: 200px;
  opacity: 1;
  visibility: visible;
}

@media screen and (max-width:767px) {
  .qna__top .list__btns {
    flex-wrap: wrap;
  }
  .qna__top .list__btns .select--typeA {
    width: 100%;
  }
  .qna__top .list__btns .btn {
    width: calc(50% - 4px);
  }
  /* 단일 버튼일시 너비 100% */
  .qna__top .list__btns:not(:has(.btn + .btn)) .btn {
    width: 100%;
  }
  .qna-answer {
    padding-top: 20px;
    margin-top: 20px;
  }
  .qna-answer>h5 {
    font-size: 12px;
  }
  .form_qna_answer .input_answer {
    flex-direction: column;
  }
  .form_qna_answer .input_answer input {
    flex: none;
  }
  .form_qna_answer .input_answer .btn {
    width: 100%;
    height: 48px;
    line-height: 48px;
    font-size: 16px;
  }
  .qna-answer__list {
    margin-top: 20px;
  }
  .qna-answer__item {
    padding: 20px 0;
  }
  .answer-reg__info .reg_info {
    align-items: baseline;
  }
  .answer-reg__info .reg_info .reg_thum {
    width: 20px;
    height: 20px;
  }
  .answer-reg__info .reg_info h4 {
    font-size: 16px;
  }
  .answer-reg__info .yes_answer {
    padding: 0 8px;
    height: 26px;
    line-height: 26px;
    font-size: 13px;
  }
  .answer-reg__info .answer_reg .reg_date {
    font-size: 12px;
    transform: translateX(-28px);
    margin-top: 2px;
  }
  .qna-answer__item .answer_menu .btn_menu {
    width: 20px;
    height: 20px;
  }
  .qna-answer__item .answer_menu .answer_menu--ul li {
    height: 32px;
    line-height: 32px;
    font-size: 14px;
    min-width: 48px;
  }
  .qna-answer__item .answer_content p {
    font-size: 14px;
  }
  
  .tag__list {
    gap: 4px;
  }
  .tag__list .tag {
    padding: 0 8px;
    height: 28px;
  }
  .tag__list .tag span {
    font-size: 14px;
  }
  
  .faq-type__list {
    margin-top: 20px;
  }
  .faq-type label {
    font-size: 14px;
  }
  .faq-type input[type=radio]+em,
  .faq-type input[type=checkbox]+em {
    height: 36px;
  }
  .faq__list {
    margin-top: 20px;
  }
  .faq__list .faq__item {
    padding: 12px 0;
  }
  .faq__item .faq_question {
    padding: 0 8px;
  }
  .faq__item .faq_question h3 {
    font-size: 16px;
    line-height: 1.6;
    padding-right: 18px;
  }
  .faq__item .faq_question h3::after {
    width: 10px;
    height: 7px;
  }
  .faq__item .faq_answer p {
    padding: 8px;
    font-size: 14px;
    line-height: 1.6;
  }
  .faq__item.open .faq_answer {
    margin-top: 4px;
  }
}

/* 추가한 CSS */

/* 첨부파일 목록 박스 스타일 */
#wrap .register__inner .input--typeA .attach-list {
  display: grid;
  gap: 8px;
}
#wrap .register__inner .input--typeA .attach-item {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}
#wrap .register__inner .input--typeA .attach-item .attach-order {
  color: #767676;
  min-width: 24px;
  text-align: right;
}
#wrap .register__inner .input--typeA .attach-item input[type="file"].form-control {
  flex: 1 1 auto;
  min-width: 0;
  height: 32px;
  padding: 0 12px;
  border: none;
  background: transparent;
  box-shadow: none;
}
#wrap .register__inner .input--typeA .attach-item.has-file {
  border-color: #cfcfcf;
}
#wrap .register__inner .input--typeA .attach-item .btn_remove_attach {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}
#wrap .register__inner .input--typeA .attach-item .btn_remove_attach:hover {
  background: #f5f5f5;
}

/* "+추가" 버튼과 힌트 오른쪽 정렬 및 크기 상향 */
#wrap .register__inner .input--typeA .input_content--attach {
  display: grid;
  gap: 8px;
  align-items: start;
  grid-auto-rows: max-content;
}
#wrap .register__inner .input--typeA .input_content--attach #addAttachmentBtn,
#wrap .register__inner .input--typeA .input_content--attach .help-txt {
  justify-self: end;
}
#wrap .register__inner .input--typeA .input_content--attach #addAttachmentBtn {
  min-height: 38px;
  padding: 0 14px;
  font-size: 14px;
  border-radius: 8px;
  border: 1px solid #000;
  background-color: #fff;
  color: #111;
}
#wrap .register__inner .input--typeA .input_content--attach .help-txt-fileCount,
#wrap .register__inner .input--typeA .input_content--attach .help-txt-fileExtension {
  font-size: 14px;
  text-align: right;
}

/* 에러 메시지 스타일 */
#wrap .register__inner .input--typeA .input_content--attach .help-txt-fileCount.error,
#wrap .register__inner .input--typeA .input_content--attach .help-txt-fileExtension.error {
  color: #ff0000 !important;
  font-weight: bold !important;
  text-align: right !important;
}

/* Add button disabled state */
#wrap .register__inner .input--typeA .input_content--attach #addAttachmentBtn.is-disabled {
  background-color: #d9d9d9;
  color: #fff;
  border-color: transparent;
  cursor: not-allowed;
}

/* 파일 입력 기본 버튼 스타일 */
#wrap .register__inner .input--typeA .attach-item input[type="file"]::file-selector-button {
  height: 32px;
  padding: 0 12px;
  margin-right: 8px;
  border: 1px solid #E5E5EC;
  border-radius: 6px;
  background: #F5F7FC;
  color: #333;
  font-size: 14px;
  cursor: pointer;
}
#wrap .register__inner .input--typeA .attach-item input[type="file"]::-webkit-file-upload-button {
  height: 32px;
  padding: 0 12px;
  margin-right: 8px;
  border: 1px solid #E5E5EC;
  border-radius: 6px;
  background: #F5F7FC;
  color: #333;
  font-size: 14px;
  cursor: pointer;
}

/* 게시판dtl pre-wrap 설정 */
#wrap .layout__contents .detail__contents.pre-wrap {
  white-space: pre-wrap;
  width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
}

#wrap .layout__contents .detail__contents {
  white-space: normal;
  padding: 24px 0;
  font-size: 16px;
  line-height: 1.4;
  color: #111;
}

/* qna detail: answer edit */
#editablePostBody {
  min-height: 130px;
  height: auto;
  white-space: pre-wrap;
  /* 줄바꿈과 공백을 유지합니다 */
  display: block;
  /* div가 block 요소임을 명확히 합니다. */ 
  width: 100%;
  padding: 10px;
  font-size: 16px;
  overflow-y: hidden;
}

#editablePostBody:empty:before {
  content: attr(aria-placeholder);
  color: #999;
  pointer-events: none;
}

.answer-help {
  color: #666;
  font-size: 14px;
  margin-top: 8px;
}

.answer_menu--ul .form_delete_answer {
    margin: 0;
}
.answer_menu--ul .btn_delete_answer {
    background: none;
    border: none;
    padding: 0;
    color: inherit;
    font: inherit;
    cursor: pointer;
    text-align: left;
    width: 100%;
}

/* Toast Notification Styles */
.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast-message {
  background-color: #ff4d4f;
  color: white;
  padding: 15px 20px;
  border-radius: 5px;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
  transform: translateY(-150%);
}
.toast-message.show {
  opacity: 1;
  transform: translateY(0);
}

/* ===== 커스텀 Select 드롭다운 스타일 ===== */
.custom-select-container {
  position: relative;
  display: inline-block;
  width: 100%;
}

.custom-select-display {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid #E5E5EC;
  border-radius: 8px;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-size: 16px;
  color: #111;
  position: relative;
  background-image: url(/_img/icon/icon_select_arrow.svg);
  background-repeat: no-repeat;
  background-position: center right 16px;
  background-size: 10px 7px;
  transition: border-color 0.2s ease;
}

.custom-select-display:hover {
  border-color: #0B3EB3;
}

.custom-select-display:focus {
  outline: none;
  border-color: #0B3EB3;
  box-shadow: 0 0 0 2px rgba(11, 62, 179, 0.1);
}

.custom-select-dropdown {
  visibility: hidden;
  height: 0;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: #fff;
  border-radius: 8px;
  z-index: 9999;
  box-shadow: 0 0 10px rgb(0, 0, 0, 0.16);
  margin: 4px 0 0 0;
  padding: 0;
  list-style: none;
  overflow: hidden;
  transition: none;
  border: 1px solid #E5E5EC;
}

.custom-select-dropdown.open {
  visibility: visible;
  height: auto;
  padding: 8px 0;
  transition: 0.35s;
}

.custom-select-option {
  opacity: 0;
  height: 40px;
  line-height: 40px;
  padding: 0 16px;
  cursor: pointer;
  transition: 0.1s 0s;
  color: #111;
  font-size: 16px;
  position: relative;
  z-index: 10000;
  background-color: #fff;
}

.custom-select-dropdown.open .custom-select-option {
  opacity: 1;
  transition: 0.3s 0.2s;
}

.custom-select-option:hover {
  background-color: #E5E5EC;
}

.custom-select-option.selected {
  background-color: #F5F7FC;
  color: #0B3EB3;
  font-weight: 600;
}

/* Search box select 폭 조정 - PC에서 반으로 줄이기 */
.form_search_list .search__box .custom-select-container {
  width: auto;
  min-width: 60px;
  max-width: 100px;
}

/* List buttons select 폭 조정 */
.list__btns .custom-select-container {
  width: auto;
  min-width: 150px;
  max-width: 250px;
}

/* qna-type2-list에서만 카테고리 선택상자 크기 400px로 확장 */
.qna-type2-category {
  width: auto !important;
  min-width: 300px !important;
  max-width: 400px !important;
}

/* Register form select 폭 조정 */
.register_box .custom-select-container.mw240 {
  max-width: 300px;
  min-width: 250px;
}

/* ToastUI Editor placeholder 표시 설정 - 겹침 방지 */
.toastui-editor .toastui-editor-contents .ProseMirror:empty::before {
  content: attr(data-placeholder);
  color: #999;
  pointer-events: none;
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  background-color: transparent;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-start;
  padding: 8px;
  box-sizing: border-box;
}

/* WYSIWYG 모드에서 placeholder 표시 */
.toastui-editor .toastui-editor-contents .ProseMirror:empty:before {
  content: attr(data-placeholder);
  color: #999;
  pointer-events: none;
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  background-color: transparent;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-start;
  padding: 8px;
  box-sizing: border-box;
}

/* ToastUI Editor 컨테이너 스타일 조정 */
.toastui-editor {
  border: 1px solid #E5E5EC;
  border-radius: 8px;
  position: relative;
  z-index: 1;
  height: auto !important;
}

.toastui-editor .toastui-editor-contents {
  min-height: 500px;
  height: auto !important;
}

/* ToastUI Editor 높이 자동 조절을 위한 추가 스타일 */
.toastui-editor .toastui-editor-md-container,
.toastui-editor .toastui-editor-ww-container {
  height: auto !important;
}

.toastui-editor .toastui-editor-md-container .toastui-editor-md-preview,
.toastui-editor .toastui-editor-ww-container .toastui-editor-ww-container {
  height: auto !important;
}

/* 반응형 대응 */
@media screen and (max-width: 767px) {
  .custom-select-display {
    height: 48px;
    font-size: 16px;
  }
  
  .custom-select-option {
    height: 40px;
    line-height: 40px;
    font-size: 16px;
  }
  
  /* 모바일에서 search box select 폭 조정 */
  .form_search_list .search__box .custom-select-container {
    width: 100%;
    max-width: 100%;
  }
  
  /* 모바일에서 list buttons select 폭 조정 */
  .list__btns .custom-select-container {
    width: 100%;
    max-width: 100%;
  }
  
  /* 모바일에서 qna-type2-list 카테고리 선택상자도 100% 폭 */
  .qna-type2-category {
    width: 100% !important;
    max-width: 100% !important;
    min-width: auto !important;
  }
  
  /* 모바일에서 register form select 폭 조정 */
  .register_box .custom-select-container.mw240 {
    width: 100%;
    max-width: 100%;
    min-width: auto;
  }
}
