/* ================================
   문의내역 전용 CSS (정리 최종본)
   ================================ */

/* 기본 스타일 (모바일 우선) */
main.page-inquiry-history {
  margin: 0 20px;
  margin-top: 20px;
  padding: 0;
  box-sizing: border-box;
}

/* 데스크톱 스타일 */
@media (min-width: 769px) {
  main.page-inquiry-history {
    margin: 30px 250px 0; /* 양옆 250px 마진 */
    padding: 0;           /* 내부 여백 제거 */
    height: auto;
  }
}

/* 결과 영역 */
main.page-inquiry-history .result {
  margin-top: 0;
  text-align: left;
}

/* 제목 */
main.page-inquiry-history .result h1 {
  margin-bottom: 10px;
  font-size: 28px;
  font-weight: 700;
  color: #333;
}

/* 테이블 공통 스타일 */
main.page-inquiry-history table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  border: 1px solid #ddd;
  background: #fff;
  margin-bottom: 30px;
  table-layout: fixed; /* 고정 테이블 레이아웃 사용 */
}

/* 컬럼별 너비 설정 */
main.page-inquiry-history table th:nth-child(1), /* 순번 */
main.page-inquiry-history table td:nth-child(1) {
  width: 8%;
  min-width: 60px;
}

main.page-inquiry-history table th:nth-child(2), /* 제목 */
main.page-inquiry-history table td:nth-child(2) {
  width: 25%;
  min-width: 150px;
}

main.page-inquiry-history table th:nth-child(3), /* 문의 내용 */
main.page-inquiry-history table td:nth-child(3) {
  width: 30%;
  min-width: 200px;
}

main.page-inquiry-history table th:nth-child(4), /* 문의유형 */
main.page-inquiry-history table td:nth-child(4) {
  width: 12%;
  min-width: 100px;
}

main.page-inquiry-history table th:nth-child(5), /* 이메일 */
main.page-inquiry-history table td:nth-child(5) {
  width: 15%;
  min-width: 120px;
}

main.page-inquiry-history table th:nth-child(6), /* 이름 */
main.page-inquiry-history table td:nth-child(6) {
  width: 10%;
  min-width: 80px;
}

main.page-inquiry-history thead th {
  height: 50px;
  padding: 12px 10px;
  background: #0B3D91;
  font-weight: 700;
  border-bottom: 2px solid #092b68;
  text-align: center;
  color: #fff;
  font-size: 16px;
}

main.page-inquiry-history tbody td {
  padding: 14px 10px;
  border-bottom: 1px solid #5b5b5b;
  text-align: center;
  color: #555;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: #fff;
}

/* 제목과 내용 컬럼은 줄바꿈 허용 */
main.page-inquiry-history tbody td:nth-child(2),
main.page-inquiry-history tbody td:nth-child(3) {
  white-space: normal;
  word-wrap: break-word;
  line-height: 1.4;
}

/* 행 hover 효과 */
main.page-inquiry-history tbody tr:hover {
  background: #f0f7ff !important;
  cursor: pointer;
}

main.page-inquiry-history tbody tr:hover td {
  background: #f0f7ff !important;
}

main.page-inquiry-history tbody tr[style*="cursor: pointer"]:hover {
  background: #e3f2fd;
}

/* 제목/내용 헤더는 중앙 정렬, 바디는 좌측 정렬 */
main.page-inquiry-history tbody td:nth-child(2),
main.page-inquiry-history tbody td:nth-child(3) {
  text-align: left;
}

/* 제목 열 스타일 */
main.page-inquiry-history tbody td:nth-child(2) {
  font-weight: 500;
  color: #333;
}

/* 내용 열 스타일 */
main.page-inquiry-history tbody td:nth-child(3) {
  color: #666;
}

/* 데이터 없을 때 표시 행 */
main.page-inquiry-history .empty-row {
  padding: 40px 0;
  text-align: center;
  color: #999;
  background: #fafafa;
  font-size: 16px;
  font-weight: 500;
}

/* 모바일 대응 */
@media (max-width: 768px) {
  main.page-inquiry-history {
    margin: 15px;
  }

  main.page-inquiry-history .result {
    text-align: left;
  }

  main.page-inquiry-history .result h1 {
    font-size: 22px;
    margin-bottom: 15px;
  }

  main.page-inquiry-history table {
    font-size: 12px;
    display: block;
    overflow-x: auto;
    min-width: 100%;
    border: none;
  }

  main.page-inquiry-history thead {
    display: table;
    width: 100%;
    table-layout: fixed;
  }

  main.page-inquiry-history tbody {
    display: table;
    width: 100%;
    table-layout: fixed;
  }

  /* 모바일에서 컬럼 너비 조정 */
  main.page-inquiry-history table th:nth-child(1),
  main.page-inquiry-history table td:nth-child(1) {
    width: 12%;
  }

  main.page-inquiry-history table th:nth-child(2),
  main.page-inquiry-history table td:nth-child(2) {
    width: 28%;
  }

  main.page-inquiry-history table th:nth-child(3),
  main.page-inquiry-history table td:nth-child(3) {
    width: 40%;
  }

  main.page-inquiry-history table th:nth-child(4),
  main.page-inquiry-history table td:nth-child(4) {
    width: 20%;
  }

  /* 이메일, 이름 열 숨기기 */
  main.page-inquiry-history table th:nth-child(5),
  main.page-inquiry-history table td:nth-child(5),
  main.page-inquiry-history table th:nth-child(6),
  main.page-inquiry-history table td:nth-child(6) {
    display: none;
  }

  main.page-inquiry-history thead th,
  main.page-inquiry-history tbody td {
    padding: 12px 6px;
    font-size: 12px;
    line-height: 1.5;
  }

  main.page-inquiry-history thead th {
    height: 44px;
  }

  main.page-inquiry-history tbody td {
    padding: 14px 6px;
  }

  /* 제목과 내용은 말줄임 처리 */
  main.page-inquiry-history tbody td:nth-child(2),
  main.page-inquiry-history tbody td:nth-child(3) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
