/* 검색 모달 스타일 */
.search_modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.search_modal_content {
  background-color: #fff;
  margin: 5% auto;
  padding: 0;
  border-radius: 10px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.search_modal_header {
  background: #4a90e2;
  color: white;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.search_modal_header h2 {
  margin: 0;
  font-size: 18px;
}

.close_btn {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search_modal_body {
  padding: 20px;
  max-height: 60vh;
  overflow-y: auto;
}

.search_row {
  margin-bottom: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 5px;
  display: flex;
  align-items: flex-start;
}

.search_title {
  font-weight: bold;
  color: #333;
  min-width: 80px;
  margin-right: 15px;
  padding-top: 5px;
}

.search_content {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* 체크박스 스타일 */
.checkbox_label {
  display: flex;
  align-items: center;
  cursor: pointer;
  margin-right: 15px;
  font-size: 14px;
}

.checkbox_label input[type="checkbox"] {
  display: none;
}

.checkmark {
  width: 18px;
  height: 18px;
  border: 2px solid #ddd;
  border-radius: 3px;
  margin-right: 8px;
  position: relative;
  background: white;
  transition: all 0.3s;
}

.checkbox_label input[type="checkbox"]:checked + .checkmark {
  background: #4a90e2;
  border-color: #4a90e2;
}

.checkbox_label input[type="checkbox"]:checked + .checkmark::after {
  content: "✓";
  position: absolute;
  color: white;
  font-size: 12px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* 라디오 버튼 스타일 */
.radio_label {
  display: flex;
  align-items: center;
  cursor: pointer;
  margin-right: 15px;
  font-size: 14px;
}

.radio_label input[type="radio"] {
  display: none;
}

.radio_mark {
  width: 18px;
  height: 18px;
  border: 2px solid #ddd;
  border-radius: 50%;
  margin-right: 8px;
  position: relative;
  background: white;
  transition: all 0.3s;
}

.radio_label input[type="radio"]:checked + .radio_mark {
  border-color: #4a90e2;
}

.radio_label input[type="radio"]:checked + .radio_mark::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  background: #4a90e2;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* 레인지 슬라이더 */
.range_slider_wrap {
  width: 100%;
}

.range_slider {
  position: relative;
  height: 6px;
  background: #ddd;
  border-radius: 3px;
  margin: 10px 0;
}

.range_slider input[type="range"] {
  position: absolute;
  width: 100%;
  height: 6px;
  background: none;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.range_slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: #4a90e2;
  border-radius: 50%;
  cursor: pointer;
}

.range_slider input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #4a90e2;
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.range_values {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #666;
  margin-top: 5px;
}

/* 지역 선택 */
.region_select_wrap {
  display: flex;
  gap: 10px;
  width: 100%;
}

.region_select_wrap select {
  flex: 1;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

/* 교습비용 */
.cost_input_wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.cost_input_wrap select {
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  min-width: 60px;
}

/* 과목 선택 버튼 */
.subject_select_btn {
  background: #4a90e2;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.subject_select_btn:hover {
  background: #357abd;
}

/* 선택된 과목 표시 */
.selected_subjects_display {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.selected_subject_tag {
  background: #4a90e2;
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.remove_subject {
  cursor: pointer;
  font-weight: bold;
}

/* 모달 푸터 */
.search_modal_footer {
  padding: 15px 20px;
  background: #f8f9fa;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.search_btn,
.reset_btn {
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
}

.search_btn {
  background: #4a90e2;
  color: white;
}

.search_btn:hover {
  background: #357abd;
}

.reset_btn {
  background: #6c757d;
  color: white;
}

.reset_btn:hover {
  background: #5a6268;
}

/* 과목 선택 모달 */
.subject_modal {
  display: none;
  position: fixed;
  z-index: 10001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.subject_modal_content {
  background-color: #fff;
  margin: 3% auto;
  padding: 0;
  border-radius: 10px;
  width: 90%;
  max-width: 700px;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.subject_modal_header {
  background: #4a90e2;
  color: white;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.subject_modal_header h2 {
  margin: 0;
  font-size: 18px;
}

.subject_modal_body {
  padding: 20px;
  max-height: 60vh;
  overflow-y: auto;
}

.tab_menu {
  display: flex;
  border-bottom: 1px solid #ddd;
  margin-bottom: 20px;
}

.tab_btn {
  background: none;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  font-size: 14px;
}

.tab_btn.active {
  border-bottom-color: #4a90e2;
  color: #4a90e2;
  font-weight: bold;
}

.tab_content {
  display: none;
}

.tab_content.active {
  display: block;
}

.subject_list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.subject_list label {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  transition: all 0.3s;
}

.subject_list label:hover {
  background: #f8f9fa;
}

.subject_checkbox {
  margin-right: 8px;
}

.selected_items {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 20px;
}

.selected_items p {
  margin: 0 0 10px 0;
  font-weight: bold;
  color: #333;
}

#selected_subjects_list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.subject_modal_footer {
  padding: 15px 20px;
  background: #f8f9fa;
  text-align: center;
}

.apply_btn {
  background: #4a90e2;
  color: white;
  border: none;
  padding: 10px 30px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
}

.apply_btn:hover {
  background: #357abd;
}

/* 배지 스타일 */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  margin-right: 5px;
  color: #fff;
}
.badge.basic {
  background-color: #6c757d;
}
.badge.verified {
  background-color: #28a745;
}
.badge.certified {
  background-color: #007bff;
}

/* 인증 배지 스타일 */
.verify_badge .certified {
  color: #007bff; /* 파란색 */
}
.verify_badge .unverified {
  color: #95a5a6;
}
.education_badge .education-verified {
  color: #1e8449; /* 진한 녹색 */
}
.education_badge .education-unverified {
  color: #95a5a6;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
  .search_modal_content,
  .subject_modal_content {
    width: 95%;
    margin: 2% auto;
  }

  .search_modal_body,
  .subject_modal_body {
    max-height: 70vh;
  }

  .search_row {
    flex-direction: column;
    align-items: stretch;
  }

  .search_title {
    margin-bottom: 10px;
    min-width: auto;
  }

  .region_select_wrap {
    flex-direction: column;
  }

  .cost_input_wrap {
    flex-direction: column;
    align-items: stretch;
  }

  .subject_list {
    grid-template-columns: 1fr;
  }
}
