
/* Shieldy custom messages fields polish r20 — visual-only.
   Fixes alignment of the "В одну строку" control and delete × in message fields.
   No data model, request, save/load, modal or network behavior is changed. */

[data-custom-workspace-panel="messages"] .cm519-field-row{
  grid-template-columns:minmax(180px,.9fr) minmax(260px,1.35fr) 210px 42px!important;
  column-gap:10px!important;
  row-gap:10px!important;
  align-items:end!important;
  padding:11px!important;
}

/* Keep the two text inputs on a common control baseline. */
[data-custom-workspace-panel="messages"] .cm519-field-row>.cm510-field{
  min-width:0!important;
  align-self:end!important;
}
[data-custom-workspace-panel="messages"] .cm519-field-row>.cm510-field input{
  min-height:48px!important;
  height:48px!important;
  box-sizing:border-box!important;
}

/* "В одну строку" now has the same visual height as the inputs. */
[data-custom-workspace-panel="messages"] .cm519-field-row>.cm519-inline-toggle{
  display:flex!important;
  align-items:center!important;
  align-self:end!important;
  gap:10px!important;
  width:100%!important;
  min-width:0!important;
  height:48px!important;
  min-height:48px!important;
  margin:0!important;
  padding:7px 11px!important;
  box-sizing:border-box!important;
  border-radius:9px!important;
}
[data-custom-workspace-panel="messages"] .cm519-field-row>.cm519-inline-toggle input{
  width:18px!important;
  height:18px!important;
  min-width:18px!important;
  flex:0 0 18px!important;
  margin:0!important;
  align-self:center!important;
}
[data-custom-workspace-panel="messages"] .cm519-field-row>.cm519-inline-toggle span{
  min-width:0!important;
  align-content:center!important;
}
[data-custom-workspace-panel="messages"] .cm519-field-row>.cm519-inline-toggle strong{
  font-size:11px!important;
  line-height:1.15!important;
}
[data-custom-workspace-panel="messages"] .cm519-field-row>.cm519-inline-toggle small{
  margin-top:2px!important;
  font-size:9px!important;
  line-height:1.15!important;
}

/* Field delete is a real compact danger control instead of a floating glyph. */
[data-custom-workspace-panel="messages"] .cm519-field-row>[data-cm-field-remove].cm510-icon-button{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  align-self:end!important;
  justify-self:end!important;
  width:42px!important;
  min-width:42px!important;
  height:48px!important;
  min-height:48px!important;
  margin:0!important;
  padding:0!important;
  border:1px solid rgba(207,34,46,.40)!important;
  border-radius:9px!important;
  background:rgba(207,34,46,.055)!important;
  color:#cf222e!important;
  font-size:20px!important;
  font-weight:700!important;
  line-height:1!important;
  box-sizing:border-box!important;
}
[data-custom-workspace-panel="messages"] .cm519-field-row>[data-cm-field-remove].cm510-icon-button:hover,
[data-custom-workspace-panel="messages"] .cm519-field-row>[data-cm-field-remove].cm510-icon-button:focus-visible{
  border-color:#cf222e!important;
  background:#cf222e!important;
  color:#fff!important;
  outline:none!important;
  box-shadow:0 0 0 3px rgba(207,34,46,.12)!important;
}

html[data-theme="dark"] [data-custom-workspace-panel="messages"] .cm519-field-row>[data-cm-field-remove].cm510-icon-button{
  border-color:rgba(248,113,113,.46)!important;
  background:rgba(239,68,68,.10)!important;
  color:#fca5a5!important;
}

@media(max-width:980px){
  [data-custom-workspace-panel="messages"] .cm519-field-row{
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  }
  [data-custom-workspace-panel="messages"] .cm519-field-row>.cm519-inline-toggle{
    grid-column:1!important;
    width:min(100%,260px)!important;
  }
  [data-custom-workspace-panel="messages"] .cm519-field-row>[data-cm-field-remove].cm510-icon-button{
    grid-column:2!important;
    justify-self:end!important;
  }
}

@media(max-width:640px){
  [data-custom-workspace-panel="messages"] .cm519-field-row{
    grid-template-columns:1fr!important;
  }
  [data-custom-workspace-panel="messages"] .cm519-field-row>.cm519-inline-toggle{
    grid-column:1!important;
    width:100%!important;
  }
  [data-custom-workspace-panel="messages"] .cm519-field-row>[data-cm-field-remove].cm510-icon-button{
    grid-column:1!important;
    justify-self:end!important;
    height:42px!important;
    min-height:42px!important;
  }
}
