/* 수술후기 페이지 스타일 */
.review-section {
  max-width: 1920px;
  margin: 200px auto 100px;
  padding: 0 40px;
}

.review-title {
  margin-bottom: 30px;
  border-bottom: 2px solid #e0e0e0;
}

.review-title > span {
  font-size: 28px;
  font-weight: bold;
  color: #1d1d1f;
}

/* 카테고리 필터 */
.category-filter {
  display: flex;
  gap: 12px;
  margin: 50px 0 30px;
  flex-wrap: wrap;
  align-items: center;
}

/* 수술후기 작성 버튼 - 우측 정렬 */
.category-filter .review-write-btn {
  margin-left: auto;
  font-size: 14px;
  padding: 10px 20px;
  order: 999;
}

.filter-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  gap: 8px;
  padding: 10px;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  background: #f8f9fa;
  color: #666;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.filter-btn:hover {
  background: #e9ecef;
  border-color: #ced4da;
}

.filter-btn.active {
  background: #8C79B3;
  border-color: #8C79B3;
  color: white;
}

.filter-btn .check-icon {
  font-size: 12px;
  font-weight: bold;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.filter-btn.active .check-icon {
  opacity: 1;
}

.view-all-link {
  color: #007bff;
  text-decoration: none;
  font-size: 14px;
}

.view-all-link:hover {
  text-decoration: underline;
}

.review-register button {
  background: var(--point-color);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}

.review-register button:hover {
  background: var(--point-color-hover);
}

/* 수술후기 그리드 */
.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.review-card {
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.review-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.review-card-title {
  padding: 15px 15px 10px;
  margin: 0;
  font-size: 16px;
  font-weight: bold;
  color: #1d1d1f;
  background-color: #f8f9fa;

  max-width: 357px;
  white-space: nowrap;      /* 한 줄로 유지 */
  overflow: hidden;         /* 넘치는 부분 숨김 */
  text-overflow: ellipsis;  /* 말줄임표 표시 */
}

.review-card-image-container {
  cursor: pointer;
  position: relative;
  height: 200px;
  overflow: hidden;
}

.review-card-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s;
}

.review-card-image-container:hover .review-card-image {
  transform: scale(1.05);
}

/* 비로그인 사용자 블러 오버레이 */
.review-card-blur-wrap.blur-overlay-container {
  position: relative;
  overflow: hidden;
  background: rgba(26, 26, 26, 0.8);
  height: 100%;
}

.review-card-blur-wrap.blur-overlay-container > img:first-child {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.15;
  filter: blur(8px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.review-card-blur-wrap.blur-overlay-container .blur-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  filter: brightness(0.85) contrast(1.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.review-card-image-container:hover .blur-overlay-container > img:first-child {
  opacity: 0.08;
  filter: blur(2px);
}

.review-card-image-container:hover .blur-overlay-container .blur-overlay {
  filter: brightness(0.75) contrast(1.15);
}

.review-labels {
  padding: 15px;
  display: flex;
  gap: 10px;
}

.review-label {
  background-color: #e9ecef;
  color: #495057;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
}

.review-label.new {
  background-color: #dc3545;
  color: white;
}

.review-content {
  padding: 0 15px 15px;
  font-size: 14px;
  color: #666;
  line-height: 1.4;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-content:hover {
  color: #1d1d1f;
}

.review-actions {
  padding: 0 15px 15px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-edit,
.btn-delete {
  padding: 5px 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.btn-edit {
  border: 1px solid #28a745;
  color: #28a745;
}

.btn-edit:hover {
  background-color: #28a745;
  color: white;
}

.btn-delete {
  border: 1px solid #dc3545;
  color: #dc3545;
}

.btn-delete:hover {
  background-color: #dc3545;
  color: white;
}

/* 빈 상태 */
.review-empty {
  text-align: center;
  padding: 60px 20px;
}

.empty-content {
  max-width: 400px;
  margin: 0 auto;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.empty-content h3 {
  font-size: 24px;
  color: #1d1d1f;
  margin-bottom: 10px;
}

.empty-content p {
  color: #666;
  margin-bottom: 20px;
}

.empty-action-btn {
  border: 1px solid var(--point-color);
  color: var(--point-color);
  padding: 12px 24px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.2s;
}

.empty-action-btn:hover {
  color: white;
  background: var(--point-color);
}

/* 검색 영역 */
.review-search-area {
  max-width: 1200px;
  width: 100%;
  background: #F5F5F5;
  border-radius: 16px;
  padding: 22px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 auto;
}

.review-search-area select,
.review-search-area input {
  border: none;
  background: #fff;
  border-radius: 50px;
  padding: 10px 16px;
  font-size: 15px;
  outline: none;
  min-width: 120px;
}

.review-search-area button {
  background: var(--point-color);
  border: none;
  color: #fff;
  border-radius: 50%;
  min-width: 36px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: background 0.2s;
}

.review-search-area button:hover {
  background: var(--point-color-hover);
}

.review-search-area button img {
  width: 16px;
  height: 16px;
}

/* 모달 스타일 */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.review-detail-modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  border-radius: 10px;
  max-width: 1000px;
  width: 100%;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
}

.modal-close:hover {
  color: #1d1d1f;
}

.review-detail-header {
  padding: 30px 30px 20px;
  border-bottom: 1px solid #e0e0e0;
  flex-shrink: 0;
}

.review-detail-title {
  font-size: 24px;
  color: #1d1d1f;
  margin-bottom: 10px;
}

.review-detail-surgery {
  font-size: 16px;
  color: #007bff;
  margin-bottom: 10px;
  max-width: 940px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
  cursor: default;
}

/* 시술명 툴팁 */
.review-detail-surgery[title]:hover::after {
  content: attr(title);
  position: absolute;
  left: 0;
  top: 100%;
  margin-top: 5px;
  background: #333;
  color: #fff;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 14px;
  white-space: normal;
  max-width: 940px;
  width: max-content;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  line-height: 1.5;
}

.review-detail-info {
  display: flex;
  gap: 20px;
  color: #666;
  font-size: 14px;
}

.review-detail-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 20px;
}

.review-detail-content {
  padding: 20px 30px 30px;
  overflow-y: auto;
  flex: 1;
  line-height: 1.6;
  color: #1d1d1f;
  white-space: pre-wrap;
}

/* 등록 모달 */
.review-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.review-modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  padding: 30px;
  border-radius: 10px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.review-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e0e0e0;
}

.review-modal-header h3 {
  margin: 0;
  font-size: 20px;
  color: #1d1d1f;
}

.review-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
}

.review-modal-close:hover {
  color: #1d1d1f;
}

.review-modal-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: bold;
  color: #1d1d1f;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

.btn-cancel,
.btn-submit {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.btn-cancel {
  background-color: #6c757d;
  color: white;
}

.btn-cancel:hover {
  background-color: #5a6268;
}

.btn-submit {
  background: var(--point-color);
  color: white;
}

.btn-submit:hover {
  background: var(--point-color-hover);
}

.text-muted {
  font-size: 12px;
  color: #6c757d;
}

/* 썸네일 업로드 스타일 */
.thumbnail-upload-container {
  margin-top: 10px;
}

.thumbnail-upload-area {
  border: 2px dashed #ddd;
  border-radius: 8px;
  padding: 10px 20px;
  text-align: center;
  background: #f8f9fa;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.thumbnail-upload-area:hover {
  border-color: #667eea;
  background: #f0f2ff;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.upload-placeholder .material-symbols-outlined {
  font-size: 32px;
  color: #667eea;
  opacity: 0.7;
}

.upload-placeholder p {
  margin: 0;
  font-size: 14px;
  color: #495057;
  font-weight: 500;
}

.file-preview {
  display: flex;
  justify-content: center;
}

.file-preview img {
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 썸네일 미리보기 컨테이너 */
.thumbnail-preview-container {
  position: relative;
  display: inline-block;
}

.thumbnail-preview-container img {
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 썸네일 제거 버튼 */
.thumbnail-remove-btn {
  position: absolute;
  top: -8px;
  right: -25px;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background: #dc3545;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
}

.thumbnail-remove-btn:hover {
  background: #c82333;
  transform: scale(1.1);
}

.thumbnail-remove-btn .material-symbols-outlined {
  font-size: 14px;
}

/* 모달 폼 스타일 */
.modal-form {
  padding: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #495057;
  font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 9px 16px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.3s ease;
  background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #adb5bd;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px;
  border-top: 1px solid #e9ecef;
  background: #f8f9fa;
}

.btn-reset,
.btn-add {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-reset {
  background: #6c757d;
  color: white;
}

.btn-reset:hover {
  background: #5a6268;
}

.btn-add {
  background: #667eea;
  color: white;
}

.btn-add:hover {
  background: #5a6fd8;
}

/* Quill 에디터 스타일 */
.ql-editor {
  min-height: 150px;
  font-size: 14px;
  line-height: 1.6;
}

.ql-toolbar {
  border-top: 1px solid #ddd;
  border-left: 1px solid #ddd;
  border-right: 1px solid #ddd;
  border-radius: 6px 6px 0 0;
}

.ql-container {
  border-bottom: 1px solid #ddd;
  border-left: 1px solid #ddd;
  border-right: 1px solid #ddd;
  border-radius: 0 0 6px 6px;
}

/* 모달 스타일 */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.3s ease-out;
}

.modal-content {
  background-color: white;
  margin: 0 auto;
  border-radius: 8px;
  width: 90%;
  max-width: 800px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  top: 50%;
  transform: translateY(-53%);
}
.modal-content.large {
  max-width: 1200px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e9ecef;
  background: #f8f9fa;
  border-radius: 8px 8px 0 0;
  flex-shrink: 0;
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #495057;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #6c757d;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: #e9ecef;
  color: #495057;
}

.modal-body {
  padding: 20px;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.modal-footer {
  padding: 12px 20px;
  border-top: 1px solid #e9ecef;
  background: #f8f9fa;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-radius: 0 0 8px 8px;
  flex-shrink: 0;
}

.required {
  color: red;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  /* 상세보기 모달 — 화면 85% 고정 */
  .review-detail-modal {
    width: 95%;
    height: 85vh;
    border-radius: 10px;
  }

  .review-grid {
    grid-template-columns: 1fr;
  }

  .category-filter {
    gap: 8px;
    margin: 30px 0 20px;
  }

  .filter-btn {
    min-width: 80px;
    padding: 8px 12px;
    font-size: 13px;
  }

  .review-title {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }

  .review-title .empty-action-btn {
    margin-left: 0;
    margin-top: 10px;
  }

  .review-search-area {
    flex-direction: column;
    align-items: stretch;
    padding: 16px 8px 12px 8px;
  }

  .review-search-area select {
    min-width: 90px;
  }

  .review-search-area input {
    min-width: 100px;
  }

  .form-actions {
    flex-direction: column;
  }

  .modal-content {
    width: 95%;
    margin: 10px auto;
  }

  .form-actions {
    flex-direction: column;
  }

  .btn-reset,
  .btn-add {
    width: 100%;
  }
} 