/* ============================================================
   m_search_tab.css — 모바일 검색 알바천국식 풀스크린 모달 (공유 스킨)
   · body.m-picker-on 을 m_search_modal.js 가 부여 → 이 스킨 활성
   · 개별 페이지(m_individual_area / m_adoption_area / m_find_area …) 공통 로드
   · picker 컬럼(시도/시군구/동·역) 세부 스킨은 search_select_area/subway.php 인라인(@820px)에서 관리
   ============================================================ */

/* ★ 컨테이너/리스트 폭 100% — 폭 무관 전역. >900 으로 늘려도 검색결과 리스트가 뷰포트를 넘어
   잘리지 않도록(width.png). 이 파일은 모바일 검색페이지 전용 로드라 PC 검색페이지엔 영향 없음. */
#wrap{max-width:100%!important;width:100%!important;overflow-x:hidden!important}
.search_wrapper{width:100%!important;max-width:100%!important;box-sizing:border-box!important}
.search_container{width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important}
.mypage_searchList_listStyle, .inner_list{max-width:100%!important;box-sizing:border-box!important}
body{overflow-x:hidden!important}

/* 🔴 [2026-08-20] @media(max-width:900px) 게이트 제거 — 넓은화면 640px 캔버스(m_wide_canvas.css) 배포 후
   모바일 페이지는 뷰포트 901px+ 여도 콘텐츠 폭 640이라, 뷰포트 분기가 PC 병합행을 640 캔버스에 그려 넘쳤다.
   이 파일은 모바일 검색 페이지 전용 로드 → 모달 스킨을 폭 무관 상시 적용(PC 페이지엔 애초에 안 실림). */
  #wrap{max-width:100%!important;width:100%!important;overflow-x:hidden}
  .search_wrapper{width:100%!important;max-width:100%!important;display:block!important;margin:0!important}
  .search_container{flex:none!important;width:100%!important;max-width:100%!important;min-width:0!important;padding:0!important}
  #search_container_title{max-width:100%!important;width:100%!important;font-size:18px!important;padding:12px 14px 4px!important;margin:0!important}
  body{overflow-x:hidden}

  /* 모달 갇힘 방지: 상위 transform 제거(fixed가 viewport 기준) + collapse/overflow 해제 */
  body.m-picker-on #wrap, body.m-picker-on .search_container, body.m-picker-on .search_option, body.m-picker-on form[name="frm"]{ transform:none!important; filter:none!important; }
  body.m-picker-on .search_option{ overflow:visible!important; max-height:none!important; }

  /* 트리거 바 (모달 입구) — body 접두: PC 공유 search_tab.css 의 @901 display:none!important(0,1,0)를 특정성으로 이김 */
  body .m-search-trigger{display:flex!important;align-items:center;gap:9px;width:calc(100% - 24px);margin:12px;padding:15px 16px;
    background:var(--color-bg-light, #f5f5f5);border:1px solid var(--color-border, #ddd);border-radius:14px;
    color:var(--color-text-secondary, #393939);font-size:14.5px;text-align:left;cursor:pointer}
  .m-search-trigger i{color:var(--color-brown, #E66B65);font-size:16px}

  .m-modal-dim{display:none;position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:2147483645}
  body .m-modal-dim.show{display:block!important} /* !important+body 접두 — search_tab.css @901 none!important 를 이김 */
  body.m-modal-lock{overflow:hidden}

  /* 바텀시트: 평소 아래 숨김 → .m-open 시 위로 슬라이드 */
  body.m-picker-on .stab{
    /* 상단 여백 4vh→9vh(2026-08-19 사용자) — 딤 배경이 더 보여 '떠 있는' 시트로 읽히게 */
    display:flex!important;flex-direction:column;position:fixed!important;left:0!important;right:0!important;top:9vh!important;bottom:auto!important;
    width:100%!important;max-width:500px!important;margin:0 auto!important;height:91vh!important;max-height:91vh!important;z-index:2147483646!important;background:#fff!important;
    border-radius:18px 18px 0 0;overflow:hidden;opacity:1!important;
    transform:translateY(100%);transition:transform .32s cubic-bezier(.4,0,.2,1);visibility:hidden;
    box-shadow:0 -4px 24px rgba(0,0,0,.18)}
  body.m-picker-on .stab.m-open{transform:translateY(0)!important;visibility:visible}
  /* 닫는 중(.m-closing): .m-open 은 유지해 내부 레이아웃을 그대로 둔 채 아래로만 슬라이드 (m_search_modal.js closeM) */
  body.m-picker-on .stab.m-open.m-closing{transform:translateY(100%)!important;visibility:visible;pointer-events:none}
  body .m-modal-dim.show{opacity:1;transition:opacity .32s cubic-bezier(.4,0,.2,1)}
  body .m-modal-dim.show.m-fading{opacity:0;pointer-events:none}
  /* 시트 상단 핸들 */
  body.m-picker-on .stab.m-open .m-modal-head::before{content:"";position:absolute;top:7px;left:50%;transform:translateX(-50%);
    width:40px;height:4px;border-radius:2px;background:#ddd}

  .m-modal-head{display:none}
  body.m-picker-on .stab.m-open .m-modal-head{display:flex!important;align-items:center;justify-content:center;position:relative; /* !important — search_tab.css @901 none!important 를 이김 */
    flex-shrink:0;height:54px;border-bottom:1px solid var(--color-border, #ddd)}
  .m-modal-head .m-modal-title{font-size:17px;font-weight:700;color:#222}
  .m-modal-head .m-modal-close{position:absolute;right:8px;top:50%;transform:translateY(-50%);background:none;border:none;
    font-size:24px;color:#999;cursor:pointer;width:42px;height:42px;line-height:1}

  body.m-picker-on .stab.m-open .stab__btns{flex-shrink:0;display:flex;gap:6px;padding:10px 12px;border-bottom:1px solid #f0f0f0}
  body.m-picker-on .stab.m-open .stab__btn{flex:1 1 0;min-width:0;justify-content:center;gap:3px;padding:11px 3px;font-size:clamp(12px,3.4vw,14px);border-radius:8px;border:1px solid #e5e7eb;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  body.m-picker-on .stab.m-open .stab__btn .stab__arrow{display:none!important}  /* 좁은 폭에서 텍스트('상세조건') 잘림 방지 위해 화살표 제거 → 탭 구분은 active 테두리로 */
  body.m-picker-on .stab.m-open .stab__btn.active{border-color:var(--color-brown, #E66B65);color:var(--color-brown, #E66B65)}

  body.m-picker-on .stab.m-open .stab__panel{display:none}
  body.m-picker-on .stab.m-open .stab__panel.open{display:flex!important;flex-direction:column;flex:1 1 auto;min-height:0;
    overflow:hidden;margin:0!important;border:0!important;border-radius:0!important;padding:0!important}
  body.m-picker-on .stab.m-open .stab__panel--sp .sp{flex:1;min-height:0;display:flex}
  body.m-picker-on .stab.m-open .stab__panel--sp .sp__panel{height:auto!important;max-height:none!important;flex:1;min-height:0}
  body.m-picker-on .stab.m-open .stab__area-top{flex-shrink:0;padding:12px 14px!important;gap:8px}
  body.m-picker-on .stab.m-open .stab__area-search{max-width:none!important;flex:1}

  /* 종류/나이 등 옵션 그리드(=etcOption2Area)만 1열로. picker(#areaPicker/#subwayPicker) 컬럼은 select파일에서 관리 */
  .stab .sp__head{font-size:13px!important;padding:9px 8px!important}
  .stab .sp__list li{padding:11px 8px!important;font-size:14px!important}
  .etcOption2Area{flex-direction:column!important;flex-wrap:nowrap!important;padding:4px 6px!important}
  .etcOption2Area label{width:100%!important;padding:11px 8px!important;font-size:14px!important;box-sizing:border-box}
  /* 종류 picker: 동물선택(col1) 좁게 + 세부종류(col2) flex로 좁은 화면에 맞춤 */
  #typePicker .sp__col1{flex:0 0 118px!important;width:118px!important}
  #typePicker .sp__col2{flex:1 1 0!important;width:auto!important;min-width:0!important}
  /* 스크롤바 숨김 (동물선택 목록 + 세부종류) — 스크롤은 되지만 바 안 보임. base 선택자까지 커버 */
  #typePicker .sp__list, #typePicker .etcOption2Area, #typePicker .sp__col2, .stab__panel[data-panel="type"] .etcOption2Area, .stab__panel[data-panel="type"] .sp__list{scrollbar-width:none!important;-ms-overflow-style:none!important}
  #typePicker .sp__list::-webkit-scrollbar, #typePicker .etcOption2Area::-webkit-scrollbar, #typePicker .sp__col2::-webkit-scrollbar, .stab__panel[data-panel="type"] .etcOption2Area::-webkit-scrollbar, .stab__panel[data-panel="type"] .sp__list::-webkit-scrollbar{width:0!important;height:0!important;display:none!important}
  .stab__panel--rows{padding:18px 16px!important}
  .stab__row-label{flex:0 0 70px!important}

  /* 선택 칩바 (알바천국 샘플식): 하단 한 줄 가로 스크롤, 파랑 채움 칩 + 흰 원형 × 배지 */
  body.m-picker-on .stab.m-open .stab__chipbar.has-chips{display:block!important;flex-shrink:0;padding:11px 12px!important;
    border-top:1px solid #ececec;background:#fff}
  body.m-picker-on .stab.m-open .stab__chips{display:flex;flex-wrap:nowrap;gap:8px;overflow-x:auto;-webkit-overflow-scrolling:touch;padding-bottom:2px}
  body.m-picker-on .stab.m-open .stab__chips::-webkit-scrollbar{height:0}
  body.m-picker-on .stab.m-open .stab__chip{flex:0 0 auto;display:inline-flex;align-items:center;gap:6px;padding:0 8px 0 12px;height:36px;
    font-size:13.5px;font-weight:600;background:var(--color-secondary, #2B5F9E);color:#fff;border:none;border-radius:13px;line-height:1;white-space:nowrap} /* 구 블루 → 2차색 */
  body.m-picker-on .stab.m-open .stab__chip-x{display:inline-flex;align-items:center;justify-content:center;
    width:18px;height:18px;border-radius:50%;background:rgba(255,255,255,.95);color:var(--color-secondary, #2B5F9E);font-size:11px;font-weight:800;line-height:1;cursor:pointer;flex-shrink:0}

  /* 하단 고정 적용바: 초기화 + 노랑 적용/검색 버튼 */
  body.m-picker-on .stab.m-open .stab__footer, body.m-picker-on .stab.m-open .stab__footer.stab__footer--visible{display:flex!important;flex-direction:row;align-items:center;
    gap:8px;flex-shrink:0;position:relative!important;inset:auto!important;
    padding:10px 14px calc(10px + env(safe-area-inset-bottom,0))!important;border-top:1px solid #eee;background:#fff;box-shadow:0 -2px 10px rgba(0,0,0,.06)}
  /* 초기화 = 샘플처럼 정사각 + 아이콘 위 / '초기화' 아래 */
  body.m-picker-on .stab.m-open .stab__footer .stab__reset{position:static!important;top:auto!important;right:auto!important;flex:0 0 auto;
    width:54px!important;height:50px!important;min-width:54px!important;padding:0!important;border:1px solid #e0e2e6!important;border-radius:12px!important;background:#fff!important;
    display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:3px!important;font-size:11px!important;color:var(--color-text-quaternary, #888)!important}
  body.m-picker-on .stab.m-open .stab__footer .stab__reset i{font-size:15px!important;color:var(--color-text-quaternary, #888)!important;margin:0!important}
  body.m-picker-on .stab.m-open .stab__footer .stab__reset span{font-size:11px!important;line-height:1!important}
  body.m-picker-on .stab.m-open .stab__footer .stab__search-btn{flex:1}
  body.m-picker-on .stab.m-open .stab__footer .search_button{width:100%!important;height:50px!important;min-height:50px!important;padding:0!important;border-radius:12px!important;background:var(--color-brown, #E66B65)!important;color:#fff!important;font-size:16.5px!important;font-weight:800;display:flex!important;align-items:center!important;justify-content:center!important;line-height:1!important;box-sizing:border-box!important}

/* ══════════════════════════════════════════════════════════════════════════
   다크모드 (2026-07-31)
   이 파일은 밝은 면(#fff·#ddd·#eee·#ececec)을 !important 로 박고 있는데
   `.dark` 규칙이 하나도 없어서, 다크에서 모바일 검색 바텀시트가 통째로 흰 덩어리였다.
   위 규칙들이 전부 !important 라 여기서도 !important 로 덮는다.
   ══════════════════════════════════════════════════════════════════════════ */
/* (다크 블록도 위와 같은 이유로 @media 게이트 제거 — 2026-08-20) */
  /* 시트 본체 */
  body.dark.m-picker-on .stab{
    background:var(--color-bg-white, #232323)!important;
    box-shadow:0 -4px 24px rgba(0,0,0,.55)}
  /* 상단 핸들 */
  body.dark.m-picker-on .stab.m-open .m-modal-head::before{background:var(--color-border, #4A4A4A)}
  body.dark.m-picker-on .stab.m-open .m-modal-head{border-bottom-color:var(--color-border, #3D3D3D)}
  body.dark .m-modal-head .m-modal-title{color:var(--color-text-primary, #ECECEC)}
  body.dark .m-modal-head .m-modal-close{color:var(--color-text-quaternary, #8C8C8C)}
  /* 탭 버튼 줄 */
  body.dark.m-picker-on .stab.m-open .stab__btns{border-bottom-color:var(--color-border, #3D3D3D)}
  body.dark.m-picker-on .stab.m-open .stab__btn{
    border-color:var(--color-border, #3D3D3D);
    background:var(--color-bg-lighter, #2A2A2A);
    color:var(--color-text-primary, #ECECEC)}
  /* 하단 고정 바 */
  body.dark.m-picker-on .stab.m-open .stab__footer{
    border-top-color:var(--color-border, #3D3D3D);
    background:var(--color-bg-white, #232323)!important;
    box-shadow:0 -2px 10px rgba(0,0,0,.45)}
  body.dark.m-picker-on .stab.m-open .stab__footer .stab__reset{
    border-color:var(--color-border, #3D3D3D)!important;
    background:var(--color-bg-lighter, #2A2A2A)!important}
  /* 선택 칩 줄 구분선 */
  body.dark.m-picker-on .stab.m-open .stab__chips{border-top-color:var(--color-border, #3D3D3D)!important;
    background:var(--color-bg-white, #232323)!important}
