
/* Civora V14 — campos de búsqueda y asistente de redacción */
.smart-search-shell{
  position:relative;
  width:100%;
}
.smart-search-shell>.input,
.smart-search-shell>.textarea{
  width:100%;
  padding-right:46px;
}
.smart-search-shell.is-textarea>.textarea{padding-right:46px}
.smart-search-trigger{
  position:absolute;
  top:50%;
  right:8px;
  width:34px;
  height:34px;
  transform:translateY(-50%);
  border:0;
  border-radius:10px;
  background:#f0f1f5;
  color:#30343d;
  display:grid;
  place-items:center;
  font-size:1.2rem;
  cursor:pointer;
  z-index:2;
  transition:transform .16s ease,background .16s ease;
}
.smart-search-shell.is-textarea .smart-search-trigger{
  top:10px;
  transform:none;
}
.smart-search-trigger:hover,
.smart-search-trigger:focus-visible{background:#e3e5eb;outline:2px solid #635bff;outline-offset:2px}
.smart-search-trigger:active{transform:translateY(-50%) scale(.94)}
.smart-search-shell.is-textarea .smart-search-trigger:active{transform:scale(.94)}
.smart-suggest-panel{
  position:absolute;
  top:calc(100% + 8px);
  left:0;
  right:0;
  z-index:80;
  background:#fff;
  border:1px solid #dfe2e8;
  border-radius:16px;
  box-shadow:0 18px 50px rgba(21,24,31,.16);
  overflow:hidden;
}
.smart-suggest-head{
  display:flex;
  gap:12px;
  justify-content:space-between;
  align-items:flex-start;
  padding:13px 14px 10px;
  border-bottom:1px solid #edf0f4;
  background:#fafbfc;
}
.smart-suggest-head strong{display:block;font-size:.83rem;color:#252932}
.smart-suggest-head span{display:block;margin-top:2px;font-size:.72rem;color:#747b88;line-height:1.35}
.smart-suggest-head button{
  flex:0 0 30px;width:30px;height:30px;border:0;border-radius:9px;background:#eceff3;color:#4a505b;font-size:1.2rem;cursor:pointer
}
.smart-suggest-list{max-height:260px;overflow:auto;padding:6px}
.smart-suggest-option{
  width:100%;
  border:0;
  background:transparent;
  border-radius:11px;
  display:grid;
  grid-template-columns:28px minmax(0,1fr) 20px;
  gap:8px;
  align-items:center;
  text-align:left;
  padding:10px 9px;
  cursor:pointer;
  color:#2d3139;
}
.smart-suggest-option:hover,
.smart-suggest-option.keyboard-active{background:#f0efff}
.smart-suggest-option>span:nth-child(2){min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.88rem}
.smart-suggest-option small{color:#9da2ad;text-align:center}
.smart-suggest-mark{
  width:28px;height:28px;border-radius:9px;background:#f1f2f6;display:grid;place-items:center;color:#635bff;font-weight:800
}
.smart-suggest-empty{padding:18px 12px;margin:0;color:#777f8c;font-size:.82rem;line-height:1.45}
.smart-suggest-backdrop{display:none}

/* Asistente de perfil */
.text-assistant{
  margin-top:10px;
  padding:13px;
  border:1px solid #e1e3ea;
  border-radius:16px;
  background:linear-gradient(135deg,#fbfaff 0%,#f7f9fc 100%);
}
.text-assistant-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.text-assistant-head strong{display:flex;align-items:center;gap:7px;font-size:.88rem;color:#252932}
.text-assistant-head small{display:block;color:#737b88;font-size:.72rem;line-height:1.35;margin-top:3px}
.text-assistant-actions{display:flex;gap:7px;flex-wrap:wrap}
.text-assistant-action,
.text-assistant-undo{
  border:1px solid #d9dce4;
  background:#fff;
  color:#353a44;
  border-radius:999px;
  min-height:36px;
  padding:7px 11px;
  font-size:.76rem;
  font-weight:700;
  cursor:pointer;
  transition:transform .16s ease,border-color .16s ease,background .16s ease;
}
.text-assistant-action:hover{border-color:#aba6ff;background:#f4f2ff}
.text-assistant-action:active,.text-assistant-undo:active{transform:scale(.97)}
.text-assistant-action.is-loading{
  pointer-events:none;
  color:#635bff;
  background:#f3f1ff;
  position:relative;
}
.text-assistant-action.is-loading::before{
  content:"";
  width:12px;height:12px;border:2px solid #c7c3ff;border-top-color:#635bff;border-radius:50%;
  display:inline-block;margin-right:6px;vertical-align:-2px;animation:civoraTextSpin .7s linear infinite
}
.text-assistant-status{margin-top:9px;min-height:18px;font-size:.74rem;line-height:1.4;color:#69717e}
.text-assistant-status.is-error{color:#a13843}
.text-assistant-status.is-ok{color:#23654e}
.text-assistant-undo{margin-left:auto;background:transparent}
@keyframes civoraTextSpin{to{transform:rotate(360deg)}}

@media(max-width:640px){
  .smart-suggest-panel{
    position:fixed;
    z-index:1499;
    border-radius:16px;
    box-shadow:0 20px 55px rgba(15,18,24,.24);
  }
  .smart-suggest-backdrop{display:none!important}
  .smart-suggest-list{max-height:calc(var(--smart-panel-height,320px) - 60px);overscroll-behavior:contain}
  .smart-suggest-head{padding:11px 12px 9px}
  .smart-suggest-head span{font-size:.68rem}
  .smart-suggest-option{min-height:46px;padding:11px 10px}
  .text-assistant{padding:12px;border-radius:15px}
  .text-assistant-head{display:block}
  .text-assistant-actions{display:grid;grid-template-columns:1fr 1fr}
  .text-assistant-action{border-radius:12px;min-height:42px;padding:9px}
  .text-assistant-undo{width:100%;margin:7px 0 0;border-radius:12px}
}
@media(prefers-reduced-motion:reduce){
  .smart-search-trigger,.text-assistant-action,.text-assistant-undo{transition:none}
  .text-assistant-action.is-loading::before{animation:none}
}
