/* 디자인 의뢰 뷰 스타일 */

.design-request-view {
  position: fixed;
  top: 60px;
  left: 150px;
  right: 0;
  bottom: 0;
  background: var(--bg-primary, #f5f5f5);
  z-index: 100;
  overflow: hidden;
}

.design-request-container {
  display: flex;
  width: 100%;
  height: 100%;
}

/* 사이드바 */
.design-request-sidebar {
  width: 380px;
  min-width: 380px;
  height: 100%;
  background: #fff;
  border-right: 1px solid #e8e8e8;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.sidebar-header-section {
  padding: 20px;
  border-bottom: 1px solid #e8e8e8;
}

.design-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 8px;
  color: #333;
  font-size: 13px;
  cursor: pointer;
  margin-bottom: 12px;
}

.design-back-btn:hover {
  background: #e8e8e8;
}

.design-view-title {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0;
}

/* 섹션 스타일 */
.sidebar-section {
  padding: 16px 20px;
  border-bottom: 1px solid #e8e8e8;
}

.sidebar-section h3 {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin: 0 0 12px 0;
}

/* 상품 정보 카드 */
.product-info-card {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 12px;
}

.product-info-card .product-name {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.product-info-card .product-price {
  font-size: 18px;
  font-weight: 700;
  color: #F56342;
}

/* 보상 정보 테이블 */
.reward-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  overflow: hidden;
}

.reward-table th,
.reward-table td {
  padding: 10px 12px;
  text-align: left;
  font-size: 13px;
  border-bottom: 1px solid #e8e8e8;
}

.reward-table th {
  background: #fafafa;
  font-weight: 600;
  color: #666;
}

.reward-table td {
  color: #333;
}

.reward-table .reward-amount {
  font-weight: 600;
  color: #4a90e2;
}

/* 제출 목록 */
.submission-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.submission-card:hover {
  border-color: #4a90e2;
  box-shadow: 0 2px 8px rgba(74, 144, 226, 0.15);
}

.submission-card.selected {
  border-color: #F56342;
  background: #fff9f7;
}

.submission-thumbnail {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  object-fit: cover;
  background: #f0f0f0;
}

.submission-info {
  flex: 1;
  min-width: 0;
}

.submission-designer {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 2px;
}

.submission-library-title {
  font-size: 12px;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.submission-rank-select {
  width: 60px;
  padding: 6px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
  background: #fff;
  cursor: pointer;
}

.submission-rank-select:disabled {
  background: #f5f5f5;
  color: #999;
  cursor: not-allowed;
}

/* 순위 현황 */
.ranking-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ranking-row {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  background: #f8f9fa;
  border-radius: 6px;
}

.ranking-row .rank-badge {
  width: 28px;
  font-size: 16px;
}

.ranking-row .rank-name {
  flex: 1;
  font-size: 14px;
  color: #333;
}

.ranking-row .rank-name.empty {
  color: #999;
}

/* 액션 섹션 */
.action-section {
  padding: 20px;
  margin-top: auto;
  border-top: 1px solid #e8e8e8;
}

.confirm-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #F56342, #d94a2e);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.confirm-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 99, 66, 0.3);
}

.confirm-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.confirm-btn.completed {
  background: linear-gradient(135deg, #34c759, #28a745);
}

/* 미리보기 영역 */
.design-preview-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafafa;
  padding: 20px;
}

.preview-placeholder {
  text-align: center;
  color: #999;
}

.preview-placeholder svg {
  width: 64px;
  height: 64px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.preview-placeholder p {
  font-size: 14px;
}

.preview-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* 내 라이브러리 목록 (제출용) */
.library-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.library-card:hover {
  border-color: #4a90e2;
}

.library-card.submitted {
  border-color: #34c759;
  background: #f0fff4;
}

.library-thumbnail {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  object-fit: cover;
  background: #f0f0f0;
}

.library-info {
  flex: 1;
  min-width: 0;
}

.library-title {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 2px;
}

.library-tags {
  font-size: 11px;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.submit-btn {
  padding: 8px 16px;
  background: #4a90e2;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.submit-btn:hover {
  background: #357abd;
}

.submitted-badge {
  padding: 6px 12px;
  background: #34c759;
  color: #fff;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

/* 빈 상태 */
.empty-state {
  padding: 32px 16px;
  text-align: center;
  color: #999;
}

.empty-state svg {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.empty-state p {
  font-size: 13px;
  margin: 0;
}

/* 반응형 - 태블릿 (메인 사이드바 축소형 옆에 배치) */
@media (min-width: 769px) and (max-width: 1024px) {
  .design-request-view {
    left: var(--sidebar-collapsed-width, 80px); /* 축소된 메인 사이드바 너비 */
  }

  .design-request-sidebar {
    width: 320px;
    min-width: 320px;
  }
}

/* 반응형 - 모바일 */
@media (max-width: 768px) {
  .design-request-container {
    flex-direction: column;
  }

  .design-request-sidebar {
    width: 100%;
    min-width: 100%;
    height: auto;
    max-height: 60vh;
  }

  .design-preview-area {
    min-height: 40vh;
  }
}

/* 3D 뷰어 컨테이너 */
#review-preview-3d-viewer,
#submit-preview-3d-viewer {
  width: 100%;
  height: 100%;
  min-height: 400px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

#review-preview-3d-viewer canvas,
#submit-preview-3d-viewer canvas {
  border-radius: 8px;
}

/* 라디오 버튼 선택 */
.submission-radio-select {
  width: 20px;
  height: 20px;
  accent-color: #F56342;
  cursor: pointer;
}

.submission-radio-select:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
