/* 전체 화면 어둡게 덮는 오버레이 (의뢰 모달) */
.request_modal_overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.45);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  backdrop-filter: blur(2px);
}

/* 모달 박스 */
.request_modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(480px, 90vw);
  max-height: 90vh; /* 조금 넉넉하게 */
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 헤더 영역 */
.request_modal_header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 15px;
  font-weight: 600;
  background-color: #017cf8;
  color: white;
}

.request_modal_header span {
  font-size: 15px;
}

.request_modal_close {
  border: none;
  background: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: white;
}

.request_modal_close:hover {
  color: #e0e0e0;
}

/* 바디 영역 */
.request_modal_body {
  padding: 16px 18px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  overflow-y: auto;
  max-height: calc(90vh - 120px);  
}

.request_modal_body label {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 4px;
  color: #555;
}

.request_modal_body input[type="text"],
.request_modal_body input[type="email"],
.request_modal_body textarea {
  width: 100%;
  box-sizing: border-box;
  border-radius: 6px;
  border: 1px solid #ddd;
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
}

.request_modal_body input[type="text"]:focus,
.request_modal_body input[type="email"]:focus,
.request_modal_body textarea:focus {
  outline: none;
  border-color: #017cf8;
  box-shadow: 0 0 0 1px rgba(1, 124, 248, 0.12);
}

.request_modal_body textarea{
  min-height: 120px;
}

/* 푸터 영역 */
.request_modal_footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 18px 14px;
  border-top: 1px solid #f0f0f0;
}

.request_modal_cancel,
.request_modal_submit {
  min-width: 72px;
  height: 32px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 13px;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.request_modal_cancel {
  background: #f5f5f5;
  color: #555;
}

.request_modal_cancel:hover {
  background: #e8e8e8;
}

.request_modal_submit {
  background: #017cf8;
  color: #fff;
  font-weight: 500;
}

.request_modal_submit:hover {
  background: #0167cb;
}

/* 이미지 미리보기 영역 */
.req-image-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

/* 미리보기 아이템(개별 박스) */
.req-preview-item {
  position: relative;
  width: 70px;
  height: 70px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #ddd;
}

/* 미리보기 썸네일 */
.req-preview-thumb {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  object-fit: cover;
  display: block;
}

/* 미리보기 삭제 버튼(X) */
.req-preview-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  line-height: 20px;
}

/* 업로드 로딩 오버레이 */
.request_loading_overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: none;          /* JS에서 flex로 변경 */
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.request_loading_box {
  background: #fff;
  padding: 16px 24px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  text-align: center;
  font-size: 14px;
  color: #333;
}

.request_loading_spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid #eee;
  border-top-color: #333;
  margin: 0 auto 8px;
  animation: request-spin 0.7s linear infinite;
}

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

/* 모바일 대응 */
@media (max-width: 480px) {
  .request_modal {
    width: calc(100vw - 24px);
  }

  .request_modal_header,
  .request_modal_body,
  .request_modal_footer {
    padding-left: 14px;
    padding-right: 14px;
  }
}
