.portal .ch-attach-button,.portal .ch-file-icon-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 40px;
  width:40px;
  height:40px;
  padding:0;
  border:0;
  border-radius:var(--x-radio-md);
  background:transparent;
  color:var(--x-texto-dim);
  cursor:pointer
}

.portal .ch-attach-button:disabled,.ch-file-icon-button:disabled{
  opacity:.45;
  cursor:default
}

.ch-file-menu button{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:40px;
  width:100%;
  padding:9px 10px;
  border:0;
  border-radius:var(--x-radio-sm);
  background:transparent;
  color:inherit;
  font:inherit;
  font-size:var(--x-fs-s);
  text-align:left;
  cursor:pointer
}.ch-preview-actions button{min-height:44px}

.portal .ch-attach-button:focus-visible,.ch-file-icon-button:focus-visible,.ch-file-main:focus-visible,.ch-file-menu button:focus-visible{
  outline:2px solid var(--x-acento);
  outline-offset:2px
}

.portal .ch-composer-tools .ch-attach-button{
  border-radius:var(--x-radio-circulo);
  width:40px;
  height:40px;
  flex-basis:40px;
  color:var(--x-texto-dim)
}

.portal .ch-preview-actions .ch-file-icon-button{
  background:transparent;
  color:var(--x-texto);
  border:0;
  padding:0;
  min-width:44px
}

.portal .ch-attach-button:hover:not(:disabled),.portal .ch-file-icon-button:hover:not(:disabled){
  background:var(--x-fondo);
  color:var(--x-texto)
}

.portal .ch-compositor{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:10px;
  padding:14px 14px 8px;
  border-radius:var(--x-radio-xl);
  background:var(--x-superficie2);
  border-color:var(--x-borde)
}

.portal .ch-compositor:focus-within{
  outline:1px solid var(--x-acento);
  outline-offset:1px
}

.portal .ch-compositor textarea{
  min-height:52px;
  padding:2px 2px 0;
  resize:none
}

.ch-composer-tools{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  width:100%
}

.portal .ch-pie .ch-composer-tools .ch-enviar.mini{
  border-radius:var(--x-radio-circulo)!important;
  width:40px;
  min-width:40px;
  height:40px;
  padding:0
}

.portal #chEnviarTexto{
  position:absolute;
  width:1px;
  height:1px;
  overflow:hidden;
  clip-path:inset(50%);
  white-space:nowrap
}

.ch-file-status{
  margin:0 0 10px;
  color:var(--x-texto-dim);
  font-size:var(--x-fs-xs);
  line-height:1.6
}.ch-file-status[data-error]{color:var(--x-error)}.ch-file-status:empty{display:none}

.ch-file-status.is-quiet{
  position:absolute;
  width:1px;
  height:1px;
  margin:-1px;
  overflow:hidden;
  clip-path:inset(50%);
  white-space:nowrap
}

.ch-file-pending{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  max-height:180px;
  overflow:auto;
  margin-bottom:10px;
  padding:2px
}.ch-file-pending:empty{display:none}

.ch-file-row,.ch-message-file{
  display:flex;
  align-items:center;
  gap:6px;
  min-width:0;
  box-sizing:border-box;
  border:1px solid var(--x-borde);
  border-radius:var(--x-radio-md);
  background:var(--x-superficie)
}

.ch-file-row{
  flex:0 1 320px;
  padding:4px 6px 4px 10px
}.ch-file-row.is-selected{border-color:var(--x-borde-fuerte)}

.ch-file-row label{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
  flex:1;
  min-height:52px;
  cursor:pointer
}

.ch-file-row input{
  width:16px;
  height:16px;
  flex-shrink:0;
  accent-color:var(--x-acento-boton)
}

.ch-file-document{
  display:flex;
  align-items:center;
  justify-content:center;
  width:32px;
  height:38px;
  flex-shrink:0;
  color:var(--x-texto-dim)
}

.ch-file-info{
  display:flex;
  flex:1;
  flex-direction:column;
  gap:3px;
  min-width:0;
  text-align:left
}

.ch-file-name{
  display:block;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:var(--x-fs-s);
  font-weight:600;
  line-height:1.5;
  color:var(--x-texto)
}

.ch-file-meta{
  font-size:var(--x-fs-2xs);
  font-weight:400;
  line-height:1.5;
  color:var(--x-texto-dim);
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis
}

.ch-message-files{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:8px;
  margin-top:12px;
  min-width:0
}.ch-message-files:empty{display:none}

.ch-message-file{
  width:min(360px,100%);
  padding:4px 6px
}

.portal .ch-file-main{
  display:flex;
  align-items:center;
  gap:10px;
  flex:1;
  min-width:0;
  min-height:56px;
  padding:4px 6px;
  border:0;
  border-radius:var(--x-radio-sm);
  background:transparent;
  color:var(--x-texto);
  font:inherit;
  cursor:pointer
}.portal .ch-file-main:hover{background:transparent}

