/* KlipTok v159 · Panel lateral Herramientas (Constructor Web) */
.kbt-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 12050;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px 0 14px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(100deg, #2563eb, #7c3aed 55%, #ec4899);
  color: #fff;
  font: 700 13px/1 system-ui, sans-serif;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(37, 99, 235, 0.35);
}
.kbt-fab:hover { filter: brightness(1.06); }
.kbt-fab span { letter-spacing: 0.01em; }

.kbt-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 12040;
  width: min(380px, 100vw);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #0f1528;
  color: #e2e8f0;
  border-left: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.35);
  transform: translateX(105%);
  transition: transform 0.22s ease;
}
.kbt-panel.on { transform: translateX(0); }

.kbt-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  flex: none;
}
.kbt-head b { flex: 1; font: 800 15px/1.2 system-ui, sans-serif; }
.kbt-x {
  width: 34px; height: 34px; border: 0; border-radius: 8px;
  background: rgba(255, 255, 255, 0.06); color: #fff; cursor: pointer; font-size: 16px;
}
.kbt-x:hover { background: rgba(255, 255, 255, 0.12); }

.kbt-search { padding: 10px 14px; flex: none; }
.kbt-search input {
  width: 100%; box-sizing: border-box; height: 38px; padding: 0 12px;
  border-radius: 10px; border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.04); color: #e2e8f0; font: 500 13.5px/1 system-ui, sans-serif;
}
.kbt-search input:focus { outline: 2px solid #7c3aed; outline-offset: 1px; }

.kbt-body { flex: 1; overflow: auto; padding: 4px 10px 16px; min-height: 0; }
.kbt-empty { color: #94a3b8; padding: 20px 10px; text-align: center; font-size: 13.5px; }

.kbt-grp { margin: 8px 0 12px; }
.kbt-grp-h {
  width: 100%; display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border: 0; border-radius: 8px;
  background: transparent; color: #94a3b8; font: 700 12px/1 system-ui, sans-serif;
  text-transform: uppercase; letter-spacing: 0.04em; cursor: pointer; text-align: left;
}
.kbt-grp-h span { flex: 1; }
.kbt-grp-h small {
  background: rgba(255, 255, 255, 0.06); color: #cbd5e1;
  padding: 2px 7px; border-radius: 999px; font-size: 11px;
}
.kbt-grp.collapsed .kbt-items { display: none; }

.kbt-item {
  width: 100%; display: flex; gap: 10px; align-items: flex-start;
  padding: 10px; margin: 0 0 4px; border: 1px solid transparent; border-radius: 10px;
  background: rgba(255, 255, 255, 0.03); color: inherit; text-align: left; cursor: pointer;
  font: inherit;
}
.kbt-item:hover { border-color: rgba(124, 58, 237, 0.45); background: rgba(124, 58, 237, 0.1); }
.kbt-ic {
  width: 28px; height: 28px; border-radius: 8px; flex: none;
  display: grid; place-items: center;
  background: rgba(124, 58, 237, 0.18); font-size: 14px;
}
.kbt-meta { min-width: 0; flex: 1; }
.kbt-meta b { display: block; font: 650 13.5px/1.25 system-ui, sans-serif; color: #f1f5f9; }
.kbt-meta small {
  display: block; margin-top: 2px; color: #94a3b8; font-size: 12px; line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.kbt-foot {
  flex: none; margin: 0; padding: 10px 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  color: #64748b; font-size: 11.5px;
}

/* En pantallas estrechas el panel ocupa más */
@media (max-width: 720px) {
  .kbt-panel { width: 100vw; }
  .kbt-fab span { display: none; }
  .kbt-fab { width: 48px; padding: 0; justify-content: center; border-radius: 50%; }
}
