/*
파일:  yyy__view.css
위치:  /var/www/html/y/yyy_view.css  
버전 : 2.2.3a  replace배경 더 검게
*/

body { 
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background:var(--bg); color:var(--text); 
} 
/* 
파일: 

══════════════════════════════
   툴바
══════════════════════════════ */
.toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0px 10px;
  background: var(--panel2);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;          /* ✅ 모바일 자동 줄바꿈 */
  min-height: 44px;
}
background:#641010; color: #c7c7c7;
/* 파일명 표시 */
.title {
  flex: 1;
  min-width: 120px;
  font-size: 12px;
  line-height: 1.3;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  opacity: .9;
}
.title small { opacity:.7; margin-left:6px; }

/* 구분선 */
.tb-sep { width:1px; height:22px; background:var(--border); margin:0 2px; flex-shrink:0; }
/* ── 공통 툴바 버튼 (BS 5.3 Outline 느낌) ── */
/* =========================================
   3) CSS 추가 (tb-btn 통합 / BS5.3 스타일 최소 커스텀)
   ========================================= */

/* 공통 토글/툴바 버튼 (btn + tb-btn 같이 써도 안전) */
.tb-btn{
  --tb-size: 32px;
  --tb-radius: 6px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;

  height: var(--tb-size);
  min-height: var(--tb-size);
  padding: 0 10px;

  border: 2px solid var(--border);
  border-radius: var(--tb-radius);

  background: var(--panel);
  color: var(--text);

  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;

  transition:
    background-color .15s ease,
    border-color .15s ease,
    color .15s ease,
    box-shadow .15s ease,
    opacity .15s ease;
}

.no_select{ user-select:none ;} 

/* Bootstrap .btn 와 같이 붙여도 테두리/높이 흔들림 최소화 */
.btn.tb-btn{
  padding-top: 0;
  padding-bottom: 0;
}

/* 아이콘 전용 32x32 정사각 */
.tb-btn.icon-only{
  width: var(--tb-size);
  min-width: var(--tb-size);
  padding: 0;
}

/* 아이콘/텍스트 정렬 */
.tb-btn .bi,
.tb-btn .tb-ico{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 14px;
}

.tb-btn .tb-label{
  line-height: 1;
}

/* Hover / Focus (BS5.3 outline 느낌) */
.tb-btn:hover{
  background: color-mix(in srgb, var(--panel) 88%, var(--text) 12%);
  color: var(--text);
  text-decoration: none;
}

.tb-btn:focus-visible{
  outline: none;
  box-shadow: 0 0 0 .2rem rgba(13,110,253,.25);
}

/* disabled 대응 */
.tb-btn:disabled,
.tb-btn.disabled{
  opacity: .6;
  cursor: not-allowed;
  pointer-events: none;
}

