/* 텍꾸 창 정리 (tgw-tabs.css) — 2026-11 추가
   tgw-tabs.js 가 만드는 검색칸 · 분류 탭 · 즐겨찾기 · 최근 사용의 모양입니다.
   색은 텍꾸 포인트 색(없으면 홈페이지 강조색)을 따라갑니다. */

.tgw-tabs-on {
  --tgw-tabs-point: var(--effect-point, var(--accent-color, #9F80F6));
  --tgw-tabs-line: color-mix(in srgb, currentColor 14%, transparent);
}

/* ── 위쪽: 검색칸 + 분류 탭 ── */
.tgw-tabs-top {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}
.tgw-tabs-search {
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  width: 100%;
  height: 32px;
  margin: 0;
  padding: 0 10px;
  font: inherit;
  font-size: 12.5px;
  color: inherit;
  background: color-mix(in srgb, currentColor 4%, transparent);
  border: 1px solid var(--tgw-tabs-line);
  border-radius: 8px;
  outline: none;
}
.tgw-tabs-search:focus { border-color: var(--tgw-tabs-point); }
.tgw-tabs-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.tgw-tabs-tab {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  padding: 3px 10px;
  font: inherit;
  font-size: 11.5px;
  line-height: 1.5;
  color: inherit;
  background: transparent;
  border: 1px solid var(--tgw-tabs-line);
  border-radius: 99px;
  cursor: pointer;
  opacity: .8;
}
.tgw-tabs-tab:hover { opacity: 1; border-color: var(--tgw-tabs-point); }
.tgw-tabs-tab.is-on {
  color: #fff;
  background: var(--tgw-tabs-point);
  border-color: var(--tgw-tabs-point);
  opacity: 1;
}
.tgw-tabs-searching .tgw-tabs-bar { opacity: .4; }

/* ── 즐겨찾기 · 최근 ── */
.tgw-tabs-quick {
  margin-bottom: 10px;
  padding: 8px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--tgw-tabs-point) 8%, transparent);
}
.tgw-tabs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 11px;
}
.tgw-tabs-head b { color: var(--tgw-tabs-point); font-weight: 700; }
.tgw-tabs-rechead { margin-top: 8px; }
.tgw-tabs-rechead b { color: inherit; opacity: .6; }
.tgw-tabs-edit {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  padding: 2px 8px;
  font: inherit;
  font-size: 11px;
  line-height: 1.5;
  color: var(--tgw-tabs-point);
  background: transparent;
  border: 1px solid var(--tgw-tabs-point);
  border-radius: 99px;
  cursor: pointer;
}
.tgw-tabs-editing .tgw-tabs-edit { color: #fff; background: var(--tgw-tabs-point); }
.tgw-tabs-hint {
  margin: 0 0 6px;
  font-size: 11px;
  line-height: 1.5;
  opacity: .7;
}
/* 최근: 한 줄로 두고 옆으로 밀어서 보기 */
.tgw-tabs-quick .tgw-tabs-strip {
  display: flex !important;
  flex-wrap: nowrap;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}
.tgw-tabs-quick .tgw-tabs-strip > * { flex: 0 0 calc(50% - 3px); }

/* 검색 중에는 즐겨찾기·최근 칸을 접음 */
.tgw-tabs-searching .tgw-tabs-quick { display: none; }

/* 탭에서 고르지 않은 그룹, 검색에 안 맞는 서식은 숨김 */
.tgw-tabs-on .tgw-tabs-hide,
.tgw-tabs-on .tgw-tabs-nohit { display: none !important; }

/* ── 편집 모드: 즐겨찾기에 들어간 서식에 ★ 표시 ── */
.tgw-tabs-editing [data-prefix],
.tgw-tabs-editing .tgw-item { position: relative; }
.tgw-tabs-editing .tgw-tabs-faved::after {
  content: '★';
  position: absolute;
  top: 2px;
  right: 4px;
  font-size: 11px;
  line-height: 1;
  color: #f5b301;
  pointer-events: none;
}
.tgw-tabs-editing .tgw-tabs-faved { outline: 1.5px solid #f5b301; outline-offset: -1.5px; }

/* ── 텍꾸 창 ── */
.tgw-tabs-panel .ra0-textggu__scroll { margin-top: 10px; }
.tgw-tabs-panel .ra0-textggu__scroll > section h3 { margin-top: 0; }

/* ── 에디터 메뉴: 검색칸·탭은 위에 고정, 아래만 스크롤 ── */
.tgw-tabs-menu .tgw-tabs-top {
  position: sticky;
  top: -10px;
  z-index: 2;
  margin: -10px -10px 10px;
  padding: 10px;
  background: inherit;
  border-bottom: 1px solid #eef0f4;
}
.tgw-tabs-menu .tgw-tabs-quick .tgw-item { height: 40px; min-height: 40px; }

/* ── 휴대폰: 누르기 편하게 ── */
@media (max-width: 600px) {
  .tgw-tabs-search { height: 38px; font-size: 16px; }   /* 16px 보다 작으면 아이폰이 화면을 확대해 버림 */
  .tgw-tabs-tab { padding: 5px 12px; font-size: 12.5px; }
  .tgw-tabs-edit { padding: 4px 10px; font-size: 12px; }
}
