/**
 * Inquiry Modal History Styles
 * 문의 내역 관련 스타일
 */

/* 히스토리 컨테이너 */
.inquiry-history-container {
  width: 100%;
  height: 100%;
}

/* 목록 뷰 */
.inquiry-list-view {
  width: 100%;
}

/* 히스토리 헤더 */
.inquiry-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e0e0e0;
}

.inquiry-history-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

/* 새로고침 버튼 */
.inquiry-refresh-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  color: #666;
  transition: all 0.2s ease;
}

.inquiry-refresh-btn:hover {
  background: #f8f9fa;
  border-color: #667eea;
  color: #667eea;
}

.inquiry-refresh-btn:active {
  transform: scale(0.98);
}

.inquiry-refresh-btn svg {
  flex-shrink: 0;
}

.inquiry-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 문의 아이템 */
.inquiry-item {
  padding: 16px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
}

.inquiry-item:hover {
  border-color: #667eea;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
  transform: translateY(-1px);
}

.inquiry-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 12px;
}

.inquiry-item-title {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  margin: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inquiry-item-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #666;
}

.inquiry-item-date {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #666;
}

.inquiry-item-date svg {
  width: 14px;
  height: 14px;
}

.inquiry-item-answered {
  color: #667eea;
  font-weight: 500;
}

/* 빈 상태 */
.inquiry-empty {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.inquiry-empty svg {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  opacity: 0.3;
}

.inquiry-empty p {
  font-size: 15px;
  color: #666;
  margin: 0 0 8px 0;
}

.inquiry-empty small {
  font-size: 13px;
  color: #999;
}

/* 오류 상태 */
.inquiry-error {
  text-align: center;
  padding: 60px 20px;
  color: #e74c3c;
}

.inquiry-error svg {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.inquiry-error p {
  font-size: 14px;
  margin: 0;
}

/* 상세 뷰 */
.inquiry-detail-view {
  width: 100%;
}

.inquiry-back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  color: #666;
  transition: all 0.2s ease;
  margin-bottom: 20px;
}

.inquiry-back-btn:hover {
  background: #e0e0e0;
  color: #333;
}

.inquiry-back-btn svg {
  width: 20px;
  height: 20px;
}

/* 상세 헤더 */
.inquiry-detail-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid #e0e0e0;
}

.inquiry-detail-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.inquiry-detail-title-row h3 {
  font-size: 18px;
  font-weight: 700;
  color: #333;
  margin: 0;
  flex: 1;
}

.inquiry-detail-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #666;
}

.inquiry-detail-date {
  display: flex;
  align-items: center;
  gap: 4px;
}

.inquiry-detail-date svg {
  width: 14px;
  height: 14px;
}

/* 상세 내용 */
.inquiry-detail-content {
  margin-bottom: 24px;
}

.inquiry-detail-content h4 {
  font-size: 14px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  margin: 0 0 12px 0;
}

.inquiry-content-text {
  padding: 16px;
  background: #f9f9f9;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.6;
  color: #333;
  white-space: pre-wrap;
  word-break: break-word;
}

/* 답변 영역 */
.inquiry-answer {
  padding: 20px;
  background: #e8f4f8;
  border-left: 4px solid #667eea;
  border-radius: 8px;
}

.inquiry-answer h4 {
  font-size: 14px;
  font-weight: 600;
  color: #667eea;
  text-transform: uppercase;
  margin: 0 0 12px 0;
}

.inquiry-answer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.inquiry-answer-dates {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.inquiry-answer-date {
  font-size: 0.875rem;
  color: #718096;
  cursor: help;
}

.inquiry-answer-updated {
  font-size: 0.75rem;
  color: #a0aec0;
  font-style: italic;
  cursor: help;
}

.inquiry-answer-content {
  font-size: 14px;
  line-height: 1.6;
  color: #333;
  white-space: pre-wrap;
  word-break: break-word;
}

.inquiry-answer-content a {
  color: #667eea;
  text-decoration: underline;
  word-break: break-all;
}

.inquiry-answer-content a:hover {
  color: #764ba2;
}

/* 답변 없음 */
.inquiry-no-answer {
  text-align: center;
  padding: 40px 20px;
  background: #f9f9f9;
  border-radius: 8px;
  color: #999;
}

.inquiry-no-answer svg {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  opacity: 0.3;
}

.inquiry-no-answer p {
  font-size: 14px;
  color: #666;
  margin: 0 0 8px 0;
}

.inquiry-no-answer small {
  font-size: 13px;
  color: #999;
}

/* 텍스트 색상 명시 */
.inquiry-tab-panel p,
.inquiry-tab-panel div:not(.inquiry-status-badge) {
  color: #333;
}

/* 반응형: 모바일 */
@media (max-width: 767px) {
  .inquiry-item {
    padding: 14px;
  }

  .inquiry-item-title {
    font-size: 14px;
  }

  .inquiry-answer-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .inquiry-answer-dates {
    align-items: flex-start;
  }
}

/* 다크 모드 */
@media (prefers-color-scheme: dark) {
  .inquiry-item {
    background: #2a2a2a;
    border-color: #3a3a3a;
  }

  .inquiry-item-title {
    color: #e0e0e0;
  }

  .inquiry-content-text {
    background: #2a2a2a;
    color: #e0e0e0;
  }

  .inquiry-answer {
    background: #2a3a4a;
  }

  .inquiry-answer-content {
    color: #e0e0e0;
  }
}
