/**
 * Inquiry Modal Base Styles
 * 모달 기본 구조, 탭, 공통 요소
 */

/* 모달 오버레이 */
.inquiry-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.inquiry-modal.active {
  opacity: 1;
  visibility: visible;
}

/* 오버레이 배경 */
.inquiry-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* 모달 컨텐츠 */
.inquiry-modal-content {
  position: relative;
  background: white;
  border-radius: 12px;
  width: 100%;
  max-width: 600px;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.inquiry-modal.active .inquiry-modal-content {
  transform: scale(1) translateY(0);
}

/* 모달 헤더 */
.inquiry-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e0e0e0;
  background: #f9f9f9;
}

.inquiry-modal-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #333;
}

/* 닫기 버튼 */
.inquiry-modal-close {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: #666;
  transition: all 0.2s ease;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.inquiry-modal-close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #333;
}

.inquiry-modal-close svg {
  width: 24px;
  height: 24px;
}

/* 탭 네비게이션 */
.inquiry-tabs {
  display: flex;
  border-bottom: 2px solid #e0e0e0;
  background: white;
}

.inquiry-tab {
  flex: 1;
  padding: 16px 20px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  transition: all 0.2s ease;
  position: relative;
}

.inquiry-tab:hover {
  background: rgba(102, 126, 234, 0.05);
  color: #667eea;
}

.inquiry-tab.active {
  color: #667eea;
  font-weight: 600;
}

.inquiry-tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 3px;
  background: #667eea;
  border-radius: 3px 3px 0 0;
}

.inquiry-tab svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* 탭 컨텐츠 */
.inquiry-tab-content {
  flex: 1;
  overflow-y: auto;
  background: white;
}

.inquiry-tab-panel {
  display: none;
  padding: 24px;
  animation: fadeIn 0.3s ease;
}

.inquiry-tab-panel.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 공통 버튼 스타일 */
.inquiry-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.inquiry-btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.inquiry-btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #7c8ff0 0%, #8a5bb8 100%);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.inquiry-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.inquiry-btn-secondary {
  background: #f5f5f5;
  color: #666;
}

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

/* 로딩 스피너 */
.inquiry-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #666;
}

.inquiry-loading .spinner {
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
  color: #667eea;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 상태 배지 */
.inquiry-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.inquiry-status-badge.pending {
  background: #fff3cd;
  color: #856404;
}

.inquiry-status-badge.answered {
  background: #d4edda;
  color: #155724;
}

.inquiry-status-badge.closed {
  background: #d1ecf1;
  color: #0c5460;
}

/* 반응형: 모바일 */
@media (max-width: 767px) {
  .inquiry-modal {
    padding: 0;
    align-items: flex-end;
  }

  .inquiry-modal-content {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
  }

  .inquiry-modal.active .inquiry-modal-content {
    transform: translateY(0);
  }

  .inquiry-tab {
    padding: 14px 16px;
    font-size: 13px;
  }

  .inquiry-tab span {
    display: none;
  }
}

/* 다크 모드 */
@media (prefers-color-scheme: dark) {
  .inquiry-modal-content {
    background: #1e1e1e;
  }

  .inquiry-modal-header {
    background: #2a2a2a;
    border-bottom-color: #3a3a3a;
  }

  .inquiry-modal-header h2 {
    color: #e0e0e0;
  }

  .inquiry-tab-content {
    background: #1e1e1e;
  }
}