.ch-file-main:hover .ch-file-name{
  text-decoration:underline;
  text-underline-offset:3px
}

.ch-file-menu{
  position:fixed;
  inset:auto;
  margin:0;
  padding:5px;
  width:190px;
  box-sizing:border-box;
  border:1px solid var(--x-borde);
  border-radius:var(--x-radio-md);
  background:var(--x-superficie);
  color:var(--x-texto);
  box-shadow:0 6px 20px rgb(0 0 0 / 12%)
}

.ch-file-menu:popover-open{
  display:flex;
  flex-direction:column
}.ch-file-menu button:hover{background:var(--x-fondo)}.ch-file-menu button[data-danger]{color:var(--x-error)}.ch-file-menu svg,.ch-file-icon-button svg{flex-shrink:0}

@media(pointer:coarse){.portal .ch-attach-button,.portal .ch-file-icon-button{
  width:44px;
  height:44px;
  flex-basis:44px
}.ch-file-menu button{min-height:44px}}

@media(width <=600px){.ch-file-row{flex-basis:100%}.ch-message-file{width:100%}

.portal .ch-file-main{
  gap:6px;
  padding-left:2px
}.ch-file-document{width:26px}.ch-file-name{font-size:var(--x-fs-xs)}.ch-file-meta{font-size:var(--x-fs-2xs)}.portal .ch-pie-meta #chFileNotice{font-size:var(--x-fs-2xs)}}

.ch-preview{
  box-sizing:border-box;
  width:min(1080px,calc(100% - 40px));
  height:min(84dvh,920px);
  max-height:calc(100dvh - 40px);
  margin:auto;
  padding:0;
  border:1px solid var(--x-borde);
  border-radius:var(--x-radio-xl);
  background:var(--x-superficie);
  color:var(--x-texto);
  font:14px/1.7 var(--x-fuente);
  overflow:hidden
}

.ch-preview[open]{
  display:flex;
  flex-direction:column
}.ch-preview::backdrop{background:rgb(0 0 0 / 55%)}.ch-preview [hidden]{display:none!important}

.portal .ch-preview-head{
  display:flex;
  flex:none;
  align-items:center;
  justify-content:space-between;
  position:static;
  gap:24px;
  min-height:80px;
  padding:18px 24px;
  border-bottom:1px solid var(--x-borde);
  background:var(--x-superficie)
}
.ch-preview-head>div:first-child{min-width:0}

.ch-preview-head h2{
  margin:0;
  font-size:var(--x-fs-l);
  line-height:1.5;
  overflow-wrap:anywhere;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden
}

.ch-preview-head p{
  margin:4px 0 0;
  color:var(--x-texto-dim);
  font-size:var(--x-fs-xs)
}

.ch-preview-actions{
  display:flex;
  align-items:center;
  gap:12px;
  flex-shrink:0
}

.ch-preview-status{
  padding:20px 24px;
  margin:0;
  color:var(--x-texto-dim)
}.ch-preview-status:empty{display:none}

.ch-preview-reader{
  flex:1;
  min-height:0;
  overflow:auto;
  overscroll-behavior:contain;
  padding:32px 40px
}

.portal .ch-preview-reader pre{
  max-width:76ch;
  max-height:none;
  margin:0 auto;
  padding:0;
  border:0;
  border-radius:0;
  overflow:visible;
  background:transparent;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  font:14px/1.9 var(--x-fuente);
  color:var(--x-texto)
}

.ch-preview-image{
  flex:1;
  min-height:0;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:auto;
  overscroll-behavior:contain;
  padding:24px;
  background:var(--x-fondo)
}

.ch-preview-image img{
  display:block;
  max-width:100%;
  max-height:100%;
  object-fit:contain
}
.ch-preview:focus{outline:none}

.ch-preview :focus-visible{
  outline:2px solid var(--x-acento);
  outline-offset:3px
}

@media(pointer:coarse){.portal .ch-composer-tools .ch-attach-button,.portal .ch-pie .ch-composer-tools .ch-enviar.mini{
  width:44px;
  height:44px;
  min-width:44px;
  flex-basis:44px
}}

@media(width <=600px){.ch-preview{
  width:calc(100% - 16px);
  height:92dvh;
  max-height:calc(100dvh - 16px);
  border-radius:var(--x-radio-lg)
}

.portal .ch-preview-head{
  gap:12px;
  align-items:flex-start;
  padding:16px;
  flex-wrap:wrap
}

.ch-preview-head>div:first-child{
  flex:1;
  min-width:130px
}.ch-preview-actions{gap:6px}

.ch-preview-actions .mini{
  font-size:var(--x-fs-xs);
  padding:8px 10px
}.ch-preview-reader{padding:24px 20px}.ch-preview-image{padding:12px}.portal .ch-compositor{padding:12px 12px 6px}.portal .ch-pie-meta>span:first-child{display:none}}
