/* ============================================
   프로젝트 상세 모달 스타일
   ============================================ */

/* 모달 컨테이너 */
.project-detail-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 모달 오버레이 */
.project-detail-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

/* 모달 콘텐츠 */
.project-detail-content {
  position: relative;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  background-color: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 닫기 버튼 */
.project-detail-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  padding: 0;
  background-color: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: #333;
  transition: all 0.2s;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-detail-close:hover {
  background-color: white;
  color: #F56342;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 모달 본문 */
.project-detail-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* 썸네일 */
.project-detail-thumbnail {
  width: 100%;
  height: 400px;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
}

.project-detail-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 예산 정보 섹션 */
.project-budget-section {
  margin: 16px 0;
  padding: 16px;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-radius: 8px;
  border: 1px solid #dee2e6;
}

.budget-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f0f0f;
  margin-bottom: 12px;
}

.project-budget-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  overflow: hidden;
}

.project-budget-table td {
  padding: 10px 12px;
  font-size: 13px;
  border-bottom: 1px solid #e8e8e8;
}

.project-budget-table td:first-child {
  color: #666;
  font-weight: 500;
  width: 40%;
}

.project-budget-table td:last-child {
  text-align: right;
  font-weight: 600;
}

.project-budget-table tr:last-child td {
  border-bottom: none;
}

.budget-value {
  color: #F56342;
  font-size: 14px;
}

.reward-value {
  color: #4a90e2;
  font-size: 13px;
}

/* 프로젝트 정보 */
.project-detail-info {
  padding: 0 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 제목 */
.project-detail-title {
  font-size: 28px;
  font-weight: 700;
  color: #0f0f0f;
  margin: 0;
}

/* 설명 */
.project-detail-description {
  font-size: 16px;
  color: #666;
  line-height: 1.6;
  margin: 0;
}

/* 태그 */
.project-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-tag {
  padding: 6px 14px;
  background-color: #f5f5f5;
  border-radius: 16px;
  font-size: 13px;
  color: #666;
  border: 1px solid #e0e0e0;
}

/* 작성자 정보 */
.project-detail-author {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  background-color: #f9f9f9;
  border-radius: 12px;
  border: 1px solid #e8e8e8;
}

.author-profile {
  display: flex;
  align-items: center;
  gap: 16px;
}

.author-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F56342, #d94a2e);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  font-weight: 700;
}

.author-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.author-name,
#projectAuthorName {
  font-size: 16px;
  font-weight: 600;
  color: #000000 !important;
}

.author-occupation {
  font-size: 14px;
  color: #999;
}