/* 색상 바리에이션 (테두리만 다르게) */
.tb-btn.green  { border-color: #198754; }
.tb-btn.blue   { border-color: #0d6efd; }
.tb-btn.orange { border-color: #fd7e14; }
.tb-btn.gray   { border-color: #6c757d; }

.tb-btn.green:hover  { background: rgba(25,135,84,.10); }
.tb-btn.blue:hover   { background: rgba(13,110,253,.10); }
.tb-btn.orange:hover { background: rgba(253,126,20,.10); }
.tb-btn.gray:hover   { background: rgba(108,117,125,.10); }

/* 활성 상태 (class=active 또는 aria-pressed=true 둘 다 지원) */
.tb-btn.active,
.tb-btn[aria-pressed="true"]{
  border-color: #0d6efd;
  color: #0d6efd;
  background: rgba(13,110,253,.12);
}

/* =========================================
   아이콘 ON/OFF 전환 (CSS로만 표시 제어)
   HTML에서 아이콘 2개 넣고 클래스만 다르게 주면 됨
   ========================================= */
.tb-btn .ico-off{ display: inline-flex; }
.tb-btn .ico-on { display: none; }

.tb-btn.active .ico-off,
.tb-btn[aria-pressed="true"] .ico-off{
  display: none;
}
.tb-btn.active .ico-on,
.tb-btn[aria-pressed="true"] .ico-on{
  display: inline-flex;
}

/* 아이콘만 있는 버튼에서 두 아이콘 겹침 방지 */
.tb-btn.icon-only .ico-off,
.tb-btn.icon-only .ico-on{
  width: 100%;
  height: 100%;
  margin: 0;
}

/* 검색패널 헤더 안 버튼도 동일 규격 사용 가능 */
#sp-header .tb-btn{
  --tb-size: 26px;       /* 패널 헤더는 조금 작게 */
  border-radius: 5px;
  font-size: 12px;
}
#sp-header .tb-btn .bi,
#sp-header .tb-btn .tb-ico{
  font-size: 13px;
}

/* ── Sticky 함수바 ── */
#cm-sticky-func {
  height: 24px; line-height: 24px; padding: 0 12px;
  background: var(--panel2); border-bottom: 1px solid var(--border);
  font-size: 12px; opacity: .9;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}

/* ── 에디터 래퍼 ── */
#editor-wrap {
  height: calc(100vh - 44px - 24px);
  transition: margin-right .2s ease;
}
.cm-brace-match {
  background: rgba(255, 60, 60, 0.45);
  border-radius: 2px;
  outline: 1px solid rgba(255,80,80,.7);
}    
.cm-fold-start { background: rgba(255, 60, 60, 0.35); outline: 1px solid rgba(255,80,80,.7); border-radius:2px; }
.cm-fold-end   { background: rgba(255, 60, 60, 0.35); outline: 1px solid rgba(255,80,80,.7); border-radius:2px; }
.cm-fold-line-hl { background: rgba(255, 60, 60, 0.18) !important; }    
    
/* ── CodeMirror 테마 ── */
html[data-bs-theme="light"] .CodeMirror,
html:not([data-bs-theme]) .CodeMirror { background:#fff !important; color:#111 !important; }

html[data-bs-theme="light"] .CodeMirror-gutters,
html:not([data-bs-theme]) .CodeMirror-gutters { background:#f7f7f7 !important; border-right:1px solid #ddd !important; }

html[data-bs-theme="light"] .CodeMirror-linenumber,
html:not([data-bs-theme]) .CodeMirror-linenumber { color:#888 !important; }

html[data-bs-theme="dark"] .CodeMirror { background:#1e1e1e !important; color:#eaeaea !important; }
html[data-bs-theme="dark"] .CodeMirror-gutters { background:#252525 !important; border-right:1px solid #333 !important; }
html[data-bs-theme="dark"] .CodeMirror-linenumber { color:#8a8a8a !important; }

.CodeMirror pre.CodeMirror-line,
.CodeMirror pre.CodeMirror-line-like { padding-left:10px !important; }
.CodeMirror-linenumber { padding-right:8px !important; }

:root { --cm-line-hl:rgba(13,110,253,.12); }
html[data-bs-theme="dark"] { --cm-line-hl:rgba(78,161,255,.18); }

.CodeMirror-linebackground.cm-selected-line { background:var(--cm-line-hl) !important; }
.CodeMirror-scroll { padding-bottom:50vh !important; }

a { text-decoration:none; }
a:hover { text-decoration:none; background:transparent; color:inherit; }

/* Split 구분선 */
#cm-divider { height:6px; cursor:row-resize; background:#555; flex:0 0 6px; }
#cm-bottom  { flex:1 1 auto; }

/* ── 모달 닫기 X ── */
.modal-header .btn-close {
  display:inline-flex !important; align-items:center; justify-content:center;
  width:28px !important; height:28px !important; padding:0 !important;
  border-radius:6px !important; border:1px solid var(--border) !important;
  background:none !important; color:var(--text) !important;
  opacity:1 !important; font-size:16px; cursor:pointer; flex-shrink:0;
}
.modal-header .btn-close::after { content:'✕'; display:block; }
.modal-header .btn-close:hover { background:var(--panel) !important; }

/* ── 목록 공통 아이템 ── */
.func-item {
  display:flex; gap:8px; align-items:center;
  padding:5px 10px; border-radius:8px; cursor:pointer; user-select:text;
}
.func-item:hover { background:var(--panel2); }
.func-ln { opacity:.65; min-width:46px; text-align:right; font-variant-numeric:tabular-nums; flex-shrink:0; }
.func-nm { flex:1; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.func-kind { opacity:.7; font-size:11px; border:1px solid var(--border); padding:1px 5px; border-radius:999px; flex-shrink:0; }
.srch-line-text { flex:1; font-family:monospace; font-size:12px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; user-select:text; }
.srch-hl { background:rgba(255,200,0,.38); border-radius:2px; padding:0 1px; }

/* ══════════════════════════════
   우측 고정 내용검색 패널
══════════════════════════════ */
#search-panel {
  position: fixed;
  right: 0; top: 0; bottom: 0;
  width: 298px;
  min-width: 180px;
  max-width: 70vw;
  background: var(--panel);
  border-left: 1px solid var(--border);
  box-shadow: -4px 0 20px rgba(0,0,0,.35);
  display: flex;
  flex-direction: column;
  z-index: 5000;
  transform: translateX(100%);
  transition: transform .2s ease;
}
#search-panel.sp-open { transform: translateX(0); }

/* 좌우 리사이즈 핸들 */
#sp-resize-handle {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
  cursor: ew-resize;
  background: transparent;
  z-index: 10;
  transition: background .15s;
}
#sp-resize-handle:hover,
#sp-resize-handle.dragging { background: #0d6efd66; }

#sp-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px 6px 14px; 
  background: var(--panel2);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}  
/* ƒ 버튼 (패널 헤더 안) */
#funcBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  padding: 0 8px;
  border: 2px solid var(--border);
  border-radius: 5px;
  background: var(--panel);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
}
#funcBtn:hover { background: var(--panel2); }

#sp-close { 
  border:1px solid var(--border); background:none; color:var(--text);
  cursor:pointer;  
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
#sp-close:hover { background:var(--panel2); }

#sp-input-wrap {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  flex: 0 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  max-height: calc(100vh - 120px);
}
#sp-input {
  width: 100%; box-sizing: border-box; font-size: 13px;
  border: 2px solid var(--border); border-radius: 6px;
  padding: 6px 10px; background: var(--panel2); color: var(--text); outline: none;
}
#sp-input:focus { border-color:#0d6efd; }
#sp-meta { font-size:11px; opacity:.6; margin-top:4px; } 

#sp-results {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 2px;
}


