/* ============================================================
   muktimoon - search skin (basic)
   Target: #fsearch / #sch_res_detail / #sch_result markup
   ============================================================ */

:root{
  --sch-radius: 14px;
  --sch-border: rgba(0,0,0,.10);
  --sch-border-strong: rgba(0,0,0,.16);
  --sch-bg: #fff;
  --sch-soft: rgba(0,0,0,.03);
  --sch-soft2: rgba(0,0,0,.06);
  --sch-text: rgba(0,0,0,.88);
  --sch-muted: rgba(0,0,0,.60);
  --sch-muted2: rgba(0,0,0,.48);
  --sch-focus: rgba(0,0,0,.22);
}

/* --- Form wrapper ----------------------------------------- */
#fsearch{
  margin: 0 0 18px;
}

#sch_res_detail{
  border: 1px solid var(--sch-border);
  border-radius: var(--sch-radius);
  background: var(--sch-bg);
  padding: 14px;
}

#sch_res_detail legend{
  font-weight: 800;
  padding: 0 6px;
}

/* 상단 컨트롤 1줄 정렬 */
#sch_res_detail > select,
#sch_res_detail .sch_wr{
  vertical-align: middle;
}

#sch_res_detail{
  display: grid;
  grid-template-columns: 220px 180px 1fr;
  grid-auto-rows: auto;
  gap: 10px;
  align-items: center;
}

/* select */
#sch_res_detail select{
  height: 44px;
  border: 1px solid var(--sch-border);
  border-radius: 12px;
  background: #fff;
  padding: 0 12px;
  outline: none;
}

#sch_res_detail select:focus{
  border-color: var(--sch-border-strong);
  box-shadow: 0 0 0 3px var(--sch-focus);
}

/* input + button row */
#sch_res_detail .sch_wr{
  display: flex;
  gap: 10px;
  align-items: center;
}

#sch_res_detail .frm_input{
  flex: 1 1 auto;
  height: 44px;
  border: 1px solid var(--sch-border);
  border-radius: 12px;
  padding: 0 12px;
  outline: none;
  background: #fff;
}

#sch_res_detail .frm_input:focus{
  border-color: var(--sch-border-strong);
  box-shadow: 0 0 0 3px var(--sch-focus);
}

#sch_res_detail .btn_submit{
  height: 44px;
  border: 1px solid var(--sch-border);
  border-radius: 12px;
  padding: 0 16px;
  font-weight: 800;
  cursor: pointer;
  background: #fff;
  white-space: nowrap;
}

#sch_res_detail .btn_submit:hover{
  background: var(--sch-soft2);
}

#sch_res_detail .btn_submit:focus{
  outline: none;
  box-shadow: 0 0 0 3px var(--sch-focus);
}

/* AND/OR toggle: 다음 줄로 고정 */
#sch_res_detail .switch_field{
  grid-column: 1 / -1;
  display: inline-flex;
  width: fit-content;
  border: 1px solid var(--sch-border);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}

.switch_field input[type="radio"]{
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch_field label{
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  font-weight: 900;
  color: var(--sch-muted);
  cursor: pointer;
  border-right: 1px solid var(--sch-border);
}

.switch_field label:last-of-type{
  border-right: 0;
}

.switch_field input[type="radio"]:checked + label{
  background: var(--sch-soft2);
  color: var(--sch-text);
}

.switch_field input[type="radio"]:focus + label{
  box-shadow: inset 0 0 0 2px var(--sch-border-strong);
}

/* --- Overview --------------------------------------------- */
#sch_res_ov{
  border: 1px solid var(--sch-border);
  border-radius: var(--sch-radius);
  background: var(--sch-bg);
  padding: 14px;
  margin: 0 0 14px;
}

#sch_res_ov h1, #sch_res_ov h2{
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
  color: var(--sch-text);
}

#sch_res_ov ul{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--sch-muted);
  font-size: 13px;
}

/* --- Board tabs ------------------------------------------- */
#sch_res_board{
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#sch_res_board a{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--sch-border);
  border-radius: 999px;
  background: #fff;
  color: var(--sch-text);
  font-size: 13px;
  text-decoration: none;
}

#sch_res_board a:hover{
  background: var(--sch-soft2);
}

#sch_res_board a.sch_on{
  border-color: var(--sch-border-strong);
  background: var(--sch-soft2);
  font-weight: 900;
}

#sch_res_board .cnt_cmt{
  display: inline-flex;
  min-width: 26px;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--sch-soft2);
  color: var(--sch-muted);
  font-weight: 900;
}

/* --- Result cards ----------------------------------------- */
.sch_res_list{
  display: grid;
  gap: 18px;
}

.search_board_result{
  position: relative;
  border: 1px solid var(--sch-border);
  border-radius: var(--sch-radius);
  background: var(--sch-bg);
  padding: 14px;
}

.search_board_result > h2{
  margin: 0;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.35;
}

.search_board_result .sch_more{
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 13px;
  color: var(--sch-muted);
  text-decoration: none;
}

.search_board_result .sch_more:hover{
  text-decoration: underline;
}

.search_board_result ul{
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 12px;
}

.search_board_result li{
  padding-top: 12px;
  border-top: 1px solid var(--sch-border);
}

.search_board_result li:first-child{
  padding-top: 0;
  border-top: 0;
}

.sch_tit{
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.sch_res_title{
  flex: 1 1 auto;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.45;
  color: var(--sch-text);
  word-break: break-word;
  text-decoration: none;
}

.sch_res_title:hover{
  text-decoration: underline;
}

.pop_a{
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid var(--sch-border);
  background: #fff;
  color: var(--sch-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.pop_a:hover{
  background: var(--sch-soft2);
}

.pop_a:focus{
  outline: none;
  box-shadow: 0 0 0 3px var(--sch-focus);
}

/* snippet: 3줄 클램프(레이아웃 안정) */
.search_board_result p{
  margin: 8px 0 0;
  color: rgba(0,0,0,.76);
  font-size: 13px;
  line-height: 1.55;
  word-break: break-word;

  display: -webkit-box;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* meta row */
.sch_info{
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: var(--sch-muted);
  font-size: 12px;
}

.sch_datetime{
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--sch-muted2);
}

/* --- Paging (gnuboard) ------------------------------------ */
.pg_wrap{
  margin: 18px 0 0;
}

.pg{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  align-items: center;
}

.pg a,
.pg strong{
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--sch-border);
  border-radius: 12px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  text-decoration: none;
}

.pg a:hover{
  background: var(--sch-soft2);
}

.pg .pg_current,
.pg strong{
  background: var(--sch-soft2);
  border-color: var(--sch-border-strong);
  font-weight: 900;
}

/* --- Mobile ----------------------------------------------- */
@media (max-width: 900px){
  #sch_res_detail{
    grid-template-columns: 1fr 1fr;
  }
  #sch_res_detail .sch_wr{
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px){
  #sch_res_detail{
    grid-template-columns: 1fr;
  }
  #sch_res_detail .btn_submit{
    width: 100%;
  }
  .search_board_result .sch_more{
    position: static;
    display: inline-block;
    margin-top: 8px;
  }
}
