/* Kimi Code Web UI local patches — stable URL, survives bundle hash upgrades.
 * Loaded after the bundled stylesheet; equal-specificity rules here win. */

/* iOS: let the slash-command and @-mention menus scroll natively on touch */
.slash-scroll,
.mention-scroll {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* iOS: drop the home-indicator safe-area padding while the keyboard is open.
 * --kb-open is maintained by kimi-patch.js. .composer.composer ties the
 * bundled .composer[data-v-*] specificity; loading later wins the tie. */
@media (max-width: 640px) {
  .composer.composer {
    padding-bottom: calc(max(24px, var(--safe-bottom)) * (1 - var(--kb-open, 0)) + 12px * var(--kb-open, 0));
  }
}

/* "New folder" button + inline create row in the Add workspace dialog */
.kimi-newfolder-btn {
  margin-left: 8px;
}
.kimi-newfolder-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(128, 128, 128, 0.15);
}
.kimi-newfolder-row input {
  flex: 1;
  min-width: 120px;
  padding: 7px 10px;
  border: 1px solid rgba(128, 128, 128, 0.45);
  border-radius: 8px;
  font: inherit;
  background: transparent;
  color: inherit;
  outline: none;
}
.kimi-newfolder-row input:focus {
  border-color: #2f7bff;
}
.kimi-newfolder-row .kimi-nf-ok {
  padding: 7px 14px;
  border-radius: 8px;
  border: none;
  background: #2f7bff;
  color: #fff;
  font: inherit;
  cursor: pointer;
}
.kimi-newfolder-row .kimi-nf-ok:disabled {
  opacity: 0.5;
  cursor: default;
}
.kimi-newfolder-row .kimi-nf-cancel {
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid rgba(128, 128, 128, 0.4);
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.kimi-newfolder-row .kimi-nf-err {
  flex-basis: 100%;
  color: #d33;
  font-size: 12px;
}
.kimi-newfolder-row .kimi-nf-err:empty {
  display: none;
}