#sp-results.sp-wrap .srch-line-text{
  white-space: pre-wrap;
  word-break: break-word;
  overflow: visible;
  text-overflow: initial;
}

/* ── 우측 검색패널 옵션 버튼 (tb-btn 느낌 유지 + 크기만 축소) ── */
.sp-tool-btn{
  width: 26px;
  height: 26px;
  min-width: 26px;
  padding: 0 !important;
  border-radius: 5px;
  font-size: 12px;
}
.sp-tool-btn .bi{ font-size: 13px; }
.sp-btn-text{
  font-weight: 700;
  font-size: 11px;
  line-height: 1;
}

/* ── 우측 검색결과 줄바꿈 토글 전용 (좌측 편집기 wrap과 분리) ── */
#sp-results.sp-wrap .srch-line-text{
  white-space: pre-wrap;
  word-break: break-word;
  overflow: visible;
  text-overflow: initial;
}

/* ── Find / Replace 박스 ── */
#sp-replace-box{
  margin-top: 8px;
  padding-top: 8px;
  border-top: 2px dashed var(--border);
}

.sp-replace-row{
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}

#sp-replace-input{
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  background: var(--panel2);
  color: var(--text);
  outline: none;
}

#sp-replace-input:focus{
  border-color:#0d6efd;
}

html[data-bs-theme="dark"] #sp-replace-input{
  background:#111 !important;
  color:#f1f1f1 !important;
}

html[data-bs-theme="dark"] #sp-replace-input::placeholder{
  color:#8c8c8c;
}

.sp-replace-actions{
  display:flex;
  gap:6px;
  align-items:center;
  justify-content:flex-start;
  position: sticky;
  bottom: 0;
  z-index: 3;
  padding-top: 6px;
  padding-bottom: 2px;
  background: var(--panel);
}