/* 친구 추가 버튼 */
.btn-add-friend {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #4a90e2, #357abd);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-add-friend:hover {
  background: linear-gradient(135deg, #357abd, #2868a8);
  box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.btn-add-friend:active {
  transform: translateY(1px);
}

.btn-add-friend.added {
  background: #28a745;
  cursor: default;
}

.btn-add-friend.added:hover {
  background: #28a745;
  box-shadow: none;
}

.icon-user-add {
  width: 18px;
  height: 18px;
}

/* 프로젝트 들어가기 액션 */
.project-detail-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-enter-project {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #F56342, #d94a2e);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  justify-content: center;
}

.btn-enter-project:hover {
  background: linear-gradient(135deg, #d94a2e, #c43d22);
  box-shadow: 0 4px 16px rgba(245, 99, 66, 0.4);
  transform: translateY(-2px);
}

.btn-enter-project:active {
  transform: translateY(0);
}

.btn-enter-project svg {
  width: 20px;
  height: 20px;
}

/* 메타 정보 */
.project-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding-top: 16px;
  border-top: 1px solid #e8e8e8;
}

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

.meta-icon {
  width: 18px;
  height: 18px;
  color: #999;
}

/* 반응형 */
@media (max-width: 768px) {
  .project-detail-content {
    width: 95%;
    max-height: 95vh;
  }

  .project-detail-thumbnail {
    height: 250px;
  }

  .project-detail-info {
    padding: 0 20px 20px;
  }

  .project-detail-title {
    font-size: 22px;
  }

  .project-detail-description {
    font-size: 14px;
  }

  .project-detail-author {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }

  .btn-add-friend {
    width: 100%;
    justify-content: center;
  }

  .project-detail-meta {
    gap: 12px;
  }

  .meta-item {
    font-size: 13px;
  }
}

/* 프로젝트 진행 상황 스타일 */
.project-progress-section {
  margin: 24px 0;
  padding: 20px;
  background-color: #f9f9f9;
  border-radius: 12px;
  border: 1px solid #e8e8e8;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.progress-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f0f0f;
  margin: 0;
}

.progress-percentage {
  font-size: 18px;
  font-weight: 700;
  color: #F56342;
}

/* 프로그레스 바 */
.progress-bar-container {
  width: 100%;
  height: 8px;
  background-color: #e8e8e8;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 24px;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #F56342, #ff7a5c);
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* 진행 단계 */
.progress-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.progress-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background-color: #ffffff;
  border-radius: 8px;
  border: 1px solid #e8e8e8;
  transition: all 0.2s;
}

.progress-step:hover {
  border-color: #d0d0d0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* 완료된 단계 */
.progress-step.completed {
  border-color: #28a745;
  background-color: #f0f9f4;
}

.progress-step.completed .step-icon {
  background-color: #28a745;
  color: white;
}

.progress-step.completed .step-status {
  color: #28a745;
  font-weight: 600;
}

/* 진행중인 단계 */
.progress-step.active {
  border-color: #F56342;
  background-color: #fff8f6;
}

.progress-step.active .step-icon {
  background-color: #F56342;
  color: white;
  animation: pulse 2s infinite;
}

.progress-step.active .step-status {
  color: #F56342;
  font-weight: 600;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* 단계 아이콘 */
.step-icon {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #e8e8e8;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-weight: 600;
  transition: all 0.3s;
}

.step-number {
  font-size: 16px;
}

/* 단계 정보 */
.step-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.step-label {
  font-size: 14px;
  font-weight: 600;
  color: #0f0f0f;
}

.step-status {
  font-size: 12px;
  color: #999;
}

/* 견적 정보 섹션 */
.project-estimate-section {
  margin: 20px 0;
  padding: 20px;
  background-color: #f9f9f9;
  border-radius: 12px;
  border: 1px solid #e8e8e8;
}

.estimate-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f0f0f;
  margin: 0 0 16px 0;
}

.estimate-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.estimate-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: white;
  border-radius: 8px;
  border: 1px solid #e8e8e8;
}

.estimate-item-name {
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

.estimate-item-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.estimate-item-qty {
  font-size: 12px;
  color: #999;
}

.estimate-item-price {
  font-size: 14px;
  font-weight: 600;
  color: #F56342;
}

.estimate-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: linear-gradient(135deg, #F56342, #d94a2e);
  border-radius: 8px;
  color: white;
  font-weight: 600;
}

.estimate-total-value {
  font-size: 20px;
  font-weight: 700;
}

/* 연결된 항목 섹션 (라이브러리/상품 공통) */
.linked-items-section {
  margin: 20px 0;
  padding: 16px;
  background-color: rgba(78, 205, 196, 0.1);
  border-radius: 12px;
  border: 1px solid rgba(78, 205, 196, 0.3);
}

.linked-items-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f0f0f;
  margin: 0 0 12px 0;
}

.linked-items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.linked-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: white;
  border-radius: 8px;
  border: 1px solid #e8e8e8;
  cursor: pointer;
  transition: all 0.2s;
}

.linked-item:hover {
  border-color: #4ECDC4;
  box-shadow: 0 2px 8px rgba(78, 205, 196, 0.2);
}

.linked-item-image {
  width: 50px;
  height: 50px;
  border-radius: 6px;
  object-fit: cover;
  background: #f0f0f0;
}

.linked-item-info {
  flex: 1;
}

.linked-item-name {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 2px;
}

.linked-item-price {
  font-size: 12px;
  color: #F56342;
  font-weight: 500;
}

.linked-item-badge {
  padding: 4px 8px;
  background: #4ECDC4;
  color: white;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

/* 반응형 */
@media (max-width: 768px) {
  .project-progress-section {
    padding: 16px;
    margin: 16px 0;
  }

  .progress-title {
    font-size: 14px;
  }

  .progress-percentage {
    font-size: 16px;
  }

  .progress-steps {
    gap: 8px;
  }

  .progress-step {
    padding: 10px;
    gap: 10px;
  }

  .step-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
  }

  .step-label {
    font-size: 13px;
  }

  .step-status {
    font-size: 11px;
  }
}
