/* =====================================================
   components.css — tab bar · search · theme pills · tweet card
   ===================================================== */

/* ── TAB BAR ──────────────────────────────────────── */
.tabbar {
  display: flex;
  border-bottom: 1px solid var(--bd);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabbar::-webkit-scrollbar { display: none; }

.titem {
  flex: 1;
  min-width: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 50px;
  font-size: 14px;
  font-weight: 600;
  color: var(--tx2);
  cursor: pointer;
  position: relative;
  transition: color .15s, background .15s;
  white-space: nowrap;
  padding: 0 12px;
}
.titem:hover { background: rgba(231,233,234,0.05); color: var(--tx); }
.titem.on    { color: var(--tx); }
.titem.on::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 3px;
  background: var(--bl);
  border-radius: 2px 2px 0 0;
}
.tcnt {
  font-size: 11px;
  font-weight: 700;
  background: var(--bl2);
  color: var(--bl);
  padding: 1px 6px;
  border-radius: 10px;
}
.titem.on .tcnt { background: var(--bl); color: #fff; }

/* ── SEARCH BAR ───────────────────────────────────── */
.sbar {
  padding: 8px 16px;
  border-bottom: 1px solid var(--bd);
  background: var(--bg);
}
.swrap { position: relative; }
.swrap > svg {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--tx2);
  pointer-events: none;
}
.sinput {
  width: 100%;
  background: var(--bg3);
  border: 1px solid transparent;
  border-radius: 9999px;
  padding: 10px 36px 10px 42px;
  color: var(--tx);
  font-family: var(--fn);
  font-size: 15px;
  outline: none;
  transition: border-color .2s, background .2s;
}
.sinput:focus { border-color: var(--bl); background: var(--bg); }
.sinput::placeholder { color: var(--tx2); }
.xbtn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bl);
  border: none;
  color: #fff;
  cursor: pointer;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 11px;
  line-height: 20px;
  text-align: center;
  display: none;
}

/* ── THEME PILL BAR ───────────────────────────────── */
.thbar-outer {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--bd);
  min-height: 44px;
  background: var(--bg);
}
.thbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px 8px 16px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
  min-height: 44px;
}
.thbar::-webkit-scrollbar { display: none; }

.thlbl {
  font-size: 10px;
  font-weight: 700;
  color: var(--tx2);
  text-transform: uppercase;
  letter-spacing: .5px;
  flex-shrink: 0;
}
.thpill {
  flex-shrink: 0;
  padding: 4px 12px;
  border-radius: 9999px;
  background: transparent;
  border: 1px solid var(--bd);
  font-size: 13px;
  font-weight: 500;
  color: var(--tx2);
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.thpill:hover { border-color: var(--bl); color: var(--bl); background: var(--bl2) !important; }
.thpill.on    { border-color: var(--bl) !important; color: var(--bl) !important; background: rgba(29,155,240,0.28) !important; }

/* sticky clear button */
.thbar-clr-wrap {
  flex-shrink: 0;
  display: none;
  align-items: center;
  padding: 0 12px 0 4px;
  background: linear-gradient(to right, transparent, var(--bg) 28%);
}
.thbar-clr-wrap.visible { display: flex; }

.btn-clr {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 9999px;
  border: 1px solid rgba(244,33,46,.45);
  background: var(--rd2);
  color: var(--rd);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, border-color .15s;
  font-family: var(--fn);
}
.btn-clr:hover { background: rgba(244,33,46,.18); border-color: var(--rd); }
.btn-clr svg   { width: 12px; height: 12px; }

/* result count */
.ri {
  padding: 8px 16px 0;
  font-size: 13px;
  color: var(--tx2);
  min-height: 22px;
}

.tcard {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--bd);
  cursor: pointer;
  transition: background .15s;
  animation: fi .2s ease both;
}
.tcard:hover { background: var(--bg-h); }

@keyframes fi {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tavcol {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.tav {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  flex-shrink: 0;
}
.tright  { flex: 1; min-width: 0; }
.thead   { display: flex; align-items: center; gap: 4px; margin-bottom: 4px; flex-wrap: wrap; }
.tnm     { font-size: 15px; font-weight: 700; color: var(--tx); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thn     { font-size: 14px; color: var(--tx2); white-space: nowrap; }
.ttm     { font-size: 14px; color: var(--tx2); }
.spill   {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 9999px;
  white-space: nowrap;
  letter-spacing: .2px;
  flex-shrink: 0;
}
.trep {
  background: transparent;
  border: none;
  border-left: 2px solid var(--bd);
  border-radius: 0;
  padding: 6px 0 6px 10px;
  font-size: 12px;
  color: var(--tx2);
  margin-bottom: 8px;
  line-height: 1.5;
  font-style: italic;
}
.trep-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}
.trep-user {
  font-size: 11px;
  font-weight: 700;
  color: var(--bl);
}
.trep-date {
  font-size: 11px;
  color: var(--tx2);
  opacity: .7;
}
.trep-label {
  display: block;
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  color: var(--bl);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 4px;
  opacity: .8;
}
.trep-text  { color: var(--tx2); font-size: 12px; line-height: 1.5; }
.trep-full  { color: var(--tx2); font-size: 12px; line-height: 1.5; margin-top: 4px; }
.trep-toggle {
  display: inline-block;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 600;
  font-style: normal;
  color: var(--bl);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: var(--fn);
}
.trep-toggle:hover { text-decoration: underline; }
.tbody {
  font-size: 15px;
  line-height: 1.65;
  color: var(--tx);
  margin-bottom: 10px;
  word-break: break-word;
}
.ttags  { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 10px; }
.ktag   {
  font-size: 12px;
  font-weight: 500;
  padding: 2px 10px;
  border-radius: 9999px;
  border: 1px solid var(--bd);
  color: var(--bl);
  background: var(--bl2);
}
.ktag.hl { background: rgba(29,155,240,.25); border-color: var(--bl); }

.tact   { display: flex; align-items: center; gap: 4px; }
.talink {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--tx2);
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 9999px;
  transition: all .15s;
  text-decoration: none;
}
.talink:hover { color: var(--bl); background: var(--bl2); }
.talink svg   { width: 16px; height: 16px; }