.sp-apply-btn{
  height: 32px;
  padding: 0 10px;
  white-space: nowrap;
  font-size: 12px;
  transition:
    border-color .15s ease,
    box-shadow .15s ease,
    background-color .15s ease,
    color .15s ease;
}

.sp-apply-btn.sp-hit-ok{
  border-color: #fd7e14 !important;
  box-shadow: 0 0 0 .12rem rgba(253,126,20,.18);
}

.sp-apply-btn.sp-hit-ok:hover{
  background: rgba(253,126,20,.10);
}

#sp-replace-meta{
  margin-top: 4px;
  opacity: .65;
  font-size: 11px;
}

.sp-clear-flash{
  animation: spClearFlash .42s ease;
}

@keyframes spClearFlash{
  0%{
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(13,110,253,.00);
  }
  35%{
    transform: scale(.985);
    opacity: .75;
    box-shadow: 0 0 0 4px rgba(13,110,253,.10);
  }
  100%{
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(13,110,253,.00);
  }
}
    
/* search-panel(5000)보다 위로 */
.tooltip {
  --bs-tooltip-zindex: 6000;
  z-index: 6000 !important;
}
/* ── Toast 컨테이너 ── */
#yy-toast-wrap {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;  /* 뒤쪽 클릭 안막게 */
} 
#cm-sticky-func{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:6px 10px;
  border-bottom:1px solid var(--border);
  background:var(--panel2);
  color:var(--text);
  font-size:13px;
  min-height:28px;
}

#cm-sticky-text{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* 우측 검색결과: 라인/내용 분리 클릭 + 활성 강조 */
.sp-hit-row{
  display:flex;
  gap:8px;
  align-items:flex-start;
}

.sp-hit-row.sp-active{
  outline:2px solid rgba(255,193,7,.65);
  outline-offset:-2px;
  border-radius:6px;
}

.sp-ln-link{
  cursor:pointer; 
  -webkit-user-select:none;
  opacity:.85;
  white-space:nowrap;
}

.sp-tx-link{
  cursor:pointer;
  user-select:text;
  -webkit-user-select:text;
  flex:1;
  min-width:0;
}

.sp-hit-row.sp-wholeline-hit .srch-line-text{
  white-space: pre-wrap;
  word-break: break-word;
  overflow: visible;
  text-overflow: initial;
  display: block;
}

/* 드래그 복사 허용 강제 */
.yyCopySel{
  user-select:text !important;
  -webkit-user-select:text !important;
  pointer-events:auto !important;
}

/* ✅ 검색결과에서 라인/텍스트 클릭이 row로만 가지 않게 */
#sp-results .sp-ln-link,
#sp-results .sp-tx-link,
#sp-results .sp-tx-link *{
  pointer-events: auto !important;
  cursor: pointer;
}

.CodeMirror-scroll {
  padding-bottom: 100px;  /* 원하는 여유 공간 크기 */
}


/*멀티라인 검색 , 수정 시작*/ 
/*멀티라인 검색 , 수정 시작*/

.sp-meta-row{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

/* 바깥 박스가 스크롤 담당 */
#sp-input-wrap{
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  max-height: 50vh;
  overflow-y: auto;
  overflow-x: hidden;
}

/* 안쪽은 단순 묶음 */
.sp-textarea-wrap{
  display:flex;
  align-items:stretch;
  width:100%;
  min-width:0;
  border:1px solid var(--bs-border-color, #495057);
  border-radius:.375rem;
  overflow:visible;
  background:var(--bs-body-bg, #fff);
}

.sp-lines{
  width:44px;
  min-width:44px;
  padding:7px 6px;
  text-align:right;
  font:12px/1.45 monospace;
  white-space:pre;
  overflow:hidden;
  user-select:none;
  color:var(--bs-secondary-color, #6c757d);
  background:rgba(127,127,127,0.08);
  border-right:1px solid var(--bs-border-color, #495057);
  flex:0 0 44px;
}

#sp-input,
#sp-replace-input{
  min-height:34px;
  resize:none;
  overflow:hidden;
  white-space:pre-wrap;
  border:0;
  border-radius:0;
  flex:1 1 auto;
  box-sizing:border-box;
}

.sp-replace-row{
  align-items:flex-start !important;
}
 
/*멀티라인 검색 , 수정 끝*/
